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