aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-http-stream.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-09-19 01:07:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-09-19 01:07:09 +0800
commitdf21ede0c7bb0cf36ff095400e38d46950a030a5 (patch)
treecd2c957ceb136b8d85467f561fa1c97bdd5c03a4 /camel/camel-http-stream.c
parenta72785e2a7fa4e59e4297610ea3070ce79632d0b (diff)
downloadgsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.tar
gsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.tar.gz
gsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.tar.bz2
gsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.tar.lz
gsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.tar.xz
gsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.tar.zst
gsoc2013-evolution-df21ede0c7bb0cf36ff095400e38d46950a030a5.zip
s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and
2003-08-26 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-parser.[c,h]: s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and s/_header_state/_camel_mime_parser_state/g * camel-filter-driver.c: Same. * camel-folder-summary.c: Here too. * camel-http-stream.c: And here. * camel-mime-message.c: ... * camel-mime-part-utils.c: ... * camel-mime-part.c: ... * camel-movemail.c: ... * camel-multipart-signed.c: ... * camel-multipart.c: ... * providers/local/camel-mbox-folder.c: ... * providers/local/camel-mbox-summary.c: ... * providers/local/camel-mh-summary.c: ... * providers/nntp/camel-nntp-summary.c: ... * providers/pop3/camel-pop3-folder.c: ... 2003-08-25 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.[c,h]: Namespaced. * camel-data-wrapper.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-digest-folder.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-filter-driver.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-filter-search.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-folder-search.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-folder-summary.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-http-stream.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-http-stream.h: updated for namespace changed made to camel-mime-utils.[c,h] * camel-internet-address.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-medium.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-message.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-parser.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-part-utils.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-mime-part.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-movemail.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-multipart-encrypted.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-multipart-signed.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-multipart.c: updated for namespace changed made to camel-mime-utils.[c,h] * camel-search-private.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * camel-types.h: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imap/camel-imap-folder.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imap/camel-imap-store-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imap/camel-imap-utils.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/imapp/camel-imapp-utils.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-local-summary.[c,h]: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-maildir-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-mbox-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/local/camel-spool-summary.h: updated for namespace changed made to camel-mime-utils.[c,h] * providers/nntp/camel-nntp-summary.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/nntp/camel-nntp-utils.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/pop3/camel-pop3-folder.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/sendmail/camel-sendmail-transport.c: updated for namespace changed made to camel-mime-utils.[c,h] * providers/smtp/camel-smtp-transport.c: updated for namespace changed made to camel-mime-utils.[c,h] svn path=/trunk/; revision=22613
Diffstat (limited to 'camel/camel-http-stream.c')
-rw-r--r--camel/camel-http-stream.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c
index 3217a11f55..40bf71fdd3 100644
--- a/camel/camel-http-stream.c
+++ b/camel/camel-http-stream.c
@@ -96,10 +96,10 @@ camel_http_stream_finalize (CamelObject *object)
camel_object_unref(http->parser);
if (http->content_type)
- header_content_type_unref (http->content_type);
+ camel_content_type_unref (http->content_type);
if (http->headers)
- header_raw_clear (&http->headers);
+ camel_header_raw_clear (&http->headers);
if (http->session)
camel_object_unref(http->session);
@@ -261,7 +261,7 @@ http_get_statuscode (CamelHttpStream *http)
/* parse the HTTP status code */
if (!strncasecmp (buffer, "HTTP/", 5)) {
token = http_next_token (buffer);
- http->statuscode = header_decode_int (&token);
+ http->statuscode = camel_header_decode_int (&token);
return http->statuscode;
}
@@ -273,7 +273,7 @@ http_get_statuscode (CamelHttpStream *http)
static int
http_get_headers (CamelHttpStream *http)
{
- struct _header_raw *headers, *node, *tail;
+ struct _camel_header_raw *headers, *node, *tail;
const char *type;
char *buf;
size_t len;
@@ -286,27 +286,27 @@ http_get_headers (CamelHttpStream *http)
camel_mime_parser_init_with_stream (http->parser, http->read);
switch (camel_mime_parser_step (http->parser, &buf, &len)) {
- case HSCAN_MESSAGE:
- case HSCAN_HEADER:
+ case CAMEL_MIME_PARSER_STATE_MESSAGE:
+ case CAMEL_MIME_PARSER_STATE_HEADER:
headers = camel_mime_parser_headers_raw (http->parser);
if (http->content_type)
- header_content_type_unref (http->content_type);
- type = header_raw_find (&headers, "Content-Type", NULL);
+ camel_content_type_unref (http->content_type);
+ type = camel_header_raw_find (&headers, "Content-Type", NULL);
if (type)
- http->content_type = header_content_type_decode (type);
+ http->content_type = camel_content_type_decode (type);
else
http->content_type = NULL;
if (http->headers)
- header_raw_clear (&http->headers);
+ camel_header_raw_clear (&http->headers);
http->headers = NULL;
- tail = (struct _header_raw *) &http->headers;
+ tail = (struct _camel_header_raw *) &http->headers;
d(printf("HTTP Headers:\n"));
while (headers) {
d(printf(" %s:%s\n", headers->name, headers->value));
- node = g_new (struct _header_raw, 1);
+ node = g_new (struct _camel_header_raw, 1);
node->next = NULL;
node->name = g_strdup (headers->name);
node->value = g_strdup (headers->value);
@@ -432,13 +432,13 @@ stream_read (CamelStream *stream, char *buffer, size_t n)
case 302: {
char *loc;
- header_content_type_unref (http->content_type);
+ camel_content_type_unref (http->content_type);
http->content_type = NULL;
http_disconnect(http);
- loc = g_strdup(header_raw_find(&http->headers, "Location", NULL));
+ loc = g_strdup(camel_header_raw_find(&http->headers, "Location", NULL));
if (loc == NULL) {
- header_raw_clear(&http->headers);
+ camel_header_raw_clear(&http->headers);
return -1;
}
@@ -449,11 +449,11 @@ stream_read (CamelStream *stream, char *buffer, size_t n)
http->url = camel_url_new(loc, NULL);
if (http->url == NULL) {
printf("redirect url '%s' cannot be parsed\n", loc);
- header_raw_clear (&http->headers);
+ camel_header_raw_clear (&http->headers);
return -1;
}
d(printf(" redirect url = %p\n", http->url));
- header_raw_clear (&http->headers);
+ camel_header_raw_clear (&http->headers);
goto redirect;
break; }
@@ -536,7 +536,7 @@ camel_http_stream_get_content_type (CamelHttpStream *http_stream)
}
if (http_stream->content_type)
- header_content_type_ref (http_stream->content_type);
+ camel_content_type_ref (http_stream->content_type);
return http_stream->content_type;
}