mUPnP for C++
mUPnP::ControlPoint Class Reference

#include <ControlPoint.h>

Inheritance diagram for mUPnP::ControlPoint:

Public Member Functions

 ControlPoint (int ssdpPort=DEFAULT_SSDP_PORT, int httpPort=DEFAULT_EVENTSUB_PORT)
 
virtual ~ControlPoint ()
 
int getSSDPPort ()
 
void setSSDPPort (int port)
 
int getHTTPPort ()
 
void setHTTPPort (int port)
 
size_t getHTTPWorkerCount ()
 
void setHTTPWorkerCount (size_t count)
 
void setNMPRMode (bool flag)
 
bool isNMPRMode ()
 
DeviceListgetDeviceList ()
 
mupnp_shared_ptr< DevicegetDevice (mupnp_shared_ptr< uXML::Node > rootNode)
 
mupnp_shared_ptr< DevicegetDevice (const std::string &name)
 
bool hasDevice (const std::string &name)
 
void setExpiredDeviceMonitoringInterval (long interval)
 
long getExpiredDeviceMonitoringInterval ()
 
void setDeviceDisposer (Disposer *disposer)
 
DisposergetDeviceDisposer ()
 
void removeExpiredDevices ()
 
void clean ()
 
void addNotifyListener (NotifyListener *listener)
 
void removeNotifyListener (NotifyListener *listener)
 
bool performNotifyListener (SSDPPacket *ssdpPacket)
 
void addSearchResponseListener (SearchResponseListener *listener)
 
void removeSearchResponseListener (SearchResponseListener *listener)
 
bool performSearchResponseListener (SSDPPacket *ssdpPacket)
 
void addDeviceChangeListener (DeviceChangeListener *listener)
 
void removeDeviceChangeListener (DeviceChangeListener *listener)
 
bool performAddDeviceListener (Device *dev)
 
bool performRemoveDeviceListener (Device *dev)
 
void notifyReceived (SSDPPacket *packet)
 
void searchResponseReceived (SSDPPacket *packet)
 
int getSearchMx ()
 
void setSearchMx (int mx)
 
bool search (const std::string &target, int mx)
 
bool search (const std::string &target)
 
bool search ()
 
void addEventListener (EventListener *listener)
 
void removeEventListener (EventListener *listener)
 
bool performEventListener (const std::string &uuid, long seq, const std::string &name, const std::string &value)
 
const char * getEventSubURI ()
 
void setEventSubURI (const std::string &url)
 
bool subscribe (Service *service, long timeout)
 
bool subscribe (Service *service)
 
bool subscribe (Service *service, const std::string &uuid, long timeout)
 
bool subscribe (Service *service, const std::string &uuid)
 
bool isSubscribed (Service *service)
 
bool unsubscribe (Service *service)
 
void unsubscribe (Device *device)
 
void unsubscribe ()
 
ServicegetSubscriberService (const std::string &uuid)
 
void renewSubscriberService (Device *dev, long timeout)
 
void renewSubscriberService (long timeout)
 
void renewSubscriberService ()
 
void setRenewSubscriber (RenewSubscriber *sub)
 
RenewSubscribergetRenewSubscriber ()
 
bool start (const std::string &target, int mx)
 
bool start (const std::string &target)
 
bool start ()
 
bool stop ()
 
void lock ()
 
void unlock ()
 
void print ()
 

Static Public Attributes

static const int DEFAULT_EVENTSUB_PORT
 
static const int DEFAULT_EVENTSUB_WORKER_COUNT
 
static const int DEFAULT_SSDP_PORT
 
static const char * DEFAULT_EVENTSUB_URI
 
static const int DEFAULT_EXPIRED_DEVICE_MONITORING_INTERVAL
 

Private Member Functions

SSDPNotifySocketListgetSSDPNotifySocketList ()
 
SSDPSearchResponseSocketListgetSSDPSearchResponseSocketList ()
 
bool addDevice (mupnp_shared_ptr< uXML::Node > rootNode)
 
bool addDevice (SSDPPacket *ssdpPacket)
 
void initDeviceList ()
 
bool removeDevice (mupnp_shared_ptr< uXML::Node > rootNode)
 
bool removeDevice (SSDPPacket *packet)
 
uHTTP::HTTPServerList * getHTTPServerList ()
 
