MythTV  master
upnpmsrr.h
Go to the documentation of this file.
1 
2 #ifndef UPnpMSRR_H_
3 #define UPnpMSRR_H_
4 
5 #include <QDomDocument>
6 #include <QString>
7 
8 #include "httpserver.h"
9 #include "eventing.h"
10 
11 class UPnpMSRR;
12 
14 {
20 };
21 
23 //
24 // UPnpMSRR Class Definition
25 //
28 
30 {
31  private:
32 
34  QString m_sControlUrl;
35 
36  static UPnpMSRRMethod GetMethod ( const QString &sURI );
37 
38  static void HandleIsAuthorized ( HTTPRequest *pRequest );
39  static void HandleRegisterDevice ( HTTPRequest *pRequest );
40  static void HandleIsValidated ( HTTPRequest *pRequest );
41 
42  protected:
43 
44  // Implement UPnpServiceImpl methods that we can
45 
46  QString GetServiceType() override // UPnpServiceImpl
47  { return "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1"; }
48  QString GetServiceId() override // UPnpServiceImpl
49  { return "urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar"; }
50  QString GetServiceControlURL() override // UPnpServiceImpl
51  { return m_sControlUrl.mid( 1 ); }
52  QString GetServiceDescURL() override // UPnpServiceImpl
53  { return m_sControlUrl.mid( 1 ) + "/GetServDesc"; }
54 
55  public:
56  UPnpMSRR( UPnpDevice *pDevice,
57  const QString &sSharePath );
58 
59  virtual ~UPnpMSRR() = default;
60 
61  QStringList GetBasePaths() override; // Eventing
62 
63  bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
64 };
65 
66 #endif
QStringList GetBasePaths() override
Definition: eventing.cpp:131
UPnpMSRRMethod
Definition: upnpmsrr.h:13
QString GetServiceId() override
Provides the device specific urn.
Definition: upnpmsrr.h:48
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: upnpmsrr.h:50
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: eventing.cpp:143
#define UPNP_PUBLIC
Definition: upnpexp.h:9
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: upnpmsrr.h:52
QString m_sControlUrl
Definition: upnpmsrr.h:34
QString m_sServiceDescFileName
Definition: upnpmsrr.h:33
QString GetServiceType() override
Provices the schema urn.
Definition: upnpmsrr.h:46