MythTV  master
upnpcmgr.h
Go to the documentation of this file.
1 // Program Name: UPnpCMGR.h
3 // Created : Dec. 28, 2006
4 //
5 // Purpose : uPnp Connection Manager Service
6 //
7 // Copyright (c) 2006 David Blain <dblain@mythtv.org>
8 //
9 // Licensed under the GPL v2 or later, see COPYING for details
10 //
12 
13 #ifndef UPnpCMGR_H_
14 #define UPnpCMGR_H_
15 
16 #include "httpserver.h"
17 #include "eventing.h"
18 
20 {
27 };
28 
30 
32 {
38 };
39 
42 //
43 // UPnpCMGR Class Definition
44 //
47 
49 {
50  private:
51 
53  QString m_sControlUrl;
54 
56 
57  static UPnpCMGRMethod GetMethod ( const QString &sURI );
58 
59  void HandleGetProtocolInfo ( HTTPRequest *pRequest );
60  static void HandleGetCurrentConnectionInfo( HTTPRequest *pRequest );
61  void HandleGetCurrentConnectionIDs ( HTTPRequest *pRequest );
62  void HandleGetFeatureList ( HTTPRequest *pRequest );
63 
64  protected:
65 
66  // Implement UPnpServiceImpl methods that we can
67 
68  QString GetServiceType() override // UPnpServiceImpl
69  { return "urn:schemas-upnp-org:service:ConnectionManager:3"; }
70  QString GetServiceId() override // UPnpServiceImpl
71  { return "urn:upnp-org:serviceId:ConnectionManager"; }
72  QString GetServiceControlURL() override // UPnpServiceImpl
73  { return m_sControlUrl.mid( 1 ); }
74  QString GetServiceDescURL() override // UPnpServiceImpl
75  { return m_sControlUrl.mid( 1 ) + "/GetServDesc"; }
76 
77  public:
78  UPnpCMGR( UPnpDevice *pDevice,
79  const QString &sSharePath,
80  const QString &sSourceProtocols = "",
81  const QString &sSinkProtocols = "" );
82 
83  virtual ~UPnpCMGR() = default;
84 
85  void AddSourceProtocol( const QString &sProtocol );
86  void AddSinkProtocol ( const QString &sProtocol );
87 
88  QStringList GetBasePaths() override; // Eventing
89 
90  bool ProcessRequest( HTTPRequest *pRequest ) override; // Eventing
91 };
92 
93 #endif
QStringList GetBasePaths() override
Definition: eventing.cpp:131
QString GetServiceId() override
Provides the device specific urn.
Definition: upnpcmgr.h:70
UPnPFeatureList m_features
Definition: upnpcmgr.h:55
QString GetServiceDescURL() override
Provices the URL of the service description XML.
Definition: upnpcmgr.h:74
UPnpCMGRMethod
Definition: upnpcmgr.h:19
bool ProcessRequest(HTTPRequest *pRequest) override
Definition: eventing.cpp:143
UPnpCMGRConnectionStatus
Definition: upnpcmgr.h:31
QString m_sServiceDescFileName
Definition: upnpcmgr.h:52
#define UPNP_PUBLIC
Definition: upnpexp.h:9
QString GetServiceType() override
Provices the schema urn.
Definition: upnpcmgr.h:68
QString GetServiceControlURL() override
Provices the base URL for control commands.
Definition: upnpcmgr.h:72
QString m_sControlUrl
Definition: upnpcmgr.h:53