![]() |
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
#include <Addon.h>
Public Member Functions | |
CAddon (const AddonInfoPtr &addonInfo, TYPE addonType) | |
~CAddon () override=default | |
TYPE | MainType () const override |
To get the main type of this addon. More... | |
TYPE | Type () const override |
To get the on this CAddon class processed addon type. More... | |
bool | HasType (TYPE type) const override |
To check complete addon (not only this) contains a type. More... | |
bool | HasMainType (TYPE type) const override |
To check complete addon (not only this) has a specific type defined in its first extension point including the provided subcontent e.g. video or audio. More... | |
const CAddonType * | Type (TYPE type) const |
The get for given addon type information and extension data. More... | |
std::string | ID () const override |
std::string | Name () const override |
bool | IsInUse () const override |
bool | IsBinary () const override |
AddonVersion | Version () const override |
AddonVersion | MinVersion () const override |
std::string | Summary () const override |
std::string | Description () const override |
std::string | Path () const override |
std::string | Profile () const override |
std::string | LibPath () const override |
std::string | Author () const override |
std::string | ChangeLog () const override |
std::string | Icon () const override |
ArtMap | Art () const override |
std::vector< std::string > | Screenshots () const override |
std::string | Disclaimer () const override |
AddonLifecycleState | LifecycleState () const override |
std::string | LifecycleStateDescription () const override |
CDateTime | InstallDate () const override |
CDateTime | LastUpdated () const override |
CDateTime | LastUsed () const override |
std::string | Origin () const override |
std::string | OriginName () const override |
uint64_t | PackageSize () const override |
const InfoMap & | ExtraInfo () const override |
const std::vector< DependencyInfo > & | GetDependencies () const override |
std::string | FanArt () const override |
bool | HasSettings () override |
Check whether the this addon can be configured or not. More... | |
virtual bool | HasUserSettings () |
Check whether the user has configured this addon or not. More... | |
void | SaveSettings () override |
Save any user configured settings. More... | |
void | UpdateSetting (const std::string &key, const std::string &value) override |
Update a user-configured setting with a new value. More... | |
bool | UpdateSettingBool (const std::string &key, bool value) override |
Update a user-configured setting with a new boolean value. More... | |
bool | UpdateSettingInt (const std::string &key, int value) override |
Update a user-configured setting with a new integer value. More... | |
bool | UpdateSettingNumber (const std::string &key, double value) override |
Update a user-configured setting with a new number value. More... | |
bool | UpdateSettingString (const std::string &key, const std::string &value) override |
Update a user-configured setting with a new string value. More... | |
std::string | GetSetting (const std::string &key) override |
Retrieve a particular settings value If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingBool (const std::string &key, bool &value) override |
Retrieve a particular settings value as boolean If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingInt (const std::string &key, int &value) override |
Retrieve a particular settings value as integer If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingNumber (const std::string &key, double &value) override |
Retrieve a particular settings value as number If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingString (const std::string &key, std::string &value) override |
Retrieve a particular settings value as string If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
std::shared_ptr< CAddonSettings > | GetSettings () override |
AddonVersion | GetDependencyVersion (const std::string &dependencyID) const override |
get the required version of a dependency. More... | |
bool | MeetsVersion (const AddonVersion &versionMin, const AddonVersion &version) const override |
return whether or not this addon satisfies the given version requirements More... | |
bool | ReloadSettings () override |
void | ResetSettings () override |
AddonPtr | GetRunningInstance () const override |
retrieve the running instance of an add-on if it persists while running. More... | |
void | OnPreInstall () override |
void | OnPostInstall (bool update, bool modal) override |
void | OnPreUnInstall () override |
void | OnPostUnInstall () override |
![]() | |
virtual | ~IAddon ()=default |
Protected Member Functions | |
virtual bool | SettingsInitialized () const |
Whether or not the settings have been initialized. More... | |
virtual bool | SettingsLoaded () const |
Whether or not the settings have been loaded. More... | |
bool | LoadSettings (bool bForce, bool loadUserSettings=true) |
Load the default settings and override these with any previously configured user settings. More... | |
virtual bool | LoadUserSettings () |
Load the user settings. More... | |
virtual bool | HasSettingsToSave () const |
virtual bool | SettingsFromXML (const CXBMCTinyXML &doc, bool loadDefaults=false) |
Parse settings from an XML document. More... | |
virtual bool | SettingsToXML (CXBMCTinyXML &doc) const |
Write settings into an XML document. More... | |
Protected Attributes | |
const AddonInfoPtr | m_addonInfo |
std::string | m_userSettingsPath |
|
explicit |
|
overridedefault |
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
overridevirtual |
get the required version of a dependency.
dependencyID | the addon ID of the dependency. |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
retrieve the running instance of an add-on if it persists while running.
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll, and KODI::GAME::CGameClient.
|
overridevirtual |
Retrieve a particular settings value If a previously configured user setting is available, we return it's value, else we return the default (if available)
key | the id of the setting to retrieve |
Implements ADDON::IAddon.
Retrieve a particular settings value as boolean If a previously configured user setting is available, we return it's value, else we return the default (if available)
key | the id of the setting to retrieve |
value | the current value of the setting, or the default if the setting has yet to be configured |
Implements ADDON::IAddon.
Retrieve a particular settings value as integer If a previously configured user setting is available, we return it's value, else we return the default (if available)
key | the id of the setting to retrieve |
value | the current value of the setting, or the default if the setting has yet to be configured |
Implements ADDON::IAddon.
|
overridevirtual |
Retrieve a particular settings value as number If a previously configured user setting is available, we return it's value, else we return the default (if available)
key | the id of the setting to retrieve |
value | the current value of the setting, or the default if the setting has yet to be configured |
Implements ADDON::IAddon.
|
overridevirtual |
Implements ADDON::IAddon.
|
overridevirtual |
Retrieve a particular settings value as string If a previously configured user setting is available, we return it's value, else we return the default (if available)
key | the id of the setting to retrieve |
value | the current value of the setting, or the default if the setting has yet to be configured |
Implements ADDON::IAddon.
To check complete addon (not only this) has a specific type defined in its first extension point including the provided subcontent e.g. video or audio.
[in] | type | Type identifier to be checked |
Implements ADDON::IAddon.
|
overridevirtual |
Check whether the this addon can be configured or not.
Settings Handling
Implements ADDON::IAddon.
Reimplemented in ADDON::CSkinInfo.
|
protectedvirtual |
To check complete addon (not only this) contains a type.
[in] | type | The to checked type identifier |
Implements ADDON::IAddon.
Reimplemented in ADDON::CPluginSource.
|
virtual |
Check whether the user has configured this addon or not.
Reimplemented in ADDON::CSkinInfo.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll, ADDON::CLanguageResource, ADDON::CScraper, ADDON::CSkinInfo, and ADDON::CUISoundsResource.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
overridevirtual |
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll, and KODI::GAME::CGameClient.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
Load the default settings and override these with any previously configured user settings.
bForce | force the load of settings even if they are already loaded (reload) |
loadUserSettings | whether or not to load user settings |
|
protectedvirtual |
Load the user settings.
|
inlineoverridevirtual |
To get the main type of this addon.
This is the first type defined in addon.xml and can be different to the on Type() defined type.
Implements ADDON::IAddon.
|
inlineoverridevirtual |
return whether or not this addon satisfies the given version requirements
version | the version to meet. |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll, ADDON::CFontResource, ADDON::CLanguageResource, ADDON::CSkinInfo, and ADDON::CUISoundsResource.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll, and ADDON::CSkinInfo.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
Reimplemented in ADDON::CAddonDll, and ADDON::CImageResource.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
overridevirtual |
Implements ADDON::IAddon.
|
overridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
protectedvirtual |
Parse settings from an XML document.
doc | XML document to parse for settings |
loadDefaults | if true, the default attribute is used and settings are reset prior to parsing, else the value attribute is used. |
Reimplemented in ADDON::CSkinInfo.
|
protectedvirtual |
Whether or not the settings have been initialized.
Reimplemented in ADDON::CSkinInfo.
|
protectedvirtual |
Whether or not the settings have been loaded.
Reimplemented in ADDON::CSkinInfo.
|
protectedvirtual |
Write settings into an XML document.
doc | XML document to receive the settings |
Reimplemented in ADDON::CSkinInfo.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
To get the on this CAddon class processed addon type.
Implements ADDON::IAddon.
|
inline |
The get for given addon type information and extension data.
[in] | type | The wanted type data |
Example:
|
overridevirtual |
Update a user-configured setting with a new value.
key | the id of the setting to update |
value | the value that the setting should take |
Implements ADDON::IAddon.
Update a user-configured setting with a new boolean value.
key | the id of the setting to update |
value | the value that the setting should take |
Implements ADDON::IAddon.
Update a user-configured setting with a new integer value.
key | the id of the setting to update |
value | the value that the setting should take |
Implements ADDON::IAddon.
|
overridevirtual |
Update a user-configured setting with a new number value.
key | the id of the setting to update |
value | the value that the setting should take |
Implements ADDON::IAddon.
|
overridevirtual |
Update a user-configured setting with a new string value.
key | the id of the setting to update |
value | the value that the setting should take |
Implements ADDON::IAddon.
|
inlineoverridevirtual |
Implements ADDON::IAddon.
|
protected |
|
protected |