Remove build warning
[platform/upstream/libsoup.git] / libsoup / soup-headers.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2001-2003, Ximian, Inc.
4  */
5
6 #ifndef SOUP_HEADERS_H
7 #define SOUP_HEADERS_H 1
8
9 #include <glib.h>
10 #include <libsoup/soup-message.h>
11
12 G_BEGIN_DECLS
13
14 /* HTTP Header Parsing */
15
16 SOUP_AVAILABLE_IN_2_26
17 gboolean    soup_headers_parse              (const char          *str,
18                                              int                  len,
19                                              SoupMessageHeaders  *dest);
20
21 guint       soup_headers_parse_request      (const char          *str,
22                                              int                  len,
23                                              SoupMessageHeaders  *req_headers,
24                                              char               **req_method,
25                                              char               **req_path,
26                                              SoupHTTPVersion     *ver);
27
28 gboolean    soup_headers_parse_status_line  (const char          *status_line,
29                                              SoupHTTPVersion     *ver,
30                                              guint               *status_code,
31                                              char               **reason_phrase);
32
33 gboolean    soup_headers_parse_response     (const char          *str,
34                                              int                  len,
35                                              SoupMessageHeaders  *headers,
36                                              SoupHTTPVersion     *ver,
37                                              guint               *status_code,
38                                              char               **reason_phrase);
39
40 /* Individual header parsing */
41
42 GSList     *soup_header_parse_list          (const char       *header);
43 GSList     *soup_header_parse_quality_list  (const char       *header,
44                                              GSList          **unacceptable);
45 void        soup_header_free_list           (GSList           *list);
46
47 gboolean    soup_header_contains            (const char       *header,
48                                              const char       *token);
49
50 GHashTable *soup_header_parse_param_list      (const char       *header);
51 SOUP_AVAILABLE_IN_2_24
52 GHashTable *soup_header_parse_semi_param_list (const char       *header);
53 void        soup_header_free_param_list       (GHashTable       *param_list);
54
55 SOUP_AVAILABLE_IN_2_26
56 void        soup_header_g_string_append_param (GString          *string,
57                                                const char       *name,
58                                                const char       *value);
59 SOUP_AVAILABLE_IN_2_30
60 void        soup_header_g_string_append_param_quoted (GString    *string,
61                                                       const char *name,
62                                                       const char *value);
63
64 G_END_DECLS
65
66 #endif /*SOUP_HEADERS_H*/