#include <cybergarage/upnp/ccontrolpoint.h>
#include <cybergarage/upnp/cupnp_limit.h>
#include <cybergarage/upnp/control/ccontrol.h>
#include <cybergarage/util/clog.h>
void cg_upnp_controlpoint_adddevicebyssdppacket | ( | CgUpnpControlPoint * | ctrlPoint, | |
CgUpnpSSDPPacket * | ssdpPkt | |||
) |
Add a device on the basis of an SSDP packet. Do not call this from user applications.
ctrlPoint | The control point, whose device list to handle | |
ssdpPkt | The received SSDP packet |
static CgUpnpDevice* cg_upnp_controlpoint_createdevicefromssdkpacket | ( | CgUpnpSSDPPacket * | ssdpPkt | ) | [static] |
void cg_upnp_controlpoint_delete | ( | CgUpnpControlPoint * | ctrlPoint | ) |
Destroy the given control point
ctrlPoint | The control point struct to destroy |
CgUpnpDevice* cg_upnp_controlpoint_getdevicebyexacttype | ( | CgUpnpControlPoint * | ctrlPoint, | |
char * | exacttype | |||
) |
Find a device from the control point by the exact type of the device. This function searches for devices, whose *complete type string* matches the given string, including version number. For example: "urn:schemas-upnp-org:device:FooDevice:1". If you need to disregard the version, use cg_upnp_controlpoint_getdevicebytype
ctrlPoint | Controlpoint in question | |
exacttype | Type of the device |
CgUpnpDevice* cg_upnp_controlpoint_getdevicebytype | ( | CgUpnpControlPoint * | ctrlPoint, | |
char * | type | |||
) |
Find a device from the controlpoint by the type of the device. This function searches for devices, whose *type part* (i.e. not including the version) of the device type string matches the given string. For example: "urn:schemas-upnp-org:device:FooDevice". If you need to know the version of a device, use cg_upnp_devicetype_getversion
ctrlPoint | Controlpoint in question | |
type | Type of the device |
CgUpnpDevice* cg_upnp_controlpoint_getdevicebyudn | ( | CgUpnpControlPoint * | ctrlPoint, | |
char * | udn | |||
) |
Find a device from the controlpoint by the UDN of the device.
ctrlPoint | Controlpoint in question | |
udn | Type of the device |
char* cg_upnp_controlpoint_geteventsubcallbackurl | ( | CgUpnpControlPoint * | ctrlPoint, | |
char * | ifaddr, | |||
char * | buf, | |||
int | bufLen | |||
) |
Get the event subscription callback URI
ctrlPoint | The control point in question | |
ifaddr | Interface address | |
buf | Buffer used to store callback url | |
bufLen | Buffer length |
BOOL cg_upnp_controlpoint_ipchanged | ( | CgUpnpControlPoint * | ctrlpoint | ) |
Notify the control point that any IP of the host has been changed.
ctrlpoint | The control point in use |
BOOL cg_upnp_controlpoint_lock | ( | CgUpnpControlPoint * | ctrlPoint | ) |
Lock the control point's mutex. The control point should be ALWAYS locked, when a CgUpnpDevice*, CgUpnpService*, CgUpnpAction* or other pointer has been taken into use from the stack. This effectively prevents devices/services from being updated/ removed or added while the control point is locked. You should release the lock as soon as possible with cg_upnp_controlpoint_unlock
ctrlPoint | The control point in question |
CgUpnpControlPoint* cg_upnp_controlpoint_new | ( | ) |
Create a new control point. Does not start any threads.
BOOL cg_upnp_controlpoint_parsescservicescpd | ( | CgUpnpService * | service | ) |
Parse the service description from the service's SCPD URL. Do not call this from user applications.
service | The service in question |
BOOL cg_upnp_controlpoint_parseservicesfordevice | ( | CgUpnpDevice * | dev, | |
CgUpnpSSDPPacket * | ssdpPkt | |||
) |
Parse the device's services using the received SSDP packet. Do not call this from user applications.
dev | The device in question | |
ssdpPkt | An SSDP packet |
void cg_upnp_controlpoint_removedevicebyssdppacket | ( | CgUpnpControlPoint * | ctrlPoint, | |
CgUpnpSSDPPacket * | ssdpPkt | |||
) |
Remove a device on the basis of an SSDP packet. Do not call this from user applications.
ctrlPoint | The control point, whose device list to handle | |
ssdpPkt | The received SSDP packet |
BOOL cg_upnp_controlpoint_search | ( | CgUpnpControlPoint * | ctrlPoint, | |
char * | target | |||
) |
Do an M-SEARCH to look for devices in the network.
ctrlPoint | The control point in question | |
target | The Search Target parameter (ex. "ssdp:all") |
static void cg_upnp_controlpoint_ssdplistner | ( | CgUpnpSSDPPacket * | ssdpPkt | ) | [static] |
static void cg_upnp_controlpoint_ssdpresponselistner | ( | CgUpnpSSDPPacket * | ssdpPkt | ) | [static] |
BOOL cg_upnp_controlpoint_start | ( | CgUpnpControlPoint * | ctrlPoint | ) |
Activate the control point. Starts listening for SSDP messages etc. You must call this function before you can actually use a control point.
ctrlPoint | The control point to start |
BOOL cg_upnp_controlpoint_stop | ( | CgUpnpControlPoint * | ctrlPoint | ) |
Stop the control point. Stops sending/receiveing/responding to any messages.
ctrlPoint | The control point to stop |
BOOL cg_upnp_controlpoint_unlock | ( | CgUpnpControlPoint * | ctrlPoint | ) |
Release a previously locked control point mutex. See cg_upnp_controlpoint_lock for a more detailed description on the control point locking mechanism.
ctrlPoint | The control point in question |