diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-09-01 08:57:20 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-09-01 08:57:20 +0800 |
commit | 3cf4f0d243e0c84b519fe027a3299a925e7075fb (patch) | |
tree | 666af08cf25c07ea8c2da1235c4ab512f30193ce /camel/providers/nntp/camel-nntp-store.h | |
parent | 65d4250703d68534210c57f4ed413f95b24390d3 (diff) | |
download | gsoc2013-evolution-3cf4f0d243e0c84b519fe027a3299a925e7075fb.tar.gz gsoc2013-evolution-3cf4f0d243e0c84b519fe027a3299a925e7075fb.tar.zst gsoc2013-evolution-3cf4f0d243e0c84b519fe027a3299a925e7075fb.zip |
make this a bit more robust. try to create an empty .newsrc file for the
2000-08-31 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_read_for_server): make this a bit more robust.
try to create an empty .newsrc file for the server if we can't
open it for reading. also, don't allocate everything until we've
opened the file.
* providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
of our overview field indices.
(camel_nntp_get_headers): only call get_OVER_headers if the
extension is present. warn if it's not - since get_HEAD_headers
needs work before it works.
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_extensions): new function - query the server
for it's extensions.
(camel_nntp_store_get_overview_fmt): new function - query the
server for the overview format and build our table of the indices
we care about. support the "full" suffix on fields.
(nntp_store_connect): call camel_nntp_store_get_extensions and
camel_nntp_store_get_overview_fmt.
* providers/nntp/camel-nntp-store.h: add codes for extensions
found on news.mozilla.org. only one that we care about is OVER.
also, add CamelNNTPOverField and an enum of the overview fields
that we care about.
svn path=/trunk/; revision=5152
Diffstat (limited to 'camel/providers/nntp/camel-nntp-store.h')
-rw-r--r-- | camel/providers/nntp/camel-nntp-store.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h index 3099f84962..a74ea84f5e 100644 --- a/camel/providers/nntp/camel-nntp-store.h +++ b/camel/providers/nntp/camel-nntp-store.h @@ -40,12 +40,41 @@ extern "C" { #define IS_CAMEL_NNTP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE)) +enum { + CAMEL_NNTP_OVER_FROM, + CAMEL_NNTP_OVER_SUBJECT, + CAMEL_NNTP_OVER_DATE, + CAMEL_NNTP_OVER_MESSAGE_ID, + CAMEL_NNTP_OVER_REFERENCES, + CAMEL_NNTP_OVER_BYTES, + + CAMEL_NNTP_OVER_LAST +}; + +typedef struct { + int index; + gboolean full; /* full in the OVER sense - the field name + precedes the ':' in the XOVER list. */ +} CamelNNTPOverField; + typedef struct { CamelStore parent_object; -#define CAMEL_NNTP_EXT_XOVER 0x01 +#define CAMEL_NNTP_EXT_SEARCH (1<<0) +#define CAMEL_NNTP_EXT_SETGET (1<<1) +#define CAMEL_NNTP_EXT_OVER (1<<2) +#define CAMEL_NNTP_EXT_XPATTEXT (1<<3) +#define CAMEL_NNTP_EXT_XACTIVE (1<<4) +#define CAMEL_NNTP_EXT_LISTMOTD (1<<5) +#define CAMEL_NNTP_EXT_LISTSUBSCR (1<<6) +#define CAMEL_NNTP_EXT_LISTPNAMES (1<<7) guint32 extensions; + gboolean posting_allowed; + + int num_overview_fields; + CamelNNTPOverField overview_field[ CAMEL_NNTP_OVER_LAST ]; + CamelNNTPNewsrc *newsrc; CamelStream *istream, *ostream; |