MythTV  master
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
CDSObject Class Reference

#include <upnpcdsobjects.h>

Inheritance diagram for CDSObject:
Inheritance graph
[legend]
Collaboration diagram for CDSObject:
Collaboration graph
[legend]

Public Member Functions

 CDSObject (const QString &sId="-1", const QString &sTitle="", const QString &sParentId="-1")
 
virtual ~CDSObject ()
 
PropertyAddProperty (Property *pProp)
 
QList< Property * > GetProperties (const QString &sName)
 
CDSObjectAddChild (CDSObject *pChild)
 
CDSObjects GetChildren (void)
 
CDSObjectGetChild (const QString &sID)
 
ContainerClassAddSearchClass (ContainerClass *pClass)
 
ContainerClassAddCreateClass (ContainerClass *pClass)
 
void SetPropValue (const QString &sName, const QString &sValue, const QString &type="")
 
QString GetPropValue (const QString &sName) const
 
QString toXml (FilterMap &filter, bool ignoreChildren=false) const
 
void toXml (QTextStream &os, FilterMap &filter, bool ignoreChildren=false) const
 
uint32_t GetChildCount (void) const
 Return the number of children in this container. More...
 
void SetChildCount (uint32_t nCount)
 Allows the caller to set childCount without having to load children. More...
 
uint32_t GetChildContainerCount (void) const
 Return the number of child containers in this container. More...
 
void SetChildContainerCount (uint32_t nCount)
 Allows the caller to set childContainerCount without having to load children. More...
 
ResourceAddResource (const QString &sProtocol, const QString &sURI)
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter (const QString &debugName, bool logDebug=true)
 Creates reference counter with an initial value of 1. More...
 
virtual int IncrRef (void)
 Increments reference count. More...
 
virtual int DecrRef (void)
 Decrements reference count and deletes on 0. More...
 

Static Public Member Functions

