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

#include <AddonManager.h>

Public Member Functions

bool ReInit ()
 
bool Init ()
 
void DeInit ()
 
 CAddonMgr ()
 
 CAddonMgr (const CAddonMgr &)=delete
 
virtual ~CAddonMgr ()
 
CEventStream< AddonEvent > & Events ()
 
CEventStream< AddonEvent > & UnloadEvents ()
 
IAddonMgrCallbackGetCallbackForType (AddonType type)
 
bool RegisterAddonMgrCallback (AddonType type, IAddonMgrCallback *cb)
 
void UnregisterAddonMgrCallback (AddonType type)
 
bool GetAddon (const std::string &id, AddonPtr &addon, AddonType type, OnlyEnabled onlyEnabled) const
 Retrieve a specific addon (of a specific type)
 
bool GetAddon (const std::string &id, AddonPtr &addon, OnlyEnabled onlyEnabled) const
 Retrieve a specific addon (of no specific type)
 
bool HasType (const std::string &id, AddonType type)
 
bool HasAddons (AddonType type)
 
bool HasInstalledAddons (AddonType type)
 
bool GetAddonsForUpdate (VECADDONS &addons) const
 
bool GetAddons (VECADDONS &addons) const
 
bool GetAddons (VECADDONS &addons, AddonType type)
 
bool GetInstalledAddons (VECADDONS &addons)
 
bool GetInstalledAddons (VECADDONS &addons, AddonType type)
 
bool GetDisabledAddons (VECADDONS &addons)
 
bool GetDisabledAddons (VECADDONS &addons, AddonType type)
 
bool GetInstallableAddons (VECADDONS &addons)
 
bool GetInstallableAddons (VECADDONS &addons, AddonType type)
 
bool FindInstallableById (const std::string &addonId, AddonPtr &addon)
 Get the installable addon depending on install rules or fall back to highest version.
 
void AddToUpdateableAddons (AddonPtr &pAddon)
 
void RemoveFromUpdateableAddons (AddonPtr &pAddon)
 
bool ReloadSettings (const std::string &addonId, AddonInstanceId instanceId)
 
std::vector< std::shared_ptr< IAddon > > GetAvailableUpdates () const
 
std::vector< std::shared_ptr< IAddon > > GetOutdatedAddons () const
 
bool HasAvailableUpdates ()
 
bool IsOrphaned (const std::shared_ptr< IAddon > &addon, const std::vector< std::shared_ptr< IAddon > > &allAddons) const
 Checks if the passed in addon is an orphaned dependency.
 
bool FindAddons ()
 Checks for new / updated add-ons.
 
bool FindAddon (const std::string &addonId, const std::string &origin, const CAddonVersion &addonVersion)
 Checks whether given addon with given origin/version is installed.
 
bool GetIncompatibleEnabledAddonInfos (std::vector< AddonInfoPtr > &incompatible) const
 Fills the the provided vector with the list of incompatible enabled addons and returns if there's any.
 
std::vector< AddonInfoPtrMigrateAddons ()
 
std::vector< AddonInfoPtrDisableIncompatibleAddons (const std::vector< AddonInfoPtr > &incompatible)
 Try to disable addons in the given list.
 
void CheckAndInstallAddonUpdates (bool wait) const
 
bool UnloadAddon (const std::string &addonId)
 
bool LoadAddon (const std::string &addonId, const std::string &origin, const CAddonVersion &addonVersion)
 
void OnPostUnInstall (const std::string &id)
 
bool DisableAddon (const std::string &ID, AddonDisabledReason disabledReason)
 Disable an addon. Returns true on success, false on failure.
 
bool UpdateDisabledReason (const std::string &id, AddonDisabledReason newDisabledReason)
 Updates reason for a disabled addon. Returns true on success, false on failure.
 
bool EnableAddon (const std::string &ID)
 Enable an addon. Returns true on success, false on failure.
 
bool IsAddonDisabled (const std::string &ID) const
 
bool IsAddonDisabledExcept (const std::string &ID, AddonDisabledReason disabledReason) const
 Check whether an addon has been disabled via DisableAddon except for a particular reason In case the disabled cache does not know about the current state the database routine will be used.
 
bool CanAddonBeDisabled (const std::string &ID)
 
