1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
2 | /* |
3 | * Copyright (C) 2005 Novell, Inc. |
4 | */ |
5 | |
6 | #ifndef __SOUP_MESSAGE_HEADERS_H__ |
7 | #define 1 |
8 | |
9 | #include <libsoup/soup-types.h> |
10 | |
11 | G_BEGIN_DECLS |
12 | |
13 | typedef struct ; |
14 | SOUP_AVAILABLE_IN_2_4 |
15 | GType (void); |
16 | #define (soup_message_headers_get_type ()) |
17 | |
18 | typedef enum { |
19 | , |
20 | , |
21 | |
22 | } ; |
23 | |
24 | SOUP_AVAILABLE_IN_2_4 |
25 | SoupMessageHeaders * (SoupMessageHeadersType type); |
26 | |
27 | SOUP_AVAILABLE_IN_2_4 |
28 | void (SoupMessageHeaders *hdrs); |
29 | |
30 | SOUP_AVAILABLE_IN_2_4 |
31 | void (SoupMessageHeaders *hdrs, |
32 | const char *name, |
33 | const char *value); |
34 | SOUP_AVAILABLE_IN_2_4 |
35 | void (SoupMessageHeaders *hdrs, |
36 | const char *name, |
37 | const char *value); |
38 | |
39 | SOUP_AVAILABLE_IN_2_4 |
40 | void (SoupMessageHeaders *hdrs, |
41 | const char *name); |
42 | SOUP_AVAILABLE_IN_2_4 |
43 | void (SoupMessageHeaders *hdrs); |
44 | |
45 | SOUP_AVAILABLE_IN_2_36 |
46 | void (SoupMessageHeaders *hdrs); |
47 | |
48 | #ifndef SOUP_DISABLE_DEPRECATED |
49 | SOUP_AVAILABLE_IN_2_4 |
50 | SOUP_DEPRECATED_IN_2_28_FOR ("soup_message_headers_get_one or soup_message_headers_get_list" ) |
51 | const char * (SoupMessageHeaders *hdrs, |
52 | const char *name); |
53 | #endif |
54 | SOUP_AVAILABLE_IN_2_28 |
55 | const char * (SoupMessageHeaders *hdrs, |
56 | const char *name); |
57 | SOUP_AVAILABLE_IN_2_28 |
58 | const char * (SoupMessageHeaders *hdrs, |
59 | const char *name); |
60 | SOUP_AVAILABLE_IN_2_50 |
61 | gboolean (SoupMessageHeaders *hdrs, |
62 | const char *name, |
63 | const char *token); |
64 | SOUP_AVAILABLE_IN_2_50 |
65 | gboolean (SoupMessageHeaders *hdrs, |
66 | const char *name, |
67 | const char *value); |
68 | |
69 | typedef void (*)(const char *name, |
70 | const char *value, |
71 | gpointer user_data); |
72 | |
73 | SOUP_AVAILABLE_IN_2_4 |
74 | void (SoupMessageHeaders *hdrs, |
75 | SoupMessageHeadersForeachFunc func, |
76 | gpointer user_data); |
77 | |
78 | SOUP_AVAILABLE_IN_2_50 |
79 | SoupMessageHeadersType (SoupMessageHeaders *hdrs); |
80 | |
81 | typedef struct { |
82 | /*< private >*/ |
83 | gpointer dummy[3]; |
84 | } ; |
85 | |
86 | SOUP_AVAILABLE_IN_2_4 |
87 | void (SoupMessageHeadersIter *iter, |
88 | SoupMessageHeaders *hdrs); |
89 | SOUP_AVAILABLE_IN_2_4 |
90 | gboolean (SoupMessageHeadersIter *iter, |
91 | const char **name, |
92 | const char **value); |
93 | |
94 | /* Specific headers */ |
95 | |
96 | typedef enum { |
97 | SOUP_ENCODING_UNRECOGNIZED, |
98 | SOUP_ENCODING_NONE, |
99 | SOUP_ENCODING_CONTENT_LENGTH, |
100 | SOUP_ENCODING_EOF, |
101 | SOUP_ENCODING_CHUNKED, |
102 | SOUP_ENCODING_BYTERANGES |
103 | } SoupEncoding; |
104 | |
105 | SOUP_AVAILABLE_IN_2_4 |
106 | SoupEncoding (SoupMessageHeaders *hdrs); |
107 | SOUP_AVAILABLE_IN_2_4 |
108 | void (SoupMessageHeaders *hdrs, |
109 | SoupEncoding encoding); |
110 | |
111 | SOUP_AVAILABLE_IN_2_4 |
112 | goffset (SoupMessageHeaders *hdrs); |
113 | SOUP_AVAILABLE_IN_2_4 |
114 | void (SoupMessageHeaders *hdrs, |
115 | goffset content_length); |
116 | |
117 | typedef enum { |
118 | SOUP_EXPECTATION_UNRECOGNIZED = (1 << 0), |
119 | SOUP_EXPECTATION_CONTINUE = (1 << 1) |
120 | } SoupExpectation; |
121 | |
122 | SOUP_AVAILABLE_IN_2_4 |
123 | SoupExpectation (SoupMessageHeaders *hdrs); |
124 | SOUP_AVAILABLE_IN_2_4 |
125 | void (SoupMessageHeaders *hdrs, |
126 | SoupExpectation expectations); |
127 | |
128 | typedef struct { |
129 | goffset start; |
130 | goffset end; |
131 | } SoupRange; |
132 | |
133 | SOUP_AVAILABLE_IN_2_26 |
134 | gboolean (SoupMessageHeaders *hdrs, |
135 | goffset total_length, |
136 | SoupRange **ranges, |
137 | int *length); |
138 | SOUP_AVAILABLE_IN_2_26 |
139 | void (SoupMessageHeaders *hdrs, |
140 | SoupRange *ranges); |
141 | SOUP_AVAILABLE_IN_2_26 |
142 | void (SoupMessageHeaders *hdrs, |
143 | SoupRange *ranges, |
144 | int length); |
145 | SOUP_AVAILABLE_IN_2_26 |
146 | void (SoupMessageHeaders *hdrs, |
147 | goffset start, |
148 | goffset end); |
149 | |
150 | SOUP_AVAILABLE_IN_2_26 |
151 | gboolean (SoupMessageHeaders *hdrs, |
152 | goffset *start, |
153 | goffset *end, |
154 | goffset *total_length); |
155 | SOUP_AVAILABLE_IN_2_26 |
156 | void (SoupMessageHeaders *hdrs, |
157 | goffset start, |
158 | goffset end, |
159 | goffset total_length); |
160 | |
161 | |
162 | SOUP_AVAILABLE_IN_2_26 |
163 | const char * (SoupMessageHeaders *hdrs, |
164 | GHashTable **params); |
165 | SOUP_AVAILABLE_IN_2_26 |
166 | void (SoupMessageHeaders *hdrs, |
167 | const char *content_type, |
168 | GHashTable *params); |
169 | |
170 | SOUP_AVAILABLE_IN_2_26 |
171 | gboolean (SoupMessageHeaders *hdrs, |
172 | char **disposition, |
173 | GHashTable **params); |
174 | SOUP_AVAILABLE_IN_2_26 |
175 | void (SoupMessageHeaders *hdrs, |
176 | const char *disposition, |
177 | GHashTable *params); |
178 | |
179 | G_END_DECLS |
180 | |
181 | #endif /* __SOUP_MESSAGE_HEADERS_H__ */ |
182 | |