From a6d5b77cf93d138233b913b99fc6d612563408f4 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 22 Mar 2004 07:26:59 +0000 Subject: decode newsgroups header into a list of newsgroups. 2004-03-22 Not Zed * camel-mime-utils.c (camel_header_newsgroups_decode) (camel_header_newsgroups_free): decode newsgroups header into a list of newsgroups. ** See #55887. * providers/nntp/camel-nntp-summary.c (camel_nntp_summary_check): NOOP if we're offline. * providers/nntp/camel-nntp-store.c (nntp_connected): spit a warning if we try to do stuff whilst offline, rather than crash. svn path=/trunk/; revision=25142 --- camel/camel-mime-utils.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'camel/camel-mime-utils.h') diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h index 98b4eb1f1f..d4e3012d95 100644 --- a/camel/camel-mime-utils.h +++ b/camel/camel-mime-utils.h @@ -106,6 +106,12 @@ struct _camel_header_address { unsigned int refcount; }; +struct _camel_header_newsgroup { + struct _camel_header_newsgroup *next; + + char *newsgroup; +}; + /* MUST be called before everything else */ void camel_mime_utils_init(void); @@ -190,6 +196,9 @@ char *camel_header_encode_string (const unsigned char *in); /* encode a phrase, like the real name of an address */ char *camel_header_encode_phrase (const unsigned char *in); +/* FIXME: these are the only 2 functions in this header which are ch_(action)_type + rather than ch_type_(action) */ + /* decode an email date field into a GMT time, + optional offset */ time_t camel_header_decode_date (const char *in, int *saveoffset); char *camel_header_format_date (time_t time, int offset); @@ -212,6 +221,10 @@ struct _camel_header_references *camel_header_references_dup (const struct _came /* decode content-location */ char *camel_header_location_decode (const char *in); +/* nntp stuff */ +struct _camel_header_newsgroup *camel_header_newsgroups_decode(const char *in); +void camel_header_newsgroups_free(struct _camel_header_newsgroup *ng); + const char *camel_transfer_encoding_to_string (CamelTransferEncoding encoding); CamelTransferEncoding camel_transfer_encoding_from_string (const char *string); -- cgit v1.2.3