uHTTP::HTTP::StatusCode httpRequestRecieved (uHTTP::HTTPRequest *httpReq)
 
const char * getEventSubCallbackURL (const std::string &host, std::string &buf)
 

Private Attributes

SSDPNotifySocketList ssdpNotifySocketList
 
SSDPSearchResponseSocketList ssdpSearchResponseSocketList
 
int ssdpPort
 
int httpPort
 
size_t httpWorkerCount
 
uXML::NodeList devNodeList
 
uXML::NodeList removedDevNodeList
 
NotifyListenerList deviceNotifyListenerList
 
SearchResponseListenerList deviceSearchResponseListenerList
 
DeviceChangeListenerList deviceChangeListenerList
 
uHTTP::Mutex mutex
 
DeviceList deviceList
 
int searchMx
 
uHTTP::HTTPServerList httpServerList
 
EventListenerList eventListenerList
 
std::string eventSubURI
 
DisposerdeviceDisposer
 
long expiredDeviceMonitoringInterval
 
bool nmprMode
 
RenewSubscriberrenewSubscriber
 

Constructor & Destructor Documentation

◆ ControlPoint()

mUPnP::ControlPoint::ControlPoint ( int ssdpPort = DEFAULT_SSDP_PORT,
int httpPort = DEFAULT_EVENTSUB_PORT )

◆ ~ControlPoint()

virtual mUPnP::ControlPoint::~ControlPoint ( )
virtual

Member Function Documentation

◆ addDevice() [1/2]

bool mUPnP::ControlPoint::addDevice ( mupnp_shared_ptr< uXML::Node > rootNode)
private

◆ addDevice() [2/2]

bool mUPnP::ControlPoint::addDevice ( SSDPPacket * ssdpPacket)
private

◆ addDeviceChangeListener()

void mUPnP::ControlPoint::addDeviceChangeListener ( DeviceChangeListener * listener)
inline

◆ addEventListener()

void mUPnP::ControlPoint::addEventListener ( EventListener * listener)
inline

◆ addNotifyListener()

void mUPnP::ControlPoint::addNotifyListener ( NotifyListener * listener)
inline

◆ addSearchResponseListener()

void mUPnP::ControlPoint::addSearchResponseListener ( SearchResponseListener * listener)
inline

◆ clean()

void mUPnP::ControlPoint::clean ( )

◆ getDevice() [1/2]

mupnp_shared_ptr< Device > mUPnP::ControlPoint::getDevice ( const std::string & name)

◆ getDevice() [2/2]

mupnp_shared_ptr< Device > mUPnP::ControlPoint::getDevice ( mupnp_shared_ptr< uXML::Node > rootNode)

◆ getDeviceDisposer()

Disposer * mUPnP::ControlPoint::getDeviceDisposer ( )
inline

◆ getDeviceList()

DeviceList * mUPnP::ControlPoint::getDeviceList ( )
inline

◆ getEventSubCallbackURL()

const char * mUPnP::ControlPoint::getEventSubCallbackURL ( const std::string & host,
std::string & buf )
inlineprivate

◆ getEventSubURI()

const char * mUPnP::ControlPoint::getEventSubURI ( )
inline

◆ getExpiredDeviceMonitoringInterval()

long mUPnP::ControlPoint::getExpiredDeviceMonitoringInterval ( )
inline

◆ getHTTPPort()

int mUPnP::ControlPoint::getHTTPPort ( )
inline

◆ getHTTPServerList()

uHTTP::HTTPServerList * mUPnP::ControlPoint::getHTTPServerList ( )
inlineprivate

◆ getHTTPWorkerCount()

size_t mUPnP::ControlPoint::getHTTPWorkerCount ( )
inline

◆ getRenewSubscriber()

RenewSubscriber * mUPnP::ControlPoint::getRenewSubscriber ( )
inline

◆ getSearchMx()

int mUPnP::ControlPoint::getSearchMx ( )
inline

◆ getSSDPNotifySocketList()

SSDPNotifySocketList * mUPnP::ControlPoint::getSSDPNotifySocketList ( )
inlineprivate

◆ getSSDPPort()

int mUPnP::ControlPoint::getSSDPPort ( )
inline

◆ getSSDPSearchResponseSocketList()

SSDPSearchResponseSocketList * mUPnP::ControlPoint::getSSDPSearchResponseSocketList ( )
inlineprivate

