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  IDTokenMap tokens,
37  QString currentToken ) override; // UPnpCDSExtension
38  bool LoadChildren( const UPnpCDSRequest *pRequest,
39  UPnpCDSExtensionResults *pResults,
40  IDTokenMap tokens,
41  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  bool LoadDates ( const UPnpCDSRequest *pRequest,
51  UPnpCDSExtensionResults *pResults,
52  const IDTokenMap& tokens );
53  bool LoadGenres ( const UPnpCDSRequest *pRequest,
54  UPnpCDSExtensionResults *pResults,
55  const IDTokenMap& tokens );
56  bool LoadChannels ( const UPnpCDSRequest *pRequest,
57  UPnpCDSExtensionResults *pResults,
58  const IDTokenMap& tokens );
59  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  void PopulateArtworkURIS( CDSObject *pItem, const QString &sInetRef,
73  int nSeason, const QUrl &URIBase );
74 
75  // Common code helpers
76  QString BuildWhereClause( QStringList clauses,
77  IDTokenMap tokens );
78  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:928
bool LoadRecGroups(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:744
bool LoadMovies(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens)
Definition: upnpcdstv.cpp:891
QString BuildWhereClause(QStringList clauses, IDTokenMap tokens)
Definition: upnpcdstv.cpp:1442
virtual ~UPnpCDSTv()=default
bool IsBrowseRequestForUs(UPnpCDSRequest *pRequest) override
Definition: upnpcdstv.cpp:412
bool LoadDates(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:606
bool LoadMetadata(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens, QString currentToken) override
Fetch just the metadata for the item identified in the request.
Definition: upnpcdstv.cpp:280
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:519
void BindValues(MSqlQuery &query, IDTokenMap tokens)
Definition: upnpcdstv.cpp:1492
QMap< QString, QString > QStringMap
Definition: upnputil.h:40
bool LoadChannels(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:816
QMap< QString, int > m_mapBackendPort
Definition: upnpcdstv.h:84
QStringMap m_mapBackendIp
Definition: upnpcdstv.h:83
QUrl m_URIBase
Definition: upnpcdstv.h:81
bool LoadChildren(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, IDTokenMap tokens, QString currentToken) override
Fetch the children of the container identified in the request.
Definition: upnpcdstv.cpp:352
bool IsSearchRequestForUs(UPnpCDSRequest *pRequest) override
Definition: upnpcdstv.cpp:458
QMap< QString, QString > IDTokenMap
Definition: upnpcds.h:197
void PopulateArtworkURIS(CDSObject *pItem, const QString &sInetRef, int nSeason, const QUrl &URIBase)
Definition: upnpcdstv.cpp:1324
void CreateRoot() override
Definition: upnpcdstv.cpp:147
bool LoadGenres(const UPnpCDSRequest *pRequest, UPnpCDSExtensionResults *pResults, const IDTokenMap &tokens)
Definition: upnpcdstv.cpp:673