25 |
extern "C" { |
extern "C" { |
26 |
#endif |
#endif |
27 |
|
|
28 |
|
/* HTTP methods. */ |
29 |
enum http_types_t { |
enum http_types_t { |
30 |
HTTP_NONE = 0, |
HTTP_NONE = 0, |
31 |
HTTP_GET, |
HTTP_GET, |
32 |
HTTP_POST, |
HTTP_POST, |
33 |
}; |
}; |
34 |
|
|
35 |
|
/* HTTP status codes. */ |
36 |
enum http_statcode_t { |
enum http_statcode_t { |
37 |
HTTP_STAT_NONE = 0, |
HTTP_STAT_NONE = 0, |
38 |
HTTP_STAT_200 = 200, /* OK */ |
HTTP_STAT_200 = 200, /* OK */ |
44 |
HTTP_STAT_405 = 405, /* Method Not Allowed */ |
HTTP_STAT_405 = 405, /* Method Not Allowed */ |
45 |
}; |
}; |
46 |
|
|
47 |
|
/* HTTP header list. */ |
48 |
struct http_head_s { |
struct http_head_s { |
49 |
struct http_head_s * next; |
struct http_head_s * next; |
50 |
int flags; |
int flags; |
52 |
}; |
}; |
53 |
typedef struct http_head_s * http_head_t; |
typedef struct http_head_s * http_head_t; |
54 |
|
|
55 |
|
/* HTTP handle. */ |
56 |
struct http_hd_s { |
struct http_hd_s { |
57 |
int fd; |
int fd; |
58 |
http_head_t head; |
http_head_t head; |
59 |
}; |
}; |
60 |
typedef struct http_hd_s * http_hd_t; |
typedef struct http_hd_s * http_hd_t; |
61 |
|
|
62 |
|
/* HTTP request. */ |
63 |
struct http_req_s { |
struct http_req_s { |
64 |
int type; |
int type; |
65 |
http_head_t head; |
http_head_t head; |
82 |
} |
} |
83 |
#endif |
#endif |
84 |
|
|
|
#endif /* WPT_HTTP_H */ |
|
85 |
|
#endif /* WPT_HTTP_H */ |