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

#include <upnpcdsmusic.h>

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

Public Member Functions

 UPnpCDSMusic ()
 Music Extension for UPnP ContentDirectory Service. More...
 
virtual ~UPnpCDSMusic ()=default
 
- Public Member Functions inherited from UPnpCDSExtension
 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 ()
 

Protected Member Functions

bool IsBrowseRequestForUs (UPnpCDSRequest *pRequest) override
 
bool IsSearchRequestForUs (UPnpCDSRequest *pRequest) override
 
void CreateRoot () override
 
bool LoadMetadata (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens, QString currentToken) override
 Fetch just the metadata for the item identified in the request. More...
 
bool LoadChildren (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens, QString currentToken) override
 Fetch the children of the container identified in the request. More...
 
- Protected Member Functions inherited from UPnpCDSExtension
QString RemoveToken (const QString &sToken, const QString &sStr, int num)
 
virtual int GetRootCount ()
 
virtual int GetRootContainerCount ()
 
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)
 

Private Member Functions

void PopulateArtworkURIS (CDSObject *pItem, int songID)
 
bool LoadArtists (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
 
bool LoadAlbums (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
 
bool LoadGenres (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
 
bool LoadTracks (const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
 
QString BuildWhereClause (QStringList clauses, IDTokenMap tokens)
 
void BindValues (MSqlQuery &query, IDTokenMap tokens)
 

Private Attributes

QUrl m_URIBase
 

Additional Inherited Members

- Public Attributes inherited from UPnpCDSExtension
QString m_sExtensionId
 
QString m_sName
 
QString m_sClass
 
CDSShortCutList m_shortcuts
 
- Protected Attributes inherited from UPnpCDSExtension
CDSObjectm_pRoot {nullptr}
 

Detailed Description

Definition at line 22 of file upnpcdsmusic.h.

Constructor & Destructor Documentation

◆ UPnpCDSMusic()

UPnpCDSMusic::UPnpCDSMusic ( )

Music Extension for UPnP ContentDirectory Service.

Music Music

  • All Music Music/Track
    • <Track 1> Music/Track=1
    • <Track 2> Music/Track=2
    • <Track 3> Music/Track=3
  • PlayLists // TODO
  • By Artist Music/Artist
    • <Artist 1> Music/Artist=123
      • <Album 1> Music/Artist=123/Album=345
        • <Track 1> Music/Artist=123/Album=345/Track=1
        • <Track 2> Music/Artist=123/Album=345/Track=2
  • By Album Music/Album
    • <Album 1> Music/Album=789
      • <Track 1> Music/Album=789/Track=1
      • <Track 2> Music/Album=789/Track=2
  • By Recently Added // TODO
    • <Track 1>
    • <Track 2>
  • By Genre Music/Genre
    • <Genre 1> Music/Genre=252
      • By Artist Music/Genre=252/Artist
        • <Artist 1> Music/Genre=252/Artist=123
          • <Album 1> Music/Genre=252/Artist=123/Album=345
            • <Track 1> Music/Genre=252/Artist=123/Album=345/Track=1
            • <Track 2> Music/Genre=252/Artist=123/Album=345/Track=2

Definition at line 58 of file upnpcdsmusic.cpp.

◆ ~UPnpCDSMusic()

virtual UPnpCDSMusic::~UPnpCDSMusic ( )
virtualdefault

Member Function Documentation

◆ IsBrowseRequestForUs()

bool UPnpCDSMusic::IsBrowseRequestForUs ( UPnpCDSRequest pRequest)
overrideprotectedvirtual

Reimplemented from UPnpCDSExtension.

Definition at line 183 of file upnpcdsmusic.cpp.

◆ IsSearchRequestForUs()

bool UPnpCDSMusic::IsSearchRequestForUs ( UPnpCDSRequest pRequest)
overrideprotectedvirtual

Reimplemented from UPnpCDSExtension.

Definition at line 216 of file upnpcdsmusic.cpp.

◆ CreateRoot()

void UPnpCDSMusic::CreateRoot ( )
overrideprotectedvirtual

Reimplemented from UPnpCDSExtension.

Definition at line 80 of file upnpcdsmusic.cpp.

◆ LoadMetadata()

bool UPnpCDSMusic::LoadMetadata ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
IDTokenMap  tokens,
QString  currentToken 
)
overrideprotectedvirtual

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 from UPnpCDSExtension.

Definition at line 261 of file upnpcdsmusic.cpp.

◆ LoadChildren()

bool UPnpCDSMusic::LoadChildren ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
IDTokenMap  tokens,
QString  currentToken 
)
overrideprotectedvirtual

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 from UPnpCDSExtension.

Definition at line 325 of file upnpcdsmusic.cpp.

◆ PopulateArtworkURIS()

void UPnpCDSMusic::PopulateArtworkURIS ( CDSObject pItem,
int  songID 
)
private

Definition at line 369 of file upnpcdsmusic.cpp.

Referenced by LoadAlbums(), and LoadTracks().

◆ LoadArtists()

bool UPnpCDSMusic::LoadArtists ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
const IDTokenMap tokens 
)
private

Definition at line 550 of file upnpcdsmusic.cpp.

Referenced by CreateRoot(), LoadChildren(), and LoadMetadata().

◆ LoadAlbums()

bool UPnpCDSMusic::LoadAlbums ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
const IDTokenMap tokens 
)
private

Definition at line 458 of file upnpcdsmusic.cpp.

Referenced by CreateRoot(), LoadChildren(), and LoadMetadata().

◆ LoadGenres()

bool UPnpCDSMusic::LoadGenres ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
const IDTokenMap tokens 
)
private

Definition at line 633 of file upnpcdsmusic.cpp.

Referenced by CreateRoot(), LoadChildren(), and LoadMetadata().

◆ LoadTracks()

bool UPnpCDSMusic::LoadTracks ( const UPnpCDSRequest pRequest,
UPnpCDSExtensionResults pResults,
const IDTokenMap tokens 
)
private

Definition at line 705 of file upnpcdsmusic.cpp.

Referenced by CreateRoot(), LoadChildren(), and LoadMetadata().

◆ BuildWhereClause()

QString UPnpCDSMusic::BuildWhereClause ( QStringList  clauses,
IDTokenMap  tokens 
)
private

Definition at line 843 of file upnpcdsmusic.cpp.

Referenced by LoadAlbums(), LoadArtists(), LoadGenres(), and LoadTracks().

◆ BindValues()

void UPnpCDSMusic::BindValues ( MSqlQuery query,
IDTokenMap  tokens 
)
private

Definition at line 878 of file upnpcdsmusic.cpp.

Referenced by LoadAlbums(), LoadArtists(), LoadGenres(), and LoadTracks().

Member Data Documentation

◆ m_URIBase

QUrl UPnpCDSMusic::m_URIBase
private

Definition at line 47 of file upnpcdsmusic.h.

Referenced by LoadTracks(), PopulateArtworkURIS(), and UPnpCDSMusic().


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