Mercurial > mplayer.hg
comparison libmpdemux/http.h @ 2310:9e059416eea6
libdemuxer...
author | arpi |
---|---|
date | Sat, 20 Oct 2001 18:49:08 +0000 |
parents | http.h@ede5785faa53 |
children | 0ecc1b4f7cf8 |
comparison
equal
deleted
inserted
replaced
2309:3128b9d8b4ea | 2310:9e059416eea6 |
---|---|
1 /* | |
2 * HTTP Helper | |
3 * by Bertrand Baudet <bertrand_baudet@yahoo.com> | |
4 * (C) 2001, MPlayer team. | |
5 */ | |
6 | |
7 #ifndef __HTTP_H | |
8 #define __HTTP_H | |
9 | |
10 #define HTTP_FIELD_MAX 20 | |
11 | |
12 typedef struct { | |
13 char *protocol; | |
14 char *method; | |
15 char *uri; | |
16 int status_code; | |
17 char *reason_phrase; | |
18 int http_minor_version; | |
19 char *fields[HTTP_FIELD_MAX]; | |
20 int field_nb; | |
21 char *field_search; | |
22 int search_pos; | |
23 char *body; | |
24 int body_size; | |
25 char *buffer; | |
26 int buffer_size; | |
27 int is_parsed; | |
28 } HTTP_header_t; | |
29 | |
30 HTTP_header_t* http_new_header(); | |
31 void http_free( HTTP_header_t *http_hdr ); | |
32 int http_response_append( HTTP_header_t *http_hdr, char *data, int length ); | |
33 int http_response_parse( HTTP_header_t *http_hdr ); | |
34 int http_is_header_entired( HTTP_header_t *http_hdr ); | |
35 char* http_build_request( HTTP_header_t *http_hdr ); | |
36 char* http_get_field( HTTP_header_t *http_hdr, const char *field_name ); | |
37 char* http_get_next_field( HTTP_header_t *http_hdr ); | |
38 void http_set_field( HTTP_header_t *http_hdr, const char *field ); | |
39 void http_set_method( HTTP_header_t *http_hdr, const char *method ); | |
40 void http_set_uri( HTTP_header_t *http_hdr, const char *uri ); | |
41 | |
42 void http_debug_hdr( HTTP_header_t *http_hdr ); | |
43 | |
44 #endif // __HTTP_H |