mUPnP for C
http.h File Reference
#include <mupnp/typedef.h>
#include <mupnp/version.h>
#include <mupnp/util/string.h>
#include <mupnp/util/list.h>
#include <mupnp/util/thread.h>
#include <mupnp/util/time.h>
#include <mupnp/util/mutex.h>
#include <mupnp/net/socket.h>
#include <mupnp/net/url.h>

Data Structures

struct  _mUpnpHttpHeader
 
struct  _mUpnpHttpPacket
 
struct  _mUpnpHttpResponse
 
struct  _mUpnpHttpRequest
 
struct  _mUpnpHttpServer
 

Macros

#define MUPNP_HTTP_READLINE_BUFSIZE   512
 
#define MUPNP_HTTP_SEVERNAME_MAXLEN   64
 
#define MUPNP_HTTP_DATE_MAXLEN   128
 
#define MUPNP_HTTP_REQUESTLINE_DELIM   "\r\n "
 
#define MUPNP_HTTP_STATUSLINE_DELIM   "\r\n "
 
#define MUPNP_HTTP_HEADERLINE_DELIM   "\r\n :"
 
#define MUPNP_HTTP_CR   "\r"
 
#define MUPNP_HTTP_LF   "\n"
 
#define MUPNP_HTTP_CRLF   "\r\n"
 
#define MUPNP_HTTP_SP   " "
 
#define MUPNP_HTTP_COLON   ":"
 
#define MUPNP_HTTP_VER10   "HTTP/1.0"
 
#define MUPNP_HTTP_VER11   "HTTP/1.1"
 
#define MUPNP_HTTP_USERAGENT_DEFAULT   "mUPnP-HTTP/" MUPNP_VER
 
#define MUPNP_HTTP_DEFAULT_PORT   80
 
#define MUPNP_HTTS_DEFAULT_PORT   443
 
#define MUPNP_HTTP_STATUS_CONTINUE   100
 
#define MUPNP_HTTP_STATUS_OK   200
 
#define MUPNP_HTTP_STATUS_PARTIAL_CONTENT   206
 
#define MUPNP_HTTP_STATUS_BAD_REQUEST   400
 
#define MUPNP_HTTP_STATUS_NOT_FOUND   404
 
#define MUPNP_HTTP_STATUS_METHOD_NOT_ALLOWED   405
 
#define MUPNP_HTTP_STATUS_PRECONDITION_FAILED   412
 
#define MUPNP_HTTP_STATUS_INVALID_RANGE   416
 
#define MUPNP_HTTP_STATUS_INTERNAL_SERVER_ERROR   500
 
#define MUPNP_HTTP_POST   "POST"
 
#define MUPNP_HTTP_GET   "GET"
 
#define MUPNP_HTTP_HEAD   "HEAD"
 
#define MUPNP_HTTP_HOST   "HOST"
 
#define MUPNP_HTTP_DATE   "Date"
 
#define MUPNP_HTTP_CACHE_CONTROL   "Cache-Control"
 
#define MUPNP_HTTP_NO_CACHE   "no-cache"
 
#define MUPNP_HTTP_MAX_AGE   "max-age"
 
#define MUPNP_HTTP_CONNECTION   "Connection"
 
#define MUPNP_HTTP_CLOSE   "close"
 
#define MUPNP_HTTP_KEEP_ALIVE   "Keep-Alive"
 
#define MUPNP_HTTP_CONTENT_TYPE   "Content-Type"
 
#define MUPNP_HTTP_CONTENT_LENGTH   "Content-Length"
 
#define MUPNP_HTTP_CONTENT_RANGE   "Content-Range"
 
#define MUPNP_HTTP_CONTENT_RANGE_BYTES   "bytes"
 
#define MUPNP_HTTP_LOCATION   "Location"
 
#define MUPNP_HTTP_SERVER   "Server"
 
#define MUPNP_HTTP_RANGE   "Range"
 
#define MUPNP_HTTP_TRANSFER_ENCODING   "Transfer-Encoding"
 
#define MUPNP_HTTP_CHUNKED   "Chunked"
 
#define MUPNP_HTTP_USERAGENT   "User-Agent"
 
#define MUPNP_HTTP_SOAP_ACTION   "SOAPACTION"
 
#define MUPNP_HTTP_SOAP_ACTION_WITH_NS   "01-SOAPACTION"
 
#define MUPNP_HTTP_SOAP_MAN_VALUE   "\"http://schemas.xmlsoap.org/soap/envelope/\"; ns=01"
 
#define MUPNP_HTTP_MPOST   "M-POST"
 
#define MUPNP_HTTP_MSEARCH   "M-SEARCH"
 
#define MUPNP_HTTP_NOTIFY   "NOTIFY"
 
#define MUPNP_HTTP_SUBSCRIBE   "SUBSCRIBE"
 
#define MUPNP_HTTP_UNSUBSCRIBE   "UNSUBSCRIBE"
 
#define MUPNP_HTTP_ST   "ST"
 
#define MUPNP_HTTP_MX   "MX"
 
#define MUPNP_HTTP_MAN   "MAN"
 
#define MUPNP_HTTP_NT   "NT"
 
#define MUPNP_HTTP_NTS   "NTS"
 
#define MUPNP_HTTP_USN   "USN"
 
#define MUPNP_HTTP_EXT   "EXT"
 
#define MUPNP_HTTP_SID   "SID"
 
#define MUPNP_HTTP_SEQ   "SEQ"
 
#define MUPNP_HTTP_CALLBACK   "CALLBACK"
 
#define MUPNP_HTTP_TIMEOUT   "TIMEOUT"
 
#define MUPNP_HTTP_CURL_CONNECTTIMEOUT   2
 
#define MUPNP_HTTP_CONN_TIMEOUT   30
 
#define MUPNP_HTTP_SERVER_READ_TIMEOUT   120
 
#define MUPNP_HTTP_REASON_100   "Continue"
 
#define MUPNP_HTTP_REASON_101   "Switching Protocols"
 
#define MUPNP_HTTP_REASON_200   "OK"
 
#define MUPNP_HTTP_REASON_201   "Created"
 
#define MUPNP_HTTP_REASON_202   "Accepted"
 
#define MUPNP_HTTP_REASON_203   "Non-Authoritative Information"
 
#define MUPNP_HTTP_REASON_204   "No Content"
 
#define MUPNP_HTTP_REASON_205   "Reset Content"
 
#define MUPNP_HTTP_REASON_206   "Partial Content"
 
#define MUPNP_HTTP_REASON_300   "Multiple Choices"
 
#define MUPNP_HTTP_REASON_301   "Moved Permanently"
 
#define MUPNP_HTTP_REASON_302   "Found"
 
#define MUPNP_HTTP_REASON_303   "See Other"
 
#define MUPNP_HTTP_REASON_304   "Not Modified"
 
#define MUPNP_HTTP_REASON_305   "Use Proxy"
 
#define MUPNP_HTTP_REASON_307   "Temporary Redirect"
 
#define MUPNP_HTTP_REASON_400   "Bad Request"
 
#define MUPNP_HTTP_REASON_401   "Unauthorized"
 
#define MUPNP_HTTP_REASON_402   "Payment Required"
 
#define MUPNP_HTTP_REASON_403   "Forbidden"
 
#define MUPNP_HTTP_REASON_404   "Not Found"
 
#define MUPNP_HTTP_REASON_405   "Method Not Allowed"
 
#define MUPNP_HTTP_REASON_406   "Not Acceptable"
 
#define MUPNP_HTTP_REASON_407   "Proxy Authentication Required"
 
#define MUPNP_HTTP_REASON_408   "Request Time-out"
 
#define MUPNP_HTTP_REASON_409   "Conflict"
 
#define MUPNP_HTTP_REASON_410   "Gone"
 
#define MUPNP_HTTP_REASON_411   "Length Required"
 
#define MUPNP_HTTP_REASON_412   "Precondition Failed"
 
#define MUPNP_HTTP_REASON_413   "Request Entity Too Large"
 
#define MUPNP_HTTP_REASON_414   "Request-URI Too Large"
 
#define MUPNP_HTTP_REASON_415   "Unsupported Media Type"
 
#define MUPNP_HTTP_REASON_416   "Requested range not satisfiable"
 
#define MUPNP_HTTP_REASON_417   "Expectation Failed"
 
#define MUPNP_HTTP_REASON_500   "Internal Server Error"
 
#define MUPNP_HTTP_REASON_501   "Not Implemented"
 
#define MUPNP_HTTP_REASON_502   "Bad Gateway"
 
#define MUPNP_HTTP_REASON_503   "Service Unavailable"
 
#define MUPNP_HTTP_REASON_504   "Gateway Time-out"
 
#define MUPNP_HTTP_REASON_505   "HTTP Version not supported"
 
#define mupnp_http_header_next(header)
 
#define mupnp_http_headerlist_clear(headerList)
 
#define mupnp_http_headerlist_size(headerList)
 
#define mupnp_http_headerlist_gets(headerList)
 
#define mupnp_http_headerlist_add(headerList, header)
 
#define mupnp_http_packet_deleteallheaders(httpPkt)
 
#define mupnp_http_packet_getnheaders(httpPkt)
 
#define mupnp_http_packet_getheaders(httpPkt)
 
#define mupnp_http_packet_getheader(httpPkt, name)
 
