mUPnP for C++
|
#include <Device.h>
Public Member Functions | |
mupnp_shared_ptr< uXML::Node > | getRootNode () |
mupnp_shared_ptr< uXML::Node > | getDeviceNode () |
bool | hasDeviceNode () |
void | setRootNode (mupnp_shared_ptr< uXML::Node > node) |
void | setDeviceNode (mupnp_shared_ptr< uXML::Node > node) |
Device () | |
Device (mupnp_shared_ptr< uXML::Node > root, mupnp_shared_ptr< uXML::Node > device) | |
Device (mupnp_shared_ptr< uXML::Node > device) | |
Device (uHTTP::File *descriptionFile) | |
Device (const std::string &descriptionFileName) | |
virtual | ~Device () |
void | lock () |
void | unlock () |
void | setNMPRMode (bool flag) |
bool | isNMPRMode () |
void | setWirelessMode (bool flag) |
bool | isWirelessMode () |
int | getSSDPAnnounceCount () |
const char * | getUUID () |
int | getBootID () |
Device * | getRootDevice () |
Device * | getParentDevice () |
DeviceData * | getDeviceData () |
bool | hasDeviceData () |
void | setDescriptionFile (const std::string &file) |
const char * | getDescriptionFile () |
void | setDescriptionURI (const std::string &uri) |
const char * | getDescriptionURI () |
bool | isDescriptionURI (const std::string &uri) |
const char * | getDescriptionFilePath (std::string &buf) |
bool | loadDescription (const std::string &descString) |
bool | loadDescription (uHTTP::File *file) |
bool | isRootDevice () |
void | setSSDPPacket (SSDPPacket *packet) |
SSDPPacket * | getSSDPPacket () |
void | setLocation (const std::string &value) |
const char * | getLocation () |
void | setLeaseTime (int value) |
int | getLeaseTime () |
long | getTimeStamp () |
long | getElapsedTime () |
bool | isExpired () |
const char * | getURLBase () |
bool | setDeviceType (const std::string &value) |
const char * | getDeviceType () |
bool | isDeviceType (const std::string &value) |
bool | setFriendlyName (const std::string &value) |
const char * | getFriendlyName () |
bool | setManufacturer (const std::string &value) |
const char * | getManufacturer () |
bool | setManufacturerURL (const std::string &value) |
const char * | getManufacturerURL () |
bool | setModelDescription (const std::string &value) |
const char * | getModelDescription () |
bool | setModelName (const std::string &value) |
const char * | getModelName () |
bool | setModelNumber (const std::string &value) |
const char * | getModelNumber () |
bool | setModelURL (const std::string &value) |
const char * | getModelURL () |
bool | setSerialNumber (const std::string &value) |
const char * | getSerialNumber () |
bool | setUDN (const std::string &value) |
const char * | getUDN () |
bool | hasUDN () |
bool | setUPC (const std::string &value) |
const char * | getUPC () |
bool | setPresentationURL (const std::string &value) |
const char * | getPresentationURL () |
DeviceList * | getDeviceList () |
bool | isDevice (const std::string &name) |
mupnp_shared_ptr< Device > | getDevice (const std::string &name) |
mupnp_shared_ptr< Device > | getDeviceByDescriptionURI (const std::string &uri) |
ServiceList * | getServiceList () |
Service * | getService (const std::string &name) |
Service * | getSubscriberService (const std::string &uuid) |
Service * | getServiceBySCPDURL (const std::string &searchUrl) |
Service * | getServiceByControlURL (const std::string &searchUrl) |
Service * | getServiceByEventSubURL (const std::string &searchUrl) |
StateVariable * | getStateVariable (const std::string &serviceType, const std::string &name) |
StateVariable * | getStateVariable (const std::string &name) |
Action * | getAction (const std::string &name) |
IconList * | getIconList () |
Icon * | getIcon (size_t n) |
const char * | getLocationURL (const std::string &host, std::string &buf) |
bool | announce (const std::string &ifAddr) |
bool | announce () |
bool | byebye (const std::string &ifAddr) |
bool | byebye () |
bool | postSearchResponse (SSDPPacket *ssdpPacket, const std::string &st, const std::string &usn) |
bool | deviceSearchResponse (SSDPPacket *ssdpPacket) |
bool | deviceSearchReceived (SSDPPacket *ssdpPacket) |
void | setHTTPPort (int port) |
int | getHTTPPort () |
void | setHTTPWorkerCount (size_t count) |
size_t | getHTTPWorkerCount () |
uHTTP::HTTP::StatusCode | httpRequestRecieved (uHTTP::HTTPRequest *httpReq) |
uHTTP::HTTPServerList * | getHTTPServerList () |
SSDPSearchSocketList * | getSSDPSearchSocketList () |
void | setAdvertiser (Advertiser *adv) |
Advertiser * | getAdvertiser () |
bool | start () |
bool | stop () |
const char * | getInterfaceAddress () |
void | setActionListener (ActionListener *listener) |
void | setQueryListener (QueryListener *listener) |
void | setActionListener (ActionListener *listener, bool includeSubDevices) |
void | setQueryListener (QueryListener *listener, bool includeSubDevices) |
Public Member Functions inherited from mUPnP::SearchListener |
Static Public Member Functions | |
static bool | isDeviceNode (mupnp_shared_ptr< uXML::Node > node) |
static void | notifyWait () |
Static Public Attributes | |
static const char * | ELEM_NAME |
static const char * | UPNP_ROOTDEVICE |
static const int | DEFAULT_STARTUP_WAIT_TIME |
static const int | DEFAULT_DISCOVERY_WAIT_TIME |
static const int | DEFAULT_LEASE_TIME |
static const int | HTTP_DEFAULT_PORT |
static const int | HTTP_DEFAULT_WORKER_COUNT |
static const char * | DEFAULT_DESCRIPTION_URI |
static const char * | URLBASE_NAME |
static const char * | DEVICE_TYPE |
static const char * | FRIENDLY_NAME |
static const char * | MANUFACTURER |
static const char * | MANUFACTURER_URL |
static const char * | MODEL_DESCRIPTION |
static const char * | MODEL_NAME |
static const char * | MODEL_NUMBER |
static const char * | MODEL_URL |
static const char * | SERIAL_NUMBER |
static const char * | UDN |
static const char * | UPC |
static const char * | presentationURL |
Private Member Functions | |
void | initUUID () |
void | updateBootID () |
void | initDeviceData () |
void | initChildList () |
void | setUUID (const std::string &uuid) |
void | updateUDN () |
void | setBootID (int bootId) |
void | setLocalRootDeviceFlag (bool flag) |
bool | isLocalRootDevice () |
bool | initializeLoadedDescription () |
void | setURLBase (const std::string &value) |
void | updateURLBase (const std::string &host) |
bool | setDeviceNodeValue (const std::string &name, const std::string &value) |
const char * | getDeviceNodeValue (const std::string &name) |
void | initDeviceList () |
void | initServiceList () |
void | initIconList () |
const char * | getNotifyDeviceNT (std::string &buf) |
const char * | getNotifyDeviceUSN (std::string &buf) |
const char * | getNotifyDeviceTypeNT (std::string &buf) |
const char * | getNotifyDeviceTypeUSN (std::string &buf) |
const char * | getDescriptionData (const std::string &host, std::string &buf) |
uHTTP::HTTP::StatusCode | httpGetRequestRecieved (uHTTP::HTTPRequest *httpReq) |
uHTTP::HTTP::StatusCode | httpPostRequestRecieved (uHTTP::HTTPRequest *httpReq) |
uHTTP::HTTP::StatusCode | soapBadActionRecieved (uHTTP::HTTPRequest *soapReq) |
uHTTP::HTTP::StatusCode | soapActionRecieved (uHTTP::HTTPRequest *soapReq) |
uHTTP::HTTP::StatusCode | invalidActionControlRecieved (ControlRequest *ctlReq) |
uHTTP::HTTP::StatusCode | deviceControlRequestRecieved (ControlRequest *ctlReq, Service *service) |
uHTTP::HTTP::StatusCode | deviceActionControlRecieved (ActionRequest *ctlReq, Service *service) |
uHTTP::HTTP::StatusCode | deviceQueryControlRecieved (QueryRequest *ctlReq, Service *service) |
uHTTP::HTTP::StatusCode | upnpBadSubscriptionRecieved (SubscriptionRequest *subReq, int code) |
uHTTP::HTTP::StatusCode | deviceEventSubscriptionRecieved (SubscriptionRequest *subReq) |
uHTTP::HTTP::StatusCode | deviceEventNewSubscriptionRecieved (Service *service, SubscriptionRequest *subReq) |
uHTTP::HTTP::StatusCode | deviceEventRenewSubscriptionRecieved (Service *service, SubscriptionRequest *subReq) |
uHTTP::HTTP::StatusCode | deviceEventUnsubscriptionRecieved (Service *service, SubscriptionRequest *subReq) |
bool | stop (bool doByeBye) |
Private Attributes | |
mupnp_shared_ptr< uXML::Node > | rootNode |
mupnp_shared_ptr< uXML::Node > | deviceNode |
Device * | rootDevice |
Device * | parentDevice |
DeviceList | deviceList |
ServiceList | serviceList |
IconList | iconList |
bool | localRootDeviceFlag |
std::string | devUUID |
int | devBootID |
uHTTP::Mutex | mutex |
bool | wirelessMode |
mUPnP::Device::Device | ( | ) |
mUPnP::Device::Device | ( | mupnp_shared_ptr< uXML::Node > | root, |
mupnp_shared_ptr< uXML::Node > | device ) |
mUPnP::Device::Device | ( | mupnp_shared_ptr< uXML::Node > | device | ) |
mUPnP::Device::Device | ( | uHTTP::File * | descriptionFile | ) |
mUPnP::Device::Device | ( | const std::string & | descriptionFileName | ) |
|
virtual |
bool mUPnP::Device::announce | ( | ) |
bool mUPnP::Device::announce | ( | const std::string & | ifAddr | ) |
bool mUPnP::Device::byebye | ( | ) |
bool mUPnP::Device::byebye | ( | const std::string & | ifAddr | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
Implements mUPnP::SearchListener.
bool mUPnP::Device::deviceSearchResponse | ( | SSDPPacket * | ssdpPacket | ) |
Action * mUPnP::Device::getAction | ( | const std::string & | name | ) |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
|
inline |
mupnp_shared_ptr< Device > mUPnP::Device::getDevice | ( | const std::string & | name | ) |
mupnp_shared_ptr< Device > mUPnP::Device::getDeviceByDescriptionURI | ( | const std::string & | uri | ) |
DeviceData * mUPnP::Device::getDeviceData | ( | ) |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int mUPnP::Device::getLeaseTime | ( | ) |
|
inline |
const char * mUPnP::Device::getLocationURL | ( | const std::string & | host, |
std::string & | buf ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
Device * mUPnP::Device::getParentDevice | ( | ) |
|
inline |
Device * mUPnP::Device::getRootDevice | ( | ) |
|
inline |
|
inline |
Service * mUPnP::Device::getService | ( | const std::string & | name | ) |
Service * mUPnP::Device::getServiceByControlURL | ( | const std::string & | searchUrl | ) |
Service * mUPnP::Device::getServiceByEventSubURL | ( | const std::string & | searchUrl | ) |
Service * mUPnP::Device::getServiceBySCPDURL | ( | const std::string & | searchUrl | ) |
|
inline |
|
inline |
|
inline |
|
inline |
StateVariable * mUPnP::Device::getStateVariable | ( | const std::string & | name | ) |
StateVariable * mUPnP::Device::getStateVariable | ( | const std::string & | serviceType, |
const std::string & | name ) |
Service * mUPnP::Device::getSubscriberService | ( | const std::string & | uuid | ) |
long mUPnP::Device::getTimeStamp | ( | ) |
|
inline |
|
inline |
const char * mUPnP::Device::getURLBase | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
uHTTP::HTTP::StatusCode mUPnP::Device::httpRequestRecieved | ( | uHTTP::HTTPRequest * | httpReq | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
bool mUPnP::Device::isDevice | ( | const std::string & | name | ) |
|
inlinestatic |
bool mUPnP::Device::isDeviceType | ( | const std::string & | value | ) |
bool mUPnP::Device::isExpired | ( | ) |
|
inlineprivate |
bool mUPnP::Device::isNMPRMode | ( | ) |
|
inline |
|
inline |
bool mUPnP::Device::loadDescription | ( | const std::string & | descString | ) |
bool mUPnP::Device::loadDescription | ( | uHTTP::File * | file | ) |
|
inline |
|
static |
bool mUPnP::Device::postSearchResponse | ( | SSDPPacket * | ssdpPacket, |
const std::string & | st, | ||
const std::string & | usn ) |
void mUPnP::Device::setActionListener | ( | ActionListener * | listener | ) |
void mUPnP::Device::setActionListener | ( | ActionListener * | listener, |
bool | includeSubDevices ) |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
void mUPnP::Device::setLeaseTime | ( | int | value | ) |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void mUPnP::Device::setNMPRMode | ( | bool | flag | ) |
|
inline |
void mUPnP::Device::setQueryListener | ( | QueryListener * | listener | ) |
void mUPnP::Device::setQueryListener | ( | QueryListener * | listener, |
bool | includeSubDevices ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
inlineprivate |
|
inline |
|
private |
|
private |
bool mUPnP::Device::start | ( | ) |
|
inline |
|
private |
|
inline |
|
private |
|
inlineprivate |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
private |
|
static |
|
private |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
static |
|
private |
|
private |
|
static |
|
private |
|
static |
|
static |
|
static |
|
static |
|
private |