Electroneum
upnphttp.h File Reference
#include <netinet/in.h>
#include <sys/queue.h>
#include "config.h"
Include dependency graph for upnphttp.h:

Go to the source code of this file.

Classes

struct  upnphttp
 

Macros

#define UPNP_VERSION_STRING   "UPnP/" UPNP_VERSION_MAJOR_STR "." UPNP_VERSION_MINOR_STR
 
#define MINIUPNPD_SERVER_STRING   OS_VERSION " " UPNP_VERSION_STRING " MiniUPnPd/" MINIUPNPD_VERSION
 
#define FLAG_TIMEOUT   0x01
 
#define FLAG_SID   0x02
 
#define FLAG_CONTINUE   0x40
 
#define FLAG_HTML   0x80
 
#define FLAG_ALLOW_POST   0x100
 
#define FLAG_ALLOW_SUB_UNSUB   0x200
 

Enumerations

enum  httpStates {
  EWaitingForHttpRequest = 0, EWaitingForHttpContent, ESendingContinue, ESendingAndClosing,
  EToDelete = 100
}
 
enum  httpCommands {
  EUnknown = 0, EGet, EPost, ESubscribe,
  EUnSubscribe
}
 

Functions

struct upnphttpNew_upnphttp (int)
 
void CloseSocket_upnphttp (struct upnphttp *)
 
void Delete_upnphttp (struct upnphttp *)
 
void Process_upnphttp (struct upnphttp *)
 
int BuildHeader_upnphttp (struct upnphttp *h, int respcode, const char *respmsg, int bodylen)
 
void BuildResp_upnphttp (struct upnphttp *, const char *, int)
 
void BuildResp2_upnphttp (struct upnphttp *h, int respcode, const char *respmsg, const char *body, int bodylen)
 
int SendResp_upnphttp (struct upnphttp *)
 
void SendRespAndClose_upnphttp (struct upnphttp *)
 

Macro Definition Documentation

◆ FLAG_ALLOW_POST

#define FLAG_ALLOW_POST   0x100

Definition at line 106 of file upnphttp.h.

◆ FLAG_ALLOW_SUB_UNSUB

#define FLAG_ALLOW_SUB_UNSUB   0x200

Definition at line 107 of file upnphttp.h.

◆ FLAG_CONTINUE

#define FLAG_CONTINUE   0x40

Definition at line 100 of file upnphttp.h.

◆ FLAG_HTML

#define FLAG_HTML   0x80

Definition at line 103 of file upnphttp.h.

◆ FLAG_SID

#define FLAG_SID   0x02

Definition at line 97 of file upnphttp.h.

◆ FLAG_TIMEOUT

#define FLAG_TIMEOUT   0x01

Definition at line 95 of file upnphttp.h.

◆ MINIUPNPD_SERVER_STRING

#define MINIUPNPD_SERVER_STRING   OS_VERSION " " UPNP_VERSION_STRING " MiniUPnPd/" MINIUPNPD_VERSION

Definition at line 24 of file upnphttp.h.

◆ UPNP_VERSION_STRING

#define UPNP_VERSION_STRING   "UPnP/" UPNP_VERSION_MAJOR_STR "." UPNP_VERSION_MINOR_STR

Definition at line 21 of file upnphttp.h.

Enumeration Type Documentation

◆ httpCommands

Enumerator
EUnknown 
EGet 
EPost 
ESubscribe 
EUnSubscribe 

Definition at line 41 of file upnphttp.h.

41  {
42  EUnknown = 0,
43  EGet,
44  EPost,
45  ESubscribe,
47 };
Definition: upnphttp.h:44
Definition: upnphttp.h:43

◆ httpStates

enum httpStates
Enumerator
EWaitingForHttpRequest 
EWaitingForHttpContent 
ESendingContinue 
ESendingAndClosing 
EToDelete 

Definition at line 33 of file upnphttp.h.

Function Documentation

◆ BuildHeader_upnphttp()

int BuildHeader_upnphttp ( struct upnphttp h,
int  respcode,
const char *  respmsg,
int  bodylen 
)

◆ BuildResp2_upnphttp()

void BuildResp2_upnphttp ( struct upnphttp h,
int  respcode,
const char *  respmsg,
const char *  body,
int  bodylen 
)

◆ BuildResp_upnphttp()

void BuildResp_upnphttp ( struct upnphttp ,
const char *  ,
int   
)

◆ CloseSocket_upnphttp()

void CloseSocket_upnphttp ( struct upnphttp )

◆ Delete_upnphttp()

void Delete_upnphttp ( struct upnphttp )

◆ New_upnphttp()

struct upnphttp* New_upnphttp ( int  )

◆ Process_upnphttp()

void Process_upnphttp ( struct upnphttp )

◆ SendResp_upnphttp()

int SendResp_upnphttp ( struct upnphttp )

◆ SendRespAndClose_upnphttp()

void SendRespAndClose_upnphttp ( struct upnphttp )