mUPnP for C
subscriber.c File Reference
#include <mupnp/event/event.h>
#include <mupnp/event/notify.h>
#include <mupnp/upnp_limit.h>
#include <mupnp/util/log.h>
#include <mupnp/util/time.h>

Functions

mUpnpSubscribermupnp_subscriber_new ()
 
void mupnp_subscriber_delete (mUpnpSubscriber *sub)
 
void mupnp_subscriber_clear (mUpnpSubscriber *sub)
 
void mupnp_subscriber_renew (mUpnpSubscriber *sub)
 
long mupnp_subscriber_incrementnotifycount (mUpnpSubscriber *sub)
 
bool mupnp_subscriber_isexpired (mUpnpSubscriber *sub)
 
static bool mupnp_subscriber_notifymain (mUpnpSubscriber *sub, mUpnpService *service, mUpnpStateVariable *statVar)
 
bool mupnp_subscriber_notify (mUpnpSubscriber *sub, mUpnpStateVariable *statVar)
 
bool mupnp_subscriber_notifyall (mUpnpSubscriber *sub, void *service)
 

Function Documentation

◆ mupnp_subscriber_clear()

void mupnp_subscriber_clear ( mUpnpSubscriber * sub)

Clear the contents of an event subscriber

Todo
Lacks implementation (is it necessary?)
Parameters
subThe event subscriber

◆ mupnp_subscriber_delete()

void mupnp_subscriber_delete ( mUpnpSubscriber * sub)

Destroy an event subscriber

Parameters
subThe event subscriber

◆ mupnp_subscriber_incrementnotifycount()

long mupnp_subscriber_incrementnotifycount ( mUpnpSubscriber * sub)

Increment the event notify count by one

Parameters
subThe event subscriber
Returns
The new notify count

◆ mupnp_subscriber_isexpired()

bool mupnp_subscriber_isexpired ( mUpnpSubscriber * sub)

Check, whether a subscriber's event subscription has been expired

Parameters
subThe subscriber
Returns
true if the subscription has been expired; otherwise false

◆ mupnp_subscriber_new()

mUpnpSubscriber * mupnp_subscriber_new ( void )

Create a new event subscriber

◆ mupnp_subscriber_notify()

bool mupnp_subscriber_notify ( mUpnpSubscriber * sub,
mUpnpStateVariable * statVar )

Post a notification to an event subscriber. This is called in a device.

Parameters
subThe event subscriber
statVarThe evented state variable
Returns
true if succesful; otherwise false

◆ mupnp_subscriber_notifyall()

bool mupnp_subscriber_notifyall ( mUpnpSubscriber * sub,
void * service )

Post a notification to an event subscriber. This is called in a device.

Parameters
subThe event subscriber
serviceThe evented service
Returns
true if succesful; otherwise false

◆ mupnp_subscriber_notifymain()

static bool mupnp_subscriber_notifymain ( mUpnpSubscriber * sub,
mUpnpService * service,
mUpnpStateVariable * statVar )
static

Post a notification to an event subscriber. This is called in a device.

Parameters
subThe event subscriber
statVarThe evented state variable
Returns
true if succesful; otherwise false

◆ mupnp_subscriber_renew()

void mupnp_subscriber_renew ( mUpnpSubscriber * sub)

Renew a subscription. Essentially sets subscription time (duration) to zero and resets notify count (== event key).

Parameters
subThe event subscriber