bool CanAddonBeEnabled (const std::string &id)
 
bool IsAddonInstalled (const std::string &ID)
 
bool IsAddonInstalled (const std::string &ID, const std::string &origin) const
 
bool IsAddonInstalled (const std::string &ID, const std::string &origin, const CAddonVersion &version)
 
bool CanAddonBeInstalled (const AddonPtr &addon)
 
bool CanUninstall (const AddonPtr &addon)
 
bool IsBundledAddon (const std::string &id)
 Checks whether an addon is a bundled addon.
 
bool IsSystemAddon (const std::string &id)
 Checks whether an addon is a system addon.
 
bool IsRequiredSystemAddon (const std::string &id)
 Checks whether an addon is a required system addon.
 
bool IsOptionalSystemAddon (const std::string &id)
 Checks whether an addon is an optional system addon.
 
bool AddUpdateRuleToList (const std::string &id, AddonUpdateRule updateRule)
 Addon update rules.
 
bool RemoveAllUpdateRulesFromList (const std::string &id)
 
bool RemoveUpdateRuleFromList (const std::string &id, AddonUpdateRule updateRule)
 
bool IsAutoUpdateable (const std::string &id) const
 
void PublishEventAutoUpdateStateChanged (const std::string &id)
 
void UpdateLastUsed (const std::string &id)
 
void PublishInstanceAdded (const std::string &addonId, AddonInstanceId instanceId)
 Launches event AddonEvent::InstanceAdded.
 
void PublishInstanceRemoved (const std::string &addonId, AddonInstanceId instanceId)
 Launches event AddonEvent::InstanceRemoved.
 
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.
 
bool ServicesHasStarted () const
 
bool IsCompatible (const std::shared_ptr< const IAddon > &addon) const
 Check if given addon is compatible with Kodi.
 
bool IsCompatible (const AddonInfoPtr &addonInfo) const
 Check given addon information is compatible with Kodi.
 
std::vector< DependencyInfoGetDepsRecursive (const std::string &id, OnlyEnabledRootAddon onlyEnabledRootAddon)
 Recursively get dependencies for an add-on.
 
bool GetAddonInfos (std::vector< AddonInfoPtr > &addonInfos, bool onlyEnabled, AddonType type) const
 Get a list of add-on's with info's for the on system available ones.
 
std::vector< AddonInfoPtrGetAddonInfos (bool onlyEnabled, const std::vector< AddonType > &types) const
 Get a list of add-on's with info's for the on system available ones.
 
bool GetDisabledAddonInfos (std::vector< AddonInfoPtr > &addonInfos, AddonType type) const
 Get a list of disabled add-on's with info's.
 
bool GetDisabledAddonInfos (std::vector< AddonInfoPtr > &addonInfos, AddonType type, AddonDisabledReason disabledReason) const
 Get a list of disabled add-on's with info's for the on system available ones with a specific disabled reason.
 
const AddonInfoPtr GetAddonInfo (const std::string &id, AddonType type) const
 
const std::string & GetTempAddonBasePath ()
 Get the path where temporary add-on files are stored.
 
AddonOriginType GetAddonOriginType (const AddonPtr &addon) const
 
bool IsAddonDisabledWithReason (const std::string &ID, AddonDisabledReason disabledReason) const
 Check whether an addon has been disabled with a special reason.
 
bool SetAddonOrigin (const std::string &addonId, const std::string &repoAddonId, bool isUpdate)
 Addon update and install management.
 
bool AddonsFromRepoXML (const RepositoryDirInfo &repo, const std::string &xml, std::vector< AddonInfoPtr > &addons)
 Parse a repository XML file for addons and load their descriptors.
 
std::map< std::string, AddonWithUpdateGetAddonsWithAvailableUpdate () const
 Retrieves list of outdated addons as well as their related available updates and stores them into map.
 
std::vector< std::shared_ptr< IAddon > > GetCompatibleVersions (const std::string &addonId) const
 Retrieves list of compatible addon versions of all origins.
 
const std::string & GetLastAvailableUpdatesCountAsString () const
 Return number of available updates formatted as string this can be used as a lightweight method of retrieving the number of updates rather than using the expensive GetAvailableUpdates call.
 
