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  ~UPnpMSRR() override = default;
60 
61  QStringList GetBasePaths() override; // Eventing
62 
63  bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
64 };
65 
66 #endif
HTTPRequest
Definition: httprequest.h:108
Eventing::GetBasePaths
QStringList GetBasePaths() override
Definition: eventing.cpp:141
UPnpMSRR
Definition: upnpmsrr.h:29
Eventing
Definition: eventing.h:245
UPnpMSRR::GetServiceControlURL
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: upnpmsrr.h:50
Eventing::ProcessRequest
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: eventing.cpp:153
UPnpMSRR::GetServiceType
QString GetServiceType() override
Provices the schema urn.
Definition: upnpmsrr.h:46
MSRR_IsAuthorized
@ MSRR_IsAuthorized
Definition: upnpmsrr.h:17
eventing.h
MSRR_GetServiceDescription
@ MSRR_GetServiceDescription
Definition: upnpmsrr.h:16
UPnpMSRR::GetServiceDescURL
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: upnpmsrr.h:52
UPnpDevice
Definition: upnpdevice.h:101
UPnpMSRR::m_sControlUrl
QString m_sControlUrl
Definition: upnpmsrr.h:34
MSRR_IsValidated
@ MSRR_IsValidated
Definition: upnpmsrr.h:19
MSRR_Unknown
@ MSRR_Unknown
Definition: upnpmsrr.h:15
MSRR_RegisterDevice
@ MSRR_RegisterDevice
Definition: upnpmsrr.h:18
UPNP_PUBLIC
#define UPNP_PUBLIC
Definition: upnpexp.h:9
UPnpMSRRMethod
UPnpMSRRMethod
Definition: upnpmsrr.h:13
httpserver.h
UPnpMSRR::m_sServiceDescFileName
QString m_sServiceDescFileName
Definition: upnpmsrr.h:33
UPnpMSRR::GetServiceId
QString GetServiceId() override
Provides the device specific urn.
Definition: upnpmsrr.h:48