Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
ADDON::CAddonSystemSettings Class Reference

#include <AddonSystemSettings.h>

Inheritance diagram for ADDON::CAddonSystemSettings:
ISettingCallback

Public Member Functions

void OnSettingAction (std::shared_ptr< const CSetting > setting) override
 The given setting has been activated. More...
 
void OnSettingChanged (std::shared_ptr< const CSetting > setting) override
 The value of the given setting has changed. More...
 
bool GetActive (const TYPE &type, AddonPtr &addon)
 
bool SetActive (const TYPE &type, const std::string &addonID)
 
bool IsActive (const IAddon &addon)
 
bool UnsetActive (const AddonPtr &addon)
 
std::vector< std::string > MigrateAddons (std::function< void(void)> onMigrate)
 
- Public Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 
virtual bool OnSettingChanging (std::shared_ptr< const CSetting > setting)
 The value of the given setting is being changed. More...
 
virtual bool OnSettingUpdate (std::shared_ptr< CSetting > setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated. More...
 
virtual void OnSettingPropertyChanged (std::shared_ptr< const CSetting > setting, const char *propertyName)
 The given property of the given setting has changed. More...
 

Static Public Member Functions

static CAddonSystemSettingsGetInstance ()
 

Member Function Documentation

§ GetActive()

bool ADDON::CAddonSystemSettings::GetActive ( const TYPE type,
AddonPtr addon 
)

§ GetInstance()

CAddonSystemSettings & ADDON::CAddonSystemSettings::GetInstance ( )
static

§ IsActive()

bool ADDON::CAddonSystemSettings::IsActive ( const IAddon addon)

§ MigrateAddons()

std::vector< std::string > ADDON::CAddonSystemSettings::MigrateAddons ( std::function< void(void)>  onMigrate)

Check compatibility of installed addons and attempt to migrate.

Parameters
onMigrateCalled when a long running migration task takes place.
Returns
list of addons that was modified.

§ OnSettingAction()

void ADDON::CAddonSystemSettings::OnSettingAction ( std::shared_ptr< const CSetting setting)
overridevirtual

The given setting has been activated.

This callback is triggered whenever the given setting has been activated. This callback is only fired for CSettingAction settings.

Parameters
settingThe setting which has been activated.

Reimplemented from ISettingCallback.

§ OnSettingChanged()

void ADDON::CAddonSystemSettings::OnSettingChanged ( std::shared_ptr< const CSetting setting)
overridevirtual

The value of the given setting has changed.

This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.

Parameters
settingThe setting whose value has been changed

Reimplemented from ISettingCallback.

§ SetActive()

bool ADDON::CAddonSystemSettings::SetActive ( const TYPE type,
const std::string &  addonID 
)

§ UnsetActive()

bool ADDON::CAddonSystemSettings::UnsetActive ( const AddonPtr addon)

Attempt to unset addon as active. Returns true if addon is no longer active, false if it could not be unset (e.g. if the addon is the default)


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