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
11#include <cstdint>
12
13#include <QString>
14#include <QStringList>
15
18
19enum MythFEXMLMethod : std::uint8_t
20{
25};
26
27class MythFEXML : public Eventing
28{
29 private:
30
33
34 protected:
35
36 // Implement UPnpServiceImpl methods that we can
37
38 QString GetServiceType() override // UPnpServiceImpl
39 { return "urn:schemas-mythtv-org:service:MythFrontend:1"; }
40 QString GetServiceId() override // UPnpServiceImpl
41 { return "urn:mythtv-org:serviceId:MYTHFRONTEND_1-0"; }
42 QString GetServiceControlURL() override // UPnpServiceImpl
43 { return m_sControlUrl.mid( 1 ); }
44 QString GetServiceDescURL() override // UPnpServiceImpl
45 { return m_sControlUrl.mid( 1 ) + "/GetServDesc"; }
46
47 private:
48
49 static MythFEXMLMethod GetMethod( const QString &sURI );
50
51 static void GetScreenShot ( HTTPRequest *pRequest );
52 static void GetActionListTest( HTTPRequest *pRequest );
53
54 public:
55 MythFEXML( UPnpDevice *pDevice , const QString &sSharePath);
56 ~MythFEXML() override = default;
57
58 QStringList GetBasePaths() override; // Eventing
59
60 bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
61};
62
63#endif
64
65
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: mythfexml.h:44
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: mythfexml.h:42
static void GetActionListTest(HTTPRequest *pRequest)
Definition: mythfexml.cpp:157
QString m_sServiceDescFileName
Definition: mythfexml.h:32
MythFEXML(UPnpDevice *pDevice, const QString &sSharePath)
Definition: mythfexml.cpp:29
QStringList GetBasePaths() override
Definition: mythfexml.cpp:60
~MythFEXML() override=default
static void GetScreenShot(HTTPRequest *pRequest)
Definition: mythfexml.cpp:105
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: mythfexml.cpp:69
QString GetServiceType() override
Provices the schema urn.
Definition: mythfexml.h:38
static MythFEXMLMethod GetMethod(const QString &sURI)
Definition: mythfexml.cpp:47
QString m_sControlUrl
Definition: mythfexml.h:31
QString GetServiceId() override
Provides the device specific urn.
Definition: mythfexml.h:40
MythFEXMLMethod
Definition: mythfexml.h:20
@ MFEXML_ActionListTest
Definition: mythfexml.h:24
@ MFEXML_GetScreenShot
Definition: mythfexml.h:23
@ MFEXML_GetServiceDescription
Definition: mythfexml.h:22
@ MFEXML_Unknown
Definition: mythfexml.h:21