rasdaman complete source
http.h
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 */
23 /*------------------------------------------------------------------------*/
24 /* http.h - typedefs and structures for HTTP. */
25 /*------------------------------------------------------------------------*/
26 /*
27  * RCS:
28  * $RCSfile: http.h,v $ $Revision: 1.3 $ $State: Exp $
29  * $Locker: $
30  */
31 
32 #ifndef _HTTP_H
33 #define _HTTP_H
34 
35 
36 struct KeywordKey
37 {
38  char *Keyword;
39  int Key;
40 };
41 
42 struct HTTPError
43 {
44  int Code;
45  char *Reason;
46  char *Message_en;
47  char *Message_de;
48 };
49 
50 /* HTTP Message structure
51  */
52 
53 struct HTTPMsg
54 {
55  char *Head;
56  char *Body;
57  int BodySize;
58 };
59 
60 
61 struct URLComps
62 {
63  char *Protocol;
64  char *Servername;
65  char *Path;
66  char *Extra;
67 };
68 
69 
70 struct Version
71 {
72  int Major;
73  int Minor;
74 };
75 
76 
78 {
79  char *Vanilla;
80  int Method;
81  struct URLComps URL;
82  struct Version Version;
83 };
84 
85 struct StatusLine
86 {
87  char *Vanilla;
88  struct Version Version;
89  int Status;
90  char *Reason;
91 };
92 
93 struct MsgHeader
94 {
95  struct MsgHeader *Next;
96  int Field;
97  char *Content;
98 };
99 
100 
101 /* Data Structure for HTTP Request
102  */
103 
104 struct ReqInfo
105 {
106  int State;
107  char *HeadBuff;
108  size_t HeadSize;
109  char *BodyBuff;
110  size_t BodySize;
112  struct MsgHeader *First;
113  struct MsgHeader *Last;
114  char *Body;
115 };
116 
117 /* Data Structure for HTTP Response
118  */
119 
120 struct RespInfo
121 {
122  int State;
123  char *HeadBuff;
124  size_t HeadSize;
125  char *BodyBuff;
126  size_t BodySize;
127  struct StatusLine Line;
128  struct MsgHeader *First;
129  struct MsgHeader *Last;
130  char *Body;
131 };
132 
133 #endif /* _HTTP_H not defined */
Definition: http.h:77
Definition: http.h:42
char * BodyBuff
Definition: http.h:125
size_t BodySize
Definition: http.h:126
char * Reason
Definition: http.h:45
int Status
Definition: http.h:89
int Code
Definition: http.h:44
char * Extra
Definition: http.h:66
char * HeadBuff
Definition: http.h:107
struct MsgHeader * Last
Definition: http.h:113
char * Vanilla
Definition: http.h:87
int BodySize
Definition: http.h:57
char * Path
Definition: http.h:65
char * Keyword
Definition: http.h:38
int Major
Definition: http.h:72
struct URLComps URL
Definition: http.h:81
Definition: http.h:36
Definition: http.h:85
struct MsgHeader * Next
Definition: http.h:95
char * Servername
Definition: http.h:64
int Method
Definition: http.h:80
char * Vanilla
Definition: http.h:79
int Field
Definition: http.h:96
char * BodyBuff
Definition: http.h:109
struct MsgHeader * First
Definition: http.h:128
int State
Definition: http.h:122
char * Content
Definition: http.h:97
char * Body
Definition: http.h:130
char * HeadBuff
Definition: http.h:123
struct MsgHeader * Last
Definition: http.h:129
struct MsgHeader * First
Definition: http.h:112
int Key
Definition: http.h:39
char * Body
Definition: http.h:114
Definition: http.h:53
char * Protocol
Definition: http.h:63
char * Message_en
Definition: http.h:46
int State
Definition: http.h:106
int Minor
Definition: http.h:73
Definition: http.h:61
size_t HeadSize
Definition: http.h:108
size_t HeadSize
Definition: http.h:124
char * Reason
Definition: http.h:90
Definition: http.h:70
char * Body
Definition: http.h:56
struct StatusLine Line
Definition: http.h:127
char * Message_de
Definition: http.h:47
Definition: http.h:93
Definition: http.h:104
size_t BodySize
Definition: http.h:110
char * Head
Definition: http.h:55
struct RequestLine Line
Definition: http.h:111
Definition: http.h:120