mUPnP for C
|
#include <mupnp/service.h>
#include <mupnp/device.h>
#include <mupnp/net/uri.h>
#include <mupnp/net/url.h>
#include <mupnp/ssdp/ssdp.h>
#include <mupnp/upnp.h>
#include <mupnp/upnp_function.h>
#include <mupnp/util/log.h>
#include <mupnp/util/string.h>
bool mupnp_service_addsubscriber | ( | mUpnpService * | service, |
mUpnpSubscriber * | sub ) |
Add a subscriber to the service
service | The service in question |
sub | The subscriber |
bool mupnp_service_announcefrom | ( | mUpnpService * | service, |
const 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 mupnp_service_byebyefrom | ( | mUpnpService * | service, |
const 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 mupnp_service_clear | ( | mUpnpService * | service | ) |
Clear the contents of a UPnP service
service | The service to clear |
void mupnp_service_delete | ( | mUpnpService * | service | ) |
Destroy a UPnP service
service | The service to destroy |
mUpnpAction * mupnp_service_getactionbyname | ( | mUpnpService * | service, |
const 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 |
mUpnpActionList * mupnp_service_getactionlist | ( | mUpnpService * | service | ) |
Get the service's list of actions (head of list)
service | The service in question |
mUpnpAction * mupnp_service_getactions | ( | mUpnpService * | 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 |
mUpnpNetURL * mupnp_service_getcontrolurl | ( | mUpnpService * | service | ) |
Get the service's control URL
service | The service in question |
char * mupnp_service_getdescription | ( | mUpnpService * | service, |
mUpnpString * | descStr ) |
Get the service's description XML nodes as a string
service | The service in question |
descStr | The description string |
mUpnpNetURL * mupnp_service_geteventsuburl | ( | mUpnpService * | service | ) |
Get the service's event subscription URL
service | The service in question |
char * mupnp_service_getnotifyservicetypent | ( | mUpnpService * | service, |
char * | buf, | ||
int | bufSize ) |
char * mupnp_service_getnotifyservicetypeusn | ( | mUpnpService * | service, |
char * | buf, | ||
int | bufSize ) |
mUpnpNetURL * mupnp_service_getscpdurl | ( | mUpnpService * | service | ) |
Get the service's SCPD (service description) URL
service | The service in question |
mUpnpServiceStateTable * mupnp_service_getservicestatetable | ( | mUpnpService * | service | ) |
Get the service's state table
service | The service in question |
mUpnpStateVariable * mupnp_service_getstatevariablebyname | ( | mUpnpService * | service, |
const 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 |
mUpnpStateVariable * mupnp_service_getstatevariables | ( | mUpnpService * | 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 |
mUpnpSubscriber * mupnp_service_getsubscriberbysid | ( | mUpnpService * | service, |
const 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 |
|
static |
|
static |
bool mupnp_service_isscpdurl | ( | mUpnpService * | service, |
const char * | url ) |
Compare the service's SCPD URL and the given location
service | The service in question |
url | The URL (location) to compare |
mUpnpNetURL * mupnp_service_mangleabsoluteurl | ( | const char * | serviceURLStr, |
const char * | baseURLStr, | ||
const char * | locationURLStr ) |
|
static |
mUpnpService * mupnp_service_new | ( | void | ) |
Create a new UPnP service
bool mupnp_service_parsedescription | ( | mUpnpService * | service, |
const char * | description, | ||
size_t | 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 mupnp_service_parsedescriptionurl | ( | mUpnpService * | service, |
mUpnpNetURL * | url ) |
Create the service's contents from the given URL. Gets the XML document from the URL and passes it again to mupnp_service_parsedescription
service | The service to create |
url | The URL of the document to parse |
bool mupnp_service_removesubscriber | ( | mUpnpService * | service, |
mUpnpSubscriber * | sub ) |
Remove a subscriber from the service
service | The service in question |
sub | The subscriber to remove |
void mupnp_service_setactionlistener | ( | mUpnpService * | service, |
MUPNP_ACTION_LISTNER | actionListener ) |
Set an action listener to the service
service | The service in question |
actionListener | A callback function of type MUPNP_ACTION_LISTNER |
void mupnp_service_setquerylistener | ( | mUpnpService * | service, |
MUPNP_STATEVARIABLE_LISTNER | queryListener ) |
Set a query listener to the service
service | The service in question |
queryListener | A callback function of type MUPNP_STATEVARIABLE_LISTNER |
const char * mupnp_servicetype_getidentifier | ( | const char * | serviceType | ) |
Get the identifier-part of a service type string (usually "urn")
serviceType | A service type string (usually the result from mupnp_service_getservicetype) |
char * mupnp_servicetype_getschematype | ( | const 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 mupnp_service_getservicetype) |
const char * mupnp_servicetype_getservice | ( | const char * | serviceType | ) |
Get the service part of a service type string (usually just "service")
serviceType | A service type string (usually the result from mupnp_service_getservicetype) |
const char * mupnp_servicetype_gettype | ( | const char * | serviceType | ) |
Get the type part of a service type string (ex. "ContentDirectory")
serviceType | A service type string (usually the result from mupnp_service_getservicetype) |
const char * mupnp_servicetype_geturn | ( | const char * | serviceType | ) |
Get the URN part of a service type string (usually "schemas-upnp-org")
serviceType | A service type string (usually the result from mupnp_service_getservicetype) |
const char * mupnp_servicetype_getversion | ( | const char * | serviceType | ) |
Get the version part of a service type string (ex. "1")
serviceType | A service type string (usually the result from mupnp_service_getservicetype) |