From 580fe4e21ff8ed486157bd975066e87389b0a275 Mon Sep 17 00:00:00 2001 From: montellese Date: Mon, 22 Dec 2014 01:53:23 +0100 Subject: [PATCH] CAddonMgr: make GetExtElement() public --- xbmc/addons/AddonManager.cpp | 4 ++-- xbmc/addons/AddonManager.h | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp index a94c30179b401..67a7f62b1f33f 100644 --- a/xbmc/addons/AddonManager.cpp +++ b/xbmc/addons/AddonManager.cpp @@ -814,9 +814,9 @@ bool CAddonMgr::PlatformSupportsAddon(const cp_plugin_info_t *plugin) const return true; // assume no is equivalent to all } -const cp_cfg_element_t *CAddonMgr::GetExtElement(cp_cfg_element_t *base, const char *path) +cp_cfg_element_t *CAddonMgr::GetExtElement(cp_cfg_element_t *base, const char *path) { - const cp_cfg_element_t *element = NULL; + cp_cfg_element_t *element = NULL; if (base) element = m_cpluff->lookup_cfg_element(base, path); return element; diff --git a/xbmc/addons/AddonManager.h b/xbmc/addons/AddonManager.h index 8bc058d0f6af8..82d794cba0e57 100644 --- a/xbmc/addons/AddonManager.h +++ b/xbmc/addons/AddonManager.h @@ -159,6 +159,14 @@ namespace ADDON /* libcpluff */ std::string GetExtValue(cp_cfg_element_t *base, const char *path); + /*! \brief Retrieve an element from a given configuration element + \param base the base configuration element. + \param path the path to the configuration element from the base element. + \param element [out] returned element. + \return true if the configuration element is present + */ + cp_cfg_element_t *GetExtElement(cp_cfg_element_t *base, const char *path); + /*! \brief Retrieve a vector of repeated elements from a given configuration element \param base the base configuration element. \param path the path to the configuration element from the base element. @@ -215,7 +223,6 @@ namespace ADDON std::map& unresolved); /* libcpluff */ - const cp_cfg_element_t *GetExtElement(cp_cfg_element_t *base, const char *path); cp_context_t *m_cp_context; DllLibCPluff *m_cpluff; VECADDONS m_updateableAddons;