#define mupnp_http_packet_hasheader(httpPkt, name)
 
#define mupnp_http_packet_hasheadervalue(httpPkt, header, value)
 
#define mupnp_http_packet_addheader(httpPkt, header)
 
#define mupnp_http_packet_setcontent(httpPkt, value)
 
#define mupnp_http_packet_setncontent(httpPkt, value, len)
 
#define mupnp_http_packet_appendncontent(httpPkt, value, len)
 
#define mupnp_http_packet_setcontentpointer(httpPkt, value, len)
 
#define mupnp_http_packet_getcontent(httpPkt)
 
#define mupnp_http_packet_setcontentlength(httpPkt, value)
 
#define mupnp_http_packet_getcontentlength(httpPkt)
 
#define mupnp_http_packet_setconnection(httpPkt, value)
 
#define mupnp_http_packet_getconnection(httpPkt)
 
#define mupnp_http_packet_iskeepaliveconnection(httpPkt)
 
#define mupnp_http_packet_settransferencoding(httpPkt, value)
 
#define mupnp_http_packet_gettransferencoding(httpPkt)
 
#define mupnp_http_packet_ischunked(httpPkt)
 
#define mupnp_http_packet_gethost(httpPkt)
 
#define mupnp_http_request_closesocket(httpReq)
 
#define mupnp_http_request_poststring(httpReq, data)
 
#define mupnp_http_request_postchunkedstring(httpReq, data)
 
#define mupnp_http_request_postokrequest(httpReq)
 
#define mupnp_http_request_postbadrequest(httpReq)
 
#define mupnp_http_request_ismethod(httpReq, value)
 
#define mupnp_http_request_isgetrequest(httpReq)
 
#define mupnp_http_request_ispostrequest(httpReq)
 
#define mupnp_http_request_isheadrequest(httpReq)
 
#define mupnp_http_request_issubscriberequest(httpReq)
 
#define mupnp_http_request_isunsubscriberequest(httpReq)
 
#define mupnp_http_request_isnotifyrequest(httpReq)
 
#define mupnp_http_request_issoapaction(httpReq)
 
#define mupnp_http_request_setcontent(httpReq, value)
 
#define mupnp_http_request_setncontent(httpReq, value, len)
 
#define mupnp_http_request_appendncontent(httpPkt, value, len)
 
#define mupnp_http_request_setcontentpointer(httpReq, value, len)
 
#define mupnp_http_request_getcontent(httpReq)
 
#define mupnp_http_request_getheaders(httpReq)
 
#define mupnp_http_request_getheader(httpReq, name)
 
#define mupnp_http_request_setheadervalue(httpReq, name, value)
 
#define mupnp_http_request_setheaderinteger(httpReq, name, value)
 
#define mupnp_http_request_setheaderlong(httpReq, name, value)
 
#define mupnp_http_request_getheadervalue(httpReq, name)
 
#define mupnp_http_request_getheaderinteger(httpReq, name)
 
#define mupnp_http_request_getheaderlong(httpReq, name)
 
#define mupnp_http_request_setuserdata(httpReq, value)
 
#define mupnp_http_request_getuserdata(httpReq)
 
#define mupnp_http_request_getlocaladdress(httpReq)
 
#define mupnp_http_request_getlocalport(httpReq)
 
#define mupnp_http_request_setcontentlength(httpReq, value)
 
#define mupnp_http_request_getcontentlength(httpReq)
 
#define mupnp_http_request_setcontenttype(httpReq, value)
 
#define mupnp_http_request_getcontenttype(httpReq)
 
#define mupnp_http_request_setconnection(httpReq, value)
 
#define mupnp_http_request_getconnection(httpReq)
 
#define mupnp_http_request_iskeepaliveconnection(httpReq)
 
#define mupnp_http_request_settransferencoding(httpReq, value)
 
#define mupnp_http_request_gettransferencoding(httpReq)
 
#define mupnp_http_request_ischunked(httpReq)
 
#define mupnp_http_request_sethost(httpReq, addr, port)
 
#define mupnp_http_request_gethost(httpReq)
 
#define mupnp_http_request_setdate(httpReq, value)
 
#define mupnp_http_request_getdate(httpReq)
 
#define mupnp_http_request_getposturl(httpReq)
 
#define mupnp_http_request_settimeout(httpReq, value)
 
#define mupnp_http_request_gettimeout(httpReq)
 
#define mupnp_http_response_issuccessful(httpRes)
 
#define mupnp_http_response_setcontent(httpRes, value)
 
#define mupnp_http_response_setncontent(httpRes, value, len)
 
#define mupnp_http_response_appendncontent(httpRes, value, len)
 
#define mupnp_http_response_setcontentpointer(httpRes, value, len)
 
#define mupnp_http_response_getcontent(httpRes)
 
#define mupnp_http_response_getheaders(p)
 
#define mupnp_http_response_getheader(p, n)
 
#define mupnp_http_response_setheadervalue(httpRes, n, value)
 
#define mupnp_http_response_setheaderinteger(httpRes, n, value)
 
#define mupnp_http_response_setheaderlong(httpRes, n, value)
 
#define mupnp_http_response_getheadervalue(httpRes, n)
 
#define mupnp_http_response_getheaderinteger(httpRes, n)
 
#define mupnp_http_response_getheaderlong(httpRes, n)
 
#define mupnp_http_response_setuserdata(httpRes, value)
 
#define mupnp_http_response_getuserdata(httpRes)
 
#define mupnp_http_response_setcontentlength(httpRes, value)
 
#define mupnp_http_response_getcontentlength(httpRes)
 
#define mupnp_http_response_setcontenttype(httpRes, value)
 
#define mupnp_http_response_getcontenttype(httpRes)
 
#define mupnp_http_response_setconnection(httpRes, value)
 
#define mupnp_http_response_getconnection(httpRes)
 
#define mupnp_http_response_iskeepaliveconnection(httpRes)
 
#define mupnp_http_response_sethost(httpRes, addr, port)
 
#define mupnp_http_response_gethost(httpRes)
 
#define mupnp_http_response_setdate(httpRes, value)
 
#define mupnp_http_response_getdate(httpRes)
 
#define mupnp_http_response_settransferencoding(httpReq, value)
 
#define mupnp_http_response_gettransferencoding(httpReq)
 
#define mupnp_http_response_settimeout(httpRes, value)
 
#define mupnp_http_response_gettimeout(httpRes)
 
#define mupnp_http_server_next(httpServer)
 
#define mupnp_http_server_getsocket(httpServer)
 
#define mupnp_http_server_isopened(httpServer)
 
#define mupnp_http_server_setuserdata(httpServer, value)
 
#define mupnp_http_server_getuserdata(httpServer)
 
#define mupnp_http_server_settimeout(httpServer, value)
 
#define mupnp_http_server_gettimeout(httpServer)
 
#define mupnp_http_server_lock(httpServer)
 
#define mupnp_http_server_unlock(httpServer)
 
#define mupnp_http_serverlist_clear(httpServerList)
 
#define mupnp_http_serverlist_size(httpServerList)
 
#define mupnp_http_serverlist_gets(httpServerList)
 
#define mupnp_http_serverlist_add(httpServerList, httpServer)
 

Typedefs

typedef struct _mUpnpHttpHeader mUpnpHttpHeader
 
typedef struct _mUpnpHttpHeader mUpnpHttpHeaderList
 
typedef struct _mUpnpHttpPacket mUpnpHttpPacket
 
typedef struct _mUpnpHttpResponse mUpnpHttpResponse
 
typedef struct _mUpnpHttpRequest mUpnpHttpRequest
 
typedef void(* MUPNP_HTTP_LISTENER) (mUpnpHttpRequest *)
 
typedef struct _mUpnpHttpServer mUpnpHttpServer
 
typedef struct _mUpnpHttpServer mUpnpHttpServerList
 

Functions

const char * mupnp_http_statuscode2reasonphrase (const int code)
 
mUpnpHttpHeadermupnp_http_header_new (void)
 
void mupnp_http_header_delete (mUpnpHttpHeader *header)
 
void mupnp_http_header_setname (mUpnpHttpHeader *header, const char *name)
 
const char * mupnp_http_header_getname (mUpnpHttpHeader *header)
 
void mupnp_http_header_setvalue (mUpnpHttpHeader *header, const char *value)
 
const char * mupnp_http_header_getvalue (mUpnpHttpHeader *header)
 
mUpnpHttpHeaderListmupnp_http_headerlist_new (void)
 
void mupnp_http_headerlist_delete (mUpnpHttpHeaderList *headerList)
 
mUpnpHttpHeadermupnp_http_headerlist_get (mUpnpHttpHeaderList *headerList, const char *name)
 
void mupnp_http_headerlist_set (mUpnpHttpHeaderList *headerList, const char *name, const char *value)
 
const char * mupnp_http_headerlist_getvalue (mUpnpHttpHeaderList *headerList, const char *name)
 
mUpnpHttpPacketmupnp_http_packet_new (void)
 
