|
| static void | mupnp_service_initchildnodes (mUpnpService *service) |
| |
| static void | mupnp_service_initactionlist (mUpnpService *service) |
| |
| static void | mupnp_service_initservicestatetable (mUpnpService *service) |
| |
| static mUpnpNetURL * | mupnp_service_mangleurl (mUpnpService *service, char *type) |
| |
| mUpnpService * | mupnp_service_new (void) |
| | Create a new UPnP service instance.
|
| |
| void | mupnp_service_delete (mUpnpService *service) |
| | Destroy a UPnP service and free all associated resources.
|
| |
| void | mupnp_service_clear (mUpnpService *service) |
| |
| bool | mupnp_service_isscpdurl (mUpnpService *service, const char *url) |
| |
| mUpnpNetURL * | mupnp_service_geteventsuburl (mUpnpService *service) |
| |
| mUpnpNetURL * | mupnp_service_getcontrolurl (mUpnpService *service) |
| |
| mUpnpNetURL * | mupnp_service_getscpdurl (mUpnpService *service) |
| |
| bool | mupnp_service_parsedescription (mUpnpService *service, const char *desciption, size_t descriptionLen) |
| | Parse and populate a service from an SCPD XML document.
|
| |
| bool | mupnp_service_parsedescriptionurl (mUpnpService *service, mUpnpNetURL *url) |
| |
| char * | mupnp_service_getdescription (mUpnpService *service, mUpnpString *descStr) |
| |
| const char * | mupnp_servicetype_getidentifier (const char *serviceType) |
| |
| const char * | mupnp_servicetype_geturn (const char *serviceType) |
| |
| const char * | mupnp_servicetype_getservice (const char *serviceType) |
| |
| const char * | mupnp_servicetype_gettype (const char *serviceType) |
| |
| char * | mupnp_servicetype_getschematype (const char *serviceType) |
| |
| const char * | mupnp_servicetype_getversion (const char *serviceType) |
| |
| char * | mupnp_service_getnotifyservicetypent (mUpnpService *service, char *buf, int bufSize) |
| |
| char * | mupnp_service_getnotifyservicetypeusn (mUpnpService *service, char *buf, int bufSize) |
| |
| bool | mupnp_service_announcefrom (mUpnpService *service, const char *bindAddr) |
| |
| bool | mupnp_service_byebyefrom (mUpnpService *service, const char *bindAddr) |
| |
| mUpnpAction * | mupnp_service_getactionbyname (mUpnpService *service, const char *name) |
| |
| mUpnpStateVariable * | mupnp_service_getstatevariablebyname (mUpnpService *service, const char *name) |
| |
| void | mupnp_service_setactionlistener (mUpnpService *service, MUPNP_ACTION_LISTNER actionListener) |
| |
| void | mupnp_service_setquerylistener (mUpnpService *service, MUPNP_STATEVARIABLE_LISTNER queryListener) |
| |
| mUpnpActionList * | mupnp_service_getactionlist (mUpnpService *service) |
| |
| mUpnpAction * | mupnp_service_getactions (mUpnpService *service) |
| |
| mUpnpServiceStateTable * | mupnp_service_getservicestatetable (mUpnpService *service) |
| |
| mUpnpStateVariable * | mupnp_service_getstatevariables (mUpnpService *service) |
| |
| bool | mupnp_service_addsubscriber (mUpnpService *service, mUpnpSubscriber *sub) |
| |
| bool | mupnp_service_removesubscriber (mUpnpService *service, mUpnpSubscriber *sub) |
| |
| mUpnpSubscriber * | mupnp_service_getsubscriberbysid (mUpnpService *service, const char *sid) |
| |
| mUpnpNetURL * | mupnp_service_mangleabsoluteurl (const char *serviceURLStr, const char *baseURLStr, const char *locationURLStr) |
| |
Create a new UPnP service instance.
Allocates and initializes a new UPnP service object. Services represent the functional units within a UPnP device, providing actions and state variables that can be controlled and queried by control points.
The function initializes:
- Action list (empty)
- State variable table (empty)
- Subscriber list for event notifications (if eventing enabled)
- Internal mutex for thread safety
- SCPD (Service Control Protocol Description) node list
After creation, the service should be populated either by:
- Returns
- A newly-created mUpnpService on success, or NULL if memory allocation fails.
- Note
- The returned service must be freed with mupnp_service_delete() when no longer needed.
-
Thread-safe: Can be called concurrently from multiple threads.
-
Services are typically created as part of device initialization and are managed by the parent device's service list.
- See also
- mupnp_service_delete()
-
mupnp_service_parsedescription()