|
mUPnP for C
|
Functions | |
| bool | mupnp_controlpoint_seteventlistener (mUpnpControlPoint *ctrlPoint, MUPNP_EVENT_LISTENER evlistener) |
| mUpnpService * | mupnp_device_getfirstexpiratedservice (mUpnpControlPoint *ctrlPoint, mUpnpDevice *dev, mUpnpTime expirationTime) |
| void | mupnp_controlpoint_expirationhandler (mUpnpThread *thread) |
| bool | mupnp_controlpoint_resubscribe (mUpnpControlPoint *ctrlPoint, mUpnpService *service, long timeout) |
| bool | mupnp_controlpoint_subscribe (mUpnpControlPoint *ctrlPoint, mUpnpService *service, long timeout) |
| Subscribe to a UPnP service's event notifications. | |
| bool | mupnp_controlpoint_unsubscribe (mUpnpControlPoint *ctrlPoint, mUpnpService *service) |
| bool | mupnp_controlpoint_subscribeall (mUpnpControlPoint *ctrlPoint, mUpnpDevice *dev, long timeout) |
| bool | mupnp_controlpoint_resubscribeall (mUpnpControlPoint *ctrlPoint, mUpnpDevice *dev, long timeout) |
| bool | mupnp_controlpoint_unsubscribeall (mUpnpControlPoint *ctrlPoint, mUpnpDevice *dev) |
| void mupnp_controlpoint_expirationhandler | ( | mUpnpThread * | thread | ) |
Worker thread for handling expirations.
| thread | the thread in question |
| bool mupnp_controlpoint_resubscribe | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpService * | service, | ||
| long | timeout ) |
Re-subscribe to a service's events (i.e. renew subscription)
| ctrlPoint | The control point in use |
| service | The service to subscribe to |
| timeout | Timeout for subscription expiration/renewal |
| bool mupnp_controlpoint_resubscribeall | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpDevice * | dev, | ||
| long | timeout ) |
Re-subscribe to all of the device's services' events (i.e. renew subscription)
| ctrlPoint | The control point in use |
| dev | The device to subscribe to |
| timeout | Timeout for subscription expiration/renewal |
| bool mupnp_controlpoint_seteventlistener | ( | mUpnpControlPoint * | ctrlPoint, |
| MUPNP_EVENT_LISTENER | evlistener ) |
Set a single event listener for the control point. Use this function to get event notifications to user-space applications if you need only one listener.
| ctrlPoint | The control point in question |
| evlistener | The callback function to set, that is of type MUPNP_EVENT_LISTENER, or NULL |
| bool mupnp_controlpoint_subscribe | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpService * | service, | ||
| long | timeout ) |
Subscribe to a UPnP service's event notifications.
Sends a SUBSCRIBE request to the service's event subscription URL to receive notifications when the service's state variables change. The service will send an initial event message with current values, followed by updates whenever evented state variables change.
The subscription is identified by a Subscription ID (SID) returned by the service and stored in the service object. Event notifications are received on the control point's HTTP event server and dispatched to registered event listeners.
Subscriptions must be renewed before they expire using mupnp_controlpoint_resubscribe() or they will be automatically cancelled by the service.
| ctrlPoint | The control point to use. Must not be NULL and must be running. |
| service | The service to subscribe to. Must not be NULL and must have a valid event subscription URL. |
| timeout | The requested subscription duration in seconds. Use 0 or negative value for infinite duration (if supported by the service). Typical values: 300-1800 seconds. The service may grant a different duration than requested. |
| true | Subscription successful. Check service's SID for subscription ID. |
| false | Subscription failed due to:
|
| bool mupnp_controlpoint_subscribeall | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpDevice * | dev, | ||
| long | timeout ) |
Subscribe to all of the device's services' events
| ctrlPoint | The control point in use |
| dev | The device to subscribe to |
| timeout | Timeout for subscription expiration/renewal |
| bool mupnp_controlpoint_unsubscribe | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpService * | service ) |
Unsubscribe to a service's events (i.e. cancel subscription)
| ctrlPoint | The control point in use |
| service | The service to unsubscribe to |
| bool mupnp_controlpoint_unsubscribeall | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpDevice * | dev ) |
Unsubscribe to all of the device's services' events (i.e. cancel subscription)
| ctrlPoint | The control point in use |
| dev | The device to unsubscribe to |
| mUpnpService * mupnp_device_getfirstexpiratedservice | ( | mUpnpControlPoint * | ctrlPoint, |
| mUpnpDevice * | dev, | ||
| mUpnpTime | expirationTime ) |