diff options
author | Not Zed <NotZed@Ximian.com> | 2004-06-03 17:29:08 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-06-03 17:29:08 +0800 |
commit | 0a7400e900f9235cf6ef73a8978433178a5b8f0c (patch) | |
tree | 53f1ce1f63eff31afa5e3ef0c607a9af806cd441 /camel/providers/nntp/camel-nntp-store-summary.c | |
parent | f60455997beaa2374f20921d2e874f70d08b4bb4 (diff) | |
download | gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.tar gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.tar.gz gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.tar.bz2 gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.tar.lz gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.tar.xz gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.tar.zst gsoc2013-evolution-0a7400e900f9235cf6ef73a8978433178a5b8f0c.zip |
only save the summary, don't update from server, thats what refresh info
2004-06-03 Not Zed <NotZed@Ximian.com>
* providers/nntp/camel-nntp-folder.c (nntp_folder_sync_online):
only save the summary, don't update from server, thats what
refresh info does.
(nntp_folder_download_message): fix exception handling.
(nntp_folder_cache_message): same.
(nntp_folder_get_message): ditto, plus major cleanup.
(nntp_folder_download_message): take combined uid so it can cache
and lookup properly. duh.
* providers/nntp/camel-nntp-store.c
(nntp_store_get_subscribed_folder_info): if not fast, then open
the folder, and update it. Yeah i've given up trying to worry
about performance vs usability.
* providers/nntp/camel-nntp-summary.c (camel_nntp_summary_check):
update the storesummary if we update the folder summary. Hmm,
isn't duplicated data meant to be a bad thing? :P
* providers/nntp/camel-nntp-store.c (camel_nntp_store_set_folder):
removed, now handled by nntp_command.
(nntp_connected): removed, now handled by nntp_command.
* camel-string-utils.c (camel_tolower): added ascii to-lower
function.
(camel_toupper): and upper, for completeness.
* camel-store-summary.c (CAMEL_STORE_SUMMARY_VERSION): bumped file
version by 1. This is a mess, version 1 files treated the
bitfield 'flags' with bit number values not bits. Messy.
* providers/nntp/camel-nntp-store-summary.c (store_info_save):
write last/first count.
(CAMEL_NNTP_STORE_SUMMARY_VERSION): bump version to 1.
(store_info_load): if we're loading >= version 1, then load
last/first counts.
* providers/nntp/camel-nntp-store.c
(nntp_store_get_folder_info_all): pass the whole line to
store_info_from_line, dont strip last/first info.
(nntp_store_info_update): renamed from info_new_from_line. only
add if not present. handle updates, try and handle unread counts
and readonly status.
2004-06-02 Not Zed <NotZed@Ximian.com>
* providers/nntp/camel-nntp-store.c: setup xover once we've
started.
* providers/nntp/camel-nntp-summary.c: (xover_setup): moved to
nntp store.
* providers/nntp/camel-nntp-folder.c (folder_check)
(folder_check_free, camel_nntp_folder_new): remove async summary
stuff.
* providers/nntp/camel-nntp-store.c (camel_nntp_command): take
exception argument again, and folder argument. do retry logic and
auth logic differently.
(camel_nntp_raw_command): raw command interface, dont try
reconnect or anything fancy. pass i/o errors straight out, etc.
(camel_nntp_try_authenticate): change to return return codes &
take exception.
* providers/nntp/camel-nntp-summary.c (camel_nntp_summary_new):
just take path argument.
(camel_nntp_summary_check): take a store, and a folder name.
(add_range_head, add_range_xover): remove the time based update
events, they never had any effect anyway. Take store argument.
(xover_setup): take store argument.
* camel-folder-search.c (search_match_threads): remove debug.
svn path=/trunk/; revision=26164
Diffstat (limited to 'camel/providers/nntp/camel-nntp-store-summary.c')
-rw-r--r-- | camel/providers/nntp/camel-nntp-store-summary.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/camel/providers/nntp/camel-nntp-store-summary.c b/camel/providers/nntp/camel-nntp-store-summary.c index 8cade2a5eb..7dbcd89118 100644 --- a/camel/providers/nntp/camel-nntp-store-summary.c +++ b/camel/providers/nntp/camel-nntp-store-summary.c @@ -19,8 +19,6 @@ * Boston, MA 02111-1307, USA. */ -/* currently, this is just a straigt s/imap/nntp from the IMAP file*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -45,8 +43,9 @@ #define io(x) /* io debug */ #define CAMEL_NNTP_STORE_SUMMARY_VERSION_0 (0) +#define CAMEL_NNTP_STORE_SUMMARY_VERSION_1 (1) -#define CAMEL_NNTP_STORE_SUMMARY_VERSION (0) +#define CAMEL_NNTP_STORE_SUMMARY_VERSION (1) #define _PRIVATE(o) (((CamelNNTPStoreSummary *)(o))->priv) @@ -362,7 +361,14 @@ store_info_load (CamelStoreSummary *s, FILE *in) if (ni) { if (camel_file_util_decode_string (in, &ni->full_name) == -1) { camel_store_summary_info_free (s, (CamelStoreInfo *) ni); - ni = NULL; + return NULL; + } + if (((CamelNNTPStoreSummary *)s)->version >= CAMEL_NNTP_STORE_SUMMARY_VERSION_1) { + if (camel_file_util_decode_uint32(in, &ni->first) == -1 + || camel_file_util_decode_uint32(in, &ni->last) == -1) { + camel_store_summary_info_free (s, (CamelStoreInfo *) ni); + return NULL; + } } /* set the URL */ } @@ -376,7 +382,9 @@ store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi) CamelNNTPStoreInfo *isi = (CamelNNTPStoreInfo *)mi; if (camel_nntp_store_summary_parent->store_info_save (s, out, mi) == -1 - || camel_file_util_encode_string (out, isi->full_name) == -1) + || camel_file_util_encode_string (out, isi->full_name) == -1 + || camel_file_util_encode_uint32(out, isi->first) == -1 + || camel_file_util_encode_uint32(out, isi->last) == -1) return -1; return 0; |