mUPnP for C
device_http_server.c File Reference
#include <mupnp/control/control.h>
#include <mupnp/device.h>
#include <mupnp/event/event.h>
#include <mupnp/http/http.h>
#include <mupnp/net/url.h>
#include <mupnp/upnp.h>
#include <mupnp/util/log.h>

Macros

#define mupnp_device_invalidactioncontrolrecieved(actionReq)
 
#define mupnp_device_invalidquerycontrolrecieved(queryReq)
 

Functions

static bool mupnp_device_ispresentationrequest (mUpnpDevice *dev, mUpnpHttpRequest *httpReq)
 
static void mupnp_device_getrequestrecieved (mUpnpDevice *dev, mUpnpHttpRequest *httpReq)
 
static void mupnp_device_postrequestrecieved (mUpnpDevice *dev, mUpnpHttpRequest *httpReq)
 
static void mupnp_device_soapactionrecieved (mUpnpDevice *dev, mUpnpSoapRequest *soapReq)
 
static void mupnp_device_controlrequestrecieved (mUpnpService *service, mUpnpSoapRequest *soapReq)
 
static void mupnp_device_actioncontrolrequestrecieved (mUpnpService *service, mUpnpActionRequest *actionReq)
 
static void mupnp_device_querycontrolrequestrecieved (mUpnpService *service, mUpnpQueryRequest *queryReq)
 
static void mupnp_device_subscriptionrecieved (mUpnpDevice *dev, mUpnpSubscriptionRequest *subReq)
 
static void mupnp_device_newsubscriptionrecieved (mUpnpService *service, mUpnpSubscriptionRequest *subReq)
 
static void mupnp_device_renewsubscriptionrecieved (mUpnpService *service, mUpnpSubscriptionRequest *subReq)
 
static void mupnp_device_unsubscriptionrecieved (mUpnpService *service, mUpnpSubscriptionRequest *subReq)
 
void mupnp_device_httprequestrecieved (mUpnpHttpRequest *httpReq)
 
void mupnp_device_seturlbase (mUpnpDevice *dev, char *value)
 
static void mupnp_device_updateurlbase (mUpnpDevice *dev, char *host)
 
static char * mupnp_device_getdescription (mUpnpDevice *dev, char *ifAddr, mUpnpString *descStr)
 
static void mupnp_device_badsoapactionrecieved (mUpnpHttpRequest *httpReq)
 
static void mupnp_device_invalidcontrolrecieved (mUpnpSoapRequest *soapReq, int code)
 
static void mupnp_device_badsubscriptionrecieved (mUpnpSubscriptionRequest *subReq, int code)
 

Macro Definition Documentation

◆ mupnp_device_invalidactioncontrolrecieved

#define mupnp_device_invalidactioncontrolrecieved ( actionReq)
Value:
#define mupnp_control_action_request_getsoaprequest(actionReq)
Definition control.h:317
static void mupnp_device_invalidcontrolrecieved(mUpnpSoapRequest *soapReq, int code)
Definition device_http_server.c:289
#define MUPNP_STATUS_INVALID_ACTION
Definition upnp_status.h:26

◆ mupnp_device_invalidquerycontrolrecieved

#define mupnp_device_invalidquerycontrolrecieved ( queryReq)
Value:
#define mupnp_control_query_request_getsoaprequest(queryReq)
Definition control.h:491
#define MUPNP_STATUS_INVALID_VAR
Definition upnp_status.h:29

Function Documentation

◆ mupnp_device_actioncontrolrequestrecieved()

static void mupnp_device_actioncontrolrequestrecieved ( mUpnpService * service,
mUpnpActionRequest * actionReq )
static

◆ mupnp_device_badsoapactionrecieved()

static void mupnp_device_badsoapactionrecieved ( mUpnpHttpRequest * httpReq)
static

◆ mupnp_device_badsubscriptionrecieved()

static void mupnp_device_badsubscriptionrecieved ( mUpnpSubscriptionRequest * subReq,
int code )
static

◆ mupnp_device_controlrequestrecieved()

static void mupnp_device_controlrequestrecieved ( mUpnpService * service,
mUpnpSoapRequest * soapReq )
static

◆ mupnp_device_getdescription()

static char * mupnp_device_getdescription ( mUpnpDevice * dev,
char * ifAddr,
mUpnpString * descStr )
static

◆ mupnp_device_getrequestrecieved()

static void mupnp_device_getrequestrecieved ( mUpnpDevice * dev,
mUpnpHttpRequest * httpReq )
static

◆ mupnp_device_httprequestrecieved()

void mupnp_device_httprequestrecieved ( mUpnpHttpRequest * httpReq)

Handler function for a received HTTP request. Delegates GET and POST requests to their respective handlers, or treats as a BAD REQUEST, when appropriate.

Parameters
httpReqReceived HTTP request

◆ mupnp_device_invalidcontrolrecieved()

static void mupnp_device_invalidcontrolrecieved ( mUpnpSoapRequest * soapReq,
int code )
static

◆ mupnp_device_ispresentationrequest()

static bool mupnp_device_ispresentationrequest ( mUpnpDevice * dev,
mUpnpHttpRequest * httpReq )
static

◆ mupnp_device_newsubscriptionrecieved()

static void mupnp_device_newsubscriptionrecieved ( mUpnpService * service,
mUpnpSubscriptionRequest * subReq )
static

◆ mupnp_device_postrequestrecieved()

static void mupnp_device_postrequestrecieved ( mUpnpDevice * dev,
mUpnpHttpRequest * httpReq )
static

◆ mupnp_device_querycontrolrequestrecieved()

static void mupnp_device_querycontrolrequestrecieved ( mUpnpService * service,
mUpnpQueryRequest * queryReq )
static

◆ mupnp_device_renewsubscriptionrecieved()

static void mupnp_device_renewsubscriptionrecieved ( mUpnpService * service,
mUpnpSubscriptionRequest * subReq )
static

◆ mupnp_device_seturlbase()

void mupnp_device_seturlbase ( mUpnpDevice * dev,
char * value )

Modify the device's URL base The base URL is the root for all relative URLs.

Parameters
devDevice in question
valueThe URL base

◆ mupnp_device_soapactionrecieved()

static void mupnp_device_soapactionrecieved ( mUpnpDevice * dev,
mUpnpSoapRequest * soapReq )
static

◆ mupnp_device_subscriptionrecieved()

static void mupnp_device_subscriptionrecieved ( mUpnpDevice * dev,
mUpnpSubscriptionRequest * subReq )
static

◆ mupnp_device_unsubscriptionrecieved()

static void mupnp_device_unsubscriptionrecieved ( mUpnpService * service,
mUpnpSubscriptionRequest * subReq )
static

◆ mupnp_device_updateurlbase()

static void mupnp_device_updateurlbase ( mUpnpDevice * dev,
char * host )
static