std::vector< std::shared_ptr< IAddon > > GetOrphanedDependencies () const
 returns a vector with all found orphaned dependencies.
 

Detailed Description

Class - CAddonMgr Holds references to all addons, enabled or otherwise. Services the generic callbacks available to all addon variants.

Constructor & Destructor Documentation

◆ CAddonMgr() [1/2]

ADDON::CAddonMgr::CAddonMgr ( )

◆ CAddonMgr() [2/2]

ADDON::CAddonMgr::CAddonMgr ( const CAddonMgr & )
delete

◆ ~CAddonMgr()

ADDON::CAddonMgr::~CAddonMgr ( )
virtual

Member Function Documentation

◆ AddonsFromRepoXML()

bool ADDON::CAddonMgr::AddonsFromRepoXML ( const RepositoryDirInfo & repo,
const std::string & xml,
std::vector< AddonInfoPtr > & addons )

Parse a repository XML file for addons and load their descriptors.

A repository XML is essentially a concatenated list of addon descriptors.

Parameters
[in]repoThe repository info.
[in]xmlThe XML document from repository.
[out]addonsreturned list of addons.
Returns
true if the repository XML file is parsed, false otherwise.

Currently listed call sources:

  • CRepository::FetchIndex

◆ AddToUpdateableAddons()

void ADDON::CAddonMgr::AddToUpdateableAddons ( AddonPtr & pAddon)

◆ AddUpdateRuleToList()

bool ADDON::CAddonMgr::AddUpdateRuleToList ( const std::string & id,
AddonUpdateRule updateRule )

Addon update rules.

member functions for handling and querying add-on update rules

Warning
This should be never used from other places outside of addon system directory.

◆ CanAddonBeDisabled()

bool ADDON::CAddonMgr::CanAddonBeDisabled ( const std::string & ID)

◆ CanAddonBeEnabled()

bool ADDON::CAddonMgr::CanAddonBeEnabled ( const std::string & id)

◆ CanAddonBeInstalled()

bool ADDON::CAddonMgr::CanAddonBeInstalled ( const AddonPtr & addon)

◆ CanUninstall()

bool ADDON::CAddonMgr::CanUninstall ( const AddonPtr & addon)

◆ CheckAndInstallAddonUpdates()

void ADDON::CAddonMgr::CheckAndInstallAddonUpdates ( bool wait) const

Install available addon updates, if any.

Parameters
waitIf kodi should wait for all updates to download and install before returning

◆ DeInit()

void ADDON::CAddonMgr::DeInit ( )

◆ DisableAddon()

bool ADDON::CAddonMgr::DisableAddon ( const std::string & ID,
AddonDisabledReason disabledReason )

Disable an addon. Returns true on success, false on failure.

◆ DisableIncompatibleAddons()

std::vector< AddonInfoPtr > ADDON::CAddonMgr::DisableIncompatibleAddons ( const std::vector< AddonInfoPtr > & incompatible)

Try to disable addons in the given list.

Parameters
[in]incompatibleList of incompatible addon infos
Returns
list of all addon Infos that were disabled

◆ EnableAddon()

bool ADDON::CAddonMgr::EnableAddon ( const std::string & ID)

Enable an addon. Returns true on success, false on failure.

◆ Events()

CEventStream< AddonEvent > & ADDON::CAddonMgr::Events ( )
inline

◆ FindAddon()

bool ADDON::CAddonMgr::FindAddon ( const std::string & addonId,
const std::string & origin,
const CAddonVersion & addonVersion )

Checks whether given addon with given origin/version is installed.

Parameters
addonIdaddon to check
originorigin to check
addonVersionversion to check
Returns
True if installed, false otherwise

◆ FindAddons()

bool ADDON::CAddonMgr::FindAddons ( )

Checks for new / updated add-ons.

Returns
True if everything went ok, false otherwise

◆ FindInstallableById()

bool ADDON::CAddonMgr::FindInstallableById ( const std::string & addonId,
AddonPtr & addon )

Get the installable addon depending on install rules or fall back to highest version.

Note
This function gets called in different contexts. If it's called for checking possible updates for already installed addons our update restriction rules apply. If it's called to (for example) populate an addon-select-dialog the addon is not installed yet, and we have to fall back to the highest version.
Parameters
addonIdaddon to check for update or installation
addon[out]the retrieved addon pointer - only use if the function returns true.
Returns
true if an addon matching the id is available.

