MythTV  master
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
UPnpCDSExtension Class Reference

#include <upnpcds.h>

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

Public Member Functions

 UPnpCDSExtension (QString sName, QString sExtensionId, QString sClass)
 
virtual CDSObjectGetRoot ()
 
virtual ~UPnpCDSExtension ()
 
virtual UPnpCDSExtensionResultsBrowse (UPnpCDSRequest *pRequest)
 
virtual UPnpCDSExtensionResultsSearch (UPnpCDSRequest *pRequest)
 
virtual QString GetSearchCapabilities ()
 
virtual QString GetSortCapabilities ()
 
virtual CDSShortCutList GetShortCuts ()
 

Public Attributes

QString m_sExtensionId
 
QString m_sName
 
QString m_sClass
 
CDSShortCutList m_shortcuts
 

Protected Member Functions

QString RemoveToken (const QString &sToken, const QString &sStr, int num)
 
virtual bool IsBrowseRequestForUs (UPnpCDSRequest *pRequest)
 
virtual bool IsSearchRequestForUs (UPnpCDSRequest *pRequest)
 
virtual int GetRootCount ()
 
virtual int GetRootContainerCount ()
 
virtual void CreateRoot ()
 
virtual bool LoadMetadata (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens, QString currentToken)
 Fetch just the metadata for the item identified in the request. More...
 
virtual bool LoadChildren (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens, QString currentToken)
 Fetch the children of the container identified in the request. More...
 
IDTokenMap TokenizeIDString (const QString &Id) const
 Split the 'Id' String up into tokens for handling by each extension. More...
 
IDToken GetCurrentToken (const QString &Id) const
 Split the 'Id' String up into tokens and return the last (current) token. More...
 
QString CreateIDString (const QString &RequestId, const QString &Name, int Value)
 
QString CreateIDString (const QString &RequestId, const QString &Name, const QString &Value)
 

Protected Attributes

CDSObjectm_pRoot {nullptr}
 

Detailed Description

Definition at line 200 of file upnpcds.h.

Constructor & Destructor Documentation

◆ UPnpCDSExtension()

UPnpCDSExtension::UPnpCDSExtension ( QString  sName,
QString  sExtensionId,
QString  sClass 
)
inline

Definition at line 250 of file upnpcds.h.

◆ ~UPnpCDSExtension()

UPnpCDSExtension::~UPnpCDSExtension ( )
virtual

Definition at line 791 of file upnpcds.cpp.

Member Function Documentation

◆ RemoveToken()

QString UPnpCDSExtension::RemoveToken ( const QString &  sToken,
const QString &  sStr,
int  num 
)
protected

Definition at line 931 of file upnpcds.cpp.

◆ IsBrowseRequestForUs()

bool UPnpCDSExtension::IsBrowseRequestForUs ( UPnpCDSRequest pRequest)
protectedvirtual

◆ IsSearchRequestForUs()

bool UPnpCDSExtension::IsSearchRequestForUs ( UPnpCDSRequest pRequest)
protectedvirtual

◆ GetRootCount()

virtual int UPnpCDSExtension::GetRootCount ( )
inlineprotectedvirtual

Definition at line 221 of file upnpcds.h.

◆ GetRootContainerCount()

virtual int UPnpCDSExtension::GetRootContainerCount ( )
inlineprotectedvirtual

Definition at line 222 of file upnpcds.h.

◆ CreateRoot()

void UPnpCDSExtension::CreateRoot ( )
protectedvirtual

Reimplemented in UPnpCDSVideo, UPnpCDSMusic, and UPnpCDSTv.

Definition at line 1075 of file upnpcds.cpp.

Referenced by GetRoot().

◆ LoadMetadata()

bool UPnpCDSExtension::LoadMetadata ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
IDTokenMap  tokens,
QString  currentToken 
)
protectedvirtual

Fetch just the metadata for the item identified in the request.

This is the 'BrowseMetadata' request type.

The ID may refer to a container or an object.

  • pRequest The request object to read the id from
  • pResults The result object to write into