◆ getSubscriberService()

Service * mUPnP::ControlPoint::getSubscriberService ( const std::string & uuid)

◆ hasDevice()

bool mUPnP::ControlPoint::hasDevice ( const std::string & name)
inline

◆ httpRequestRecieved()

uHTTP::HTTP::StatusCode mUPnP::ControlPoint::httpRequestRecieved ( uHTTP::HTTPRequest * httpReq)
private

◆ initDeviceList()

void mUPnP::ControlPoint::initDeviceList ( )
private

◆ isNMPRMode()

bool mUPnP::ControlPoint::isNMPRMode ( )
inline

◆ isSubscribed()

bool mUPnP::ControlPoint::isSubscribed ( Service * service)

◆ lock()

void mUPnP::ControlPoint::lock ( )
inline

◆ notifyReceived()

void mUPnP::ControlPoint::notifyReceived ( SSDPPacket * packet)

◆ performAddDeviceListener()

bool mUPnP::ControlPoint::performAddDeviceListener ( Device * dev)

◆ performEventListener()

bool mUPnP::ControlPoint::performEventListener ( const std::string & uuid,
long seq,
const std::string & name,
const std::string & value )

◆ performNotifyListener()

bool mUPnP::ControlPoint::performNotifyListener ( SSDPPacket * ssdpPacket)

◆ performRemoveDeviceListener()

bool mUPnP::ControlPoint::performRemoveDeviceListener ( Device * dev)

◆ performSearchResponseListener()

bool mUPnP::ControlPoint::performSearchResponseListener ( SSDPPacket * ssdpPacket)

◆ print()

void mUPnP::ControlPoint::print ( )

◆ removeDevice() [1/2]

bool mUPnP::ControlPoint::removeDevice ( mupnp_shared_ptr< uXML::Node > rootNode)
private

◆ removeDevice() [2/2]

bool mUPnP::ControlPoint::removeDevice ( SSDPPacket * packet)
private

◆ removeDeviceChangeListener()

void mUPnP::ControlPoint::removeDeviceChangeListener ( DeviceChangeListener * listener)
inline

◆ removeEventListener()

void mUPnP::ControlPoint::removeEventListener ( EventListener * listener)
inline

◆ removeExpiredDevices()

void mUPnP::ControlPoint::removeExpiredDevices ( )

◆ removeNotifyListener()

void mUPnP::ControlPoint::removeNotifyListener ( NotifyListener * listener)
inline

◆ removeSearchResponseListener()

void mUPnP::ControlPoint::removeSearchResponseListener ( SearchResponseListener * listener)
inline

◆ renewSubscriberService() [1/3]

void mUPnP::ControlPoint::renewSubscriberService ( )

◆ renewSubscriberService() [2/3]

void mUPnP::ControlPoint::renewSubscriberService ( Device * dev,
long timeout )

◆ renewSubscriberService() [3/3]

void mUPnP::ControlPoint::renewSubscriberService ( long timeout)

◆ search() [1/3]

bool mUPnP::ControlPoint::search ( )
inline

◆ search() [2/3]

bool mUPnP::ControlPoint::search ( const std::string & target)
inline

◆ search() [3/3]

bool mUPnP::ControlPoint::search ( const std::string & target,
int mx )

◆ searchResponseReceived()

void mUPnP::ControlPoint::searchResponseReceived ( SSDPPacket * packet)

◆ setDeviceDisposer()

void mUPnP::ControlPoint::setDeviceDisposer ( Disposer * disposer)
inline

◆ setEventSubURI()

void mUPnP::ControlPoint::setEventSubURI ( const std::string & url)
inline

◆ setExpiredDeviceMonitoringInterval()

void mUPnP::ControlPoint::setExpiredDeviceMonitoringInterval ( long interval)
inline

◆ setHTTPPort()

void mUPnP::ControlPoint::setHTTPPort ( int port)
inline

◆ setHTTPWorkerCount()

void mUPnP::ControlPoint::setHTTPWorkerCount ( size_t count)
inline

◆ setNMPRMode()

void mUPnP::ControlPoint::setNMPRMode ( bool flag)
inline

◆ setRenewSubscriber()

void mUPnP::ControlPoint::setRenewSubscriber ( RenewSubscriber * sub)
inline

◆ setSearchMx()

void mUPnP::ControlPoint::setSearchMx ( int mx)
inline

