diff options
author | Dan Winship <danw@src.gnome.org> | 2008-02-09 00:46:12 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2008-02-09 00:46:12 +0000 |
commit | 801cefbcf058518a60360e1297c63b482e267655 (patch) | |
tree | 3fc9eee910e0c0994b0311dcf9d912a15c6359c2 /libsoup/soup-message-headers.h | |
parent | 0c890a53d6318c078cfd3edf19b4ee8aff05c124 (diff) | |
download | libsoup-801cefbcf058518a60360e1297c63b482e267655.tar.gz |
Add an iterator type for SoupMessageHeaders.
* libsoup/soup-message-headers.c (SoupMessageHeadersIter)
(soup_message_headers_iter_init, soup_message_headers_iter_next):
Add an iterator type for SoupMessageHeaders.
* libsoup/soup-message-client-io.c (get_request_headers):
* libsoup/soup-message-server-io.c (get_response_headers): Use
SoupMessageHeadersIter.
* libsoup/soup-logger.c (print_request, print_response): Use
SoupMessageHeadersIter. And take advantage of the simplification
to fix the kludge where 'direction' was stored as a field in
SoupLoggerPrivate rather than being an argument to
soup_logger_print.
* tests/get.c (get_url):
* tests/header-parsing.c (check_headers):
* tests/simple-httpd.c (server_callback): Use
SoupMessageHeadersIter
svn path=/trunk/; revision=1079
Diffstat (limited to 'libsoup/soup-message-headers.h')
-rw-r--r-- | libsoup/soup-message-headers.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsoup/soup-message-headers.h b/libsoup/soup-message-headers.h index 68baf524..49f16a2a 100644 --- a/libsoup/soup-message-headers.h +++ b/libsoup/soup-message-headers.h @@ -43,6 +43,16 @@ void soup_message_headers_foreach (SoupMessageHeaders *hdrs, SoupMessageHeadersForeachFunc func, gpointer user_data); +typedef struct { + gpointer dummy[3]; +} SoupMessageHeadersIter; + +void soup_message_headers_iter_init (SoupMessageHeadersIter *iter, + SoupMessageHeaders *hdrs); +gboolean soup_message_headers_iter_next (SoupMessageHeadersIter *iter, + const char **name, + const char **value); + /* Specific headers */ typedef enum { |