void mupnp_http_packet_delete (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_init (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_clean (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_clear (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_setheadervalue (mUpnpHttpPacket *httpPkt, const char *name, const char *value)
 
void mupnp_http_packet_setheaderinteger (mUpnpHttpPacket *httpPkt, const char *name, int value)
 
void mupnp_http_packet_setheaderlong (mUpnpHttpPacket *httpPkt, const char *name, long value)
 
void mupnp_http_packet_setheadersizet (mUpnpHttpPacket *httpPkt, const char *name, size_t value)
 
void mupnp_http_packet_setheaderssizet (mUpnpHttpPacket *httpPkt, const char *name, ssize_t value)
 
const char * mupnp_http_packet_getheadervalue (mUpnpHttpPacket *httpPkt, const char *name)
 
int mupnp_http_packet_getheaderinteger (mUpnpHttpPacket *httpPkt, const char *name)
 
long mupnp_http_packet_getheaderlong (mUpnpHttpPacket *httpPkt, const char *name)
 
size_t mupnp_http_packet_getheadersizet (mUpnpHttpPacket *httpPkt, const char *name)
 
ssize_t mupnp_http_packet_getheaderssizet (mUpnpHttpPacket *httpPkt, const char *name)
 
size_t mupnp_http_packet_getheadersize (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_post (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock)
 
void mupnp_http_packet_read_headers (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, char *lineBuf, size_t lineBufSize)
 
bool mupnp_http_packet_read_body (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, char *lineBuf, size_t lineBufSize)
 
bool mupnp_http_packet_read (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, bool onlyHeader, char *lineBuf, size_t lineBufSize)
 
void mupnp_http_packet_sethost (mUpnpHttpPacket *httpPkt, const char *addr, int port)
 
void mupnp_http_packet_copy (mUpnpHttpPacket *destHttpPkt, mUpnpHttpPacket *srcHttpPkt)
 
void mupnp_http_packet_print (mUpnpHttpPacket *httpPkt)
 
mUpnpHttpRequestmupnp_http_request_new (void)
 
void mupnp_http_request_delete (mUpnpHttpRequest *httpReq)
 
void mupnp_http_request_clear (mUpnpHttpRequest *httpReq)
 
void mupnp_http_request_setmethod (mUpnpHttpRequest *httpReq, const char *method)
 
char * mupnp_http_request_getmethod (mUpnpHttpRequest *httpReq)
 
void mupnp_http_request_setversion (mUpnpHttpRequest *httpReq, const char *version)
 
char * mupnp_http_request_getversion (mUpnpHttpRequest *httpReqest)
 
void mupnp_http_request_setuseragent (mUpnpHttpRequest *httpReq, const char *version)
 
char * mupnp_http_request_getuseragent (mUpnpHttpRequest *httpReqest)
 
void mupnp_http_request_addtouseragent (mUpnpHttpRequest *httpReq, const char *value)
 
void mupnp_http_request_seturi (mUpnpHttpRequest *httpReq, const char *uri)
 
char * mupnp_http_request_geturi (mUpnpHttpRequest *httpReq)
 
void mupnp_http_request_setsocket (mUpnpHttpRequest *httpReq, mUpnpSocket *sock)
 
mUpnpSocketmupnp_http_request_getsocket (mUpnpHttpRequest *httpReq)
 
mUpnpHttpResponsemupnp_http_request_post (mUpnpHttpRequest *httpReq, const char *ipaddr, int port)
 
bool mupnp_http_request_read (mUpnpHttpRequest *httpReq, mUpnpSocket *sock)
 
bool mupnp_http_request_postresponse (mUpnpHttpRequest *httpReq, mUpnpHttpResponse *httpRes)
 
bool mupnp_http_request_poststatuscode (mUpnpHttpRequest *httpReq, int httpStatCode)
 
bool mupnp_http_request_postdata (mUpnpHttpRequest *httpReq, void *data, int dataLen)
 
bool mupnp_http_request_postchunkedsize (mUpnpHttpRequest *httpReq, int dataLen)
 
bool mupnp_http_request_postchunkeddata (mUpnpHttpRequest *httpReq, void *data, int dataLen)
 
bool mupnp_http_request_postlastchunk (mUpnpHttpRequest *httpReq)
 
void mupnp_http_request_copy (mUpnpHttpRequest *destHttpReq, mUpnpHttpRequest *srcHttpReq)
 
void mupnp_http_request_print (mUpnpHttpRequest *httpReq)
 
mUpnpHttpResponsemupnp_http_response_new (void)
 
void mupnp_http_response_delete (mUpnpHttpResponse *httpRes)
 
void mupnp_http_response_clear (mUpnpHttpResponse *httpRes)
 
void mupnp_http_response_setversion (mUpnpHttpResponse *httpRes, const char *version)
 
char * mupnp_http_response_getversion (mUpnpHttpResponse *httpRes)
 
void mupnp_http_response_setreasonphrase (mUpnpHttpResponse *httpRes, const char *value)
 
char * mupnp_http_response_getreasonphrase (mUpnpHttpResponse *httpRes)
 
void mupnp_http_response_setstatuscode (mUpnpHttpResponse *httpRes, int code)
 
int mupnp_http_response_getstatuscode (mUpnpHttpResponse *httpRes)
 
bool mupnp_http_response_read (mUpnpHttpResponse *httpRes, mUpnpSocket *sock, bool onlyHeader)
 
void mupnp_http_response_copy (mUpnpHttpResponse *destHttpRes, mUpnpHttpResponse *srcHttpRes)
 
void mupnp_http_response_print (mUpnpHttpResponse *httpRes)
 
mUpnpHttpServermupnp_http_server_new (void)
 
void mupnp_http_server_delete (mUpnpHttpServer *httpServer)
 
bool mupnp_http_server_open (mUpnpHttpServer *httpServer, int bindPort, const char *bindAddr)
 
bool mupnp_http_server_close (mUpnpHttpServer *httpServer)
 
bool mupnp_http_server_accept (mUpnpHttpServer *httpServer)
 
bool mupnp_http_server_start (mUpnpHttpServer *httpServer)
 
bool mupnp_http_server_stop (mUpnpHttpServer *httpServer)
 
void mupnp_http_server_setlistener (mUpnpHttpServer *httpServer, MUPNP_HTTP_LISTENER listener)
 
const char * mupnp_http_getservername (char *buf, size_t bufSize)
 
mUpnpHttpServerListmupnp_http_serverlist_new (void)
 
void mupnp_http_serverlist_delete (mUpnpHttpServerList *httpServerList)
 
bool mupnp_http_serverlist_open (mUpnpHttpServerList *httpServerList, int port)
 
bool mupnp_http_serverlist_close (mUpnpHttpServerList *httpServerList)
 
bool mupnp_http_serverlist_start (mUpnpHttpServerList *httpServerList)
 
bool mupnp_http_serverlist_stop (mUpnpHttpServerList *httpServerList)
 
void mupnp_http_serverlist_setlistener (mUpnpHttpServerList *httpServerList, MUPNP_HTTP_LISTENER listener)
 
void mupnp_http_serverlist_setuserdata (mUpnpHttpServerList *httpServerList, void *value)
 
const char * mupnp_http_getdate (mUpnpTime sysTime, char *buf, size_t bufSize)
 
bool mupnp_http_persistentconnection_init (void)
 
void mupnp_http_persistentconnection_clear (void)
 
void mupnp_http_persistentconnection_lock (void)
 
void mupnp_http_persistentconnection_unlock (void)
 
void * mupnp_http_persistentconnection_get (char *host, int port)
 
bool mupnp_http_persistentconnection_put (char *host, int port, void *data)
 

Macro Definition Documentation

◆ MUPNP_HTTP_CACHE_CONTROL

#define MUPNP_HTTP_CACHE_CONTROL   "Cache-Control"

◆ MUPNP_HTTP_CALLBACK

#define MUPNP_HTTP_CALLBACK   "CALLBACK"

◆ MUPNP_HTTP_CHUNKED

#define MUPNP_HTTP_CHUNKED   "Chunked"

◆ MUPNP_HTTP_CLOSE

#define MUPNP_HTTP_CLOSE   "close"

◆ MUPNP_HTTP_COLON

#define MUPNP_HTTP_COLON   ":"

◆ MUPNP_HTTP_CONN_TIMEOUT

#define MUPNP_HTTP_CONN_TIMEOUT   30

◆ MUPNP_HTTP_CONNECTION

#define MUPNP_HTTP_CONNECTION   "Connection"

◆ MUPNP_HTTP_CONTENT_LENGTH

#define MUPNP_HTTP_CONTENT_LENGTH   "Content-Length"

◆ MUPNP_HTTP_CONTENT_RANGE

#define MUPNP_HTTP_CONTENT_RANGE   "Content-Range"

◆ MUPNP_HTTP_CONTENT_RANGE_BYTES

#define MUPNP_HTTP_CONTENT_RANGE_BYTES   "bytes"

◆ MUPNP_HTTP_CONTENT_TYPE

#define MUPNP_HTTP_CONTENT_TYPE   "Content-Type"

◆ MUPNP_HTTP_CR

#define MUPNP_HTTP_CR   "\r"

◆ MUPNP_HTTP_CRLF

#define MUPNP_HTTP_CRLF   "\r\n"

◆ MUPNP_HTTP_CURL_CONNECTTIMEOUT

#define MUPNP_HTTP_CURL_CONNECTTIMEOUT   2

◆ MUPNP_HTTP_DATE

#define MUPNP_HTTP_DATE   "Date"

◆ MUPNP_HTTP_DATE_MAXLEN

#define MUPNP_HTTP_DATE_MAXLEN   128

◆ MUPNP_HTTP_DEFAULT_PORT

#define MUPNP_HTTP_DEFAULT_PORT   80

◆ MUPNP_HTTP_EXT

#define MUPNP_HTTP_EXT   "EXT"

◆ MUPNP_HTTP_GET

#define MUPNP_HTTP_GET   "GET"

◆ MUPNP_HTTP_HEAD

#define MUPNP_HTTP_HEAD   "HEAD"

◆ mupnp_http_header_next

#define mupnp_http_header_next ( header)
Value:
mUpnpList * mupnp_list_next(mUpnpList *list)
Definition list.c:234
Definition http.h:171
The generic list interface in mUPnP.
Definition list.h:56

◆ MUPNP_HTTP_HEADERLINE_DELIM

#define MUPNP_HTTP_HEADERLINE_DELIM   "\r\n :"

◆ mupnp_http_headerlist_add

#define mupnp_http_headerlist_add ( headerList,
header )
Value:
mupnp_list_add((mUpnpList*)headerList, (mUpnpList*)header)
void mupnp_list_add(mUpnpList *headList, mUpnpList *list)
Definition list.c:123

◆ mupnp_http_headerlist_clear

#define mupnp_http_headerlist_clear ( headerList)
Value:
void mupnp_http_header_delete(mUpnpHttpHeader *header)
Definition http_header.c:43
void mupnp_list_clear(mUpnpList *headList, MUPNP_LIST_DESTRUCTORFUNC destructorFunc)
Definition list.c:257
void(* MUPNP_LIST_DESTRUCTORFUNC)(void *)
Definition list.h:29

◆ mupnp_http_headerlist_gets

#define mupnp_http_headerlist_gets ( headerList)
Value:

◆ mupnp_http_headerlist_size

#define mupnp_http_headerlist_size ( headerList)
Value:
int mupnp_list_size(mUpnpList *headList)
Definition list.c:53

◆ MUPNP_HTTP_HOST

#define MUPNP_HTTP_HOST   "HOST"

◆ MUPNP_HTTP_KEEP_ALIVE

#define MUPNP_HTTP_KEEP_ALIVE   "Keep-Alive"

◆ MUPNP_HTTP_LF

#define MUPNP_HTTP_LF   "\n"

◆ MUPNP_HTTP_LOCATION

#define MUPNP_HTTP_LOCATION   "Location"

◆ MUPNP_HTTP_MAN

#define MUPNP_HTTP_MAN   "MAN"

◆ MUPNP_HTTP_MAX_AGE

#define MUPNP_HTTP_MAX_AGE   "max-age"

◆ MUPNP_HTTP_MPOST

#define MUPNP_HTTP_MPOST   "M-POST"

◆ MUPNP_HTTP_MSEARCH

#define MUPNP_HTTP_MSEARCH   "M-SEARCH"

◆ MUPNP_HTTP_MX

#define MUPNP_HTTP_MX   "MX"

◆ MUPNP_HTTP_NO_CACHE

#define MUPNP_HTTP_NO_CACHE   "no-cache"

◆ MUPNP_HTTP_NOTIFY

#define MUPNP_HTTP_NOTIFY   "NOTIFY"

◆ MUPNP_HTTP_NT

#define MUPNP_HTTP_NT   "NT"

◆ MUPNP_HTTP_NTS

#define MUPNP_HTTP_NTS   "NTS"

◆ mupnp_http_packet_addheader

#define mupnp_http_packet_addheader ( httpPkt,
header )
Value:
mupnp_http_headerlist_add(httpPkt->headerList, header)
#define mupnp_http_headerlist_add(headerList, header)
Definition http.h:257

◆ mupnp_http_packet_appendncontent

#define mupnp_http_packet_appendncontent ( httpPkt,
value,
len )
Value:
mupnp_string_naddvalue(httpPkt->content, value, len)
char * mupnp_string_naddvalue(mUpnpString *str, const char *value, size_t valueLen)
Definition string.c:238

◆ mupnp_http_packet_deleteallheaders

#define mupnp_http_packet_deleteallheaders ( httpPkt)
Value:
mupnp_http_headerlist_gets(httpPkt->headerList)
#define mupnp_http_headerlist_gets(headerList)
Definition http.h:256

◆ mupnp_http_packet_getconnection

#define mupnp_http_packet_getconnection ( httpPkt)
Value:
#define MUPNP_HTTP_CONNECTION
Definition http.h:78
const char * mupnp_http_packet_getheadervalue(mUpnpHttpPacket *httpPkt, const char *name)
Definition http_packet.c:179

◆ mupnp_http_packet_getcontent

#define mupnp_http_packet_getcontent ( httpPkt)
Value:
mupnp_string_getvalue(httpPkt->content)
char * mupnp_string_getvalue(mUpnpString *str)
Definition string.c:177

◆ mupnp_http_packet_getcontentlength

#define mupnp_http_packet_getcontentlength ( httpPkt)
Value:
ssize_t mupnp_http_packet_getheaderssizet(mUpnpHttpPacket *httpPkt, const char *name)
Definition http_packet.c:239
#define MUPNP_HTTP_CONTENT_LENGTH
Definition http.h:82

◆ mupnp_http_packet_getheader

#define mupnp_http_packet_getheader ( httpPkt,
name )
Value:
mupnp_http_headerlist_get((mUpnpHttpHeaderList*)httpPkt->headerList, name)
mUpnpHttpHeader * mupnp_http_headerlist_get(mUpnpHttpHeaderList *headerList, const char *name)
Definition http_header_list.c:56

◆ mupnp_http_packet_getheaders

#define mupnp_http_packet_getheaders ( httpPkt)
Value:
mupnp_http_headerlist_gets(httpPkt->headerList)

◆ mupnp_http_packet_gethost

#define mupnp_http_packet_gethost ( httpPkt)
Value:
long mupnp_http_packet_getheaderlong(mUpnpHttpPacket *httpPkt, const char *name)
Definition http_packet.c:205
#define MUPNP_HTTP_HOST
Definition http.h:73

◆ mupnp_http_packet_getnheaders

#define mupnp_http_packet_getnheaders ( httpPkt)
Value:
mupnp_http_headerlist_size(httpPkt->headerList)
#define mupnp_http_headerlist_size(headerList)
Definition http.h:255

◆ mupnp_http_packet_gettransferencoding

#define mupnp_http_packet_gettransferencoding ( httpPkt)
Value:
#define MUPNP_HTTP_TRANSFER_ENCODING
Definition http.h:88

◆ mupnp_http_packet_hasheader

#define mupnp_http_packet_hasheader ( httpPkt,
name )
Value:
((mupnp_http_headerlist_get((mUpnpHttpHeaderList*)httpPkt->headerList, name) != NULL) ? true : false)
#define true
Definition typedef.h:63

