MythTV master
mythfexml.h
Go to the documentation of this file.
1
2// Program Name: mythxml.h
3//
4// Purpose - Myth Frontend XML protocol HttpServerExtension
5//
7
8#ifndef MYTHFEXML_H_
9#define MYTHFEXML_H_
10
12#include "libmythupnp/upnp.h"
13
14enum MythFEXMLMethod : std::uint8_t
15{
21};
22
23class MythFEXML : public Eventing
24{
25 private:
26
29
30 protected:
31
32 // Implement UPnpServiceImpl methods that we can
33
34 QString GetServiceType() override // UPnpServiceImpl
35 { return "urn:schemas-mythtv-org:service:MythFrontend:1"; }
36 QString GetServiceId() override // UPnpServiceImpl
37 { return "urn:mythtv-org:serviceId:MYTHFRONTEND_1-0"; }
38 QString GetServiceControlURL() override // UPnpServiceImpl
39 { return m_sControlUrl.mid( 1 ); }
40 QString GetServiceDescURL() override // UPnpServiceImpl
41 { return m_sControlUrl.mid( 1 ) + "/GetServDesc"; }
42
43 private:
44
45 static MythFEXMLMethod GetMethod( const QString &sURI );
46
47 static void GetScreenShot ( HTTPRequest *pRequest );
48 static void GetActionListTest( HTTPRequest *pRequest );
49 static void GetRemote ( HTTPRequest *pRequest );
50
51 public:
52 MythFEXML( UPnpDevice *pDevice , const QString &sSharePath);
53 ~MythFEXML() override = default;
54
55 QStringList GetBasePaths() override; // Eventing
56
57 bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
58};
59
60#endif
61
62
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: mythfexml.h:40
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: mythfexml.h:38
static void GetActionListTest(HTTPRequest *pRequest)
Definition: mythfexml.cpp:166
QString m_sServiceDescFileName
Definition: mythfexml.h:28
MythFEXML(UPnpDevice *pDevice, const QString &sSharePath)
Definition: mythfexml.cpp:34
QStringList GetBasePaths() override
Definition: mythfexml.cpp:66
~MythFEXML() override=default
static void GetRemote(HTTPRequest *pRequest)
Definition: mythfexml.cpp:207
static void GetScreenShot(HTTPRequest *pRequest)
Definition: mythfexml.cpp:114
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: mythfexml.cpp:75
QString GetServiceType() override
Provices the schema urn.
Definition: mythfexml.h:34
static MythFEXMLMethod GetMethod(const QString &sURI)
Definition: mythfexml.cpp:52
QString m_sControlUrl
Definition: mythfexml.h:27
QString GetServiceId() override
Provides the device specific urn.
Definition: mythfexml.h:36
MythFEXMLMethod
Definition: mythfexml.h:15
@ MFEXML_ActionListTest
Definition: mythfexml.h:19
@ MFEXML_GetScreenShot
Definition: mythfexml.h:18
@ MFEXML_GetRemote
Definition: mythfexml.h:20
@ MFEXML_GetServiceDescription
Definition: mythfexml.h:17
@ MFEXML_Unknown
Definition: mythfexml.h:16