mUPnP for C++
mUPnP::Service Class Reference

#include <Service.h>

Public Member Functions

mupnp_shared_ptr< uXML::NodegetServiceNode ()
 
bool hasServiceNode ()
 
 Service (mupnp_shared_ptr< uXML::Node > node)
 
 ~Service ()
 
void lock ()
 
void unlock ()
 
DevicegetDevice ()
 
DevicegetRootDevice ()
 
void setServiceType (const std::string &value)
 
const char * getServiceType ()
 
void setServiceID (const std::string &value)
 
const char * getServiceID ()
 
void setSCPDURL (const std::string &value)
 
const char * getSCPDURL ()
 
bool isSCPDURL (const std::string &url)
 
const char * getSCPDData (std::string &buf)
 
void setControlURL (const std::string &value)
 
const char * getControlURL ()
 
bool isControlURL (const std::string &url)
 
void setEventSubURL (const std::string &value)
 
const char * getEventSubURL ()
 
bool isEventSubURL (const std::string &url)
 
bool loadSCPD (const std::string &descString)
 
bool loadSCPD (uHTTP::File *file)
 
ActionListgetActionList ()
 
ActiongetAction (const std::string &actionName)
 
ServiceStateTablegetServiceStateTable ()
 
StateVariablegetStateVariable (const std::string &name)
 
bool hasStateVariable (const std::string &name)
 
bool isService (const std::string &name)
 
ServiceDatagetServiceData ()
 
bool announce (const std::string &ifAddr)
 
bool byebye (const std::string &ifAddr)
 
bool serviceSearchResponse (SSDPPacket *ssdpPacket)
 
void setQueryListener (QueryListener *listener)
 
SubscriberListgetSubscriberList ()
 
void addSubscriber (Subscriber *sub)
 
void removeSubscriber (Subscriber *sub)
 
SubscribergetSubscriberBySID (const std::string &name)
 
SubscribergetSubscriberByDeliveryURL (const std::string &name)
 
void notify (StateVariable *stateVar)
 
void notifyAllStateVariables ()
 
const char * getSID ()
 
void setSID (const std::string &sid)
 
void clearSID ()
 
bool hasSID ()
 
bool isSubscribed ()
 
long getTimeout ()
 
void setTimeout (long value)
 
void setActionListener (ActionListener *listener)
 

Static Public Member Functions

static bool isServiceNode (mupnp_shared_ptr< uXML::Node > node)
 

Static Public Attributes

static const char * ELEM_NAME
 
static const char * SERVICE_TYPE
 
static const char * SERVICE_ID
 
static const char * SCPDURL
 
static const char * CONTROL_URL
 
static const char * EVENT_SUB_URL
 

Private Member Functions

void initServiceData ()
 
uXML::NodegetDeviceNode ()
 
uXML::NodegetRootNode ()
 
bool isURL (const std::string &referenceUrl, const std::string &url)
 
mupnp_shared_ptr< uXML::NodegetSCPDNode (uHTTP::URL *url)
 
mupnp_shared_ptr< uXML::NodegetSCPDNode (uHTTP::File *file)
 
mupnp_shared_ptr< uXML::NodegetSCPDNode (const std::string &description)
 
mupnp_shared_ptr< uXML::NodegetSCPDNode ()
 
void initActionList ()
 
void initServiceStateTable ()
 
const char * getNotifyServiceTypeNT (std::string &buf)
 
const char * getNotifyServiceTypeUSN (std::string &buf)
 
bool notify (Subscriber *sub, StateVariable *stateVar)
 

Private Attributes

mupnp_shared_ptr< uXML::NodeserviceNode
 
ActionList actionList
 
ServiceStateTable serviceStateTable
 
uHTTP::Mutex mutex
 

Constructor & Destructor Documentation

◆ Service()

mUPnP::Service::Service ( mupnp_shared_ptr< uXML::Node > node)

◆ ~Service()

mUPnP::Service::~Service ( )

Member Function Documentation

◆ addSubscriber()

void mUPnP::Service::addSubscriber ( Subscriber * sub)

◆ announce()

bool mUPnP::Service::announce ( const std::string & ifAddr)

◆ byebye()

bool mUPnP::Service::byebye ( const std::string & ifAddr)

◆ clearSID()

void mUPnP::Service::clearSID ( )
inline

◆ getAction()

Action * mUPnP::Service::getAction ( const std::string & actionName)

◆ getActionList()

ActionList * mUPnP::Service::getActionList ( )
inline

◆ getControlURL()

const char * mUPnP::Service::getControlURL ( )
inline

◆ getDevice()

Device * mUPnP::Service::getDevice ( )
inline

◆ getDeviceNode()

uXML::Node * mUPnP::Service::getDeviceNode ( )
inlineprivate

◆ getEventSubURL()

const char * mUPnP::Service::getEventSubURL ( )
inline

◆ getNotifyServiceTypeNT()

const char * mUPnP::Service::getNotifyServiceTypeNT ( std::string & buf)
private

◆ getNotifyServiceTypeUSN()

const char * mUPnP::Service::getNotifyServiceTypeUSN ( std::string & buf)
private

◆ getRootDevice()

Device * mUPnP::Service::getRootDevice ( )

◆ getRootNode()

uXML::Node * mUPnP::Service::getRootNode ( )
inlineprivate

◆ getSCPDData()

const char * mUPnP::Service::getSCPDData ( std::string & buf)

◆ getSCPDNode() [1/4]

mupnp_shared_ptr< uXML::Node > mUPnP::Service::getSCPDNode ( )
private

◆ getSCPDNode() [2/4]