◆ setSSDPPort()

void mUPnP::ControlPoint::setSSDPPort ( int port)
inline

◆ start() [1/3]

bool mUPnP::ControlPoint::start ( )
inline

◆ start() [2/3]

bool mUPnP::ControlPoint::start ( const std::string & target)
inline

◆ start() [3/3]

bool mUPnP::ControlPoint::start ( const std::string & target,
int mx )

◆ stop()

bool mUPnP::ControlPoint::stop ( )

◆ subscribe() [1/4]

bool mUPnP::ControlPoint::subscribe ( Service * service)
inline

◆ subscribe() [2/4]

bool mUPnP::ControlPoint::subscribe ( Service * service,
const std::string & uuid )
inline

◆ subscribe() [3/4]

bool mUPnP::ControlPoint::subscribe ( Service * service,
const std::string & uuid,
long timeout )

◆ subscribe() [4/4]

bool mUPnP::ControlPoint::subscribe ( Service * service,
long timeout )

◆ unlock()

void mUPnP::ControlPoint::unlock ( )
inline

◆ unsubscribe() [1/3]

void mUPnP::ControlPoint::unsubscribe ( )

◆ unsubscribe() [2/3]

void mUPnP::ControlPoint::unsubscribe ( Device * device)

◆ unsubscribe() [3/3]

bool mUPnP::ControlPoint::unsubscribe ( Service * service)

Field Documentation

◆ DEFAULT_EVENTSUB_PORT

const int mUPnP::ControlPoint::DEFAULT_EVENTSUB_PORT
static

◆ DEFAULT_EVENTSUB_URI

const char* mUPnP::ControlPoint::DEFAULT_EVENTSUB_URI
static

◆ DEFAULT_EVENTSUB_WORKER_COUNT

const int mUPnP::ControlPoint::DEFAULT_EVENTSUB_WORKER_COUNT
static

◆ DEFAULT_EXPIRED_DEVICE_MONITORING_INTERVAL

const int mUPnP::ControlPoint::DEFAULT_EXPIRED_DEVICE_MONITORING_INTERVAL
static

◆ DEFAULT_SSDP_PORT

const int mUPnP::ControlPoint::DEFAULT_SSDP_PORT
static

◆ deviceChangeListenerList

DeviceChangeListenerList mUPnP::ControlPoint::deviceChangeListenerList
private

◆ deviceDisposer

Disposer* mUPnP::ControlPoint::deviceDisposer
private

◆ deviceList

DeviceList mUPnP::ControlPoint::deviceList
private

◆ deviceNotifyListenerList

NotifyListenerList mUPnP::ControlPoint::deviceNotifyListenerList
private

◆ deviceSearchResponseListenerList

SearchResponseListenerList mUPnP::ControlPoint::deviceSearchResponseListenerList
private

◆ devNodeList

uXML::NodeList mUPnP::ControlPoint::devNodeList
private

◆ eventListenerList

EventListenerList mUPnP::ControlPoint::eventListenerList
private

◆ eventSubURI

std::string mUPnP::ControlPoint::eventSubURI
private

◆ expiredDeviceMonitoringInterval

long mUPnP::ControlPoint::expiredDeviceMonitoringInterval
private

◆ httpPort

int mUPnP::ControlPoint::httpPort
private

◆ httpServerList

uHTTP::HTTPServerList mUPnP::ControlPoint::httpServerList
private

◆ httpWorkerCount

size_t mUPnP::ControlPoint::httpWorkerCount
private

◆ mutex

uHTTP::Mutex mUPnP::ControlPoint::mutex
private

◆ nmprMode

bool mUPnP::ControlPoint::nmprMode
private

◆ removedDevNodeList

uXML::NodeList mUPnP::ControlPoint::removedDevNodeList
private

◆ renewSubscriber

RenewSubscriber* mUPnP::ControlPoint::renewSubscriber
private

◆ searchMx

int mUPnP::ControlPoint::searchMx
private

◆ ssdpNotifySocketList

SSDPNotifySocketList mUPnP::ControlPoint::ssdpNotifySocketList
private

◆ ssdpPort

int mUPnP::ControlPoint::ssdpPort
private

◆ ssdpSearchResponseSocketList

SSDPSearchResponseSocketList mUPnP::ControlPoint::ssdpSearchResponseSocketList
private

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