◆ mupnp_http_packet_hasheadervalue

#define mupnp_http_packet_hasheadervalue ( httpPkt,
header,
value )
Value:
bool mupnp_streq(const char *str1, const char *str2)
Definition string_function.c:158
Definition http.h:178

◆ mupnp_http_packet_ischunked

#define mupnp_http_packet_ischunked ( httpPkt)
Value:
#define mupnp_http_packet_gettransferencoding(httpPkt)
Definition http.h:318
#define MUPNP_HTTP_CHUNKED
Definition http.h:89
bool mupnp_strcaseeq(const char *str1, const char *str2)
Definition string_function.c:174

◆ mupnp_http_packet_iskeepaliveconnection

#define mupnp_http_packet_iskeepaliveconnection ( httpPkt)
Value:
#define mupnp_http_packet_getconnection(httpPkt)
Definition http.h:313
#define MUPNP_HTTP_CLOSE
Definition http.h:79

◆ mupnp_http_packet_setconnection

#define mupnp_http_packet_setconnection ( httpPkt,
value )
Value:
void mupnp_http_packet_setheadervalue(mUpnpHttpPacket *httpPkt, const char *name, const char *value)
Definition http_packet.c:106

◆ mupnp_http_packet_setcontent

#define mupnp_http_packet_setcontent ( httpPkt,
value )
Value:
mupnp_string_setvalue(httpPkt->content, value)
void mupnp_string_setvalue(mUpnpString *str, const char *value)
Definition string.c:84

◆ mupnp_http_packet_setcontentlength

#define mupnp_http_packet_setcontentlength ( httpPkt,
value )
Value:
void mupnp_http_packet_setheaderssizet(mUpnpHttpPacket *httpPkt, const char *name, ssize_t value)
Definition http_packet.c:164

◆ mupnp_http_packet_setcontentpointer

#define mupnp_http_packet_setcontentpointer ( httpPkt,
value,
len )
Value:
mupnp_string_setpointervalue(httpPkt->content, value, len)
void mupnp_string_setpointervalue(mUpnpString *str, char *value, size_t len)
Definition string.c:159

◆ mupnp_http_packet_setncontent

#define mupnp_http_packet_setncontent ( httpPkt,
value,
len )
Value:
mupnp_string_setnvalue(httpPkt->content, value, len)
void mupnp_string_setnvalue(mUpnpString *str, const char *value, size_t len)
Definition string.c:130

◆ mupnp_http_packet_settransferencoding

#define mupnp_http_packet_settransferencoding ( httpPkt,
value )

◆ MUPNP_HTTP_POST

#define MUPNP_HTTP_POST   "POST"

◆ MUPNP_HTTP_RANGE

