Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup: Don't expose the AddonManager's privates when not required.

git-svn-id: 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
commit b6f0f59ac1a1b68488facc7f7b19f66b022d07e3 1 parent 4dfc4c3
jmarshallnz authored
Showing with 14 additions and 20 deletions.
  1. +9 −8 xbmc/addons/AddonManager.cpp
  2. +5 −12 xbmc/addons/AddonManager.h
17 xbmc/addons/AddonManager.cpp
@@ -54,8 +54,9 @@ using namespace std;
namespace ADDON
-int cp_to_clog(cp_log_severity_t);
-cp_log_severity_t clog_to_cp(int);
+cp_log_severity_t clog_to_cp(int lvl);
+void cp_fatalErrorHandler(const char *msg);
+void cp_logger(cp_log_severity_t level, const char *msg, const char *apid, void *user_data);
* CAddonMgr
@@ -977,11 +978,6 @@ CStdString CAddonMgr::GetExtValue(cp_cfg_element_t *base, const char *path)
else return CStdString();
-void CAddonMgr::CPluffFatalError(const char *msg)
- CLog::Log(LOGERROR, "ADDONS: CPluffFatalError(%s)", msg);
int cp_to_clog(cp_log_severity_t lvl)
if( lvl == CP_LOG_DEBUG )
@@ -1006,7 +1002,12 @@ cp_log_severity_t clog_to_cp(int lvl)
return CP_LOG_DEBUG;
-void CAddonMgr::CPluffLog(cp_log_severity_t level, const char *msg, const char *apid, void *user_data)
+void cp_fatalErrorHandler(const char *msg)
+ CLog::Log(LOGERROR, "ADDONS: CPluffFatalError(%s)", msg);
+void cp_logger(cp_log_severity_t level, const char *msg, const char *apid, void *user_data)
CLog::Log(cp_to_clog(level), "ADDON: cpluff: '%s'", msg);
17 xbmc/addons/AddonManager.h
@@ -93,13 +93,17 @@ namespace ADDON
bool GetAllAddons(VECADDONS &addons, bool enabledOnly = true);
CStdString GetString(const CStdString &id, const int number);
+ static bool AddonFromInfoXML(const CStdString &path, AddonPtr &addon);
static bool AddonFromInfoXML(const TiXmlElement *xmlDoc, AddonPtr &addon,
const CStdString &strPath);
- static bool AddonFromInfoXML(const CStdString &path, AddonPtr &addon);
static bool GetTranslatedString(const TiXmlElement *xmldoc, const char *tag, CStdString& data);
static AddonPtr AddonFromProps(AddonProps& props);
void UpdateRepos();
void FindAddons();
+ /* libcpluff */
+ CStdString GetExtValue(cp_cfg_element_t *base, const char *path);
+ private:
void LoadAddons(const CStdString &path,
std::map<CStdString, AddonPtr>& unresolved);
@@ -109,20 +113,9 @@ namespace ADDON
bool GetExtensions(const TYPE &type, VECADDONS &addons, const CONTENT_TYPE &content);
const cp_cfg_element_t *GetExtElement(cp_cfg_element_t *base, const char *path);
bool GetExtElementDeque(DEQUEELEMENTS &elements, cp_cfg_element_t *base, const char *path);
- CStdString GetExtValue(cp_cfg_element_t *base, const char *path);
- void CPluffFatalError(const char *msg);
- void CPluffLog(cp_log_severity_t level, const char *msg, const char *apid, void *user_data);
cp_context_t *m_cp_context;
DllLibCPluff *m_cpluff;
- static void cp_fatalErrorHandler(const char *msg) {
- CAddonMgr::Get().CPluffFatalError(msg);
- }
- static void cp_logger(cp_log_severity_t level, const char *msg, const char *apid, void *user_data) {
- CAddonMgr::Get().CPluffLog(level, msg, apid, user_data);
- }
- private:
bool DependenciesMet(AddonPtr &addon);
bool UpdateIfKnown(AddonPtr &addon);
AddonPtr Factory(const cp_extension_t *props);
Please sign in to comment.
Something went wrong with that request. Please try again.