MythTV  master
upnpcdstv.h
Go to the documentation of this file.
1 // Program Name: upnpcdstv.h
3 //
4 // Purpose - uPnp Content Directory Extension for Recorded TV
5 //
6 // Created By : David Blain Created On : Jan. 24, 2005
7 // Modified By : Modified On:
8 //
10 
11 #ifndef UPnpCDSTV_H_
12 #define UPnpCDSTV_H_
13 
14 #include "upnpcds.h"
15 
17 //
19 
21 {
22  public:
23 
24  UPnpCDSTv();
25  virtual ~UPnpCDSTv() = default;
26 
27  protected:
28 
29  bool IsBrowseRequestForUs( UPnpCDSRequest *pRequest ) override; // UPnpCDSExtension
30  bool IsSearchRequestForUs( UPnpCDSRequest *pRequest ) override; // UPnpCDSExtension
31 
32  void CreateRoot ( ) override; // UPnpCDSExtension
33 
34  bool LoadMetadata( const UPnpCDSRequest *pRequest,
35  UPnpCDSExtensionResults *pResults,
36  const IDTokenMap& tokens,
37  const QString& currentToken ) override; // UPnpCDSExtension
38  bool LoadChildren( const UPnpCDSRequest *pRequest,
39  UPnpCDSExtensionResults *pResults,
40  const IDTokenMap& tokens,
41  const QString& currentToken ) override; // UPnpCDSExtension
42 
43  private:
44  bool LoadRecordings ( const UPnpCDSRequest *pRequest,
45  UPnpCDSExtensionResults *pResults,
46  IDTokenMap tokens );
47  bool LoadTitles ( const UPnpCDSRequest *pRequest,
48  UPnpCDSExtensionResults *pResults,
49  const IDTokenMap& tokens );
50  static bool LoadDates ( const UPnpCDSRequest *pRequest,
51  UPnpCDSExtensionResults *pResults,
52  const IDTokenMap& tokens );
53  static bool LoadGenres ( const UPnpCDSRequest *pRequest,
54  UPnpCDSExtensionResults *pResults,
55  const IDTokenMap& tokens );
56  static bool LoadChannels ( const UPnpCDSRequest *pRequest,
57  UPnpCDSExtensionResults *pResults,
58  const IDTokenMap& tokens );
59  static bool LoadRecGroups ( const UPnpCDSRequest *pRequest,
60  UPnpCDSExtensionResults *pResults,
61  const IDTokenMap& tokens );
62  bool LoadMovies ( const UPnpCDSRequest *pRequest,
63  UPnpCDSExtensionResults *pResults,
64  IDTokenMap tokens );
65 // bool LoadSeasons ( const UPnpCDSRequest *pRequest,
66 // UPnpCDSExtensionResults *pResults,
67 // IDTokenMap tokens );
68 // bool LoadEpisodes ( const UPnpCDSRequest *pRequest,
69 // UPnpCDSExtensionResults *pResults,
70 // IDTokenMap tokens );
71 
72  static void PopulateArtworkURIS( CDSObject *pItem, const QString &sInetRef,
73  int nSeason, const QUrl &URIBase );
74 
75  // Common code helpers
76  static QString BuildWhereClause( QStringList clauses,
77  IDTokenMap tokens );
78  static void BindValues ( MSqlQuery &query,
79  IDTokenMap tokens );
80 
81  QUrl m_URIBase;
82 
84  QMap<QString, int> m_mapBackendPort;
85 };
86 
87 #endif
bool LoadRecordings(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens)
Definition: upnpcdstv.cpp:927
static bool LoadRecGroups(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:743
QMap< QString, QString > QStringMap
Definition: upnputil.h:40
bool LoadMovies(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens)
Definition: upnpcdstv.cpp:890
static QString BuildWhereClause(QStringList clauses, IDTokenMap tokens)
Definition: upnpcdstv.cpp:1441
virtual ~UPnpCDSTv()=default
bool IsBrowseRequestForUs(UPnpCDSRequest *pRequest) override
Definition: upnpcdstv.cpp:411
static bool LoadDates(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:605
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
bool LoadTitles(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:518
static void BindValues(MSqlQuery &query, IDTokenMap tokens)
Definition: upnpcdstv.cpp:1491
bool LoadMetadata(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens, const QString &currentToken) override
Fetch just the metadata for the item identified in the request.
Definition: upnpcdstv.cpp:279
bool LoadChildren(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens, const QString &currentToken) override
Fetch the children of the container identified in the request.
Definition: upnpcdstv.cpp:351
static bool LoadChannels(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:815
QMap< QString, int > m_mapBackendPort
Definition: upnpcdstv.h:84
QMap< QString, QString > IDTokenMap
Definition: upnpcds.h:195
QStringMap m_mapBackendIp
Definition: upnpcdstv.h:83
QUrl m_URIBase
Definition: upnpcdstv.h:81
bool IsSearchRequestForUs(UPnpCDSRequest *pRequest) override
Definition: upnpcdstv.cpp:457
static void PopulateArtworkURIS(CDSObject *pItem, const QString &sInetRef, int nSeason, const QUrl &URIBase)
Definition: upnpcdstv.cpp:1323
void CreateRoot() override
Definition: upnpcdstv.cpp:147
static bool LoadGenres(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:672