]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: Moved struct http_response* to http-response.h
authorTimo Sirainen <tss@iki.fi>
Thu, 11 Jul 2013 09:54:02 +0000 (12:54 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 11 Jul 2013 09:54:02 +0000 (12:54 +0300)
Also http-client.h now #includes only http-response.h

src/lib-http/Makefile.am
src/lib-http/http-client.h
src/lib-http/http-response-parser.h
src/lib-http/http-response.h [new file with mode: 0644]

index 4127a146477d3d142b999f46893dce650c9f92b9..32693e7c5470ebdf66bc2421140750363caf0714 100644 (file)
@@ -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
index 5cb1f669cbdd8b9ed31f9f9537c24f97de4bcae9..fc2c0a50e9faa6c57bb4eb1b7f452fa3132d7acd 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef HTTP_CLIENT_H
 #define HTTP_CLIENT_H
 
-#include "http-response-parser.h"
+#include "http-response.h"
 
 struct http_response;
 
index afe43008f28b7dec7c75b78aa3eed501a7cfd395..e25fad053e6f49617182f2c25b9221ca05c925e1 100644 (file)
@@ -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 (file)
index 0000000..5be5cd4
--- /dev/null
@@ -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