|
Kodi Documentation
18.0
Kodi is an open source media player and entertainment hub.
|
#include <AddonManager.h>
Public Member Functions | |
| bool | ReInit () |
| bool | Init () |
| void | DeInit () |
| CAddonMgr ()=default | |
| CAddonMgr (const CAddonMgr &)=delete | |
| virtual | ~CAddonMgr () |
| CEventStream< AddonEvent > & | Events () |
| CEventStream< AddonEvent > & | UnloadEvents () |
| IAddonMgrCallback * | GetCallbackForType (TYPE type) |
| bool | RegisterAddonMgrCallback (TYPE type, IAddonMgrCallback *cb) |
| void | UnregisterAddonMgrCallback (TYPE type) |
| bool | GetAddon (const std::string &id, AddonPtr &addon, const TYPE &type=ADDON_UNKNOWN, bool enabledOnly=true) |
| Retrieve a specific addon (of a specific type) More... | |
| bool | HasType (const std::string &id, const TYPE &type) |
| bool | HasAddons (const TYPE &type) |
| bool | HasInstalledAddons (const TYPE &type) |
| bool | GetAddons (VECADDONS &addons) |
| bool | GetAddons (VECADDONS &addons, const TYPE &type) |
| bool | GetInstalledAddons (VECADDONS &addons) |
| bool | GetInstalledAddons (VECADDONS &addons, const TYPE &type) |
| bool | GetDisabledAddons (VECADDONS &addons) |
| bool | GetDisabledAddons (VECADDONS &addons, const TYPE &type) |
| bool | GetInstallableAddons (VECADDONS &addons) |
| bool | GetInstallableAddons (VECADDONS &addons, const TYPE &type) |
| bool | GetInstalledBinaryAddons (BINARY_ADDON_LIST &binaryAddonList) |
| To get all installed binary addon on Kodi. More... | |
| bool | GetInstalledBinaryAddon (const std::string &addonId, BINARY_ADDON_LIST_ENTRY &binaryAddon) |
| To get requested installed binary addon on Kodi. More... | |
| bool | FindInstallableById (const std::string &addonId, AddonPtr &addon) |
| void | AddToUpdateableAddons (AddonPtr &pAddon) |
| void | RemoveFromUpdateableAddons (AddonPtr &pAddon) |
| bool | ReloadSettings (const std::string &id) |
| VECADDONS | GetAvailableUpdates () |
| bool | HasAvailableUpdates () |
| std::string | GetTranslatedString (const cp_cfg_element_t *root, const char *tag) |
| bool | FindAddons () |
| Checks for new / updated add-ons. More... | |
| bool | UnloadAddon (const std::string &addonId) |
| bool | LoadAddon (const std::string &addonId) |
| void | OnPostUnInstall (const std::string &id) |
| bool | DisableAddon (const std::string &ID) |
| Disable an addon. Returns true on success, false on failure. More... | |
| bool | EnableAddon (const std::string &ID) |
| Enable an addon. Returns true on success, false on failure. More... | |
| bool | IsAddonDisabled (const std::string &ID) |
| bool | CanAddonBeDisabled (const std::string &ID) |
| bool | CanAddonBeEnabled (const std::string &id) |
| bool | IsAddonInstalled (const std::string &ID) |
| bool | CanAddonBeInstalled (const AddonPtr &addon) |
| bool | CanUninstall (const AddonPtr &addon) |
| bool | IsSystemAddon (const std::string &id) |
| bool | AddToUpdateBlacklist (const std::string &id) |
| bool | RemoveFromUpdateBlacklist (const std::string &id) |
| bool | IsBlacklisted (const std::string &id) const |
| void | UpdateLastUsed (const std::string &id) |
| std::string | GetExtValue (cp_cfg_element_t *base, const char *path) const |
| cp_cfg_element_t * | GetExtElement (cp_cfg_element_t *base, const char *path) |
| Retrieve an element from a given configuration element. More... | |
| bool | GetExtElements (cp_cfg_element_t *base, const char *path, ELEMENTS &result) |
| Retrieve a vector of repeated elements from a given configuration element. More... | |
| bool | GetExtList (cp_cfg_element_t *base, const char *path, std::vector< std::string > &result) const |
| Retrieve a list of strings from a given configuration element Assumes the configuration element or attribute contains a whitespace separated list of values (eg xs:list schema). More... | |
| const cp_extension_t * | GetExtension (const cp_plugin_info_t *props, const char *extension) const |
| std::string | GetPlatformLibraryName (cp_cfg_element_t *base) const |
| Retrieves the platform-specific library name from the given configuration element. More... | |
| bool | LoadAddonDescription (const std::string &path, AddonPtr &addon) |
| Load the addon in the given path This loads the addon using c-pluff which parses the addon descriptor file. More... | |
| bool | AddonsFromRepoXML (const CRepository::DirInfo &repo, const std::string &xml, VECADDONS &addons) |
| Parse a repository XML file for addons and load their descriptors A repository XML is essentially a concatenated list of addon descriptors. More... | |
| bool | ServicesHasStarted () const |
| bool | IsCompatible (const IAddon &addon) |
| std::vector< DependencyInfo > | GetDepsRecursive (const std::string &id) |
| Recursively get dependencies for an add-on. More... | |
Static Public Member Functions | |
| static AddonPtr | AddonFromProps (CAddonInfo &addonInfo) |
| static AddonPtr | Factory (const cp_plugin_info_t *plugin, TYPE type) |
| static bool | Factory (const cp_plugin_info_t *plugin, TYPE type, CAddonBuilder &builder, bool ignoreExtensions=false, const CRepository::DirInfo &repo={}) |
| static void | FillCpluffMetadata (const cp_plugin_info_t *plugin, CAddonBuilder &builder, const CRepository::DirInfo &repo) |
Class - CAddonMgr Holds references to all addons, enabled or otherwise. Services the generic callbacks available to all addon variants.
|
default |
|
delete |
|
virtual |
|
static |
| bool ADDON::CAddonMgr::AddonsFromRepoXML | ( | const CRepository::DirInfo & | repo, |
| const std::string & | xml, | ||
| VECADDONS & | addons | ||
| ) |
Parse a repository XML file for addons and load their descriptors A repository XML is essentially a concatenated list of addon descriptors.
| repo | The repository info. |
| xml | The XML document from repository. |
| addons | [out] returned list of addons. |
| bool ADDON::CAddonMgr::AddToUpdateBlacklist | ( | const std::string & | id | ) |
| bool ADDON::CAddonMgr::CanAddonBeDisabled | ( | const std::string & | ID | ) |
| bool ADDON::CAddonMgr::CanAddonBeEnabled | ( | const std::string & | id | ) |
| bool ADDON::CAddonMgr::CanAddonBeInstalled | ( | const AddonPtr & | addon | ) |
| bool ADDON::CAddonMgr::CanUninstall | ( | const AddonPtr & | addon | ) |
| void ADDON::CAddonMgr::DeInit | ( | ) |
| bool ADDON::CAddonMgr::DisableAddon | ( | const std::string & | ID | ) |
Disable an addon. Returns true on success, false on failure.
| bool ADDON::CAddonMgr::EnableAddon | ( | const std::string & | ID | ) |
Enable an addon. Returns true on success, false on failure.
|
inline |
|
static |
|
static |
|
static |
| bool ADDON::CAddonMgr::FindAddons | ( | ) |
Checks for new / updated add-ons.
| bool ADDON::CAddonMgr::FindInstallableById | ( | const std::string & | addonId, |
| AddonPtr & | addon | ||
| ) |
Get the installable addon with the highest version.
| bool ADDON::CAddonMgr::GetAddon | ( | const std::string & | id, |
| AddonPtr & | addon, | ||
| const TYPE & | type = ADDON_UNKNOWN, |
||
| bool | enabledOnly = true |
||
| ) |
Retrieve a specific addon (of a specific type)
| id | the id of the addon to retrieve. |
| addon | [out] the retrieved addon pointer - only use if the function returns true. |
| type | type of addon to retrieve - defaults to any type. |
| enabledOnly | whether we only want enabled addons - set to false to allow both enabled and disabled addons - defaults to true. |
| bool ADDON::CAddonMgr::GetAddons | ( | VECADDONS & | addons | ) |
Returns all installed, enabled add-ons.
Returns enabled add-ons with given type.
| VECADDONS ADDON::CAddonMgr::GetAvailableUpdates | ( | ) |
Get addons with available updates
| IAddonMgrCallback * ADDON::CAddonMgr::GetCallbackForType | ( | TYPE | type | ) |
| std::vector< DependencyInfo > ADDON::CAddonMgr::GetDepsRecursive | ( | const std::string & | id | ) |
Recursively get dependencies for an add-on.
| bool ADDON::CAddonMgr::GetDisabledAddons | ( | VECADDONS & | addons | ) |
| cp_cfg_element_t * ADDON::CAddonMgr::GetExtElement | ( | cp_cfg_element_t * | base, |
| const char * | path | ||
| ) |
Retrieve an element from a given configuration element.
| base | the base configuration element. |
| path | the path to the configuration element from the base element. |
| element | [out] returned element. |
| bool ADDON::CAddonMgr::GetExtElements | ( | cp_cfg_element_t * | base, |
| const char * | path, | ||
| ELEMENTS & | result | ||
| ) |
Retrieve a vector of repeated elements from a given configuration element.
| base | the base configuration element. |
| path | the path to the configuration element from the base element. |
| result | [out] returned list of elements. |
| const cp_extension_t * ADDON::CAddonMgr::GetExtension | ( | const cp_plugin_info_t * | props, |
| const char * | extension | ||
| ) | const |
| bool ADDON::CAddonMgr::GetExtList | ( | cp_cfg_element_t * | base, |
| const char * | path, | ||
| std::vector< std::string > & | result | ||
| ) | const |
Retrieve a list of strings from a given configuration element Assumes the configuration element or attribute contains a whitespace separated list of values (eg xs:list schema).
| base | the base configuration element. |
| path | the path to the configuration element or attribute from the base element. |
| result | [out] returned list of strings. |
| std::string ADDON::CAddonMgr::GetExtValue | ( | cp_cfg_element_t * | base, |
| const char * | path | ||
| ) | const |
| bool ADDON::CAddonMgr::GetInstallableAddons | ( | VECADDONS & | addons | ) |
Get all installable addons
| bool ADDON::CAddonMgr::GetInstalledAddons | ( | VECADDONS & | addons | ) |
Returns all installed, including disabled.
Returns installed add-ons, including disabled, with given type.
| bool ADDON::CAddonMgr::GetInstalledBinaryAddon | ( | const std::string & | addonId, |
| BINARY_ADDON_LIST_ENTRY & | binaryAddon | ||
| ) |
To get requested installed binary addon on Kodi.
This function is used by ADDON::CBinaryAddonManager to obtain the add-on with the given id, regardless the add-on is disabled or enabled.
| [in] | addonId | Id to get |
| [out] | binaryAddon | Addon info returned |
| bool ADDON::CAddonMgr::GetInstalledBinaryAddons | ( | BINARY_ADDON_LIST & | binaryAddonList | ) |
To get all installed binary addon on Kodi.
This function becomes used from ADDON::CBinaryAddonManager to get his related addons (whether enabled or disabled).
| [out] | binaryAddonList | The list where from here the binary addons becomes stored. |
| std::string ADDON::CAddonMgr::GetPlatformLibraryName | ( | cp_cfg_element_t * | base | ) | const |
Retrieves the platform-specific library name from the given configuration element.
| std::string ADDON::CAddonMgr::GetTranslatedString | ( | const cp_cfg_element_t * | root, |
| const char * | tag | ||
| ) |
| bool ADDON::CAddonMgr::HasAddons | ( | const TYPE & | type | ) |
| bool ADDON::CAddonMgr::HasAvailableUpdates | ( | ) |
Returns true if there is any addon with available updates, otherwise false
| bool ADDON::CAddonMgr::HasInstalledAddons | ( | const TYPE & | type | ) |
| bool ADDON::CAddonMgr::HasType | ( | const std::string & | id, |
| const TYPE & | type | ||
| ) |
| bool ADDON::CAddonMgr::Init | ( | ) |
| bool ADDON::CAddonMgr::IsAddonDisabled | ( | const std::string & | ID | ) |
| bool ADDON::CAddonMgr::IsAddonInstalled | ( | const std::string & | ID | ) |
| bool ADDON::CAddonMgr::IsBlacklisted | ( | const std::string & | id | ) | const |
| bool ADDON::CAddonMgr::IsCompatible | ( | const IAddon & | addon | ) |
| bool ADDON::CAddonMgr::IsSystemAddon | ( | const std::string & | id | ) |
| bool ADDON::CAddonMgr::LoadAddon | ( | const std::string & | addonId | ) |
Returns true if the addon was successfully loaded and enabled; otherwise false.
| bool ADDON::CAddonMgr::LoadAddonDescription | ( | const std::string & | path, |
| AddonPtr & | addon | ||
| ) |
Load the addon in the given path This loads the addon using c-pluff which parses the addon descriptor file.
| path | folder that contains the addon. |
| addon | [out] returned addon. |
| void ADDON::CAddonMgr::OnPostUnInstall | ( | const std::string & | id | ) |
Hook for clearing internal state after uninstall.
| bool ADDON::CAddonMgr::RegisterAddonMgrCallback | ( | TYPE | type, |
| IAddonMgrCallback * | cb | ||
| ) |
|
inline |
| bool ADDON::CAddonMgr::ReloadSettings | ( | const std::string & | id | ) |
| bool ADDON::CAddonMgr::RemoveFromUpdateBlacklist | ( | const std::string & | id | ) |
| bool ADDON::CAddonMgr::ServicesHasStarted | ( | ) | const |
| bool ADDON::CAddonMgr::UnloadAddon | ( | const std::string & | addonId | ) |
Unload addon from the system. Returns true if it was unloaded, otherwise false.
|
inline |
| void ADDON::CAddonMgr::UpdateLastUsed | ( | const std::string & | id | ) |