#define MUPNP_HTTP_RANGE   "Range"

◆ MUPNP_HTTP_READLINE_BUFSIZE

#define MUPNP_HTTP_READLINE_BUFSIZE   512

◆ MUPNP_HTTP_REASON_100

#define MUPNP_HTTP_REASON_100   "Continue"

◆ MUPNP_HTTP_REASON_101

#define MUPNP_HTTP_REASON_101   "Switching Protocols"

◆ MUPNP_HTTP_REASON_200

#define MUPNP_HTTP_REASON_200   "OK"

◆ MUPNP_HTTP_REASON_201

#define MUPNP_HTTP_REASON_201   "Created"

◆ MUPNP_HTTP_REASON_202

#define MUPNP_HTTP_REASON_202   "Accepted"

◆ MUPNP_HTTP_REASON_203

#define MUPNP_HTTP_REASON_203   "Non-Authoritative Information"

◆ MUPNP_HTTP_REASON_204

#define MUPNP_HTTP_REASON_204   "No Content"

◆ MUPNP_HTTP_REASON_205

#define MUPNP_HTTP_REASON_205   "Reset Content"

◆ MUPNP_HTTP_REASON_206

#define MUPNP_HTTP_REASON_206   "Partial Content"

◆ MUPNP_HTTP_REASON_300

#define MUPNP_HTTP_REASON_300   "Multiple Choices"

◆ MUPNP_HTTP_REASON_301

#define MUPNP_HTTP_REASON_301   "Moved Permanently"

◆ MUPNP_HTTP_REASON_302

#define MUPNP_HTTP_REASON_302   "Found"

◆ MUPNP_HTTP_REASON_303

#define MUPNP_HTTP_REASON_303   "See Other"

◆ MUPNP_HTTP_REASON_304

#define MUPNP_HTTP_REASON_304   "Not Modified"

◆ MUPNP_HTTP_REASON_305

#define MUPNP_HTTP_REASON_305   "Use Proxy"

◆ MUPNP_HTTP_REASON_307

#define MUPNP_HTTP_REASON_307   "Temporary Redirect"

◆ MUPNP_HTTP_REASON_400

#define MUPNP_HTTP_REASON_400   "Bad Request"

◆ MUPNP_HTTP_REASON_401

#define MUPNP_HTTP_REASON_401   "Unauthorized"

◆ MUPNP_HTTP_REASON_402

#define MUPNP_HTTP_REASON_402   "Payment Required"

◆ MUPNP_HTTP_REASON_403

#define MUPNP_HTTP_REASON_403   "Forbidden"

◆ MUPNP_HTTP_REASON_404

#define MUPNP_HTTP_REASON_404   "Not Found"

◆ MUPNP_HTTP_REASON_405

#define MUPNP_HTTP_REASON_405   "Method Not Allowed"

◆ MUPNP_HTTP_REASON_406

#define MUPNP_HTTP_REASON_406   "Not Acceptable"

◆ MUPNP_HTTP_REASON_407

#define MUPNP_HTTP_REASON_407   "Proxy Authentication Required"

◆ MUPNP_HTTP_REASON_408

#define MUPNP_HTTP_REASON_408   "Request Time-out"

◆ MUPNP_HTTP_REASON_409

#define MUPNP_HTTP_REASON_409   "Conflict"

◆ MUPNP_HTTP_REASON_410

#define MUPNP_HTTP_REASON_410   "Gone"

◆ MUPNP_HTTP_REASON_411

#define MUPNP_HTTP_REASON_411   "Length Required"

◆ MUPNP_HTTP_REASON_412

#define MUPNP_HTTP_REASON_412   "Precondition Failed"

◆ MUPNP_HTTP_REASON_413

#define MUPNP_HTTP_REASON_413   "Request Entity Too Large"

◆ MUPNP_HTTP_REASON_414

#define MUPNP_HTTP_REASON_414   "Request-URI Too Large"

◆ MUPNP_HTTP_REASON_415

#define MUPNP_HTTP_REASON_415   "Unsupported Media Type"

◆ MUPNP_HTTP_REASON_416

#define MUPNP_HTTP_REASON_416   "Requested range not satisfiable"

◆ MUPNP_HTTP_REASON_417

#define MUPNP_HTTP_REASON_417   "Expectation Failed"

◆ MUPNP_HTTP_REASON_500

#define MUPNP_HTTP_REASON_500   "Internal Server Error"

◆ MUPNP_HTTP_REASON_501

#define MUPNP_HTTP_REASON_501   "Not Implemented"

◆ MUPNP_HTTP_REASON_502

#define MUPNP_HTTP_REASON_502   "Bad Gateway"

◆ MUPNP_HTTP_REASON_503

#define MUPNP_HTTP_REASON_503   "Service Unavailable"

◆ MUPNP_HTTP_REASON_504

#define MUPNP_HTTP_REASON_504   "Gateway Time-out"

◆ MUPNP_HTTP_REASON_505

#define MUPNP_HTTP_REASON_505   "HTTP Version not supported"

◆ mupnp_http_request_appendncontent

#define mupnp_http_request_appendncontent ( httpPkt,
value,
len )
Value:
#define mupnp_http_packet_appendncontent(httpPkt, value, len)
Definition http.h:299

◆ mupnp_http_request_closesocket

#define mupnp_http_request_closesocket ( httpReq)
Value:
mUpnpSocket * mupnp_http_request_getsocket(mUpnpHttpRequest *httpReq)
Definition http_request.c:246
bool mupnp_socket_close(mUpnpSocket *sock)
Definition socket.c:318

◆ mupnp_http_request_getconnection

#define mupnp_http_request_getconnection ( httpReq)

◆ mupnp_http_request_getcontent

#define mupnp_http_request_getcontent ( httpReq)
Value:
#define mupnp_http_packet_getcontent(httpPkt)
Definition http.h:301

◆ mupnp_http_request_getcontentlength

#define mupnp_http_request_getcontentlength ( httpReq)
Value:
#define mupnp_http_packet_getcontentlength(httpPkt)
Definition http.h:309

◆ mupnp_http_request_getcontenttype

#define mupnp_http_request_getcontenttype ( httpReq)
Value:
#define MUPNP_HTTP_CONTENT_TYPE
Definition http.h:81

◆ mupnp_http_request_getdate

#define mupnp_http_request_getdate ( httpReq)
Value:
#define MUPNP_HTTP_DATE
Definition http.h:74

◆ mupnp_http_request_getheader

#define mupnp_http_request_getheader ( httpReq,
name )
Value:
#define mupnp_http_packet_getheader(httpPkt, name)
Definition http.h:277

◆ mupnp_http_request_getheaderinteger

#define mupnp_http_request_getheaderinteger ( httpReq,
name )
Value:
int mupnp_http_packet_getheaderinteger(mUpnpHttpPacket *httpPkt, const char *name)
Definition http_packet.c:188

◆ mupnp_http_request_getheaderlong

#define mupnp_http_request_getheaderlong ( httpReq,
name )

◆ mupnp_http_request_getheaders

#define mupnp_http_request_getheaders ( httpReq)
Value:
#define mupnp_http_packet_getheaders(httpPkt)
Definition http.h:275

◆ mupnp_http_request_getheadervalue

#define mupnp_http_request_getheadervalue ( httpReq,
name )

◆ mupnp_http_request_gethost

#define mupnp_http_request_gethost ( httpReq)

◆ mupnp_http_request_getlocaladdress

#define mupnp_http_request_getlocaladdress ( httpReq)
Value:
#define mupnp_socket_getaddress(socket)
Definition socket.h:131

◆ mupnp_http_request_getlocalport

#define mupnp_http_request_getlocalport ( httpReq)
Value:
mupnp_socket_getport(httpReq->sock)
#define mupnp_socket_getport(socket)
Definition socket.h:132

◆ mupnp_http_request_getposturl

#define mupnp_http_request_getposturl ( httpReq)
Value:
(httpReq->postURL)

◆ mupnp_http_request_gettimeout

#define mupnp_http_request_gettimeout ( httpReq)
Value:
(httpReq->timeout)

◆ mupnp_http_request_gettransferencoding

#define mupnp_http_request_gettransferencoding ( httpReq)

◆ mupnp_http_request_getuserdata

#define mupnp_http_request_getuserdata ( httpReq)
Value:
(httpReq->userData)

◆ mupnp_http_request_ischunked

#define mupnp_http_request_ischunked ( httpReq)
Value:
#define mupnp_http_packet_ischunked(httpPkt)
Definition http.h:319

◆ mupnp_http_request_isgetrequest

#define mupnp_http_request_isgetrequest ( httpReq)
Value:
#define MUPNP_HTTP_GET
Definition http.h:70
char * mupnp_http_request_getmethod(mUpnpHttpRequest *httpReq)
Definition http_request.c:182

◆ mupnp_http_request_isheadrequest

#define mupnp_http_request_isheadrequest ( httpReq)
Value:
#define MUPNP_HTTP_HEAD
Definition http.h:71

◆ mupnp_http_request_iskeepaliveconnection

#define mupnp_http_request_iskeepaliveconnection ( httpReq)
Value:
#define mupnp_http_packet_iskeepaliveconnection(httpPkt)
Definition http.h:314

◆ mupnp_http_request_ismethod

#define mupnp_http_request_ismethod ( httpReq,
value )
Value:

◆ mupnp_http_request_isnotifyrequest

