#include <cybergarage/upnp/cservice.h>#include <cybergarage/upnp/cupnp.h>#include <cybergarage/upnp/cupnp_function.h>#include <cybergarage/upnp/cdevice.h>#include <cybergarage/upnp/ssdp/cssdp.h>#include <cybergarage/util/clog.h>#include <cybergarage/util/cstring.h>| BOOL cg_upnp_service_addsubscriber | ( | CgUpnpService * | service, | |
| CgUpnpSubscriber * | sub | |||
| ) |
Add a subscriber to the service
| service | The service in question | |
| sub | The subscriber |
| BOOL cg_upnp_service_announcefrom | ( | CgUpnpService * | service, | |
| char * | bindAddr | |||
| ) |
Send a service announcement (advertisement) from the given address
| service | The service to advertise | |
| bindAddr | The address to attach to the announcement |
| BOOL cg_upnp_service_byebyefrom | ( | CgUpnpService * | service, | |
| char * | bindAddr | |||
| ) |
Send a byebye announcement (i.e. a cancelling advertisement) from the given address
| service | The service to announce from | |
| bindAddr | The address to attach to the announcement |
| void cg_upnp_service_clear | ( | CgUpnpService * | service | ) |
Clear the contents of a UPnP service
| service | The service to clear |
| void cg_upnp_service_delete | ( | CgUpnpService * | service | ) |
Destroy a UPnP service
| service | The service to destroy |
| CgUpnpAction* cg_upnp_service_getactionbyname | ( | CgUpnpService * | service, | |
| char * | name | |||
| ) |
Get an action from the service by the action's name
| service | The service in question | |
| name | The name of the action to look for |
| CgUpnpActionList* cg_upnp_service_getactionlist | ( | CgUpnpService * | service | ) |
Get the service's list of actions (head of list)
| service | The service in question |
| CgUpnpAction* cg_upnp_service_getactions | ( | CgUpnpService * | service | ) |
Get the first action in the service's list of actions. Use as the starting point in iteration loops.
| service | The service in question |
| char* cg_upnp_service_getdescription | ( | CgUpnpService * | service, | |
| CgString * | descStr | |||
| ) |
Get the service's description XML nodes as a string
| service | The service in question | |
| descStr | The description string |
| char* cg_upnp_service_getnotifyservicetypent | ( | CgUpnpService * | service, | |
| char * | buf, | |||
| int | bufSize | |||
| ) |
| char* cg_upnp_service_getnotifyservicetypeusn | ( | CgUpnpService * | service, | |
| char * | buf, | |||
| int | bufSize | |||
| ) |
| CgUpnpServiceStateTable* cg_upnp_service_getservicestatetable | ( | CgUpnpService * | service | ) |
Get the service's state table
| service | The service in question |
| CgUpnpStateVariable* cg_upnp_service_getstatevariablebyname | ( | CgUpnpService * | service, | |
| char * | name | |||
| ) |
Get a state variable from the service's state table by the variable's name
| service | The service in question | |
| name | the name of the variable |
| CgUpnpStateVariable* cg_upnp_service_getstatevariables | ( | CgUpnpService * | service | ) |
Get the first state variable in the service's state table. Use as the starting point in iteration loops.
| service | The service in question |
| CgUpnpSubscriber* cg_upnp_service_getsubscriberbysid | ( | CgUpnpService * | service, | |
| char * | sid | |||
| ) |
Find a subscriber from the service's list of subscribers by its SID (Subscription ID)
| service | The service in question | |
| sid | The SID |
| static void cg_upnp_service_initactionlist | ( | CgUpnpService * | service | ) | [static] |
| static void cg_upnp_service_initchildnodes | ( | CgUpnpService * | service | ) | [static] |
| static void cg_upnp_service_initservicestatetable | ( | CgUpnpService * | service | ) | [static] |
| BOOL cg_upnp_service_isscpdurl | ( | CgUpnpService * | service, | |
| char * | url | |||
| ) |
Compare the service's SCPD URL and the given location
| service | The service in question | |
| url | The URL (location) to compare |
| CgUpnpService* cg_upnp_service_new | ( | ) |
Create a new UPnP service
| BOOL cg_upnp_service_parsedescription | ( | CgUpnpService * | service, | |
| char * | description, | |||
| int | descriptionLen | |||
| ) |
Create the service's contents from the given XML document
| service | The service to create | |
| description | The XML document to parse | |
| descriptionLen | The length of the XML document |
| BOOL cg_upnp_service_parsedescriptionurl | ( | CgUpnpService * | service, | |
| CgNetURL * | url | |||
| ) |
Create the service's contents from the given URL. Gets the XML document from the URL and passes it again to cg_upnp_service_parsedescription
| service | The service to create | |
| url | The URL of the document to parse |
| BOOL cg_upnp_service_removesubscriber | ( | CgUpnpService * | service, | |
| CgUpnpSubscriber * | sub | |||
| ) |
Remove a subscriber from the service
| service | The service in question | |
| sub | The subscriber to remove |
| void cg_upnp_service_setactionlistener | ( | CgUpnpService * | service, | |
| CG_UPNP_ACTION_LISTNER | actionListener | |||
| ) |
Set an action listener to the service
| service | The service in question | |
| actionListener | A callback function of type CG_UPNP_ACTION_LISTNER |
| void cg_upnp_service_setquerylistener | ( | CgUpnpService * | service, | |
| CG_UPNP_STATEVARIABLE_LISTNER | queryListener | |||
| ) |
Set a query listener to the service
| service | The service in question | |
| queryListener | A callback function of type CG_UPNP_STATEVARIABLE_LISTNER |
| char* cg_upnp_servicetype_getidentifier | ( | char * | serviceType | ) |
Get the identifier-part of a service type string (usually "urn")
| serviceType | A service type string (usually the result from cg_upnp_service_getservicetype) |
| char* cg_upnp_servicetype_getschematype | ( | char * | serviceType | ) |
Get the schema type part of a service type string (without last colon) (ex. "urn:schemas-upnp-org:service:ContentDirectory")
| serviceType | A service type string (usually the result from cg_upnp_service_getservicetype) |
| char* cg_upnp_servicetype_getservice | ( | char * | serviceType | ) |
Get the service part of a service type string (usually just "service")
| serviceType | A service type string (usually the result from cg_upnp_service_getservicetype) |
| char* cg_upnp_servicetype_gettype | ( | char * | serviceType | ) |
Get the type part of a service type string (ex. "ContentDirectory")
| serviceType | A service type string (usually the result from cg_upnp_service_getservicetype) |
| char* cg_upnp_servicetype_geturn | ( | char * | serviceType | ) |
Get the URN part of a service type string (usually "schemas-upnp-org")
| serviceType | A service type string (usually the result from cg_upnp_service_getservicetype) |
| char* cg_upnp_servicetype_getversion | ( | char * | serviceType | ) |
Get the version part of a service type string (ex. "1")
| serviceType | A service type string (usually the result from cg_upnp_service_getservicetype) |
1.4.7