◆ GetAddon() [1/2]

bool ADDON::CAddonMgr::GetAddon ( const std::string & id,
AddonPtr & addon,
AddonType type,
OnlyEnabled onlyEnabled ) const

Retrieve a specific addon (of a specific type)

Parameters
idthe id of the addon to retrieve.
addon[out]the retrieved addon pointer - only use if the function returns true.
typetype of addon to retrieve - defaults to any type.
onlyEnabledwhether we only want enabled addons - set to false to allow both enabled and disabled addons - defaults to true.
Returns
true if an addon matching the id of the given type is available and is enabled (if onlyEnabled is true).

◆ GetAddon() [2/2]

bool ADDON::CAddonMgr::GetAddon ( const std::string & id,
AddonPtr & addon,
OnlyEnabled onlyEnabled ) const

Retrieve a specific addon (of no specific type)

Parameters
idthe id of the addon to retrieve.
addon[out]the retrieved addon pointer - only use if the function returns true.
onlyEnabledwhether we only want enabled addons - set to false to allow both enabled and disabled addons - defaults to true.
Returns
true if an addon matching the id of any type is available and is enabled (if onlyEnabled is true).

◆ GetAddonInfo()

const AddonInfoPtr ADDON::CAddonMgr::GetAddonInfo ( const std::string & id,
AddonType type ) const

◆ GetAddonInfos() [1/2]

std::vector< AddonInfoPtr > ADDON::CAddonMgr::GetAddonInfos ( bool onlyEnabled,
const std::vector< AddonType > & types ) const

Get a list of add-on's with info's for the on system available ones.

Parameters
[in]onlyEnabledIf true are only enabled ones given back, if false all on system available. Default is true.
[in]typesList about requested types.
Returns
List where finded addon information becomes returned.
Note
ADDON_UNKNOWN should not used for here!

◆ GetAddonInfos() [2/2]

bool ADDON::CAddonMgr::GetAddonInfos ( std::vector< AddonInfoPtr > & addonInfos,
bool onlyEnabled,
AddonType type ) const

Get a list of add-on's with info's for the on system available ones.

Parameters
[out]addonInfoslist where finded addon information becomes stored
[in]onlyEnabledIf true are only enabled ones given back, if false all on system available. Default is true.
[in]typeThe requested type, with "ADDON_UNKNOWN" are all add-on types given back who match the case with value before. If a type id becomes added are only add-ons returned who match them. Default is for all types.
Returns
true if the list contains entries

◆ GetAddonOriginType()

AddonOriginType ADDON::CAddonMgr::GetAddonOriginType ( const AddonPtr & addon) const

◆ GetAddons() [1/2]

bool ADDON::CAddonMgr::GetAddons ( VECADDONS & addons) const

Returns all installed, enabled add-ons.

◆ GetAddons() [2/2]

bool ADDON::CAddonMgr::GetAddons ( VECADDONS & addons,
AddonType type )

Returns enabled add-ons with given type.

◆ GetAddonsForUpdate()

bool ADDON::CAddonMgr::GetAddonsForUpdate ( VECADDONS & addons) const

Returns all installed, enabled and incompatible (and disabled) add-ons.

◆ GetAddonsWithAvailableUpdate()

std::map< std::string, AddonWithUpdate > ADDON::CAddonMgr::GetAddonsWithAvailableUpdate ( ) const

Retrieves list of outdated addons as well as their related available updates and stores them into map.

Returns
map of outdated addons with their update

◆ GetAvailableUpdates()

std::vector< std::shared_ptr< IAddon > > ADDON::CAddonMgr::GetAvailableUpdates ( ) const

Get addons with available updates

◆ GetCallbackForType()

IAddonMgrCallback * ADDON::CAddonMgr::GetCallbackForType ( AddonType type)

◆ GetCompatibleVersions()

std::vector< std::shared_ptr< IAddon > > ADDON::CAddonMgr::GetCompatibleVersions ( const std::string & addonId) const

Retrieves list of compatible addon versions of all origins.

Parameters
[in]addonIdaddon to look up
Returns
vector containing compatible addon versions