#define mupnp_http_request_isnotifyrequest ( httpReq)
Value:
#define MUPNP_HTTP_NOTIFY
Definition http.h:100

◆ mupnp_http_request_ispostrequest

#define mupnp_http_request_ispostrequest ( httpReq)
Value:
#define MUPNP_HTTP_POST
Definition http.h:69
#define MUPNP_HTTP_MPOST
Definition http.h:98

◆ mupnp_http_request_issoapaction

#define mupnp_http_request_issoapaction ( httpReq)
Value:
#define mupnp_http_packet_hasheader(httpPkt, name)
Definition http.h:278
#define MUPNP_HTTP_SOAP_ACTION
Definition http.h:93

◆ mupnp_http_request_issubscriberequest

#define mupnp_http_request_issubscriberequest ( httpReq)
Value:
#define MUPNP_HTTP_SUBSCRIBE
Definition http.h:101

◆ mupnp_http_request_isunsubscriberequest

#define mupnp_http_request_isunsubscriberequest ( httpReq)
Value:
#define MUPNP_HTTP_UNSUBSCRIBE
Definition http.h:102

◆ mupnp_http_request_postbadrequest

#define mupnp_http_request_postbadrequest ( httpReq)
Value:
bool mupnp_http_request_poststatuscode(mUpnpHttpRequest *httpReq, int httpStatCode)
Definition http_request.c:805
#define MUPNP_HTTP_STATUS_BAD_REQUEST
Definition http.h:62

◆ mupnp_http_request_postchunkedstring

#define mupnp_http_request_postchunkedstring ( httpReq,
data )
Value:
bool mupnp_http_request_postchunkeddata(mUpnpHttpRequest *httpReq, void *data, int dataLen)
Definition http_request.c:861
size_t mupnp_strlen(const char *str)
Definition string_function.c:63

◆ mupnp_http_request_postokrequest

#define mupnp_http_request_postokrequest ( httpReq)
Value:
#define MUPNP_HTTP_STATUS_OK
Definition http.h:60

◆ mupnp_http_request_poststring

#define mupnp_http_request_poststring ( httpReq,
data )
Value:
bool mupnp_http_request_postdata(mUpnpHttpRequest *httpReq, void *data, int dataLen)
Definition http_request.c:827

◆ mupnp_http_request_setconnection

#define mupnp_http_request_setconnection ( httpReq,
value )

◆ mupnp_http_request_setcontent

#define mupnp_http_request_setcontent ( httpReq,
value )
Value:
#define mupnp_http_packet_setcontent(httpPkt, value)
Definition http.h:297

◆ mupnp_http_request_setcontentlength

#define mupnp_http_request_setcontentlength ( httpReq,
value )
Value:
#define mupnp_http_packet_setcontentlength(httpPkt, value)
Definition http.h:308

◆ mupnp_http_request_setcontentpointer

#define mupnp_http_request_setcontentpointer ( httpReq,
value,
len )
Value:
#define mupnp_http_packet_setcontentpointer(httpPkt, value, len)
Definition http.h:300

◆ mupnp_http_request_setcontenttype

#define mupnp_http_request_setcontenttype ( httpReq,
value )

◆ mupnp_http_request_setdate

#define mupnp_http_request_setdate ( httpReq,
value )

◆ mupnp_http_request_setheaderinteger

#define mupnp_http_request_setheaderinteger ( httpReq,
name,
value )
Value:
void mupnp_http_packet_setheaderinteger(mUpnpHttpPacket *httpPkt, const char *name, int value)
Definition http_packet.c:119

◆ mupnp_http_request_setheaderlong

#define mupnp_http_request_setheaderlong ( httpReq,
name,
value )
Value:
void mupnp_http_packet_setheaderlong(mUpnpHttpPacket *httpPkt, const char *name, long value)
Definition http_packet.c:134

◆ mupnp_http_request_setheadervalue

#define mupnp_http_request_setheadervalue ( httpReq,
name,
value )
Value:

◆ mupnp_http_request_sethost

#define mupnp_http_request_sethost ( httpReq,
addr,
port )
Value:
void mupnp_http_packet_sethost(mUpnpHttpPacket *httpPkt, const char *addr, int port)
Definition http_packet.c:256

◆ mupnp_http_request_setncontent

#define mupnp_http_request_setncontent ( httpReq,
value,
len )
Value:

◆ mupnp_http_request_settimeout

#define mupnp_http_request_settimeout ( httpReq,
value )
Value:
(httpReq->timeout = value)

◆ mupnp_http_request_settransferencoding

#define mupnp_http_request_settransferencoding ( httpReq,
value )
Value:
#define mupnp_http_packet_settransferencoding(httpPkt, value)
Definition http.h:317

◆ mupnp_http_request_setuserdata

#define mupnp_http_request_setuserdata ( httpReq,
value )
Value:
(httpReq->userData = value)

◆ MUPNP_HTTP_REQUESTLINE_DELIM

#define MUPNP_HTTP_REQUESTLINE_DELIM   "\r\n "

◆ mupnp_http_response_appendncontent

#define mupnp_http_response_appendncontent ( httpRes,
value,
len )
Value:

◆ mupnp_http_response_getconnection

#define mupnp_http_response_getconnection ( httpRes)

◆ mupnp_http_response_getcontent

#define mupnp_http_response_getcontent ( httpRes)

◆ mupnp_http_response_getcontentlength

#define mupnp_http_response_getcontentlength ( httpRes)

◆ mupnp_http_response_getcontenttype

#define mupnp_http_response_getcontenttype ( httpRes)

◆ mupnp_http_response_getdate

#define mupnp_http_response_getdate ( httpRes)

◆ mupnp_http_response_getheader

#define mupnp_http_response_getheader ( p,
n )

◆ mupnp_http_response_getheaderinteger

#define mupnp_http_response_getheaderinteger ( httpRes,
n )

◆ mupnp_http_response_getheaderlong

#define mupnp_http_response_getheaderlong ( httpRes,
n )

◆ mupnp_http_response_getheaders

#define mupnp_http_response_getheaders ( p)

◆ mupnp_http_response_getheadervalue

#define mupnp_http_response_getheadervalue ( httpRes,
n )

◆ mupnp_http_response_gethost

#define mupnp_http_response_gethost ( httpRes)

◆ mupnp_http_response_gettimeout

#define mupnp_http_response_gettimeout ( httpRes)
Value:
(httpRes->timeout)

◆ mupnp_http_response_gettransferencoding

#define mupnp_http_response_gettransferencoding ( httpReq)

◆ mupnp_http_response_getuserdata

#define mupnp_http_response_getuserdata ( httpRes)
Value:
(httpRes->userData)

◆ mupnp_http_response_iskeepaliveconnection

#define mupnp_http_response_iskeepaliveconnection ( httpRes)

◆ mupnp_http_response_issuccessful

#define mupnp_http_response_issuccessful ( httpRes)
Value:
int mupnp_http_response_getstatuscode(mUpnpHttpResponse *httpRes)
Definition http_response.c:123

◆ mupnp_http_response_setconnection

#define mupnp_http_response_setconnection ( httpRes,
value )

◆ mupnp_http_response_setcontent

#define mupnp_http_response_setcontent ( httpRes,
value )
Value:

◆ mupnp_http_response_setcontentlength

#define mupnp_http_response_setcontentlength ( httpRes,
value )

◆ mupnp_http_response_setcontentpointer

#define mupnp_http_response_setcontentpointer ( httpRes,
value,
len )
Value:

◆ mupnp_http_response_setcontenttype

#define mupnp_http_response_setcontenttype ( httpRes,
value )

◆ mupnp_http_response_setdate

#define mupnp_http_response_setdate ( httpRes,
value )

◆ mupnp_http_response_setheaderinteger

#define mupnp_http_response_setheaderinteger ( httpRes,
n,
value )

◆ mupnp_http_response_setheaderlong

#define mupnp_http_response_setheaderlong ( httpRes,
n,
value )

◆ mupnp_http_response_setheadervalue

#define mupnp_http_response_setheadervalue ( httpRes,
n,
value )

◆ mupnp_http_response_sethost

#define mupnp_http_response_sethost ( httpRes,
addr,
port )
Value:

◆ mupnp_http_response_setncontent

#define mupnp_http_response_setncontent ( httpRes,
value,
len )
Value:
#define mupnp_http_packet_setncontent(httpPkt, value, len)
Definition http.h:298

◆ mupnp_http_response_settimeout

#define mupnp_http_response_settimeout ( httpRes,
value )
Value:
(httpRes->timeout = value)

◆ mupnp_http_response_settransferencoding

#define mupnp_http_response_settransferencoding ( httpReq,
value )

◆ mupnp_http_response_setuserdata

#define mupnp_http_response_setuserdata ( httpRes,
value )
Value:
(httpRes->userData = value)

◆ MUPNP_HTTP_SEQ

#define MUPNP_HTTP_SEQ   "SEQ"

◆ MUPNP_HTTP_SERVER

#define MUPNP_HTTP_SERVER   "Server"

◆ mupnp_http_server_getsocket

#define mupnp_http_server_getsocket ( httpServer)
Value:
(httpServer->sock)

◆ mupnp_http_server_gettimeout

#define mupnp_http_server_gettimeout ( httpServer)
Value:
(httpServer->timeout)

◆ mupnp_http_server_getuserdata

