MythTV  master
mythfexml.h
Go to the documentation of this file.
1 // 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 "libmythupnp/eventing.h"
12 #include "libmythupnp/upnp.h"
13 
14 enum MythFEXMLMethod : std::uint8_t
15 {
21 };
22 
23 class MythFEXML : public Eventing
24 {
25  private:
26 
27  QString m_sControlUrl;
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 
MythFEXML::ProcessRequest
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: mythfexml.cpp:75
HTTPRequest
Definition: httprequest.h:109
MFEXML_GetScreenShot
@ MFEXML_GetScreenShot
Definition: mythfexml.h:18
MythFEXML::~MythFEXML
~MythFEXML() override=default
MythFEXML::GetScreenShot
static void GetScreenShot(HTTPRequest *pRequest)
Definition: mythfexml.cpp:114
MythFEXML
Definition: mythfexml.h:23
Eventing
Definition: eventing.h:245
MythFEXML::GetServiceDescURL
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: mythfexml.h:40
MythFEXML::m_sControlUrl
QString m_sControlUrl
Definition: mythfexml.h:27
MFEXML_GetRemote
@ MFEXML_GetRemote
Definition: mythfexml.h:20
MythFEXML::GetServiceControlURL
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: mythfexml.h:38
MythFEXML::GetMethod
static MythFEXMLMethod GetMethod(const QString &sURI)
Definition: mythfexml.cpp:52
MFEXML_ActionListTest
@ MFEXML_ActionListTest
Definition: mythfexml.h:19
eventing.h
upnp.h
MythFEXML::GetBasePaths
QStringList GetBasePaths() override
Definition: mythfexml.cpp:66
MythFEXML::m_sServiceDescFileName
QString m_sServiceDescFileName
Definition: mythfexml.h:28
MythFEXMLMethod
MythFEXMLMethod
Definition: mythfexml.h:14
UPnpDevice
Definition: upnpdevice.h:102
MythFEXML::GetActionListTest
static void GetActionListTest(HTTPRequest *pRequest)
Definition: mythfexml.cpp:166
MFEXML_Unknown
@ MFEXML_Unknown
Definition: mythfexml.h:16
MythFEXML::GetServiceType
QString GetServiceType() override
Provices the schema urn.
Definition: mythfexml.h:34
MythFEXML::MythFEXML
MythFEXML(UPnpDevice *pDevice, const QString &sSharePath)
Definition: mythfexml.cpp:34
MFEXML_GetServiceDescription
@ MFEXML_GetServiceDescription
Definition: mythfexml.h:17
MythFEXML::GetRemote
static void GetRemote(HTTPRequest *pRequest)
Definition: mythfexml.cpp:207
MythFEXML::GetServiceId
QString GetServiceId() override
Provides the device specific urn.
Definition: mythfexml.h:36