mupnp_shared_ptr< uXML::Node > mUPnP::Service::getSCPDNode ( const std::string & description)
private

◆ getSCPDNode() [3/4]

mupnp_shared_ptr< uXML::Node > mUPnP::Service::getSCPDNode ( uHTTP::File * file)
private

◆ getSCPDNode() [4/4]

mupnp_shared_ptr< uXML::Node > mUPnP::Service::getSCPDNode ( uHTTP::URL * url)
private

◆ getSCPDURL()

const char * mUPnP::Service::getSCPDURL ( )
inline

◆ getServiceData()

ServiceData * mUPnP::Service::getServiceData ( )
inline

◆ getServiceID()

const char * mUPnP::Service::getServiceID ( )
inline

◆ getServiceNode()

mupnp_shared_ptr< uXML::Node > mUPnP::Service::getServiceNode ( )
inline

◆ getServiceStateTable()

ServiceStateTable * mUPnP::Service::getServiceStateTable ( )
inline

◆ getServiceType()

const char * mUPnP::Service::getServiceType ( )
inline

◆ getSID()

const char * mUPnP::Service::getSID ( )
inline

◆ getStateVariable()

StateVariable * mUPnP::Service::getStateVariable ( const std::string & name)

◆ getSubscriberByDeliveryURL()

Subscriber * mUPnP::Service::getSubscriberByDeliveryURL ( const std::string & name)

◆ getSubscriberBySID()

Subscriber * mUPnP::Service::getSubscriberBySID ( const std::string & name)

◆ getSubscriberList()

SubscriberList * mUPnP::Service::getSubscriberList ( )
inline

◆ getTimeout()

long mUPnP::Service::getTimeout ( )
inline

◆ hasServiceNode()

bool mUPnP::Service::hasServiceNode ( )
inline

◆ hasSID()

bool mUPnP::Service::hasSID ( )
inline

◆ hasStateVariable()

bool mUPnP::Service::hasStateVariable ( const std::string & name)
inline

◆ initActionList()

void mUPnP::Service::initActionList ( )
private

◆ initServiceData()

void mUPnP::Service::initServiceData ( )
inlineprivate

◆ initServiceStateTable()

void mUPnP::Service::initServiceStateTable ( )
private

◆ isControlURL()

bool mUPnP::Service::isControlURL ( const std::string & url)
inline

◆ isEventSubURL()

bool mUPnP::Service::isEventSubURL ( const std::string & url)
inline

◆ isSCPDURL()

bool mUPnP::Service::isSCPDURL ( const std::string & url)
inline

◆ isService()

bool mUPnP::Service::isService ( const std::string & name)
inline

◆ isServiceNode()

static bool mUPnP::Service::isServiceNode ( mupnp_shared_ptr< uXML::Node > node)
inlinestatic

◆ isSubscribed()

bool mUPnP::Service::isSubscribed ( )
inline

◆ isURL()

bool mUPnP::Service::isURL ( const std::string & referenceUrl,
const std::string & url )
private

◆ loadSCPD() [1/2]

bool mUPnP::Service::loadSCPD ( const std::string & descString)

◆ loadSCPD() [2/2]

bool mUPnP::Service::loadSCPD ( uHTTP::File * file)

◆ lock()

void mUPnP::Service::lock ( )
inline

◆ notify() [1/2]

void mUPnP::Service::notify ( StateVariable * stateVar)

◆ notify() [2/2]

bool mUPnP::Service::notify ( Subscriber * sub,
StateVariable * stateVar )
private

◆ notifyAllStateVariables()

void mUPnP::Service::notifyAllStateVariables ( )

◆ removeSubscriber()

void mUPnP::Service::removeSubscriber ( Subscriber * sub)

◆ serviceSearchResponse()

bool mUPnP::Service::serviceSearchResponse ( SSDPPacket * ssdpPacket)

◆ setActionListener()

void mUPnP::Service::setActionListener ( ActionListener * listener)

◆ setControlURL()

void mUPnP::Service::setControlURL ( const std::string & value)
inline

◆ setEventSubURL()

void mUPnP::Service::setEventSubURL ( const std::string & value)
inline

◆ setQueryListener()

void mUPnP::Service::setQueryListener ( QueryListener * listener)

◆ setSCPDURL()

void mUPnP::Service::setSCPDURL ( const std::string & value)
inline

◆ setServiceID()

void mUPnP::Service::setServiceID ( const std::string & value)
inline

◆ setServiceType()

void mUPnP::Service::setServiceType ( const std::string & value)
inline

◆ setSID()

void mUPnP::Service::setSID ( const std::string & sid)
inline

◆ setTimeout()

void mUPnP::Service::setTimeout ( long value)
inline

◆ unlock()

void mUPnP::Service::unlock ( )
inline

Field Documentation

◆ actionList

ActionList mUPnP::Service::actionList
private

◆ CONTROL_URL

const char* mUPnP::Service::CONTROL_URL
static

◆ ELEM_NAME

const char* mUPnP::Service::ELEM_NAME
static

◆ EVENT_SUB_URL

const char* mUPnP::Service::EVENT_SUB_URL
static

◆ mutex

uHTTP::Mutex mUPnP::Service::mutex
private

◆ SCPDURL

const char* mUPnP::Service::SCPDURL
static

◆ SERVICE_ID

const char* mUPnP::Service::SERVICE_ID
static

◆ SERVICE_TYPE

const char* mUPnP::Service::SERVICE_TYPE
static

◆ serviceNode

mupnp_shared_ptr<uXML::Node> mUPnP::Service::serviceNode
private

◆ serviceStateTable

ServiceStateTable mUPnP::Service::serviceStateTable
private

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