Returns
true if we could load the metadata

Reimplemented in UPnpCDSVideo, UPnpCDSMusic, and UPnpCDSTv.

Definition at line 962 of file upnpcds.cpp.

Referenced by Browse().

◆ LoadChildren()

bool UPnpCDSExtension::LoadChildren ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
IDTokenMap  tokens,
QString  currentToken 
)
protectedvirtual

Fetch the children of the container identified in the request.

This is the 'BrowseDirectChildren' request type.

The ID may only refer to a container.

  • pRequest The request object to read the id from
  • pResults The result object to write into
Returns
true if we could load the children

Reimplemented in UPnpCDSVideo, UPnpCDSMusic, and UPnpCDSTv.

Definition at line 983 of file upnpcds.cpp.

Referenced by Browse().

◆ TokenizeIDString()

IDTokenMap UPnpCDSExtension::TokenizeIDString ( const QString &  Id) const
protected

Split the 'Id' String up into tokens for handling by each extension.

Some example strings:

Recordings/RecGroup=3/Date=1380844800 (2013-10-04 in 'epoch' form)
Video/Genre=10
Music/Artist=123/Album=15
Music/Genre=32/Artist=616/Album=13/Track=2632

Special case where we only care about the last token:

Video/Directory=45/Directory=63/Directory=82

Definition at line 1004 of file upnpcds.cpp.

Referenced by Browse().

◆ GetCurrentToken()

IDToken UPnpCDSExtension::GetCurrentToken ( const QString &  Id) const
protected

Split the 'Id' String up into tokens and return the last (current) token.

Some example strings:

Recordings/RecGroup=3/Date=1380844800 (2013-10-04 in 'epoch' form)
Video/Genre=10
Music/Artist=123/Album=15
Music/Genre=32/Artist=616/Album=13/Track=2632

Special case where we only care about the last token:

Video/Directory=45/Directory=63/Directory=82

Definition at line 1040 of file upnpcds.cpp.

Referenced by Browse(), and CreateIDString().

◆ CreateIDString() [1/2]

QString UPnpCDSExtension::CreateIDString ( const QString &  RequestId,
const QString &  Name,
int  Value 
)
protected

◆ CreateIDString() [2/2]

QString UPnpCDSExtension::CreateIDString ( const QString &  RequestId,
const QString &  Name,
const QString &  Value 
)
protected

Definition at line 1057 of file upnpcds.cpp.

◆ GetRoot()

CDSObject * UPnpCDSExtension::GetRoot ( void  )
virtual

◆ Browse()

UPnpCDSExtensionResults * UPnpCDSExtension::Browse ( UPnpCDSRequest pRequest)
virtual

Definition at line 818 of file upnpcds.cpp.

◆ Search()

UPnpCDSExtensionResults * UPnpCDSExtension::Search ( UPnpCDSRequest pRequest)
virtual

Definition at line 900 of file upnpcds.cpp.

◆ GetSearchCapabilities()

virtual QString UPnpCDSExtension::GetSearchCapabilities ( )
inlinevirtual

Definition at line 266 of file upnpcds.h.

◆ GetSortCapabilities()

virtual QString UPnpCDSExtension::GetSortCapabilities ( )
inlinevirtual

Definition at line 267 of file upnpcds.h.

◆ GetShortCuts()

virtual CDSShortCutList UPnpCDSExtension::GetShortCuts ( )
inlinevirtual

Definition at line 268 of file upnpcds.h.

Referenced by UPnpCDS::RegisterExtension().

Member Data Documentation

◆ m_sExtensionId

QString UPnpCDSExtension::m_sExtensionId

◆ m_sName

QString UPnpCDSExtension::m_sName

◆ m_sClass

QString UPnpCDSExtension::m_sClass

Definition at line 206 of file upnpcds.h.

Referenced by IsSearchRequestForUs(), and Search().

◆ m_shortcuts

CDSShortCutList UPnpCDSExtension::m_shortcuts

◆ m_pRoot

CDSObject* UPnpCDSExtension::m_pRoot {nullptr}
protected

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