xbmc
Public Member Functions | Friends | List of all members
ADDON::CAddonInfo Class Reference

Public Member Functions

 CAddonInfo (std::string id, AddonType type)
 
void SetMainType (AddonType type)
 
void SetBinary (bool isBinary)
 
void SetLibName (const std::string &libname)
 
void SetPath (const std::string &path)
 
void AddExtraInfo (const std::string &idName, const std::string &value)
 
void SetLastUsed (const CDateTime &dateTime)
 
const std::string & ID () const
 
AddonType MainType () const
 To get the main type of this addon. More...
 
bool HasType (AddonType type, bool mainOnly=false) const
 To check addon contains a type. More...
 
const std::vector< CAddonType > & Types () const
 To get all available types inside the addon. More...
 
const CAddonTypeType (AddonType type) const
 The get for given addon type information and extension data. More...
 
bool ProvidesSubContent (AddonType content, AddonType mainType) const
 
bool ProvidesSeveralSubContents () const
 
const CAddonVersionVersion () const
 
const CAddonVersionMinVersion () const
 
bool IsBinary () const
 
const CAddonVersionDependencyMinVersion (const std::string &dependencyID) const
 
const CAddonVersionDependencyVersion (const std::string &dependencyID) const
 
const std::string & Name () const
 
const std::string & License () const
 
const std::string & Summary () const
 
const std::string & Description () const
 
const std::string & LibName () const
 
const std::string & Author () const
 
const std::string & Source () const
 
const std::string & Website () const
 
const std::string & Forum () const
 
const std::string & EMail () const
 
const std::string & Path () const
 
const std::string & ProfilePath () const
 
const std::string & ChangeLog () const
 
const std::string & Icon () const
 
const ArtMap & Art () const
 
const std::vector< std::string > & Screenshots () const
 
const std::string & Disclaimer () const
 
const std::vector< DependencyInfo > & GetDependencies () const
 
AddonLifecycleState LifecycleState () const
 
const std::string & LifecycleStateDescription () const
 
const std::string & Origin () const
 
const std::string & OriginName () const
 
const InfoMap & ExtraInfo () const
 
bool MeetsVersion (const CAddonVersion &versionMin, const CAddonVersion &version) const
 
uint64_t PackageSize () const
 
CDateTime InstallDate () const
 
CDateTime LastUpdated () const
 
CDateTime LastUsed () const
 
bool SupportsMultipleInstances () const
 
AddonInstanceSupport InstanceUseType () const
 
bool SupportsAddonSettings () const
 
bool SupportsInstanceSettings () const
 
std::vector< AddonInstanceId > GetKnownInstanceIds () const
 

Static Public Member Functions

static std::string TranslateType (AddonType type, bool pretty=false)
 Utilities to translate add-on parts to his requested part. More...
 
static std::string TranslateIconType (AddonType type)
 
static AddonType TranslateType (const std::string &string)
 
static AddonType TranslateSubContent (const std::string &content)
 
static AddonInstanceSupport InstanceSupportType (AddonType type)
 

Friends

class CAddonInfoBuilder
 
class CAddonInfoBuilderFromDB
 

Member Function Documentation

◆ HasType()

bool ADDON::CAddonInfo::HasType ( AddonType  type,
bool  mainOnly = false 
) const

To check addon contains a type.

Parameters
[in]typeThe to checked type identifier
[in]mainOnlyto check only in first defined main addon inside addon.xml
Returns
true in case the wanted type is supported, false if not

◆ MainType()

AddonType ADDON::CAddonInfo::MainType ( ) const
inline

To get the main type of this addon.

This is the first type defined in addon.xml.

Returns
The used main type of addon

◆ TranslateType()

std::string ADDON::CAddonInfo::TranslateType ( AddonType  type,
bool  pretty = false 
)
static

Utilities to translate add-on parts to his requested part.

static public helper functions

◆ Type()

const CAddonType * ADDON::CAddonInfo::Type ( AddonType  type) const

The get for given addon type information and extension data.

Parameters
[in]typeThe wanted type data
Returns
addon type class with CAddonExtensions as information
Note
This function return never a "nullptr", in case the wanted type is not supported, becomes a dummy of CAddonType given.

Example:

// To get <extension ... name="blablabla" /> from addon.xml
std::string name = Type(ADDON_...)->GetValue("@name").asString();

◆ Types()

const std::vector<CAddonType>& ADDON::CAddonInfo::Types ( ) const
inline

To get all available types inside the addon.

To have all <extension point="..." /> defined in addon.xml inside a list.

Returns
List of all supported types

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