mUPnP for C
upnp_status.h File Reference
#include <mupnp/typedef.h>
#include <mupnp/util/string.h>

Data Structures

struct  _mUpnpStatus
 

Macros

#define MUPNP_STATUS_INVALID_ACTION   401
 
#define MUPNP_STATUS_INVALID_ARGS   402
 
#define MUPNP_STATUS_OUT_OF_SYNC   403
 
#define MUPNP_STATUS_INVALID_VAR   404
 
#define MUPNP_STATUS_ACTION_FAILED   501
 
#define mupnp_status_setcode(upnpStat, value)
 
#define mupnp_status_getcode(upnpStat)
 
#define mupnp_status_setdescription(upnpStat, value)
 
#define mupnp_status_getdescription(upnpStat)
 

Typedefs

typedef struct _mUpnpStatus mUpnpStatus
 

Functions

mUpnpStatusmupnp_status_new (void)
 
void mupnp_status_delete (mUpnpStatus *upnpStat)
 
char * mupnp_status_code2string (int code)
 

Macro Definition Documentation

◆ MUPNP_STATUS_ACTION_FAILED

#define MUPNP_STATUS_ACTION_FAILED   501

◆ mupnp_status_getcode

#define mupnp_status_getcode ( upnpStat)
Value:
(upnpStat->code)

Get Status code from a status struct

Parameters
upnpStatStatus structure

◆ mupnp_status_getdescription

#define mupnp_status_getdescription ( upnpStat)
Value:
mupnp_string_getvalue(upnpStat->description)
char * mupnp_string_getvalue(mUpnpString *str)
Definition string.c:177

Get status description from a status struct

Parameters
upnpStatStatus struct

◆ MUPNP_STATUS_INVALID_ACTION

#define MUPNP_STATUS_INVALID_ACTION   401

◆ MUPNP_STATUS_INVALID_ARGS

#define MUPNP_STATUS_INVALID_ARGS   402

◆ MUPNP_STATUS_INVALID_VAR

#define MUPNP_STATUS_INVALID_VAR   404

◆ MUPNP_STATUS_OUT_OF_SYNC

#define MUPNP_STATUS_OUT_OF_SYNC   403

◆ mupnp_status_setcode

#define mupnp_status_setcode ( upnpStat,
value )
Value:
(upnpStat->code = value)

Set status code for status struct

Parameters
upnpStatStatus struct
valueStatus code

◆ mupnp_status_setdescription

#define mupnp_status_setdescription ( upnpStat,
value )
Value:
mupnp_string_setvalue(upnpStat->description, value)
void mupnp_string_setvalue(mUpnpString *str, const char *value)
Definition string.c:84

Set status description for a status struct

Parameters
upnpStatStatus struct
valueStatus description

Typedef Documentation

◆ mUpnpStatus

typedef struct _mUpnpStatus mUpnpStatus

UPnP status struct used in action and state operations

Function Documentation

◆ mupnp_status_code2string()

char * mupnp_status_code2string ( int code)

Helper function that converts a status code into a status description

Parameters
codeCode to convert into a description
Returns
Status description

◆ mupnp_status_delete()

void mupnp_status_delete ( mUpnpStatus * upnpStat)

Delete a status struct

Parameters
upnpStatStatus struct to delete

◆ mupnp_status_new()

mUpnpStatus * mupnp_status_new ( void )

Create a new status struct