mUPnP for C
service_notify.c File Reference
#include <mupnp/service.h>
#include <mupnp/util/log.h>
#include <mupnp/util/thread.h>

Functions

static bool mupnp_service_notifymain (mUpnpService *service, mUpnpStateVariable *statVar)
 
bool mupnp_service_notify (mUpnpService *service, mUpnpStateVariable *statVar)
 
bool mupnp_service_notifyallbracket (mUpnpService *service)
 
bool mupnp_service_notifyall (mUpnpService *service, bool doBracket)
 
void mupnp_service_createnotifyallthread (mUpnpService *service, mUpnpTime waitTime)
 

Function Documentation

◆ mupnp_service_createnotifyallthread()

void mupnp_service_createnotifyallthread ( mUpnpService * service,
mUpnpTime waitTime )

Send the initial event to all of the service's subscribers after waitTime.

Despite its name this no longer starts a thread: the message is sent from the calling thread (the device's HTTP worker for a new subscription), so mupnp_device_stop() waits for it and the service cannot be freed while it is sent. Nothing is sent if the calling mUPnP thread is being stopped.

Parameters
serviceThe service in question
waitTimeThe wait time to send (milliseconds)

◆ mupnp_service_notify()

bool mupnp_service_notify ( mUpnpService * service,
mUpnpStateVariable * statVar )

Send a notification of a service's changed state variable

Parameters
serviceThe service in question
statVarThe changed state variable

◆ mupnp_service_notifyall()

bool mupnp_service_notifyall ( mUpnpService * service,
bool doBracket )

Send a notification message to all of the service's subscribers

Parameters
serviceThe service in question

◆ mupnp_service_notifyallbracket()

bool mupnp_service_notifyallbracket ( mUpnpService * service)

◆ mupnp_service_notifymain()

static bool mupnp_service_notifymain ( mUpnpService * service,
mUpnpStateVariable * statVar )
static