static CDSObjectCreateItem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateContainer (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateAudioItem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMusicTrack (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateAudioBroadcast (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateAudioBook (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateVideoItem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMovie (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateVideoBroadcast (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMusicVideoClip (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateImageItem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreatePhoto (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreatePlaylistItem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateTextItem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateAlbum (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMusicAlbum (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreatePhotoAlbum (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateGenre (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMusicGenre (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMovieGenre (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreatePlaylistContainer (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreatePerson (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateMusicArtist (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateStorageSystem (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateStorageVolume (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
static CDSObjectCreateStorageFolder (const QString &sId, const QString &sTitle, const QString &sParentId, CDSObject *pObject=nullptr)
 
- Static Public Member Functions inherited from ReferenceCounter
static void PrintDebug (void)
 Print out any leaks if that level of debugging is enabled. More...
 

Public Attributes

short m_nUpdateId {1}
 
ObjectTypes m_eType {OT_Container}
 
QString m_sId
 
QString m_sParentId
 
QString m_sTitle
 
QString m_sClass
 
bool m_bRestricted {true}
 
bool m_bSearchable {false}
 
QString m_sCreator
 
QString m_sWriteStatus {"PROTECTED"}
 
Classes m_SearchClass
 
Classes m_CreateClass
 
Properties m_properties
 
CDSObjects m_children
 
uint32_t m_nChildCount {0}
 
uint32_t m_nChildContainerCount {0}
 
Resources m_resources
 

Static Private Member Functions

static bool FilterContains (const FilterMap &filter, const QString &name)
 

Additional Inherited Members

- Protected Member Functions inherited from ReferenceCounter
virtual ~ReferenceCounter (void)
 Called on destruction, will warn if object deleted with references in place. More...
 
- Protected Attributes inherited from ReferenceCounter
bool m_logDebug
 This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More...
 
QAtomicInt m_referenceCount {1}
 

Detailed Description

Definition at line 184 of file upnpcdsobjects.h.

Constructor & Destructor Documentation

◆ CDSObject()

CDSObject::CDSObject ( const QString &  sId = "-1",
const QString &  sTitle = "",
const QString &  sParentId = "-1" 
)
explicit

◆ ~CDSObject()

CDSObject::~CDSObject ( )
virtual

Definition at line 44 of file upnpcdsobjects.cpp.

Member Function Documentation

◆ AddProperty()

Property * CDSObject::AddProperty ( Property pProp)

◆ GetProperties()

QList< Property * > CDSObject::GetProperties ( const QString &  sName)

◆ AddChild()

CDSObject * CDSObject::AddChild ( CDSObject pChild)

◆ GetChildren()

CDSObjects CDSObject::GetChildren ( void  )
inline

Definition at line 230 of file upnpcdsobjects.h.

◆ GetChild()

CDSObject * CDSObject::GetChild ( const QString &  sID)

◆ AddSearchClass()

ContainerClass* CDSObject::AddSearchClass ( ContainerClass pClass)

◆ AddCreateClass()

ContainerClass* CDSObject::AddCreateClass ( ContainerClass pClass)

◆ SetPropValue()

void CDSObject::SetPropValue ( const QString &  sName,
const QString &  sValue,
const QString &  type = "" 
)

◆ GetPropValue()

QString CDSObject::GetPropValue ( const QString &  sName) const

Definition at line 141 of file upnpcdsobjects.cpp.

◆ toXml() [1/2]

QString CDSObject::toXml ( FilterMap filter,
bool  ignoreChildren = false 
) const

Definition at line 260 of file upnpcdsobjects.cpp.

Referenced by UPnpCDS::HandleBrowse().

◆ toXml() [2/2]

void CDSObject::toXml ( QTextStream &  os,
FilterMap filter,
bool  ignoreChildren = false 
) const

Definition at line 275 of file upnpcdsobjects.cpp.

◆ GetChildCount()

uint32_t CDSObject::GetChildCount ( void  ) const

Return the number of children in this container.

Definition at line 215 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSTv::LoadChildren(), UPnpCDSMusic::LoadChildren(), UPnpCDSVideo::LoadChildren(), and toXml().

◆ SetChildCount()

void CDSObject::SetChildCount ( uint32_t  nCount)

◆ GetChildContainerCount()

uint32_t CDSObject::GetChildContainerCount ( void  ) const

Return the number of child containers in this container.

Per the UPnP Content Directory Service spec returning the number of containers lets the client determine the number of items by subtracting this value from the childCount

Definition at line 241 of file upnpcdsobjects.cpp.

Referenced by toXml().

◆ SetChildContainerCount()

void CDSObject::SetChildContainerCount ( uint32_t  nCount)

◆ AddResource()

Resource * CDSObject::AddResource ( const QString &  sProtocol,
const QString &  sURI 
)

◆ CreateItem()

CDSObject * CDSObject::CreateItem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

◆ CreateContainer()

CDSObject * CDSObject::CreateContainer ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

◆ CreateAudioItem()

CDSObject * CDSObject::CreateAudioItem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 498 of file upnpcdsobjects.cpp.

Referenced by CreateAudioBook(), CreateAudioBroadcast(), and CreateMusicTrack().

◆ CreateMusicTrack()

CDSObject * CDSObject::CreateMusicTrack ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 524 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSMusic::LoadTracks().

◆ CreateAudioBroadcast()

CDSObject * CDSObject::CreateAudioBroadcast ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 566 of file upnpcdsobjects.cpp.

◆ CreateAudioBook()

CDSObject * CDSObject::CreateAudioBook ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 587 of file upnpcdsobjects.cpp.

◆ CreateVideoItem()

CDSObject * CDSObject::CreateVideoItem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

◆ CreateMovie()

CDSObject * CDSObject::CreateMovie ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 664 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSVideo::LoadVideos().

◆ CreateVideoBroadcast()

CDSObject * CDSObject::CreateVideoBroadcast ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 682 of file upnpcdsobjects.cpp.

◆ CreateMusicVideoClip()

CDSObject * CDSObject::CreateMusicVideoClip ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 700 of file upnpcdsobjects.cpp.

◆ CreateImageItem()

CDSObject * CDSObject::CreateImageItem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 720 of file upnpcdsobjects.cpp.

Referenced by CreatePhoto().

◆ CreatePhoto()

CDSObject * CDSObject::CreatePhoto ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 745 of file upnpcdsobjects.cpp.

◆ CreatePlaylistItem()

CDSObject * CDSObject::CreatePlaylistItem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 762 of file upnpcdsobjects.cpp.

◆ CreateTextItem()

CDSObject * CDSObject::CreateTextItem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 784 of file upnpcdsobjects.cpp.

◆ CreateAlbum()

CDSObject * CDSObject::CreateAlbum ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

◆ CreateMusicAlbum()

CDSObject * CDSObject::CreateMusicAlbum ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 838 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSMusic::LoadAlbums().

◆ CreatePhotoAlbum()

CDSObject * CDSObject::CreatePhotoAlbum ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 858 of file upnpcdsobjects.cpp.

◆ CreateGenre()

CDSObject * CDSObject::CreateGenre ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 873 of file upnpcdsobjects.cpp.

Referenced by CreateMovieGenre(), and CreateMusicGenre().

◆ CreateMusicGenre()

CDSObject * CDSObject::CreateMusicGenre ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 888 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSMusic::LoadGenres().

◆ CreateMovieGenre()

CDSObject * CDSObject::CreateMovieGenre ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 903 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSTv::LoadGenres(), and UPnpCDSVideo::LoadGenres().

◆ CreatePlaylistContainer()

CDSObject * CDSObject::CreatePlaylistContainer ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 918 of file upnpcdsobjects.cpp.

◆ CreatePerson()

CDSObject * CDSObject::CreatePerson ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 941 of file upnpcdsobjects.cpp.

Referenced by CreateMusicArtist().

◆ CreateMusicArtist()

CDSObject * CDSObject::CreateMusicArtist ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 958 of file upnpcdsobjects.cpp.

Referenced by UPnpCDSMusic::LoadArtists().

◆ CreateStorageSystem()

CDSObject * CDSObject::CreateStorageSystem ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 976 of file upnpcdsobjects.cpp.

◆ CreateStorageVolume()

CDSObject * CDSObject::CreateStorageVolume ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 997 of file upnpcdsobjects.cpp.

◆ CreateStorageFolder()

CDSObject * CDSObject::CreateStorageFolder ( const QString &  sId,
const QString &  sTitle,
const QString &  sParentId,
CDSObject pObject = nullptr 
)
static

Definition at line 1017 of file upnpcdsobjects.cpp.

◆ FilterContains()

bool CDSObject::FilterContains ( const FilterMap filter,
const QString &  name 
)
staticprivate

Definition at line 1032 of file upnpcdsobjects.cpp.

Referenced by toXml().

Member Data Documentation

◆ m_nUpdateId

short CDSObject::m_nUpdateId {1}

Definition at line 187 of file upnpcdsobjects.h.

Referenced by UPnpCDS::HandleBrowse().

◆ m_eType

ObjectTypes CDSObject::m_eType {OT_Container}

Definition at line 189 of file upnpcdsobjects.h.

Referenced by AddChild(), CreateContainer(), CreateItem(), toXml(), and UPnpCDS::UPnpCDS().

◆ m_sId

QString CDSObject::m_sId

◆ m_sParentId

QString CDSObject::m_sParentId

Definition at line 194 of file upnpcdsobjects.h.

Referenced by AddChild(), toXml(), and UPnpCDS::UPnpCDS().

◆ m_sTitle

QString CDSObject::m_sTitle

Definition at line 195 of file upnpcdsobjects.h.

Referenced by toXml(), and UPnpCDS::UPnpCDS().

◆ m_sClass

QString CDSObject::m_sClass

◆ m_bRestricted

bool CDSObject::m_bRestricted {true}

Definition at line 197 of file upnpcdsobjects.h.

Referenced by toXml(), and UPnpCDS::UPnpCDS().

◆ m_bSearchable

bool CDSObject::m_bSearchable {false}

Definition at line 198 of file upnpcdsobjects.h.

Referenced by CreateContainer(), CreateItem(), toXml(), and UPnpCDS::UPnpCDS().

◆ m_sCreator

QString CDSObject::m_sCreator

Definition at line 202 of file upnpcdsobjects.h.

◆ m_sWriteStatus

QString CDSObject::m_sWriteStatus {"PROTECTED"}

Definition at line 203 of file upnpcdsobjects.h.

◆ m_SearchClass

Classes CDSObject::m_SearchClass

Definition at line 207 of file upnpcdsobjects.h.

◆ m_CreateClass

Classes CDSObject::m_CreateClass

Definition at line 208 of file upnpcdsobjects.h.

◆ m_properties

Properties CDSObject::m_properties

◆ m_children

CDSObjects CDSObject::m_children

Definition at line 213 of file upnpcdsobjects.h.

Referenced by AddChild(), GetChild(), GetChildCount(), toXml(), and ~CDSObject().

◆ m_nChildCount

uint32_t CDSObject::m_nChildCount {0}

Definition at line 214 of file upnpcdsobjects.h.

Referenced by AddChild(), GetChildCount(), and SetChildCount().

◆ m_nChildContainerCount

uint32_t CDSObject::m_nChildContainerCount {0}

Definition at line 215 of file upnpcdsobjects.h.

Referenced by AddChild(), GetChildContainerCount(), and SetChildContainerCount().

◆ m_resources

Resources CDSObject::m_resources

Definition at line 217 of file upnpcdsobjects.h.

Referenced by AddResource(), toXml(), and ~CDSObject().


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