#define mupnp_http_server_getuserdata ( httpServer)
Value:
(httpServer->userData)

◆ mupnp_http_server_isopened

#define mupnp_http_server_isopened ( httpServer)
Value:
((httpServer->sock != NULL) ? true : false)

◆ mupnp_http_server_lock

#define mupnp_http_server_lock ( httpServer)
Value:
mupnp_mutex_lock(httpServer->mutex)
bool mupnp_mutex_lock(mUpnpMutex *mutex)
Definition mutex.c:264

◆ mupnp_http_server_next

#define mupnp_http_server_next ( httpServer)
Value:
Definition http.h:209

◆ MUPNP_HTTP_SERVER_READ_TIMEOUT

#define MUPNP_HTTP_SERVER_READ_TIMEOUT   120

◆ mupnp_http_server_settimeout

#define mupnp_http_server_settimeout ( httpServer,
value )
Value:
(httpServer->timeout = value)

◆ mupnp_http_server_setuserdata

#define mupnp_http_server_setuserdata ( httpServer,
value )
Value:
(httpServer->userData = value)

◆ mupnp_http_server_unlock

#define mupnp_http_server_unlock ( httpServer)
Value:
mupnp_mutex_unlock(httpServer->mutex)
bool mupnp_mutex_unlock(mUpnpMutex *mutex)
Definition mutex.c:294

◆ mupnp_http_serverlist_add

#define mupnp_http_serverlist_add ( httpServerList,
httpServer )
Value:
mupnp_list_add((mUpnpList*)httpServerList, (mUpnpList*)httpServer)

◆ mupnp_http_serverlist_clear

#define mupnp_http_serverlist_clear ( httpServerList)
Value:
void mupnp_http_server_delete(mUpnpHttpServer *httpServer)
Definition http_server.c:64

◆ mupnp_http_serverlist_gets

#define mupnp_http_serverlist_gets ( httpServerList)
Value:

◆ mupnp_http_serverlist_size

#define mupnp_http_serverlist_size ( httpServerList)
Value:
mupnp_list_size((mUpnpList*)httpServerList)

◆ MUPNP_HTTP_SEVERNAME_MAXLEN

#define MUPNP_HTTP_SEVERNAME_MAXLEN   64

◆ MUPNP_HTTP_SID

#define MUPNP_HTTP_SID   "SID"

◆ MUPNP_HTTP_SOAP_ACTION

#define MUPNP_HTTP_SOAP_ACTION   "SOAPACTION"

◆ MUPNP_HTTP_SOAP_ACTION_WITH_NS

#define MUPNP_HTTP_SOAP_ACTION_WITH_NS   "01-SOAPACTION"

◆ MUPNP_HTTP_SOAP_MAN_VALUE

#define MUPNP_HTTP_SOAP_MAN_VALUE   "\"http://schemas.xmlsoap.org/soap/envelope/\"; ns=01"

◆ MUPNP_HTTP_SP

#define MUPNP_HTTP_SP   " "

◆ MUPNP_HTTP_ST

#define MUPNP_HTTP_ST   "ST"

◆ MUPNP_HTTP_STATUS_BAD_REQUEST

#define MUPNP_HTTP_STATUS_BAD_REQUEST   400

◆ MUPNP_HTTP_STATUS_CONTINUE

#define MUPNP_HTTP_STATUS_CONTINUE   100

◆ MUPNP_HTTP_STATUS_INTERNAL_SERVER_ERROR

#define MUPNP_HTTP_STATUS_INTERNAL_SERVER_ERROR   500

◆ MUPNP_HTTP_STATUS_INVALID_RANGE

#define MUPNP_HTTP_STATUS_INVALID_RANGE   416

◆ MUPNP_HTTP_STATUS_METHOD_NOT_ALLOWED

#define MUPNP_HTTP_STATUS_METHOD_NOT_ALLOWED   405

◆ MUPNP_HTTP_STATUS_NOT_FOUND

#define MUPNP_HTTP_STATUS_NOT_FOUND   404

◆ MUPNP_HTTP_STATUS_OK

#define MUPNP_HTTP_STATUS_OK   200

◆ MUPNP_HTTP_STATUS_PARTIAL_CONTENT

#define MUPNP_HTTP_STATUS_PARTIAL_CONTENT   206

◆ MUPNP_HTTP_STATUS_PRECONDITION_FAILED

#define MUPNP_HTTP_STATUS_PRECONDITION_FAILED   412

◆ MUPNP_HTTP_STATUSLINE_DELIM

#define MUPNP_HTTP_STATUSLINE_DELIM   "\r\n "

◆ MUPNP_HTTP_SUBSCRIBE

#define MUPNP_HTTP_SUBSCRIBE   "SUBSCRIBE"

◆ MUPNP_HTTP_TIMEOUT

#define MUPNP_HTTP_TIMEOUT   "TIMEOUT"

◆ MUPNP_HTTP_TRANSFER_ENCODING

#define MUPNP_HTTP_TRANSFER_ENCODING   "Transfer-Encoding"

◆ MUPNP_HTTP_UNSUBSCRIBE

#define MUPNP_HTTP_UNSUBSCRIBE   "UNSUBSCRIBE"

◆ MUPNP_HTTP_USERAGENT

#define MUPNP_HTTP_USERAGENT   "User-Agent"

◆ MUPNP_HTTP_USERAGENT_DEFAULT

#define MUPNP_HTTP_USERAGENT_DEFAULT   "mUPnP-HTTP/" MUPNP_VER

◆ MUPNP_HTTP_USN

#define MUPNP_HTTP_USN   "USN"

◆ MUPNP_HTTP_VER10

#define MUPNP_HTTP_VER10   "HTTP/1.0"

◆ MUPNP_HTTP_VER11

#define MUPNP_HTTP_VER11   "HTTP/1.1"

◆ MUPNP_HTTS_DEFAULT_PORT

#define MUPNP_HTTS_DEFAULT_PORT   443

Typedef Documentation

◆ MUPNP_HTTP_LISTENER

typedef void(* MUPNP_HTTP_LISTENER) (mUpnpHttpRequest *)

◆ mUpnpHttpHeader

◆ mUpnpHttpHeaderList

◆ mUpnpHttpPacket

◆ mUpnpHttpRequest

◆ mUpnpHttpResponse

◆ mUpnpHttpServer

◆ mUpnpHttpServerList

Function Documentation

◆ mupnp_http_getdate()

const char * mupnp_http_getdate ( mUpnpTime sysTime,
char * buf,
size_t bufSize )

◆ mupnp_http_getservername()

const char * mupnp_http_getservername ( char * buf,
size_t bufSize )

◆ mupnp_http_header_delete()

void mupnp_http_header_delete ( mUpnpHttpHeader * header)

◆ mupnp_http_header_getname()

const char * mupnp_http_header_getname ( mUpnpHttpHeader * header)

◆ mupnp_http_header_getvalue()

const char * mupnp_http_header_getvalue ( mUpnpHttpHeader * header)

◆ mupnp_http_header_new()

mUpnpHttpHeader * mupnp_http_header_new ( void )

◆ mupnp_http_header_setname()

void mupnp_http_header_setname ( mUpnpHttpHeader * header,
const char * name )

◆ mupnp_http_header_setvalue()

void mupnp_http_header_setvalue ( mUpnpHttpHeader * header,
const char * value )

◆ mupnp_http_headerlist_delete()

void mupnp_http_headerlist_delete ( mUpnpHttpHeaderList * headerList)

◆ mupnp_http_headerlist_get()

mUpnpHttpHeader * mupnp_http_headerlist_get ( mUpnpHttpHeaderList * headerList,
const char * name )

◆ mupnp_http_headerlist_getvalue()

const char * mupnp_http_headerlist_getvalue ( mUpnpHttpHeaderList * headerList,
const char * name )

◆ mupnp_http_headerlist_new()

mUpnpHttpHeaderList * mupnp_http_headerlist_new ( void )

◆ mupnp_http_headerlist_set()

void mupnp_http_headerlist_set ( mUpnpHttpHeaderList * headerList,
const char * name,
const char * value )

◆ mupnp_http_packet_clean()

void mupnp_http_packet_clean ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_clear()

void mupnp_http_packet_clear ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_copy()

void mupnp_http_packet_copy ( mUpnpHttpPacket * destHttpPkt,
mUpnpHttpPacket * srcHttpPkt )

◆ mupnp_http_packet_delete()

void mupnp_http_packet_delete ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_getheaderinteger()

int mupnp_http_packet_getheaderinteger ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheaderlong()

long mupnp_http_packet_getheaderlong ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheadersize()

size_t mupnp_http_packet_getheadersize ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_getheadersizet()

size_t mupnp_http_packet_getheadersizet ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheaderssizet()

ssize_t mupnp_http_packet_getheaderssizet ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheadervalue()

const char * mupnp_http_packet_getheadervalue ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_init()

void mupnp_http_packet_init ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_new()

mUpnpHttpPacket * mupnp_http_packet_new ( void )

◆ mupnp_http_packet_post()

void mupnp_http_packet_post ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock )

◆ mupnp_http_packet_print()

void mupnp_http_packet_print ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_read()

bool mupnp_http_packet_read ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
bool onlyHeader,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_read_body()

bool mupnp_http_packet_read_body ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_read_headers()

void mupnp_http_packet_read_headers ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_setheaderinteger()

