diff options
author | Dan Winship <danw@src.gnome.org> | 2000-03-25 13:18:55 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-03-25 13:18:55 +0800 |
commit | a74c859d8c64ac576255fbc36b5f59468b42ddce (patch) | |
tree | 3e71353e6c734cacedc11bc8a83ddf221812a77a /camel/providers/mbox/camel-mbox-summary.h | |
parent | 4af81200bb6f671aa581ef77d2c0b6e4c332fb81 (diff) | |
download | gsoc2013-evolution-a74c859d8c64ac576255fbc36b5f59468b42ddce.tar.gz gsoc2013-evolution-a74c859d8c64ac576255fbc36b5f59468b42ddce.tar.zst gsoc2013-evolution-a74c859d8c64ac576255fbc36b5f59468b42ddce.zip |
change the CamelFolderSummary interfaces to allow partial summary queries
* camel-folder-summary.[ch]: change the CamelFolderSummary
interfaces to allow partial summary queries (for dealing
with very large folders). Remove the "extended_fields" from
CamelFolderInfo and CamelMessageInfo: this is better dealt
with by subtyping.
* providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
subclass of CamelFolderSummary. Update interfaces for that. Remove
the internal/external summary distinction. Remove the (unused) md5
checksum in the folder summary. Change the summary file format
(primarily to make it no longer byte-order dependent) and add a
version number to it so it will be easier to change in the future.
* providers/mbox/camel-mbox-folder.[ch]
* providers/mbox/camel-mbox-search.c
* providers/mbox/camel-mbox-utils.c: update for summary changes
* camel-exception-list.def: add
CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
svn path=/trunk/; revision=2159
Diffstat (limited to 'camel/providers/mbox/camel-mbox-summary.h')
-rw-r--r-- | camel/providers/mbox/camel-mbox-summary.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/camel/providers/mbox/camel-mbox-summary.h b/camel/providers/mbox/camel-mbox-summary.h index 4ee4770a03..f8570f15c0 100644 --- a/camel/providers/mbox/camel-mbox-summary.h +++ b/camel/providers/mbox/camel-mbox-summary.h @@ -25,61 +25,61 @@ #ifndef MBOX_SUMMARY_H #define MBOX_SUMMARY_H 1 -#include <glib.h> +#include <camel-folder-summary.h> +#define CAMEL_MBOX_SUMMARY_TYPE (camel_mbox_summary_get_type ()) +#define CAMEL_MBOX_SUMMARY(obj) (GTK_CHECK_CAST((obj), CAMEL_MBOX_SUMMARY_TYPE, CamelMboxSummary)) +#define CAMEL_MBOX_SUMMARY_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MBOX_SUMMARY_TYPE, CamelMboxSummaryClass)) +#define CAMEL_IS_MBOX_SUMMARY(o) (GTK_CHECK_TYPE((o), CAMEL_MBOX_SUMMARY_TYPE)) + + +#define CAMEL_MBOX_SUMMARY_VERSION 1 -/* This contains information about one message inside - * the mbox file. This is used in the intenal summary */ typedef struct { + CamelMessageInfo headers; guint32 position; guint size; guint x_evolution_offset; guint32 uid; guchar status; - gchar *subject; - gchar *sender; - gchar *to; - gchar *date; - gchar *received_date; } CamelMboxSummaryInformation; /* this contains informations about the whole mbox file */ typedef struct { - - guint nb_message; /* number of messages in the summary */ - guchar md5_digest[16]; /* md5 signature of the mbox file */ + CamelFolderSummary parent_object; + + guint nb_message; /* number of messages in the summary */ guint32 next_uid; guint32 mbox_file_size; - - GArray *message_info; /* array of CamelMboxSummaryInformation */ - -} CamelMboxSummary; + guint32 mbox_modtime; + GArray *message_info; /* array of CamelMboxSummaryInformation */ -void -camel_mbox_save_summary (CamelMboxSummary *summary, const gchar *filename, CamelException *ex); +} CamelMboxSummary; + +typedef struct { + CamelFolderSummaryClass parent_class; -CamelMboxSummary * -camel_mbox_load_summary (const gchar *filename, CamelException *ex); +} CamelMboxSummaryClass; -gboolean -camel_mbox_check_summary_sync (gchar *summary_filename, - gchar *mbox_filename, - CamelException *ex); -void -camel_mbox_summary_append_entries (CamelMboxSummary *summary, GArray *entries); +GtkType camel_mbox_summary_get_type (void); +void camel_mbox_summary_save (CamelMboxSummary *summary, + const gchar *filename, CamelException *ex); +CamelMboxSummary *camel_mbox_summary_load (const gchar *filename, + CamelException *ex); +gboolean camel_mbox_summary_check_sync (gchar *summary_filename, + gchar *mbox_filename, + CamelException *ex); -void -camel_mbox_summary_append_internal_to_external (CamelMboxSummary *internal, - CamelFolderSummary *external, - guint first_entry); +void camel_mbox_summary_append_entries (CamelMboxSummary *summary, + GArray *entries); -#endif /* MH_SUMMARY_H */ +#endif /* MBOX_SUMMARY_H */ |