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 "eventing.h"
9#include "httprequest.h"
10
11enum UPnpMSRRMethod : std::uint8_t
12{
18};
19
21//
22// UPnpMSRR Class Definition
23//
26
28{
29 private:
30
33
34 static UPnpMSRRMethod GetMethod ( const QString &sURI );
35
36 static void HandleIsAuthorized ( HTTPRequest *pRequest );
37 static void HandleRegisterDevice ( HTTPRequest *pRequest );
38 static void HandleIsValidated ( HTTPRequest *pRequest );
39
40 protected:
41
42 // Implement UPnpServiceImpl methods that we can
43
44 QString GetServiceType() override // UPnpServiceImpl
45 { return "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1"; }
46 QString GetServiceId() override // UPnpServiceImpl
47 { return "urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar"; }
48 QString GetServiceControlURL() override // UPnpServiceImpl
49 { return m_sControlUrl.mid( 1 ); }
50 QString GetServiceDescURL() override // UPnpServiceImpl
51 { return m_sControlUrl.mid( 1 ) + "/GetServDesc"; }
52
53 public:
54 UPnpMSRR( UPnpDevice *pDevice,
55 const QString &sSharePath );
56
57 ~UPnpMSRR() override = default;
58
59 QStringList GetBasePaths() override; // Eventing
60
61 bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
62};
63
64#endif
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: eventing.cpp:148
QStringList GetBasePaths() override
Definition: eventing.cpp:136
QString GetServiceId() override
Provides the device specific urn.
Definition: upnpmsrr.h:46
QString GetServiceType() override
Provices the schema urn.
Definition: upnpmsrr.h:44
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: upnpmsrr.h:50
QString m_sServiceDescFileName
Definition: upnpmsrr.h:31
QString m_sControlUrl
Definition: upnpmsrr.h:32
~UPnpMSRR() override=default
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: upnpmsrr.h:48
#define UPNP_PUBLIC
Definition: upnpexp.h:9
UPnpMSRRMethod
Definition: upnpmsrr.h:12
@ MSRR_RegisterDevice
Definition: upnpmsrr.h:16
@ MSRR_IsValidated
Definition: upnpmsrr.h:17
@ MSRR_Unknown
Definition: upnpmsrr.h:13
@ MSRR_GetServiceDescription
Definition: upnpmsrr.h:14
@ MSRR_IsAuthorized
Definition: upnpmsrr.h:15