void mupnp_http_packet_setheaderinteger ( mUpnpHttpPacket * httpPkt,
const char * name,
int value )

◆ mupnp_http_packet_setheaderlong()

void mupnp_http_packet_setheaderlong ( mUpnpHttpPacket * httpPkt,
const char * name,
long value )

◆ mupnp_http_packet_setheadersizet()

void mupnp_http_packet_setheadersizet ( mUpnpHttpPacket * httpPkt,
const char * name,
size_t value )

◆ mupnp_http_packet_setheaderssizet()

void mupnp_http_packet_setheaderssizet ( mUpnpHttpPacket * httpPkt,
const char * name,
ssize_t value )

◆ mupnp_http_packet_setheadervalue()

void mupnp_http_packet_setheadervalue ( mUpnpHttpPacket * httpPkt,
const char * name,
const char * value )

◆ mupnp_http_packet_sethost()

void mupnp_http_packet_sethost ( mUpnpHttpPacket * httpPkt,
const char * addr,
int port )

◆ mupnp_http_persistentconnection_clear()

void mupnp_http_persistentconnection_clear ( void )

Clear persistent connection cache and free all memory

◆ mupnp_http_persistentconnection_get()

void * mupnp_http_persistentconnection_get ( char * host,
int port )

Get persistent connection from cache

◆ mupnp_http_persistentconnection_init()

bool mupnp_http_persistentconnection_init ( void )

Initialize persistent connection cache. Can be called many times

◆ mupnp_http_persistentconnection_lock()

void mupnp_http_persistentconnection_lock ( void )

Lock persistent connection cache. Required for getting, putting and using persistent connection from cache

◆ mupnp_http_persistentconnection_put()

bool mupnp_http_persistentconnection_put ( char * host,
int port,
void * data )

Put connection to persistent connection cache

◆ mupnp_http_persistentconnection_unlock()

void mupnp_http_persistentconnection_unlock ( void )

Unlock persistent connection cache.

◆ mupnp_http_request_addtouseragent()

void mupnp_http_request_addtouseragent ( mUpnpHttpRequest * httpReq,
const char * value )

◆ mupnp_http_request_clear()

void mupnp_http_request_clear ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_copy()

void mupnp_http_request_copy ( mUpnpHttpRequest * destHttpReq,
mUpnpHttpRequest * srcHttpReq )

◆ mupnp_http_request_delete()

void mupnp_http_request_delete ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_getmethod()

char * mupnp_http_request_getmethod ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_getsocket()

mUpnpSocket * mupnp_http_request_getsocket ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_geturi()

char * mupnp_http_request_geturi ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_getuseragent()

char * mupnp_http_request_getuseragent ( mUpnpHttpRequest * httpReqest)

◆ mupnp_http_request_getversion()

char * mupnp_http_request_getversion ( mUpnpHttpRequest * httpReqest)

◆ mupnp_http_request_new()

mUpnpHttpRequest * mupnp_http_request_new ( void )

◆ mupnp_http_request_post()

mUpnpHttpResponse * mupnp_http_request_post ( mUpnpHttpRequest * httpReq,
const char * ipaddr,
int port )

◆ mupnp_http_request_postchunkeddata()

bool mupnp_http_request_postchunkeddata ( mUpnpHttpRequest * httpReq,
void * data,
int dataLen )

◆ mupnp_http_request_postchunkedsize()

bool mupnp_http_request_postchunkedsize ( mUpnpHttpRequest * httpReq,
int dataLen )

◆ mupnp_http_request_postdata()

bool mupnp_http_request_postdata ( mUpnpHttpRequest * httpReq,
void * data,
int dataLen )

◆ mupnp_http_request_postlastchunk()

bool mupnp_http_request_postlastchunk ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_postresponse()

bool mupnp_http_request_postresponse ( mUpnpHttpRequest * httpReq,
mUpnpHttpResponse * httpRes )

◆ mupnp_http_request_poststatuscode()

bool mupnp_http_request_poststatuscode ( mUpnpHttpRequest * httpReq,
int httpStatCode )

◆ mupnp_http_request_print()

void mupnp_http_request_print ( mUpnpHttpRequest * httpReq)

◆ mupnp_http_request_read()

bool mupnp_http_request_read ( mUpnpHttpRequest * httpReq,
mUpnpSocket * sock )

◆ mupnp_http_request_setmethod()

void mupnp_http_request_setmethod ( mUpnpHttpRequest * httpReq,
const char * method )

◆ mupnp_http_request_setsocket()

void mupnp_http_request_setsocket ( mUpnpHttpRequest * httpReq,
mUpnpSocket * sock )

◆ mupnp_http_request_seturi()

void mupnp_http_request_seturi ( mUpnpHttpRequest * httpReq,
const char * uri )

◆ mupnp_http_request_setuseragent()

void mupnp_http_request_setuseragent ( mUpnpHttpRequest * httpReq,
const char * version )

◆ mupnp_http_request_setversion()

void mupnp_http_request_setversion ( mUpnpHttpRequest * httpReq,
const char * version )

◆ mupnp_http_response_clear()

void mupnp_http_response_clear ( mUpnpHttpResponse * httpRes)

◆ mupnp_http_response_copy()

void mupnp_http_response_copy ( mUpnpHttpResponse * destHttpRes,
mUpnpHttpResponse * srcHttpRes )

◆ mupnp_http_response_delete()

void mupnp_http_response_delete ( mUpnpHttpResponse * httpRes)

◆ mupnp_http_response_getreasonphrase()

char * mupnp_http_response_getreasonphrase ( mUpnpHttpResponse * httpRes)

◆ mupnp_http_response_getstatuscode()

int mupnp_http_response_getstatuscode ( mUpnpHttpResponse * httpRes)

◆ mupnp_http_response_getversion()

char * mupnp_http_response_getversion ( mUpnpHttpResponse * httpRes)

◆ mupnp_http_response_new()

mUpnpHttpResponse * mupnp_http_response_new ( void )

◆ mupnp_http_response_print()

void mupnp_http_response_print ( mUpnpHttpResponse * httpRes)

◆ mupnp_http_response_read()

bool mupnp_http_response_read ( mUpnpHttpResponse * httpRes,
mUpnpSocket * sock,
bool onlyHeader )

◆ mupnp_http_response_setreasonphrase()

void mupnp_http_response_setreasonphrase ( mUpnpHttpResponse * httpRes,
const char * value )

◆ mupnp_http_response_setstatuscode()

void mupnp_http_response_setstatuscode ( mUpnpHttpResponse * httpRes,
int code )

◆ mupnp_http_response_setversion()

void mupnp_http_response_setversion ( mUpnpHttpResponse * httpRes,
const char * version )

◆ mupnp_http_server_accept()

bool mupnp_http_server_accept ( mUpnpHttpServer * httpServer)

◆ mupnp_http_server_close()

bool mupnp_http_server_close ( mUpnpHttpServer * httpServer)

◆ mupnp_http_server_delete()

void mupnp_http_server_delete ( mUpnpHttpServer * httpServer)

◆ mupnp_http_server_new()

mUpnpHttpServer * mupnp_http_server_new ( void )

◆ mupnp_http_server_open()

bool mupnp_http_server_open ( mUpnpHttpServer * httpServer,
int bindPort,
const char * bindAddr )

◆ mupnp_http_server_setlistener()

void mupnp_http_server_setlistener ( mUpnpHttpServer * httpServer,
MUPNP_HTTP_LISTENER listener )

◆ mupnp_http_server_start()

bool mupnp_http_server_start ( mUpnpHttpServer * httpServer)

◆ mupnp_http_server_stop()

bool mupnp_http_server_stop ( mUpnpHttpServer * httpServer)

◆ mupnp_http_serverlist_close()

bool mupnp_http_serverlist_close ( mUpnpHttpServerList * httpServerList)

◆ mupnp_http_serverlist_delete()

void mupnp_http_serverlist_delete ( mUpnpHttpServerList * httpServerList)

◆ mupnp_http_serverlist_new()

mUpnpHttpServerList * mupnp_http_serverlist_new ( void )

◆ mupnp_http_serverlist_open()

bool mupnp_http_serverlist_open ( mUpnpHttpServerList * httpServerList,
int port )

◆ mupnp_http_serverlist_setlistener()

void mupnp_http_serverlist_setlistener ( mUpnpHttpServerList * httpServerList,
MUPNP_HTTP_LISTENER listener )

◆ mupnp_http_serverlist_setuserdata()

void mupnp_http_serverlist_setuserdata ( mUpnpHttpServerList * httpServerList,
void * value )

◆ mupnp_http_serverlist_start()

bool mupnp_http_serverlist_start ( mUpnpHttpServerList * httpServerList)

◆ mupnp_http_serverlist_stop()

bool mupnp_http_serverlist_stop ( mUpnpHttpServerList * httpServerList)

◆ mupnp_http_statuscode2reasonphrase()

const char * mupnp_http_statuscode2reasonphrase ( const int code)

Convert an HTTP status code to a reason phrase (ex. 200 -> "200 OK")

Parameters
codeThe HTTP status code to convert
Returns
The reason phrase (do not modify the pointer's contents)

Convert an HTTP status code to a reason phrase (ex. 200 -> "OK")

Parameters
codeThe HTTP status code to convert
Returns
The reason phrase (do not modify the pointer's contents)