summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-01-19 19:37:41 +0100
committerWerner Koch <wk@gnupg.org>1999-01-19 19:37:41 +0100
commitce650acf1fc32a20db50a996ecc3008f47b02188 (patch)
treeeeafe3ce39fcbdc17a377470914942920c6d225b /include
parentSee ChangeLog: Sun Jan 17 11:04:33 CET 1999 Werner Koch (diff)
downloadgnupg2-ce650acf1fc32a20db50a996ecc3008f47b02188.tar.xz
gnupg2-ce650acf1fc32a20db50a996ecc3008f47b02188.zip
See ChangeLog: Tue Jan 19 19:34:58 CET 1999 Werner Koch
Diffstat (limited to 'include')
-rw-r--r--include/http.h17
-rw-r--r--include/util.h1
2 files changed, 15 insertions, 3 deletions
diff --git a/include/http.h b/include/http.h
index a439b4b81..d55213eb9 100644
--- a/include/http.h
+++ b/include/http.h
@@ -43,20 +43,33 @@ struct parsed_uri {
};
typedef struct parsed_uri *PARSED_URI;
+typedef enum {
+ HTTP_REQ_GET = 1,
+ HTTP_REQ_HEAD = 2,
+ HTTP_REQ_POST = 3
+} HTTP_REQ_TYPE;
+
struct http_context {
int initialized;
unsigned int status_code;
int socket;
+ int in_data;
IOBUF fp_read;
IOBUF fp_write;
int is_http_0_9;
PARSED_URI uri;
+ HTTP_REQ_TYPE req_type;
byte *buffer; /* line buffer */
unsigned buffer_size;
};
typedef struct http_context *HTTP_HD;
-int open_http_document( HTTP_HD hd, const char *document, unsigned int flags );
-void close_http_document( HTTP_HD hd );
+int http_open( HTTP_HD hd, HTTP_REQ_TYPE reqtype, const char *url,
+ unsigned int flags );
+void http_start_data( HTTP_HD hd );
+int http_wait_response( HTTP_HD hd, unsigned int *ret_status );
+void http_close( HTTP_HD hd );
+
+int http_open_document( HTTP_HD hd, const char *document, unsigned int flags );
#endif /*G10_HTTP_H*/
diff --git a/include/util.h b/include/util.h
index 8b8df37e8..892d508cc 100644
--- a/include/util.h
+++ b/include/util.h
@@ -161,7 +161,6 @@ STRLIST strlist_last( STRLIST node );
const char *memistr( const char *buf, size_t buflen, const char *sub );
char *mem2str( char *, const void *, size_t);
char *trim_spaces( char *string );
-unsigned trim_trailing_ws( byte *line, unsigned len );
int string_count_chr( const char *string, int c );
int set_native_charset( const char *newset );
char *native_to_utf8( const char *string );