Skip to content

Commit

Permalink
Complete missing add-on Clone() functions
Browse files Browse the repository at this point in the history
  • Loading branch information
garbear committed Aug 5, 2013
1 parent abe76ff commit e8d623a
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/addons/Addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@ CAddonLibrary::CAddonLibrary(const AddonProps& props)
{
}

AddonPtr CAddonLibrary::Clone() const
{
return AddonPtr(new CAddonLibrary(*this));
}

TYPE CAddonLibrary::SetAddonType()
{
if (Type() == ADDON_VIZ_LIBRARY)
Expand Down
2 changes: 2 additions & 0 deletions xbmc/addons/Addon.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ class CAddonLibrary : public CAddon
CAddonLibrary(const AddonProps &props);
CAddonLibrary(const cp_extension_t *ext);

virtual AddonPtr Clone() const;

private:
virtual bool IsAddonLibrary() { return true; }
TYPE SetAddonType();
Expand Down
5 changes: 5 additions & 0 deletions xbmc/addons/PluginSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ CPluginSource::CPluginSource(const cp_extension_t *ext)
SetProvides(provides);
}

AddonPtr CPluginSource::Clone() const
{
return AddonPtr(new CPluginSource(*this));
}

void CPluginSource::SetProvides(const CStdString &content)
{
vector<CStdString> provides;
Expand Down
1 change: 1 addition & 0 deletions xbmc/addons/PluginSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CPluginSource : public CAddon
CPluginSource(const cp_extension_t *ext);
CPluginSource(const AddonProps &props);
virtual ~CPluginSource() {}
virtual AddonPtr Clone() const;
virtual bool IsType(TYPE type) const;
bool Provides(const Content& content) const
{
Expand Down
5 changes: 5 additions & 0 deletions xbmc/addons/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ CService::CService(const AddonProps &props)
BuildServiceType();
}

AddonPtr CService::Clone() const
{
return AddonPtr(new CService(*this));
}

bool CService::Start()
{
bool ret = true;
Expand Down
1 change: 1 addition & 0 deletions xbmc/addons/Service.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace ADDON

CService(const cp_extension_t *ext);
CService(const AddonProps &props);
virtual AddonPtr Clone() const;

bool Start();
bool Stop();
Expand Down
5 changes: 5 additions & 0 deletions xbmc/addons/Skin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ CSkinInfo::~CSkinInfo()
{
}

AddonPtr CSkinInfo::Clone() const
{
return AddonPtr(new CSkinInfo(*this));
}

struct closestRes
{
closestRes(const RESOLUTION_INFO &target) : m_target(target) { };
Expand Down
1 change: 1 addition & 0 deletions xbmc/addons/Skin.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CSkinInfo : public CAddon
CSkinInfo(const AddonProps &props, const RESOLUTION_INFO &res = RESOLUTION_INFO());
CSkinInfo(const cp_extension_t *ext);
virtual ~CSkinInfo();
virtual AddonPtr Clone() const;

/*! \brief Load resultion information from directories in Path().
*/
Expand Down

0 comments on commit e8d623a

Please sign in to comment.