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 
13 typedef enum
14 {
20 
22 
24 //
25 // UPnpMSRR Class Definition
26 //
29 
31 {
32  private:
33 
35  QString m_sControlUrl;
36 
37  UPnpMSRRMethod GetMethod ( const QString &sURI );
38 
39  void HandleIsAuthorized ( HTTPRequest *pRequest );
40  void HandleRegisterDevice ( HTTPRequest *pRequest );
41  void HandleIsValidated ( HTTPRequest *pRequest );
42 
43  protected:
44 
45  // Implement UPnpServiceImpl methods that we can
46 
47  QString GetServiceType() override // UPnpServiceImpl
48  { return "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1"; }
49  QString GetServiceId() override // UPnpServiceImpl
50  { return "urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar"; }
51  QString GetServiceControlURL() override // UPnpServiceImpl
52  { return m_sControlUrl.mid( 1 ); }
53  QString GetServiceDescURL() override // UPnpServiceImpl
54  { return m_sControlUrl.mid( 1 ) + "/GetServDesc"; }
55 
56  public:
57  UPnpMSRR( UPnpDevice *pDevice,
58  const QString &sSharePath );
59 
60  virtual ~UPnpMSRR() = default;
61 
62  QStringList GetBasePaths() override; // Eventing
63 
64  bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
65 };
66 
67 #endif
QStringList GetBasePaths() override
Definition: eventing.cpp:135
UPnpMSRRMethod
Definition: upnpmsrr.h:13
QString GetServiceId() override
Provides the device specific urn.
Definition: upnpmsrr.h:49
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: upnpmsrr.h:51
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: eventing.cpp:147
#define UPNP_PUBLIC
Definition: upnpexp.h:9
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: upnpmsrr.h:53
QString m_sControlUrl
Definition: upnpmsrr.h:35
QString m_sServiceDescFileName
Definition: upnpmsrr.h:34
QString GetServiceType() override
Provices the schema urn.
Definition: upnpmsrr.h:47