diff options
author | NotZed <NotZed@HelixCode.com> | 2000-04-21 07:48:45 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-04-21 07:48:45 +0800 |
commit | 383f245d39b8b806a4b6ce4dea7b0ab7f1658450 (patch) | |
tree | b6447bbcd6bd8c4b31582a343ce062e8d2c548c4 /camel/providers/mbox/camel-mbox-summary.h | |
parent | 6b5b1f6de926a4c9dec95dbd55ae53a5b30fb6a5 (diff) | |
download | gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.tar gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.tar.gz gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.tar.bz2 gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.tar.lz gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.tar.xz gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.tar.zst gsoc2013-evolution-383f245d39b8b806a4b6ce4dea7b0ab7f1658450.zip |
MERGE NEW_PARSER branch into HEAD, fixed conflicts.
2000-04-20 NotZed <NotZed@HelixCode.com>
* MERGE NEW_PARSER branch into HEAD, fixed conflicts.
* gmime-content-field.c (_print_parameter): Duh, removed again
(@@#$@ cvs merge).
* camel-mime-utils.c (header_content_type_is): Constify.
(header_content_type_unref): Killed a couple warnings.
* camel-folder.c (_init): Removed more log crap.
* providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
summary changes.
* providers/mbox/camel-mbox-folder.c (_get_message_by_number):
Fixed for new summary interface. Added a warning for using this
broken api.
(_get_message_by_uid): Fixed for message new with session
vanishing.
svn path=/trunk/; revision=2531
Diffstat (limited to 'camel/providers/mbox/camel-mbox-summary.h')
-rw-r--r-- | camel/providers/mbox/camel-mbox-summary.h | 115 |
1 files changed, 54 insertions, 61 deletions
diff --git a/camel/providers/mbox/camel-mbox-summary.h b/camel/providers/mbox/camel-mbox-summary.h index f8570f15c0..80b59ef54f 100644 --- a/camel/providers/mbox/camel-mbox-summary.h +++ b/camel/providers/mbox/camel-mbox-summary.h @@ -1,85 +1,78 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * - * Author : Bertrand Guiheneuf <bertrand@helixcode.com> +/* + * Copyright (C) 2000 Helix Code Inc. * - * Copyright (C) 1999 Helix Code (http://www.helixcode.com). + * Authors: Michael Zucchi <notzed@helixcode.com> * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License + * as published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef MBOX_SUMMARY_H -#define MBOX_SUMMARY_H 1 - -#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 +#ifndef _CAMEL_MBOX_SUMMARY_H +#define _CAMEL_MBOX_SUMMARY_H +#include <glib.h> +#include <camel/camel-folder.h> +#include <libibex/ibex.h> typedef struct { - CamelMessageInfo headers; + CamelMessageContentInfo info; - guint32 position; - guint size; - guint x_evolution_offset; - guint32 uid; - guchar status; + /* position in stream of this part */ + off_t pos; + off_t bodypos; + off_t endpos; +} CamelMboxMessageContentInfo; -} CamelMboxSummaryInformation; - - -/* this contains informations about the whole mbox file */ typedef struct { - CamelFolderSummary parent_object; + CamelMessageInfo info; - guint nb_message; /* number of messages in the summary */ - guint32 next_uid; - guint32 mbox_file_size; - guint32 mbox_modtime; + /* position of the xev header, if one exists */ + off_t xev_offset; +} CamelMboxMessageInfo; - GArray *message_info; /* array of CamelMboxSummaryInformation */ +typedef struct { + int dirty; /* if anything has changed */ -} CamelMboxSummary; + char *folder_path; + char *summary_path; + ibex *index; -typedef struct { - CamelFolderSummaryClass parent_class; + GPtrArray *messages; /* array of messages matching mbox order */ + GHashTable *message_uid; /* index to messages by uid */ -} CamelMboxSummaryClass; + int nextuid; + time_t time; /* time/size of folder's last update */ + size_t size; +} CamelMboxSummary; -GtkType camel_mbox_summary_get_type (void); +CamelMboxSummary *camel_mbox_summary_new(const char *summary, const char *folder, ibex *index); +void camel_mbox_summary_unref(CamelMboxSummary *); -void camel_mbox_summary_save (CamelMboxSummary *summary, - const gchar *filename, CamelException *ex); -CamelMboxSummary *camel_mbox_summary_load (const gchar *filename, - CamelException *ex); +int camel_mbox_summary_load(CamelMboxSummary *); +int camel_mbox_summary_save(CamelMboxSummary *); +int camel_mbox_summary_check(CamelMboxSummary *); -gboolean camel_mbox_summary_check_sync (gchar *summary_filename, - gchar *mbox_filename, - CamelException *ex); +guint32 camel_mbox_summary_next_uid(CamelMboxSummary *); +/* set the minimum uid */ +guint32 camel_mbox_summary_set_uid(CamelMboxSummary *s, guint32 uid); -void camel_mbox_summary_append_entries (CamelMboxSummary *summary, - GArray *entries); +CamelMboxMessageInfo *camel_mbox_summary_uid(CamelMboxSummary *s, const char *uid); +CamelMboxMessageInfo *camel_mbox_summary_index(CamelMboxSummary *, int index); +int camel_mbox_summary_message_count(CamelMboxSummary *); +/* TODO: should be in a utility library */ +int camel_mbox_summary_copy_block(int fromfd, int tofd, off_t readpos, size_t bytes); -#endif /* MBOX_SUMMARY_H */ +#endif /* ! _CAMEL_MBOX_SUMMARY_H */ |