3 * by Bertrand Baudet <bertrand_baudet@yahoo.com>
4 * (C) 2001, MPlayer team.
10 #include <sys/types.h>
12 typedef struct HTTP_field_type
{
14 struct HTTP_field_type
*next
;
21 unsigned int status_code
;
23 unsigned int http_minor_version
;
25 HTTP_field_t
*first_field
;
26 HTTP_field_t
*last_field
;
27 unsigned int field_nb
;
29 HTTP_field_t
*field_search_pos
;
35 unsigned int is_parsed
;
38 HTTP_header_t
* http_new_header(void);
39 void http_free( HTTP_header_t
*http_hdr
);
40 int http_response_append( HTTP_header_t
*http_hdr
, char *data
, int length
);
41 int http_response_parse( HTTP_header_t
*http_hdr
);
42 int http_is_header_entire( HTTP_header_t
*http_hdr
);
43 char* http_build_request( HTTP_header_t
*http_hdr
);
44 char* http_get_field( HTTP_header_t
*http_hdr
, const char *field_name
);
45 char* http_get_next_field( HTTP_header_t
*http_hdr
);
46 void http_set_field( HTTP_header_t
*http_hdr
, const char *field_name
);
47 void http_set_method( HTTP_header_t
*http_hdr
, const char *method
);
48 void http_set_uri( HTTP_header_t
*http_hdr
, const char *uri
);
49 int http_add_basic_authentication( HTTP_header_t
*http_hdr
, const char *username
, const char *password
);
51 void http_debug_hdr( HTTP_header_t
*http_hdr
);
53 int base64_encode(const void *enc
, int encLen
, char *out
, int outMax
);
54 #endif /* MPLAYER_HTTP_H */