◆ GetDepsRecursive()

std::vector< DependencyInfo > ADDON::CAddonMgr::GetDepsRecursive ( const std::string & id,
OnlyEnabledRootAddon onlyEnabledRootAddon )

Recursively get dependencies for an add-on.

Parameters
idthe id of the root addon
onlyEnabledRootAddonwhether look for enabled root add-ons only

◆ GetDisabledAddonInfos() [1/2]

bool ADDON::CAddonMgr::GetDisabledAddonInfos ( std::vector< AddonInfoPtr > & addonInfos,
AddonType type ) const

Get a list of disabled add-on's with info's.

Parameters
[out]addonInfoslist where finded addon information becomes stored
[in]typeThe requested type, with "ADDON_UNKNOWN" are all add-on types given back who match the case with value before. If a type id becomes added are only add-ons returned who match them. Default is for all types.
Returns
true if the list contains entries

◆ GetDisabledAddonInfos() [2/2]

bool ADDON::CAddonMgr::GetDisabledAddonInfos ( std::vector< AddonInfoPtr > & addonInfos,
AddonType type,
AddonDisabledReason disabledReason ) const

Get a list of disabled add-on's with info's for the on system available ones with a specific disabled reason.

Parameters
[out]addonInfoslist where finded addon information becomes stored
[in]typeThe requested type, with "ADDON_UNKNOWN" are all add-on types given back who match the case with value before. If a type id becomes added are only add-ons returned who match them. Default is for all types.
[in]disabledReasonTo get all disabled addons use the value "AddonDiasbledReason::NONE". If any other value is supplied only addons with that reason will be returned.
Returns
true if the list contains entries

◆ GetDisabledAddons() [1/2]

bool ADDON::CAddonMgr::GetDisabledAddons ( VECADDONS & addons)

◆ GetDisabledAddons() [2/2]

bool ADDON::CAddonMgr::GetDisabledAddons ( VECADDONS & addons,
AddonType type )

◆ GetIncompatibleEnabledAddonInfos()

bool ADDON::CAddonMgr::GetIncompatibleEnabledAddonInfos ( std::vector< AddonInfoPtr > & incompatible) const

Fills the the provided vector with the list of incompatible enabled addons and returns if there's any.

Parameters
[out]incompatibleList of incompatible addons
Returns
true if there are incompatible addons

◆ GetInstallableAddons() [1/2]

bool ADDON::CAddonMgr::GetInstallableAddons ( VECADDONS & addons)

Get all installable addons

◆ GetInstallableAddons() [2/2]

bool ADDON::CAddonMgr::GetInstallableAddons ( VECADDONS & addons,
AddonType type )

◆ GetInstalledAddons() [1/2]

bool ADDON::CAddonMgr::GetInstalledAddons ( VECADDONS & addons)

Returns all installed, including disabled.

◆ GetInstalledAddons() [2/2]

bool ADDON::CAddonMgr::GetInstalledAddons ( VECADDONS & addons,
AddonType type )

Returns installed add-ons, including disabled, with given type.

◆ GetLastAvailableUpdatesCountAsString()

const std::string & ADDON::CAddonMgr::GetLastAvailableUpdatesCountAsString ( ) const

Return number of available updates formatted as string this can be used as a lightweight method of retrieving the number of updates rather than using the expensive GetAvailableUpdates call.

Returns
number of available updates

◆ GetOrphanedDependencies()

std::vector< std::shared_ptr< IAddon > > ADDON::CAddonMgr::GetOrphanedDependencies ( ) const

returns a vector with all found orphaned dependencies.

Returns
the vector

◆ GetOutdatedAddons()

std::vector< std::shared_ptr< IAddon > > ADDON::CAddonMgr::GetOutdatedAddons ( ) const

Get addons that are outdated

◆ GetTempAddonBasePath()

const std::string & ADDON::CAddonMgr::GetTempAddonBasePath ( )
inline

Get the path where temporary add-on files are stored.

Returns
the base path used for temporary addon paths
Warning
the folder and its contents are deleted when Kodi is closed

◆ HasAddons()

bool ADDON::CAddonMgr::HasAddons ( AddonType type)

◆ HasAvailableUpdates()

