mUPnP for C
controlpoint_event.c File Reference
#include <mupnp/controlpoint.h>
#include <mupnp/upnp_limit.h>
#include <mupnp/util/log.h>

Functions

bool mupnp_controlpoint_seteventlistener (mUpnpControlPoint *ctrlPoint, MUPNP_EVENT_LISTENER evlistener)
 
mUpnpServicemupnp_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)
 
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)
 

Function Documentation

◆ mupnp_controlpoint_expirationhandler()

void mupnp_controlpoint_expirationhandler ( mUpnpThread * thread)

Worker thread for handling expirations.

Parameters
threadthe thread in question

◆ mupnp_controlpoint_resubscribe()

bool mupnp_controlpoint_resubscribe ( mUpnpControlPoint * ctrlPoint,
mUpnpService * service,
long timeout )

Re-subscribe to a service's events (i.e. renew subscription)

Parameters
ctrlPointThe control point in use
serviceThe service to subscribe to
timeoutTimeout for subscription expiration/renewal
Returns
true if successful; otherwise false

◆ mupnp_controlpoint_resubscribeall()

bool mupnp_controlpoint_resubscribeall ( mUpnpControlPoint * ctrlPoint,
mUpnpDevice * dev,
long timeout )

Re-subscribe to all of the device's services' events (i.e. renew subscription)

Parameters
ctrlPointThe control point in use
devThe device to subscribe to
timeoutTimeout for subscription expiration/renewal
Returns
true if successful; otherwise false

◆ mupnp_controlpoint_seteventlistener()

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.

Parameters
ctrlPointThe control point in question
evlistenerThe callback function to set, that is of type MUPNP_EVENT_LISTENER, or NULL

◆ mupnp_controlpoint_subscribe()

bool mupnp_controlpoint_subscribe ( mUpnpControlPoint * ctrlPoint,
mUpnpService * service,
long timeout )

Subscribe to a service's events

Parameters
ctrlPointThe control point in use
serviceThe service to subscribe to
timeoutTimeout for subscription expiration/renewal
Returns
true if successful; otherwise false

◆ mupnp_controlpoint_subscribeall()

bool mupnp_controlpoint_subscribeall ( mUpnpControlPoint * ctrlPoint,
mUpnpDevice * dev,
long timeout )

Subscribe to all of the device's services' events

Parameters
ctrlPointThe control point in use
devThe device to subscribe to
timeoutTimeout for subscription expiration/renewal
Returns
true if successful; otherwise false

◆ mupnp_controlpoint_unsubscribe()

bool mupnp_controlpoint_unsubscribe ( mUpnpControlPoint * ctrlPoint,
mUpnpService * service )

Unsubscribe to a service's events (i.e. cancel subscription)

Parameters
ctrlPointThe control point in use
serviceThe service to unsubscribe to
Returns
true if successful; otherwise false

◆ mupnp_controlpoint_unsubscribeall()

bool mupnp_controlpoint_unsubscribeall ( mUpnpControlPoint * ctrlPoint,
mUpnpDevice * dev )

Unsubscribe to all of the device's services' events (i.e. cancel subscription)

Parameters
ctrlPointThe control point in use
devThe device to unsubscribe to
Returns
true if successful; otherwise false

◆ mupnp_device_getfirstexpiratedservice()

mUpnpService * mupnp_device_getfirstexpiratedservice ( mUpnpControlPoint * ctrlPoint,
mUpnpDevice * dev,
mUpnpTime expirationTime )