aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.h
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-07-03 02:42:18 +0800
committerPeter Williams <peterw@src.gnome.org>2001-07-03 02:42:18 +0800
commit26b8fe817e4eebb373dfcdbf49b55d971084bf6e (patch)
tree209432ab48a505354ff104be7fc421a12737b593 /mail/mail-folder-cache.h
parenta881f16f9338fd78ef80bbbdb38b2e65675f2d4d (diff)
downloadgsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar
gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.gz
gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.bz2
gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.lz
gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.xz
gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.zst
gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.zip
New file. Protoypes for the Mail Folder Cache, which provides a place for
2001-07-02 Peter Williams <peterw@ximian.com> * mail-folder-cache.h: New file. Protoypes for the Mail Folder Cache, which provides a place for all the disparate pieces of the mailer to save bits of information about a folder. Centralizes the information display code. * mail-folder-cache.c: New file. Implements the Mail Folder Cache. * Makefile.am (evolution_mail_SOURCES): Add the mail-folder-cache.{c,h} * folder-browser-factory.c (fb_get_svi): Copy of that absurdly long-named function in mail-display.c that gets the GNOME_Evolution_ShellView. (control_activate): Set the ShellView for the folder cache. * folder-browser.c (got_folder): Tell the folder browser about this folder. * mail-callbacks.c (create_folders): Tell the folder cache about the new folders. * mail-local.c (reconfigure_folder_reconfigure): Don't unhook our events as we no longer hook them up. (register_folder_registered): Tell the folder cache about this folder's place in the local storage. (register_folder_register): No longer hook events; the Folder Cache will do this. (local_folder_changed, local_folder_changed_proxy): Move to mail-folder-cache.c (free_local_folder): No longer unhook events. * mail-ops.c (do_update_subfolders_rec): Instead of setting the folder status ourselves, inform the Folder Cache about the changes. * mail-tools.c (mail_tool_uri_to_folder): Replace danw's cache with the new Mail Folder Cache. (cache_folder, etc): removed. svn path=/trunk/; revision=10694
Diffstat (limited to 'mail/mail-folder-cache.h')
-rw-r--r--mail/mail-folder-cache.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
new file mode 100644
index 0000000000..dbb4be7fd6
--- /dev/null
+++ b/mail/mail-folder-cache.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* mail-folder-cache.h: Stores information about open folders */
+
+/*
+ * Authors: Peter Williams <peterw@ximian.com>
+ *
+ * Copyright 2000,2001 Ximian, Inc. (www.ximian.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 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.
+ *
+ * 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
+ */
+
+#ifndef _MAIL_FOLDER_CACHE_H
+#define _MAIL_FOLDER_CACHE_H
+
+#include <camel/camel-folder.h>
+#include <camel/camel-store.h>
+#include <shell/evolution-storage.h>
+#include <shell/Evolution.h>
+
+#include "folder-browser.h"
+
+/* No real order that these functions should be called. The idea is that whenever a
+ * chunk of the mailer gets some up-to-date information about a URI, it calls one
+ * of the _note_ functions and the folder cache sees to it that the information is
+ * put to good use.
+ *
+ * Thus there is no way to remove items from the cache. So it leaks a lot.
+ */
+
+void mail_folder_cache_set_update_estorage (const gchar *uri, EvolutionStorage *estorage);
+void mail_folder_cache_set_update_lstorage (const gchar *uri,
+ GNOME_Evolution_LocalStorage lstorage,
+ const gchar *path);
+/* We always update the shell view */
+/*void mail_folder_cache_set_update_shellview (const gchar *uri);*/
+
+void mail_folder_cache_note_folder (const gchar *uri, CamelFolder *folder);
+void mail_folder_cache_note_message_list (const gchar *uri, MessageList *ml);
+void mail_folder_cache_note_folderinfo (const gchar *uri, CamelFolderInfo *fi);
+void mail_folder_cache_note_name (const gchar *uri, const gchar *name);
+
+CamelFolder *mail_folder_cache_try_folder (const gchar *uri);
+
+void mail_folder_cache_set_shell_view (GNOME_Evolution_ShellView sv);
+
+#endif