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

#include <Addon.h>

Inheritance diagram for ADDON::CAddon:
ADDON::IAddon ADDON::CAddonDll ADDON::CContextMenuAddon ADDON::CPluginSource ADDON::CRepository ADDON::CResource ADDON::CScraper ADDON::CService ADDON::CSkinInfo ADDON::CWebinterface KODI::GAME::CController

Public Member Functions

 CAddon (const AddonInfoPtr &addonInfo, AddonType addonType)
 
 ~CAddon () override=default
 
AddonType MainType () const override
 To get the main type of this addon.
 
AddonType Type () const override
 To get the on this CAddon class processed addon type.
 
bool HasType (AddonType type) const override
 To check complete addon (not only this) contains a type.
 
bool HasMainType (AddonType 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.
 
const CAddonTypeType (AddonType type) const
 The get for given addon type information and extension data.
 
std::string ID () const override
 
std::string Name () const override
 
bool IsInUse () const override
 
bool IsBinary () const override
 
CAddonVersion Version () const override
 
CAddonVersion 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 InfoMapExtraInfo () const override
 
const std::vector< DependencyInfo > & GetDependencies () const override
 
std::string FanArt () const override
 
bool SupportsMultipleInstances () const override
 Check add-on for support from independent work instances.
 
AddonInstanceSupport InstanceUseType () const override
 Return the used instance path type of the add-on type.
 
std::vector< AddonInstanceIdGetKnownInstanceIds () const override
 Gives active, independently working instance identifiers for this add-on.
 
bool SupportsInstanceSettings () const override
 Check whether the add-on supports individual settings per add-on instance.
 
bool DeleteInstanceSettings (AddonInstanceId instance) override
 Delete selected instance settings from storage.
 
bool CanHaveAddonOrInstanceSettings () override
 Check whether this add-on can be configured by the user.
 
bool HasSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 Check whether this add-on can be configured by the user.
 
bool HasUserSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 Check whether the user has configured this add-on or not.
 
bool SaveSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 Save any user configured settings.
 
void UpdateSetting (const std::string &key, const std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new value.
 
bool UpdateSettingBool (const std::string &key, bool value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new boolean value.
 
bool UpdateSettingInt (const std::string &key, int value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new integer value.
 
bool UpdateSettingNumber (const std::string &key, double value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new number value.
 
bool UpdateSettingString (const std::string &key, const std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new string value.
 
std::string GetSetting (const std::string &key, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value.
 
bool GetSettingBool (const std::string &key, bool &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as boolean.
 
bool GetSettingInt (const std::string &key, int &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as integer.
 
bool GetSettingNumber (const std::string &key, double &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as number.
 
bool GetSettingString (const std::string &key, std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as string.
 
std::shared_ptr< CAddonSettingsGetSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 
CAddonVersion GetDependencyVersion (const std::string &dependencyID) const override
 get the required version of a dependency.
 
bool MeetsVersion (const CAddonVersion &versionMin, const CAddonVersion &version) const override
 return whether or not this addon satisfies the given version requirements
 
bool ReloadSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 
void ResetSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 
AddonPtr GetRunningInstance () const override
 retrieve the running instance of an add-on if it persists while running.
 
void OnPreInstall () override
 
void OnPostInstall (bool update, bool modal) override
 
void OnPreUnInstall () override
 
void OnPostUnInstall () override
 
- Public Member Functions inherited from ADDON::IAddon
virtual ~IAddon ()=default
 

Protected Member Functions

virtual bool SettingsInitialized (AddonInstanceId id=ADDON_SETTINGS_ID) const
 Whether or not the settings have been initialized.
 
virtual bool SettingsLoaded (AddonInstanceId id=ADDON_SETTINGS_ID) const
 Whether or not the settings have been loaded.
 
bool LoadSettings (bool bForce, bool loadUserSettings, AddonInstanceId id=ADDON_SETTINGS_ID)
 Load the default settings and override these with any previously configured user settings.
 
virtual bool LoadUserSettings (AddonInstanceId id=ADDON_SETTINGS_ID)
 Load the user settings.
 
virtual bool HasSettingsToSave (AddonInstanceId id=ADDON_SETTINGS_ID) const
 Whether there are settings to be saved.
 
virtual bool SettingsFromXML (const CXBMCTinyXML &doc, bool loadDefaults, AddonInstanceId id=ADDON_SETTINGS_ID)
 Parse settings from an XML document.
 
virtual bool SettingsToXML (CXBMCTinyXML &doc, AddonInstanceId id=ADDON_SETTINGS_ID) const
 Write settings into an XML document.
 

Protected Attributes

const AddonInfoPtr m_addonInfo
 

Constructor & Destructor Documentation

◆ CAddon()

ADDON::CAddon::CAddon ( const AddonInfoPtr & addonInfo,
AddonType addonType )
explicit

◆ ~CAddon()

ADDON::CAddon::~CAddon ( )
overridedefault

Member Function Documentation

◆ Art()

ArtMap ADDON::CAddon::Art ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ Author()

std::string ADDON::CAddon::Author ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ CanHaveAddonOrInstanceSettings()

bool ADDON::CAddon::CanHaveAddonOrInstanceSettings ( )
overridevirtual

Check whether this add-on can be configured by the user.

Returns
true if the add-on has settings, false otherwise

Implements ADDON::IAddon.

Reimplemented in KODI::GAME::CController.

◆ ChangeLog()

std::string ADDON::CAddon::ChangeLog ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ DeleteInstanceSettings()

bool ADDON::CAddon::DeleteInstanceSettings ( AddonInstanceId instance)
overridevirtual

Delete selected instance settings from storage.

The related instance-settings-[0-9...].xml file will be deleted by this method.

Parameters
[in]instanceInstance identifier to use.
Returns
true on success, false otherwise.

Implements ADDON::IAddon.

◆ Description()

std::string ADDON::CAddon::Description ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ Disclaimer()

std::string ADDON::CAddon::Disclaimer ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ ExtraInfo()

const InfoMap & ADDON::CAddon::ExtraInfo ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ FanArt()

std::string ADDON::CAddon::FanArt ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ GetDependencies()

const std::vector< DependencyInfo > & ADDON::CAddon::GetDependencies ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ GetDependencyVersion()

CAddonVersion ADDON::CAddon::GetDependencyVersion ( const std::string & dependencyID) const
overridevirtual

get the required version of a dependency.

Parameters
dependencyIDthe addon ID of the dependency.
Returns
the version this addon requires.

Implements ADDON::IAddon.

◆ GetKnownInstanceIds()

std::vector< AddonInstanceId > ADDON::CAddon::GetKnownInstanceIds ( ) const
overridevirtual

Gives active, independently working instance identifiers for this add-on.

This function is supported if add-on type has defined AddonInstanceUse::BY_SETTINGS and the associated settings are available.

Returns
List of active instance identifiers.

Settings Handling

Implements ADDON::IAddon.

◆ GetRunningInstance()

AddonPtr ADDON::CAddon::GetRunningInstance ( ) const
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.

◆ GetSetting()

std::string ADDON::CAddon::GetSetting ( const std::string & key,
AddonInstanceId id = ADDON_SETTINGS_ID )
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).

Parameters
[in]keythe id of the setting to retrieve
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
the current value of the setting, or the default if the setting has yet to be configured.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, UpdateSetting

Implements ADDON::IAddon.

◆ GetSettingBool()

bool ADDON::CAddon::GetSettingBool ( const std::string & key,
bool & value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

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).

Parameters
[in]keythe id of the setting to retrieve
[out]valuethe current value of the setting, or the default if the setting has yet to be configured
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if the setting's value was retrieved, false otherwise.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, UpdateSetting

Implements ADDON::IAddon.

◆ GetSettingInt()

bool ADDON::CAddon::GetSettingInt ( const std::string & key,
int & value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

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)

Parameters
[in]keythe id of the setting to retrieve
[out]valuethe current value of the setting, or the default if the setting has yet to be configured
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if the setting's value was retrieved, false otherwise.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, UpdateSetting

Implements ADDON::IAddon.

◆ GetSettingNumber()

bool ADDON::CAddon::GetSettingNumber ( const std::string & key,
double & value,
AddonInstanceId id = ADDON_SETTINGS_ID )
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)

Parameters
[in]keythe id of the setting to retrieve
[out]valuethe current value of the setting, or the default if the setting has yet to be configured
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if the setting's value was retrieved, false otherwise.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, UpdateSetting

Implements ADDON::IAddon.

◆ GetSettings()

std::shared_ptr< CAddonSettings > ADDON::CAddon::GetSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
overridevirtual

Implements ADDON::IAddon.

◆ GetSettingString()

bool ADDON::CAddon::GetSettingString ( const std::string & key,
std::string & value,
AddonInstanceId id = ADDON_SETTINGS_ID )
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)

Parameters
[in]keythe id of the setting to retrieve
[out]valuethe current value of the setting, or the default if the setting has yet to be configured
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if the setting's value was retrieved, false otherwise.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, UpdateSetting

Implements ADDON::IAddon.

◆ HasMainType()

bool ADDON::CAddon::HasMainType ( AddonType type) const
overridevirtual

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.

Parameters
[in]typeType identifier to be checked
Returns
true in case the wanted type is the main type, false if not

Implements ADDON::IAddon.

◆ HasSettings()

bool ADDON::CAddon::HasSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
overridevirtual

Check whether this add-on can be configured by the user.

Parameters
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if the add-on has settings, false otherwise
See also
LoadSettings, LoadUserSettings, SaveSettings, HasUserSettings, GetSetting, UpdateSetting

Implements ADDON::IAddon.

Reimplemented in ADDON::CSkinInfo.

◆ HasSettingsToSave()

bool ADDON::CAddon::HasSettingsToSave ( AddonInstanceId id = ADDON_SETTINGS_ID) const
protectedvirtual

Whether there are settings to be saved.

Parameters
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if settings has to save
See also
SaveSettings

◆ HasType()

bool ADDON::CAddon::HasType ( AddonType type) const
overridevirtual

To check complete addon (not only this) contains a type.

Note
This can be overridden by a child e.g. plugin to check for subtype e.g. video or music.
Parameters
[in]typeThe to checked type identifier
Returns
true in case the wanted type is supported, false if not

Implements ADDON::IAddon.

Reimplemented in ADDON::CPluginSource.

◆ HasUserSettings()

bool ADDON::CAddon::HasUserSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
overridevirtual

Check whether the user has configured this add-on or not.

Parameters
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if previously saved settings are found, false otherwise
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, GetSetting, UpdateSetting

Implements ADDON::IAddon.

Reimplemented in ADDON::CSkinInfo.

◆ Icon()

std::string ADDON::CAddon::Icon ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ ID()

std::string ADDON::CAddon::ID ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ InstallDate()

CDateTime ADDON::CAddon::InstallDate ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ InstanceUseType()

AddonInstanceSupport ADDON::CAddon::InstanceUseType ( ) const
overridevirtual

Return the used instance path type of the add-on type.

Returns
The route used to instance handling, AddonInstanceUse::NONE if not supported.

Implements ADDON::IAddon.

◆ IsBinary()

bool ADDON::CAddon::IsBinary ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ IsInUse()

bool ADDON::CAddon::IsInUse ( ) const
inlineoverridevirtual

◆ LastUpdated()

CDateTime ADDON::CAddon::LastUpdated ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ LastUsed()

CDateTime ADDON::CAddon::LastUsed ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ LibPath()

std::string ADDON::CAddon::LibPath ( ) const
overridevirtual

Implements ADDON::IAddon.

Reimplemented in ADDON::CAddonDll, and KODI::GAME::CGameClient.

◆ LifecycleState()

AddonLifecycleState ADDON::CAddon::LifecycleState ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ LifecycleStateDescription()

std::string ADDON::CAddon::LifecycleStateDescription ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ LoadSettings()

bool ADDON::CAddon::LoadSettings ( bool bForce,
bool loadUserSettings,
AddonInstanceId id = ADDON_SETTINGS_ID )
protected

Load the default settings and override these with any previously configured user settings.

Parameters
[in]bForceforce the load of settings even if they are already loaded (reload)
[in]loadUserSettingswhether or not to load user settings
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if settings exist, false otherwise
See also
LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting, UpdateSetting

◆ LoadUserSettings()

bool ADDON::CAddon::LoadUserSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
protectedvirtual

Load the user settings.

Parameters
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if user settings exist, false otherwise
See also
LoadSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting, UpdateSetting

◆ MainType()

AddonType ADDON::CAddon::MainType ( ) const
overridevirtual

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.

Returns
The used main type of addon

Implements ADDON::IAddon.

◆ MeetsVersion()

bool ADDON::CAddon::MeetsVersion ( const CAddonVersion & versionMin,
const CAddonVersion & version ) const
overridevirtual

return whether or not this addon satisfies the given version requirements

Parameters
versionthe version to meet.
Returns
true if min_version <= version <= current_version, false otherwise.

Implements ADDON::IAddon.

◆ MinVersion()

CAddonVersion ADDON::CAddon::MinVersion ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ Name()

std::string ADDON::CAddon::Name ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ OnPostInstall()

void ADDON::CAddon::OnPostInstall ( bool update,
bool modal )
inlineoverridevirtual

◆ OnPostUnInstall()

void ADDON::CAddon::OnPostUnInstall ( )
inlineoverridevirtual

Implements ADDON::IAddon.

Reimplemented in ADDON::CAddonDll.

◆ OnPreInstall()

void ADDON::CAddon::OnPreInstall ( )
inlineoverridevirtual

Implements ADDON::IAddon.

Reimplemented in ADDON::CAddonDll, and ADDON::CSkinInfo.

◆ OnPreUnInstall()

void ADDON::CAddon::OnPreUnInstall ( )
inlineoverridevirtual

Implements ADDON::IAddon.

Reimplemented in ADDON::CAddonDll, and ADDON::CImageResource.

◆ Origin()

std::string ADDON::CAddon::Origin ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ OriginName()

std::string ADDON::CAddon::OriginName ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ PackageSize()

uint64_t ADDON::CAddon::PackageSize ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ Path()

std::string ADDON::CAddon::Path ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ Profile()

std::string ADDON::CAddon::Profile ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ ReloadSettings()

bool ADDON::CAddon::ReloadSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
overridevirtual

Implements ADDON::IAddon.

◆ ResetSettings()

void ADDON::CAddon::ResetSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
overridevirtual

Implements ADDON::IAddon.

◆ SaveSettings()

bool ADDON::CAddon::SaveSettings ( AddonInstanceId id = ADDON_SETTINGS_ID)
overridevirtual

Save any user configured settings.

Parameters
[in]instanceInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if the operation was successful, false otherwise
See also
LoadSettings, LoadUserSettings, HasSettings, HasUserSettings, GetSetting, UpdateSetting

Implements ADDON::IAddon.

Reimplemented in ADDON::CAddonDll.

◆ Screenshots()

std::vector< std::string > ADDON::CAddon::Screenshots ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ SettingsFromXML()

bool ADDON::CAddon::SettingsFromXML ( const CXBMCTinyXML & doc,
bool loadDefaults,
AddonInstanceId id = ADDON_SETTINGS_ID )
protectedvirtual

Parse settings from an XML document.

Parameters
[in]docXML document to parse for settings
[in]loadDefaultsif true, the default attribute is used and settings are reset prior to parsing, else the value attribute is used.
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if settings are loaded, false otherwise
See also
SettingsToXML

Reimplemented in ADDON::CSkinInfo.

◆ SettingsInitialized()

bool ADDON::CAddon::SettingsInitialized ( AddonInstanceId id = ADDON_SETTINGS_ID) const
protectedvirtual

Whether or not the settings have been initialized.

Parameters
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if settings initialize was successfull

◆ SettingsLoaded()

bool ADDON::CAddon::SettingsLoaded ( AddonInstanceId id = ADDON_SETTINGS_ID) const
protectedvirtual

Whether or not the settings have been loaded.

Parameters
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if settings are loaded correct

Reimplemented in ADDON::CSkinInfo.

◆ SettingsToXML()

bool ADDON::CAddon::SettingsToXML ( CXBMCTinyXML & doc,
AddonInstanceId id = ADDON_SETTINGS_ID ) const
protectedvirtual

Write settings into an XML document.

Parameters
[out]docXML document to receive the settings
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
Returns
true if settings are saved, false otherwise
See also
SettingsFromXML

Reimplemented in ADDON::CSkinInfo.

◆ Summary()

std::string ADDON::CAddon::Summary ( ) const
overridevirtual

Implements ADDON::IAddon.

◆ SupportsInstanceSettings()

bool ADDON::CAddon::SupportsInstanceSettings ( ) const
overridevirtual

Check whether the add-on supports individual settings per add-on instance.

This function is supported if add-on type has defined AddonInstanceUse::BY_SETTINGS

Returns
true if the add-on supports individual settings per add-on instance, false otherwise

Implements ADDON::IAddon.

◆ SupportsMultipleInstances()

bool ADDON::CAddon::SupportsMultipleInstances ( ) const
overridevirtual

Check add-on for support from independent work instances.

Returns
true if the add-on supports individual add-on instances, false otherwise

Implements ADDON::IAddon.

◆ Type() [1/2]

AddonType ADDON::CAddon::Type ( ) const
inlineoverridevirtual

To get the on this CAddon class processed addon type.

Returns
For this class used addon type

Implements ADDON::IAddon.

◆ Type() [2/2]

const CAddonType * ADDON::CAddon::Type ( AddonType type) const

The get for given addon type information and extension data.

Parameters
[in]typeThe wanted type data
Returns
addon type class with CAddonExtensions as information
Note
This function return never a "nullptr", in case the wanted type is not supported, becomes a dummy of CAddonType given.

Example:

// To get e.g. <extension ... name="blablabla" /> from addon.xml
std::string name = Type(ADDON_...)->GetValue("@name").asString();
Type
Definition PackerMAT.h:16
enum const char * name
Definition addon_base.h:203

◆ UpdateSetting()

void ADDON::CAddon::UpdateSetting ( const std::string & key,
const std::string & value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

Update a user-configured setting with a new value.

Parameters
[in]keythe id of the setting to update
[in]valuethe value that the setting should take
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting

Implements ADDON::IAddon.

◆ UpdateSettingBool()

bool ADDON::CAddon::UpdateSettingBool ( const std::string & key,
bool value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

Update a user-configured setting with a new boolean value.

Parameters
[in]keythe id of the setting to update
[in]valuethe value that the setting should take
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting

Implements ADDON::IAddon.

◆ UpdateSettingInt()

bool ADDON::CAddon::UpdateSettingInt ( const std::string & key,
int value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

Update a user-configured setting with a new integer value.

Parameters
[in]keythe id of the setting to update
[in]valuethe value that the setting should take
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting

Implements ADDON::IAddon.

◆ UpdateSettingNumber()

bool ADDON::CAddon::UpdateSettingNumber ( const std::string & key,
double value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

Update a user-configured setting with a new number value.

Parameters
[in]keythe id of the setting to update
[in]valuethe value that the setting should take
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting

Implements ADDON::IAddon.

◆ UpdateSettingString()

bool ADDON::CAddon::UpdateSettingString ( const std::string & key,
const std::string & value,
AddonInstanceId id = ADDON_SETTINGS_ID )
overridevirtual

Update a user-configured setting with a new string value.

Parameters
[in]keythe id of the setting to update
[in]valuethe value that the setting should take
[in]idInstance identifier to use, use ADDON_SETTINGS_ID to denote global add-on settings from settings.xml.
See also
LoadSettings, LoadUserSettings, SaveSettings, HasSettings, HasUserSettings, GetSetting

Implements ADDON::IAddon.

◆ Version()

CAddonVersion ADDON::CAddon::Version ( ) const
overridevirtual

Implements ADDON::IAddon.

Member Data Documentation

◆ m_addonInfo

const AddonInfoPtr ADDON::CAddon::m_addonInfo
protected

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