From: Timo Sirainen Date: Thu, 11 Jul 2013 09:54:02 +0000 (+0300) Subject: lib-http: Moved struct http_response* to http-response.h X-Git-Tag: 2.2.5~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1920ef85b63738a06914e56508049dd0afe38732;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Moved struct http_response* to http-response.h Also http-client.h now #includes only http-response.h --- diff --git a/src/lib-http/Makefile.am b/src/lib-http/Makefile.am index 4127a14647..32693e7c54 100644 --- a/src/lib-http/Makefile.am +++ b/src/lib-http/Makefile.am @@ -25,6 +25,7 @@ headers = \ http-parser.h \ http-header-parser.h \ http-transfer.h \ + http-response.h \ http-response-parser.h \ http-client-private.h \ http-client.h diff --git a/src/lib-http/http-client.h b/src/lib-http/http-client.h index 5cb1f669cb..fc2c0a50e9 100644 --- a/src/lib-http/http-client.h +++ b/src/lib-http/http-client.h @@ -1,7 +1,7 @@ #ifndef HTTP_CLIENT_H #define HTTP_CLIENT_H -#include "http-response-parser.h" +#include "http-response.h" struct http_response; diff --git a/src/lib-http/http-response-parser.h b/src/lib-http/http-response-parser.h index afe43008f2..e25fad053e 100644 --- a/src/lib-http/http-response-parser.h +++ b/src/lib-http/http-response-parser.h @@ -1,28 +1,7 @@ #ifndef HTTP_RESPONSE_PARSER_H #define HTTP_RESPONSE_PARSER_H -struct http_response_header { - const char *key; - const char *value; - size_t size; -}; - -struct http_response { - unsigned char version_major; - unsigned char version_minor; - - unsigned int status; - - const char *reason; - const char *location; - - time_t date; - struct istream *payload; - - ARRAY(struct http_response_header) headers; - - unsigned int connection_close:1; -}; +#include "http-response.h" struct http_response_parser; diff --git a/src/lib-http/http-response.h b/src/lib-http/http-response.h new file mode 100644 index 0000000000..5be5cd44b3 --- /dev/null +++ b/src/lib-http/http-response.h @@ -0,0 +1,28 @@ +#ifndef HTTP_RESPONSE_H +#define HTTP_RESPONSE_H + +struct http_response_header { + const char *key; + const char *value; + size_t size; +}; +ARRAY_DEFINE_TYPE(http_response_header, struct http_response_header); + +struct http_response { + unsigned char version_major; + unsigned char version_minor; + + unsigned int status; + + const char *reason; + const char *location; + + time_t date; + struct istream *payload; + + ARRAY_TYPE(http_response_header) headers; + + unsigned int connection_close:1; +}; + +#endif