ConnectionManagerService Class Reference

This class is responsible for the UPnP Connection Manager Service operations. More...

#include <upnp_cm.h>

Inheritance diagram for ConnectionManagerService:
Singleton< ConnectionManagerService > zmm::Object

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< Mutexmutex
static zmm::Ref
< ConnectionManagerService
instance
static bool singletonActive

Detailed Description

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.


Constructor & Destructor Documentation

ConnectionManagerService::ConnectionManagerService (  ) 

Constructor for the CMS, saves the service type and service id in internal variables.

Todo:
Check if it makes sense to use it as it is done now...why not define them as constants?

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.


Member Function Documentation

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]

Definition at line 87 of file object.cc.

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file object.cc.

References MALLOC.

void ConnectionManagerService::process_action_request ( zmm::Ref< ActionRequest request  ) 

Dispatches the ActionRequest between the available actions.

Parameters:
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  ) 
virtual void Singleton< ConnectionManagerService >::registerSingleton (  )  [inline, protected, virtual, inherited]

Definition at line 94 of file singleton.h.

void Object::release (  )  [inherited]
void Object::retain (  )  [inherited]
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.

Parameters:
sourceProtocol_CSV Comma Separated Value list of protocol information

Sends out an update with protocol information to all subscribed devices

Todo:
add another error code

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().

Parameters:
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().

Parameters:
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().

Parameters:
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().


Field Documentation

mt_atomic_t zmm::Object::_ref_count [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]
String ConnectionManagerService::serviceType = nil [static, protected]

UPnP standard defined service type.

Todo:
Check if it makes sense to use it as it is done now...why not define constants here?

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.


The documentation for this class was generated from the following files:

Generated on Fri Mar 26 20:16:56 2010 for MediaTomb by  doxygen 1.6.1