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.
Modules | |
Definitions, structures and enumerators | |
General definition values | |
|
inline |
Addon base class constructor.
|
virtualdefault |
Destructor.
|
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 |
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:
|
inlinevirtual |
Instance created.
[in] | instanceType | The requested type of required instance, see ADDON_TYPE. |
[in] | instanceID | An individual identification key string given by Kodi. |
[in] | instance | The instance handler used by Kodi must be passed to the classes created here. See in the example. |
[in] | version | The from Kodi used version of instance. This can be used to allow compatibility to older versions of them. Further is this given to the parent instance that it can handle differences. |
[out] | addonInstance | 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] | instanceType | The requested type of required instance, see ADDON_TYPE. |
[in] | instanceID | An individual identification key string given by Kodi. |
[in] | addonInstance | The pointer to instance class created in addon. |