1 /* 2 * Copyright (C) 2016-2018 Team Kodi 3 * This file is part of Kodi - https://kodi.tv 4 * 5 * SPDX-License-Identifier: GPL-2.0-or-later 6 * See LICENSES/README.md for more information. 7 */ 8 9 #pragma once 10 11 /**\brief Class for the Platform object 12 * 13 * Contains method which retrieve platform specific information 14 * and methods for doing platform specific environment preparation/initialisation 15 */ 16 class CPlatform 17 { 18 public: 19 /**\brief Creates the Platform object 20 * 21 *@return the platform object 22 */ 23 static CPlatform *CreateInstance(); 24 25 /**\brief C'tor */ 26 CPlatform(); 27 28 /**\brief D'tor */ 29 virtual ~CPlatform(); 30 31 /**\brief Called at an early stage of application startup 32 * 33 * This method can be used to do platform specific environment preparation 34 * or initialisation (like setting environment variables for example) 35 */ 36 virtual bool Init(); 37 38 /**\brief Flag whether disabled add-ons - installed via packagemanager or manually - should be 39 * offered for configuration and activation on kodi startup for this platform 40 */ IsConfigureAddonsAtStartupEnabled()41 virtual bool IsConfigureAddonsAtStartupEnabled() { return false; }; 42 }; 43