📄 httpp.h,v
字号:
head 1.10;access;symbols libshout-2_0:1.10 libshout-2_0b3:1.10 libshout-2_0b2:1.9 libshout_2_0b1:1.9 libogg2-zerocopy:1.4.0.2 start:1.1.1.1 xiph:1.1.1;locks; strict;comment @ * @;1.10date 2003.07.07.01.49.27; author brendan; state Exp;branches;next 1.9;1.9date 2003.03.15.02.10.18; author msmith; state Exp;branches;next 1.8;1.8date 2003.03.09.22.56.46; author karl; state Exp;branches;next 1.7;1.7date 2003.03.08.04.57.02; author msmith; state Exp;branches;next 1.6;1.6date 2003.01.16.05.48.31; author brendan; state Exp;branches;next 1.5;1.5date 2002.12.31.06.28.39; author msmith; state Exp;branches;next 1.4;1.4date 2002.08.16.14.22.44; author msmith; state Exp;branches;next 1.3;1.3date 2002.08.05.14.48.03; author msmith; state Exp;branches;next 1.2;1.2date 2002.05.03.15.04.56; author msmith; state Exp;branches;next 1.1;1.1date 2001.09.10.02.28.47; author jack; state Exp;branches 1.1.1.1;next ;1.1.1.1date 2001.09.10.02.28.47; author jack; state Exp;branches;next ;desc@@1.10log@httpp goes through the rinse cycle@text@/* httpp.h**** http parsing library*/#ifndef __HTTPP_H#define __HTTPP_H#include <avl/avl.h>#define HTTPP_VAR_PROTOCOL "__protocol"#define HTTPP_VAR_VERSION "__version"#define HTTPP_VAR_URI "__uri"#define HTTPP_VAR_REQ_TYPE "__req_type"#define HTTPP_VAR_ERROR_MESSAGE "__errormessage"#define HTTPP_VAR_ERROR_CODE "__errorcode"#define HTTPP_VAR_ICYPASSWORD "__icy_password"typedef enum httpp_request_type_tag { httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head, httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknown} httpp_request_type_e;typedef struct http_var_tag { char *name; char *value;} http_var_t;typedef struct http_varlist_tag { http_var_t var; struct http_varlist_tag *next;} http_varlist_t;typedef struct http_parser_tag { httpp_request_type_e req_type; char *uri; avl_tree *vars; avl_tree *queryvars;} http_parser_t;#ifdef _mangle# define httpp_create_parser _mangle(httpp_create_parser)# define httpp_initialize _mangle(httpp_initialize)# define httpp_parse _mangle(httpp_parse)# define httpp_parse_icy _mangle(httpp_parse_icy)# define httpp_parse_response _mangle(httpp_parse_response)# define httpp_setvar _mangle(httpp_setvar)# define httpp_getvar _mangle(httpp_getvar)# define httpp_set_query_param _mangle(httpp_set_query_param)# define httpp_get_query_param _mangle(httpp_get_query_param)# define httpp_destroy _mangle(httpp_destroy)# define httpp_clear _mangle(httpp_clear)#endifhttp_parser_t *httpp_create_parser(void);void httpp_initialize(http_parser_t *parser, http_varlist_t *defaults);int httpp_parse(http_parser_t *parser, char *http_data, unsigned long len);int httpp_parse_icy(http_parser_t *parser, char *http_data, unsigned long len);int httpp_parse_response(http_parser_t *parser, char *http_data, unsigned long len, char *uri);void httpp_setvar(http_parser_t *parser, char *name, char *value);char *httpp_getvar(http_parser_t *parser, char *name);void httpp_set_query_param(http_parser_t *parser, char *name, char *value);char *httpp_get_query_param(http_parser_t *parser, char *name);void httpp_destroy(http_parser_t *parser);void httpp_clear(http_parser_t *parser); #endif@1.9log@Brendan was getting pissed off about inconsistent indentation styles.Convert all tabs to 4 spaces. All code must now use 4 space indents.@text@d41 14@1.8log@reduce include file namespace clutter for libshout and the associatedsmaller libs.@text@d20 2a21 2 httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head, httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknownd25 2a26 2 char *name; char *value;d30 2a31 2 http_var_t var; struct http_varlist_tag *next;d35 4a38 4 httpp_request_type_e req_type; char *uri; avl_tree *vars; avl_tree *queryvars;@1.7log@Added support for shoutcast login protocol (ewww...)@text@d9 1a9 1#include "avl.h"@1.6log@Indentation again, don't mind me@text@d17 1d44 1@1.5log@mp3 metadata complete. Still untested.@text@d19 2a20 1 httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head, httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknownd37 1a37 1 avl_tree *queryvars;a51 3@1.4log@bugfixes for httpp_parse_response@text@d36 1d45 2@1.3log@Cleaned up version of Ciaran Anscomb's relaying patch.@text@d16 1@1.2log@Memory leaks. Lots of little ones.@text@d15 1a33 1d40 1@1.1log@Initial revision@text@d43 1@1.1.1.1log@move to cvs@text@@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -