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

#include <AddonDll.h>

Inheritance diagram for ADDON::CAddonDll:
ADDON::CAddon ADDON::IAddon KODI::GAME::CGameClient PVR::CPVRClient

Public Member Functions

 CAddonDll (CAddonInfo addonInfo, BinaryAddonBasePtr addonBase)
 
 CAddonDll (CAddonInfo addonInfo)
 
 ~CAddonDll () override
 
virtual ADDON_STATUS GetStatus ()
 
std::string LibPath () const override
 
void SaveSettings () override
 Save any user configured settings. 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...
 
ADDON_STATUS Create (ADDON_TYPE type, void *funcTable, void *info)
 
void Destroy ()
 
bool DllLoaded (void) const
 
ADDON_STATUS CreateInstance (ADDON_TYPE instanceType, const std::string &instanceID, KODI_HANDLE instance, KODI_HANDLE parentInstance=nullptr)
 Function to create a addon instance class. More...
 
void DestroyInstance (const std::string &instanceID)
 Function to destroy a on addon created instance class. More...
 
AddonPtr GetRunningInstance () const override
 retrieve the running instance of an add-on if it persists while running. More...
 
bool Initialized () const
 
- Public Member Functions inherited from ADDON::CAddon
 CAddon (CAddonInfo addonInfo)
 
 ~CAddon () override=default
 
TYPE Type () const override
 
TYPE FullType () const override
 
bool IsType (TYPE type) const override
 
std::string ID () const override
 
std::string Name () const override
 
bool IsInUse () 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 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
 
std::string Broken () const override
 
CDateTime InstallDate () const override
 
CDateTime LastUpdated () const override
 
CDateTime LastUsed () const override
 
std::string Origin () const override
 
uint64_t PackageSize () const override
 
const InfoMapExtraInfo () 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 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...
 
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...
 
CAddonSettingsGetSettings () const override
 
AddonVersion GetDependencyVersion (const std::string &dependencyID) const override
 get the required version of a dependency. More...
 
bool MeetsVersion (const AddonVersion &version) const override
 return whether or not this addon satisfies the given version requirements More...
 
bool ReloadSettings () override
 
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
 

Static Public Member Functions

static void RegisterInterface (ADDON_GET_INTERFACE_FN fn)
 

Static Protected Member Functions

static std::string GetDllPath (const std::string &strFileName)
 

Protected Attributes

CAddonInterfacesm_pHelpers
 
std::string m_parentLib
 
- Protected Attributes inherited from ADDON::CAddon
const CAddonInfo m_addonInfo
 
std::string m_userSettingsPath
 

Additional Inherited Members

- Protected Member Functions inherited from ADDON::CAddon
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...
 

Constructor & Destructor Documentation

§ CAddonDll() [1/2]

ADDON::CAddonDll::CAddonDll ( CAddonInfo  addonInfo,
BinaryAddonBasePtr  addonBase 
)

§ CAddonDll() [2/2]

ADDON::CAddonDll::CAddonDll ( CAddonInfo  addonInfo)
explicit

§ ~CAddonDll()

ADDON::CAddonDll::~CAddonDll ( )
override

Member Function Documentation

§ Create()

ADDON_STATUS ADDON::CAddonDll::Create ( ADDON_TYPE  type,
void funcTable,
void info 
)

§ CreateInstance()

ADDON_STATUS ADDON::CAddonDll::CreateInstance ( ADDON_TYPE  instanceType,
const std::string &  instanceID,
KODI_HANDLE  instance,
KODI_HANDLE  parentInstance = nullptr 
)

Function to create a addon instance class.

Parameters
[in]instanceTypeThe wanted instance type class to open on addon
[in]instanceIDThe from Kodi used ID string of active instance
[in]instancePointer where the interface functions from addon becomes stored during his instance creation.
[in]parentInstanceIn case the instance class is related to another addon instance class becomes with the pointer given to addon. Is optional and most addon types not use it.
Returns
The status of addon after the creation.

§ Destroy()

void ADDON::CAddonDll::Destroy ( void  )

§ DestroyInstance()

void ADDON::CAddonDll::DestroyInstance ( const std::string &  instanceID)

Function to destroy a on addon created instance class.

Parameters
[in]instanceIDThe from Kodi used ID string of active instance

§ DllLoaded()

bool ADDON::CAddonDll::DllLoaded ( void  ) const

§ GetDllPath()

std::string ADDON::CAddonDll::GetDllPath ( const std::string &  strFileName)
staticprotected

§ GetRunningInstance()

AddonPtr ADDON::CAddonDll::GetRunningInstance ( ) const
overridevirtual

retrieve the running instance of an add-on if it persists while running.

Reimplemented from ADDON::CAddon.

Reimplemented in PVR::CPVRClient, and KODI::GAME::CGameClient.

§ GetSetting()

std::string ADDON::CAddonDll::GetSetting ( const std::string &  key)
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
keythe id of the setting to retrieve
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

Reimplemented from ADDON::CAddon.

§ GetStatus()

ADDON_STATUS ADDON::CAddonDll::GetStatus ( )
virtual

§ Initialized()

bool ADDON::CAddonDll::Initialized ( ) const
inline

§ LibPath()

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

Reimplemented from ADDON::CAddon.

Reimplemented in KODI::GAME::CGameClient.

§ RegisterInterface()

void ADDON::CAddonDll::RegisterInterface ( ADDON_GET_INTERFACE_FN  fn)
static

§ SaveSettings()

void ADDON::CAddonDll::SaveSettings ( void  )
overridevirtual

Save any user configured settings.

See also
LoadSettings, LoadUserSettings, HasSettings, HasUserSettings, GetSetting, UpdateSetting

Reimplemented from ADDON::CAddon.

Member Data Documentation

§ m_parentLib

std::string ADDON::CAddonDll::m_parentLib
protected

§ m_pHelpers

CAddonInterfaces* ADDON::CAddonDll::m_pHelpers
protected

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