This class is responsible for the UPnP Connection Manager Service operations. More...
#include <upnp_cm.h>
Public Member Functions | |
| ConnectionManagerService () | |
| Constructor for the CMS, saves the service type and service id in internal variables. | |
| virtual | ~ConnectionManagerService () |
| void | process_action_request (zmm::Ref< ActionRequest > request) |
| Dispatches the ActionRequest between the available actions. | |
| void | process_subscription_request (zmm::Ref< SubscriptionRequest > request) |
| Processes an incoming SubscriptionRequest. | |
| void | subscription_update (zmm::String sourceProtocol_CSV) |
| Sends out an event to all subscribed devices. | |
| void | retain () |
| void | release () |
| int | getRefCount () |
Static Public Member Functions | |
| static void | setStaticArgs (zmm::String serviceType, zmm::String serviceID) |
| static zmm::Ref < ConnectionManagerService > | getInstance () |
| static void * | operator new (size_t size) |
| static void | operator delete (void *ptr) |
Protected Member Functions | |
| void | upnp_action_GetCurrentConnectionIDs (zmm::Ref< ActionRequest > request) |
| UPnP standard defined action: GetCurrentConnectionIDs(). | |
| void | upnp_action_GetCurrentConnectionInfo (zmm::Ref< ActionRequest > request) |
| UPnP standard defined action: GetCurrentConnectionInfo(). | |
| void | upnp_action_GetProtocolInfo (zmm::Ref< ActionRequest > request) |
| UPnP standard defined action: GetProtocolInfo(). | |
| virtual void | init () |
| virtual void | shutdown () |
| virtual void | registerSingleton () |
Protected Attributes | |
| mt_atomic_t | _ref_count |
Static Protected Attributes | |
| static zmm::String | serviceType = nil |
| UPnP standard defined service type. | |
| static zmm::String | serviceID = nil |
| ID of the service. | |
| static zmm::Ref< Mutex > | mutex |
| static zmm::Ref < ConnectionManagerService > | instance |
| static bool | singletonActive |
This class is responsible for the UPnP Connection Manager Service operations.
Handles subscription and action invocation requests for the Connection Manager.
Definition at line 44 of file upnp_cm.h.
| ConnectionManagerService::ConnectionManagerService | ( | ) |
Constructor for the CMS, saves the service type and service id in internal variables.
Definition at line 46 of file upnp_cm.cc.
References _, _Exception, nil, serviceID, and serviceType.
| ConnectionManagerService::~ConnectionManagerService | ( | ) | [virtual] |
Definition at line 52 of file upnp_cm.cc.
References nil, serviceID, and serviceType.
| static zmm::Ref<ConnectionManagerService > Singleton< ConnectionManagerService >::getInstance | ( | ) | [inline, static, inherited] |
Definition at line 62 of file singleton.h.
Referenced by process_subscription_request(), and upnp_action_GetProtocolInfo().
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| virtual void Singleton< ConnectionManagerService >::init | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 87 of file singleton.h.
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void ConnectionManagerService::process_action_request | ( | zmm::Ref< ActionRequest > | request | ) |
Dispatches the ActionRequest between the available actions.
| request | Incoming ActionRequest. |
This function looks at the incoming ActionRequest and passes it on to the appropriate action for processing.
Definition at line 86 of file upnp_cm_actions.cc.
References log_debug, upnp_action_GetCurrentConnectionIDs(), upnp_action_GetCurrentConnectionInfo(), upnp_action_GetProtocolInfo(), and UPNP_E_INVALID_ACTION.
| void ConnectionManagerService::process_subscription_request | ( | zmm::Ref< SubscriptionRequest > | request | ) |
Processes an incoming SubscriptionRequest.
| request | Incoming SubscriptionRequest. |
Looks at the incoming SubscriptionRequest and accepts the subscription if everything is ok.
Definition at line 46 of file upnp_cm_subscriptions.cc.
References _, zmm::String::c_str(), CFG_SERVER_UDN, Singleton< ConfigManager >::getInstance(), Singleton< Server >::getInstance(), Singleton< ConnectionManagerService >::getInstance(), IXML_SUCCESS, ixmlDocument_free(), ixmlParseBufferEx(), mime_types_to_CSV(), NULL, serviceID, UPNP_E_SUBSCRIPTION_FAILED, UpnpAcceptSubscriptionExt(), and UpnpXML_CreateEventPropertySet().
| virtual void Singleton< ConnectionManagerService >::registerSingleton | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 94 of file singleton.h.
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::clear(), zmm::String::operator=(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSBHash< VT >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), DSOHash< zmm::Array< CacheObject > >::~DSOHash(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Element >::~ObjectStack(), and zmm::String::~String().
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Element >::push(), DSOHash< zmm::Array< CacheObject > >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
| void ConnectionManagerService::setStaticArgs | ( | zmm::String | serviceType, | |
| zmm::String | serviceID | |||
| ) | [static] |
Definition at line 58 of file upnp_cm.cc.
References serviceID, and serviceType.
Referenced by Server::init().
| virtual void Singleton< ConnectionManagerService >::shutdown | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 88 of file singleton.h.
| void ConnectionManagerService::subscription_update | ( | zmm::String | sourceProtocol_CSV | ) |
Sends out an event to all subscribed devices.
| sourceProtocol_CSV | Comma Separated Value list of protocol information |
Sends out an update with protocol information to all subscribed devices
Definition at line 77 of file upnp_cm_subscriptions.cc.
References _, zmm::String::c_str(), CFG_SERVER_UDN, Singleton< ConfigManager >::getInstance(), Singleton< Server >::getInstance(), IXML_SUCCESS, ixmlDocument_free(), ixmlParseBufferEx(), NULL, serviceID, UPNP_E_SUBSCRIPTION_FAILED, UpnpNotifyExt(), and UpnpXML_CreateEventPropertySet().
| void ConnectionManagerService::upnp_action_GetCurrentConnectionIDs | ( | zmm::Ref< ActionRequest > | request | ) | [protected] |
UPnP standard defined action: GetCurrentConnectionIDs().
| request | Incoming ActionRequest. |
GetCurrentConnectionIDs(string ConnectionIDs)
This is currently unsupported (returns empty string)
Definition at line 43 of file upnp_cm_actions.cc.
References _, log_debug, serviceType, UPNP_E_SUCCESS, and UpnpXML_CreateResponse().
Referenced by process_action_request().
| void ConnectionManagerService::upnp_action_GetCurrentConnectionInfo | ( | zmm::Ref< ActionRequest > | request | ) | [protected] |
UPnP standard defined action: GetCurrentConnectionInfo().
| request | Incoming ActionRequest. |
GetCurrentConnectionInfo(i4 ConnectoinID, i4 RcsID, i4 AVTransportID, string ProtocolInfo, string PeerConnectionManager, i4 PeerConnectionID, string Direction, string Status)
This action is currently unsupported.
Definition at line 57 of file upnp_cm_actions.cc.
References log_debug, and UPNP_E_NOT_EXIST.
Referenced by process_action_request().
| void ConnectionManagerService::upnp_action_GetProtocolInfo | ( | zmm::Ref< ActionRequest > | request | ) | [protected] |
UPnP standard defined action: GetProtocolInfo().
| request | Incoming ActionRequest. |
GetProtocolInfo(string Source, string Sink)
Definition at line 66 of file upnp_cm_actions.cc.
References _, Singleton< ConnectionManagerService >::getInstance(), log_debug, mime_types_to_CSV(), serviceType, UPNP_E_SUCCESS, and UpnpXML_CreateResponse().
Referenced by process_action_request().
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
zmm::Ref<ConnectionManagerService > Singleton< ConnectionManagerService >::instance [static, protected, inherited] |
Definition at line 91 of file singleton.h.
zmm::Ref<Mutex> Singleton< ConnectionManagerService >::mutex [static, protected, inherited] |
Reimplemented from zmm::Object.
Definition at line 90 of file singleton.h.
String ConnectionManagerService::serviceID = nil [static, protected] |
ID of the service.
Definition at line 53 of file upnp_cm.h.
Referenced by ConnectionManagerService(), process_subscription_request(), setStaticArgs(), subscription_update(), and ~ConnectionManagerService().
String ConnectionManagerService::serviceType = nil [static, protected] |
UPnP standard defined service type.
Definition at line 50 of file upnp_cm.h.
Referenced by ConnectionManagerService(), setStaticArgs(), upnp_action_GetCurrentConnectionIDs(), upnp_action_GetProtocolInfo(), and ~ConnectionManagerService().
bool Singleton< ConnectionManagerService >::singletonActive [static, protected, inherited] |
Definition at line 92 of file singleton.h.
1.6.1