void OnPreInstall(const AddonPtr& addon) { //Before installing we need to stop/unregister any local addon //that have this id, regardless of what the 'new' addon is. AddonPtr localAddon; if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_SERVICE)) std::static_pointer_cast<CService>(localAddon)->Stop(); if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_CONTEXT_ITEM)) CContextMenuManager::GetInstance().Unregister(std::static_pointer_cast<CContextMenuAddon>(localAddon)); //Fallback to the pre-install callback in the addon. //BUG: If primary extension point have changed we're calling the wrong method. addon->OnPreInstall(); }
void OnPreInstall(const AddonPtr& addon) { //Fallback to the pre-install callback in the addon. //! @bug If primary extension point have changed we're calling the wrong method. addon->OnPreInstall(); }