Change the "ctx.prune" option to match the command-line client default.
[cvs2svn.git] / test-data / resync-misgroups-cvsrepos / httpp / httpp.h,v
bloba3e12a86adad9a2940310d4283a7ed32ac443e01
1 head    1.10;
2 access;
3 symbols
4         libshout-2_0:1.10
5         libshout-2_0b3:1.10
6         libshout-2_0b2:1.9
7         libshout_2_0b1:1.9
8         libogg2-zerocopy:1.4.0.2
9         start:1.1.1.1
10         xiph:1.1.1;
11 locks; strict;
12 comment @ * @;
15 1.10
16 date    2003.07.07.01.49.27;    author brendan; state Exp;
17 branches;
18 next    1.9;
20 1.9
21 date    2003.03.15.02.10.18;    author msmith;  state Exp;
22 branches;
23 next    1.8;
25 1.8
26 date    2003.03.09.22.56.46;    author karl;    state Exp;
27 branches;
28 next    1.7;
30 1.7
31 date    2003.03.08.04.57.02;    author msmith;  state Exp;
32 branches;
33 next    1.6;
35 1.6
36 date    2003.01.16.05.48.31;    author brendan; state Exp;
37 branches;
38 next    1.5;
40 1.5
41 date    2002.12.31.06.28.39;    author msmith;  state Exp;
42 branches;
43 next    1.4;
45 1.4
46 date    2002.08.16.14.22.44;    author msmith;  state Exp;
47 branches;
48 next    1.3;
50 1.3
51 date    2002.08.05.14.48.03;    author msmith;  state Exp;
52 branches;
53 next    1.2;
55 1.2
56 date    2002.05.03.15.04.56;    author msmith;  state Exp;
57 branches;
58 next    1.1;
60 1.1
61 date    2001.09.10.02.28.47;    author jack;    state Exp;
62 branches
63         1.1.1.1;
64 next    ;
66 1.1.1.1
67 date    2001.09.10.02.28.47;    author jack;    state Exp;
68 branches;
69 next    ;
72 desc
76 1.10
77 log
78 @httpp goes through the rinse cycle
80 text
81 @/* httpp.h
83 ** http parsing library
86 #ifndef __HTTPP_H
87 #define __HTTPP_H
89 #include <avl/avl.h>
91 #define HTTPP_VAR_PROTOCOL "__protocol"
92 #define HTTPP_VAR_VERSION "__version"
93 #define HTTPP_VAR_URI "__uri"
94 #define HTTPP_VAR_REQ_TYPE "__req_type"
95 #define HTTPP_VAR_ERROR_MESSAGE "__errormessage"
96 #define HTTPP_VAR_ERROR_CODE "__errorcode"
97 #define HTTPP_VAR_ICYPASSWORD "__icy_password"
99 typedef enum httpp_request_type_tag {
100     httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head,
101     httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknown
102 } httpp_request_type_e;
104 typedef struct http_var_tag {
105     char *name;
106     char *value;
107 } http_var_t;
109 typedef struct http_varlist_tag {
110     http_var_t var;
111     struct http_varlist_tag *next;
112 } http_varlist_t;
114 typedef struct http_parser_tag {
115     httpp_request_type_e req_type;
116     char *uri;
117     avl_tree *vars;
118     avl_tree *queryvars;
119 } http_parser_t;
121 #ifdef _mangle
122 # define httpp_create_parser _mangle(httpp_create_parser)
123 # define httpp_initialize _mangle(httpp_initialize)
124 # define httpp_parse _mangle(httpp_parse)
125 # define httpp_parse_icy _mangle(httpp_parse_icy)
126 # define httpp_parse_response _mangle(httpp_parse_response)
127 # define httpp_setvar _mangle(httpp_setvar)
128 # define httpp_getvar _mangle(httpp_getvar)
129 # define httpp_set_query_param _mangle(httpp_set_query_param)
130 # define httpp_get_query_param _mangle(httpp_get_query_param)
131 # define httpp_destroy _mangle(httpp_destroy)
132 # define httpp_clear _mangle(httpp_clear)
133 #endif
135 http_parser_t *httpp_create_parser(void);
136 void httpp_initialize(http_parser_t *parser, http_varlist_t *defaults);
137 int httpp_parse(http_parser_t *parser, char *http_data, unsigned long len);
138 int httpp_parse_icy(http_parser_t *parser, char *http_data, unsigned long len);
139 int httpp_parse_response(http_parser_t *parser, char *http_data, unsigned long len, char *uri);
140 void httpp_setvar(http_parser_t *parser, char *name, char *value);
141 char *httpp_getvar(http_parser_t *parser, char *name);
142 void httpp_set_query_param(http_parser_t *parser, char *name, char *value);
143 char *httpp_get_query_param(http_parser_t *parser, char *name);
144 void httpp_destroy(http_parser_t *parser);
145 void httpp_clear(http_parser_t *parser);
147 #endif
153 @Brendan was getting pissed off about inconsistent indentation styles.
154 Convert all tabs to 4 spaces. All code must now use 4 space indents.
156 text
157 @d41 14
163 @reduce include file namespace clutter for libshout and the associated
164 smaller libs.
166 text
167 @d20 2
168 a21 2
169         httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head,
170         httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknown
171 d25 2
172 a26 2
173         char *name;
174         char *value;
175 d30 2
176 a31 2
177         http_var_t var;
178         struct http_varlist_tag *next;
179 d35 4
180 a38 4
181         httpp_request_type_e req_type;
182         char *uri;
183         avl_tree *vars;
184         avl_tree *queryvars;
190 @Added support for shoutcast login protocol (ewww...)
192 text
193 @d9 1
194 a9 1
195 #include "avl.h"
201 @Indentation again, don't mind me
203 text
204 @d17 1
205 d44 1
211 @mp3 metadata complete. Still untested.
213 text
214 @d19 2
215 a20 1
216         httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head, httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknown
217 d37 1
218 a37 1
219     avl_tree *queryvars;
220 a51 3
229 @bugfixes for httpp_parse_response
231 text
232 @d36 1
233 d45 2
239 @Cleaned up version of Ciaran Anscomb's relaying patch.
241 text
242 @d16 1
248 @Memory leaks. Lots of little ones.
250 text
251 @d15 1
252 a33 1
254 d40 1
260 @Initial revision
262 text
263 @d43 1
267 1.1.1.1
269 @move to cvs
271 text