bool ADDON::CAddonMgr::HasAvailableUpdates ( )

Returns true if there is any addon with available updates, otherwise false

◆ HasInstalledAddons()

bool ADDON::CAddonMgr::HasInstalledAddons ( AddonType type)

◆ HasType()

bool ADDON::CAddonMgr::HasType ( const std::string & id,
AddonType type )

◆ Init()

bool ADDON::CAddonMgr::Init ( )

◆ IsAddonDisabled()

bool ADDON::CAddonMgr::IsAddonDisabled ( const std::string & ID) const

◆ IsAddonDisabledExcept()

bool ADDON::CAddonMgr::IsAddonDisabledExcept ( const std::string & ID,
AddonDisabledReason disabledReason ) const

Check whether an addon has been disabled via DisableAddon except for a particular reason In case the disabled cache does not know about the current state the database routine will be used.

Parameters
[in]IDid of the addon
[in]disabledReasonthe reason that will be an exception to being disabled
Returns
true if the addon was disabled except for the specified reason
See also
DisableAddon

◆ IsAddonDisabledWithReason()

bool ADDON::CAddonMgr::IsAddonDisabledWithReason ( const std::string & ID,
AddonDisabledReason disabledReason ) const

Check whether an addon has been disabled with a special reason.

Parameters
IDid of the addon
disabledReasonreason we want to check for (NONE, USER, INCOMPATIBLE, PERMANENT_FAILURE)
Returns
true or false

◆ IsAddonInstalled() [1/3]

bool ADDON::CAddonMgr::IsAddonInstalled ( const std::string & ID)

◆ IsAddonInstalled() [2/3]

bool ADDON::CAddonMgr::IsAddonInstalled ( const std::string & ID,
const std::string & origin ) const

◆ IsAddonInstalled() [3/3]

bool ADDON::CAddonMgr::IsAddonInstalled ( const std::string & ID,
const std::string & origin,
const CAddonVersion & version )

◆ IsAutoUpdateable()

bool ADDON::CAddonMgr::IsAutoUpdateable ( const std::string & id) const

◆ IsBundledAddon()

bool ADDON::CAddonMgr::IsBundledAddon ( const std::string & id)

Checks whether an addon is a bundled addon.

Parameters
[in]idid of the addon
Returns
true if addon is bundled addon, false otherwise.

◆ IsCompatible() [1/2]

bool ADDON::CAddonMgr::IsCompatible ( const AddonInfoPtr & addonInfo) const

Check given addon information is compatible with Kodi.

Parameters
[in]addonInfoAddon information to check
Returns
true if compatible, false if not

◆ IsCompatible() [2/2]

bool ADDON::CAddonMgr::IsCompatible ( const std::shared_ptr< const IAddon > & addon) const

Check if given addon is compatible with Kodi.

Parameters
[in]addonAddon to check
Returns
true if compatible, false if not

◆ IsOptionalSystemAddon()

bool ADDON::CAddonMgr::IsOptionalSystemAddon ( const std::string & id)

Checks whether an addon is an optional system addon.

Parameters
[in]idid of the addon
Returns
true if addon is an optional system addon, false otherwise.

◆ IsOrphaned()

bool ADDON::CAddonMgr::IsOrphaned ( const std::shared_ptr< IAddon > & addon,
const std::vector< std::shared_ptr< IAddon > > & allAddons ) const

Checks if the passed in addon is an orphaned dependency.

Parameters
addonthe add-on/dependency to check
allAddonsvector of all installed add-ons
Returns
true or false

◆ IsRequiredSystemAddon()

bool ADDON::CAddonMgr::IsRequiredSystemAddon ( const std::string & id)

Checks whether an addon is a required system addon.

Parameters
[in]idid of the addon
Returns
true if addon is a required system addon, false otherwise.

◆ IsSystemAddon()

bool ADDON::CAddonMgr::IsSystemAddon ( const std::string & id)

Checks whether an addon is a system addon.

Parameters
[in]idid of the addon
Returns
true if addon is system addon, false otherwise.

◆ LoadAddon()

bool ADDON::CAddonMgr::LoadAddon ( const std::string & addonId,
const std::string & origin,
const CAddonVersion & addonVersion )
Note
: should only be called by AddonInstaller

Returns true if the addon was successfully loaded and enabled; otherwise false.

◆ LoadAddonDescription()

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.

Parameters
pathfolder that contains the addon.
addon[out] returned addon.
Returns
true if addon is set, false otherwise.

◆ MigrateAddons()

std::vector< AddonInfoPtr > ADDON::CAddonMgr::MigrateAddons ( )

Migrate all the addons (updates all addons that have an update pending and disables those that got incompatible)

Returns
list of all addons (infos) that were modified.

◆ OnPostUnInstall()

void ADDON::CAddonMgr::OnPostUnInstall ( const std::string & id)
Note
: should only be called by AddonInstaller

Hook for clearing internal state after uninstall.

◆ PublishEventAutoUpdateStateChanged()

void ADDON::CAddonMgr::PublishEventAutoUpdateStateChanged ( const std::string & id)

◆ PublishInstanceAdded()

void ADDON::CAddonMgr::PublishInstanceAdded ( const std::string & addonId,
AddonInstanceId instanceId )

Launches event AddonEvent::InstanceAdded.

This is called when a new instance is added in add-on settings.

Parameters
[in]addonIdAdd-on id to pass through
[in]instanceIdIdentifier of the add-on instance

◆ PublishInstanceRemoved()

void ADDON::CAddonMgr::PublishInstanceRemoved ( const std::string & addonId,
AddonInstanceId instanceId )

Launches event AddonEvent::InstanceRemoved.

This is called when an instance is removed in add-on settings.

Parameters
[in]addonIdAdd-on id to pass through
[in]instanceIdIdentifier of the add-on instance

◆ RegisterAddonMgrCallback()

bool ADDON::CAddonMgr::RegisterAddonMgrCallback ( AddonType type,
IAddonMgrCallback * cb )

◆ ReInit()

bool ADDON::CAddonMgr::ReInit ( )
inline

◆ ReloadSettings()

bool ADDON::CAddonMgr::ReloadSettings ( const std::string & addonId,
AddonInstanceId instanceId )

◆ RemoveAllUpdateRulesFromList()

bool ADDON::CAddonMgr::RemoveAllUpdateRulesFromList ( const std::string & id)

◆ RemoveFromUpdateableAddons()

void ADDON::CAddonMgr::RemoveFromUpdateableAddons ( AddonPtr & pAddon)

◆ RemoveUpdateRuleFromList()

bool ADDON::CAddonMgr::RemoveUpdateRuleFromList ( const std::string & id,
AddonUpdateRule updateRule )

◆ ServicesHasStarted()

bool ADDON::CAddonMgr::ServicesHasStarted ( ) const

◆ SetAddonOrigin()

bool ADDON::CAddonMgr::SetAddonOrigin ( const std::string & addonId,
const std::string & repoAddonId,
bool isUpdate )

Addon update and install management.

Parts inside here are used for changes about addon system.

Warning
This should be never used from other places outside of addon system directory.

Update addon origin data.

This becomes called from CAddonInstallJob to set the source repo and if update, to set also the date.

Note
This must be called after the addon manager has inserted a new addon with FindAddons() into database.
Parameters
[in]addonIdIdentifier of addon
[in]repoAddonIdIdentifier of related repository addon
[in]isUpdateIf call becomes done on already installed addon and update only.
Returns
True if successfully done, otherwise false

Currently listed call sources:

  • CAddonInstallJob::DoWork

◆ UnloadAddon()

bool ADDON::CAddonMgr::UnloadAddon ( const std::string & addonId)
Note
: should only be called by AddonInstaller

Unload addon from the system. Returns true if it was unloaded, otherwise false.

◆ UnloadEvents()

CEventStream< AddonEvent > & ADDON::CAddonMgr::UnloadEvents ( )
inline

◆ UnregisterAddonMgrCallback()

void ADDON::CAddonMgr::UnregisterAddonMgrCallback ( AddonType type)

◆ UpdateDisabledReason()

bool ADDON::CAddonMgr::UpdateDisabledReason ( const std::string & id,
AddonDisabledReason newDisabledReason )

Updates reason for a disabled addon. Returns true on success, false on failure.

◆ UpdateLastUsed()

void ADDON::CAddonMgr::UpdateLastUsed ( const std::string & id)

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