Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CPlatform Class Reference

Class for the Platform object. More...

#include <Platform.h>

Inheritance diagram for CPlatform:
CComponentContainer< IPlatformService > CPlatformPosix CPlatformWin10 CPlatformWin32 CPlatformAndroid CPlatformDarwin CPlatformFreebsd CPlatformLinux CPlatformDarwinEmbedded CPlatformDarwinOSX CPlatformWebOS

Public Member Functions

 CPlatform ()=default
 C'tor.
 
virtual ~CPlatform ()=default
 D'tor.
 
virtual bool InitStageOne ()
 Called at an early stage of application startup.
 
virtual bool InitStageTwo ()
 Called at a middle stage of application startup.
 
virtual bool InitStageThree ()
 Called at a late stage of application startup.
 
virtual void DeinitStageOne ()
 Called at a late stage of application shutdown.
 
virtual void DeinitStageTwo ()
 Called at a middle stage of application shutdown.
 
virtual void DeinitStageThree ()
 Called at an early stage of application shutdown.
 
virtual bool IsConfigureAddonsAtStartupEnabled ()
 Flag whether disabled add-ons - installed via packagemanager or manually - should be offered for configuration and activation on kodi startup for this platform.
 
virtual bool SupportsUserInstalledBinaryAddons ()
 Flag whether this platform supports user installation of binary add-ons.
 
virtual void PlatformSyslog ()
 Print platform specific info to log.
 
template<class T >
std::shared_ptr< T > GetService ()
 Get a platform service instance.
 
- Public Member Functions inherited from CComponentContainer< IPlatformService >
std::shared_ptr< T > GetComponent ()
 Obtain a component.
 
std::shared_ptr< const T > GetComponent () const
 Obtain a component.
 
std::size_t size () const
 Returns number of registered components.
 

Static Public Member Functions

static CPlatformCreateInstance ()
 Creates the Platform object.
 

Additional Inherited Members

- Protected Member Functions inherited from CComponentContainer< IPlatformService >
void RegisterComponent (const std::shared_ptr< IPlatformService > &component)
 Register a new component instance.
 
void DeregisterComponent (const std::type_info &typeInfo)
 Deregister a component.
 

Detailed Description

Class for the Platform object.

Contains methods to retrieve platform specific information and methods for doing platform specific environment preparation/initialisation

Constructor & Destructor Documentation

◆ CPlatform()

CPlatform::CPlatform ( )
default

C'tor.

◆ ~CPlatform()

virtual CPlatform::~CPlatform ( )
virtualdefault

D'tor.

Member Function Documentation

◆ CreateInstance()

CPlatform * CPlatform::CreateInstance ( )
static

Creates the Platform object.

Returns
the platform object

◆ DeinitStageOne()

virtual void CPlatform::DeinitStageOne ( )
inlinevirtual

Called at a late stage of application shutdown.

This method should be used to cleanup resources allocated in InitStageOne

Reimplemented in CPlatformLinux.

◆ DeinitStageThree()

virtual void CPlatform::DeinitStageThree ( )
inlinevirtual

Called at an early stage of application shutdown.

This method should be used to cleanup resources allocated in InitStageThree

◆ DeinitStageTwo()

virtual void CPlatform::DeinitStageTwo ( )
inlinevirtual

Called at a middle stage of application shutdown.

This method should be used to cleanup resources allocated in InitStageTwo

◆ GetService()

template<class T >
std::shared_ptr< T > CPlatform::GetService ( )
inline

Get a platform service instance.

◆ InitStageOne()

virtual bool CPlatform::InitStageOne ( )
inlinevirtual

Called at an early stage of application startup.

This method can be used to do platform specific environment preparation or initialisation (like setting environment variables for example)

Reimplemented in CPlatformAndroid, CPlatformDarwin, CPlatformDarwinEmbedded, CPlatformDarwinOSX, CPlatformFreebsd, CPlatformLinux, CPlatformPosix, CPlatformWebOS, CPlatformWin10, and CPlatformWin32.

◆ InitStageThree()

virtual bool CPlatform::InitStageThree ( )
inlinevirtual

Called at a late stage of application startup.

This method can be used for starting platform specific Window/GUI related services/components. (eg , WS-Discovery Daemons)

Reimplemented in CPlatformAndroid.

◆ InitStageTwo()

virtual bool CPlatform::InitStageTwo ( )
inlinevirtual

Called at a middle stage of application startup.

This method can be used for starting platform specific services that do not depend on windowing/gui. (eg macos XBMCHelper)

Reimplemented in CPlatformDarwinEmbedded, CPlatformDarwinOSX, and CPlatformWebOS.

◆ IsConfigureAddonsAtStartupEnabled()

virtual bool CPlatform::IsConfigureAddonsAtStartupEnabled ( )
inlinevirtual

Flag whether disabled add-ons - installed via packagemanager or manually - should be offered for configuration and activation on kodi startup for this platform.

Reimplemented in CPlatformLinux.

◆ PlatformSyslog()

virtual void CPlatform::PlatformSyslog ( )
inlinevirtual

Print platform specific info to log.

Logs platform specific system info during application creation startup

Reimplemented in CPlatformAndroid, CPlatformWin10, and CPlatformWin32.

◆ SupportsUserInstalledBinaryAddons()

virtual bool CPlatform::SupportsUserInstalledBinaryAddons ( )
inlinevirtual

Flag whether this platform supports user installation of binary add-ons.

Reimplemented in CPlatformDarwinEmbedded, and CPlatformWin10.


The documentation for this class was generated from the following files: