Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Add-on main instance class
This is the addon main class, similar to an int main()
in executable and carries out initial work and later management of it.
More...
Topics | |
Definitions, structures and enumerators | |
General definition values | |
Functions | |
kodi::addon::CAddonBase::CAddonBase () | |
Addon base class constructor. | |
virtual | kodi::addon::CAddonBase::~CAddonBase ()=default |
Destructor. | |
virtual ADDON_STATUS | kodi::addon::CAddonBase::Create () |
Main addon creation function. | |
virtual ADDON_STATUS | kodi::addon::CAddonBase::SetSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue) |
To inform addon about changed settings values. | |
virtual ADDON_STATUS | kodi::addon::CAddonBase::CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl) |
Instance created. | |
virtual void | kodi::addon::CAddonBase::DestroyInstance (const IInstanceInfo &instance, const KODI_ADDON_INSTANCE_HDL hdl) |
Instance destroy. | |
Add-on main instance class
This is the addon main class, similar to an int main()
in executable and carries out initial work and later management of it.
|
inline |
Addon base class constructor.
|
inlinevirtual |
Main addon creation function.
With this function addon can carry out necessary work which is required at later points or start necessary processes.
This function is optional and necessary work can also be carried out using CreateInstance (if it concerns any instance types).
|
inlinevirtual |
Instance created.
[in] | instance | Instance informations about |
[out] | hdl | The pointer to instance class created in addon. Needed to be able to identify them on calls. |
Here is a code example how this is used:
|
inlinevirtual |
Instance destroy.
This function is optional and intended to notify addon that the instance is terminating.
[in] | instance | Instance informations about |
[in] | hdl | The pointer to instance class created in addon. |
|
inlinevirtual |
To inform addon about changed settings values.
This becomes called for every entry defined inside his settings.xml and as last call the one where last in xml (to identify end of calls).
The following table contains values that can be set with class CSettingValue :
Name | Type | Get call |
---|---|---|
Settings value as string | std::string | GetString |
Settings value as integer | int | GetInt |
Settings value as unsigned integer | unsigned int | GetUInt |
Settings value as boolean | bool | GetBoolean |
Settings value as floating point | float | GetFloat |
Settings value as enum | enum | GetEnum |
Here is a code example how this is used:
|
virtualdefault |
Destructor.