diff options
Diffstat (limited to 'camel/providers/vee')
-rw-r--r-- | camel/providers/vee/.cvsignore | 7 | ||||
-rw-r--r-- | camel/providers/vee/Makefile.am | 37 | ||||
-rw-r--r-- | camel/providers/vee/camel-vee-folder.c | 559 | ||||
-rw-r--r-- | camel/providers/vee/camel-vee-folder.h | 58 | ||||
-rw-r--r-- | camel/providers/vee/camel-vee-provider.c | 52 | ||||
-rw-r--r-- | camel/providers/vee/camel-vee-store.c | 129 | ||||
-rw-r--r-- | camel/providers/vee/camel-vee-store.h | 48 | ||||
-rw-r--r-- | camel/providers/vee/libcamelvee.urls | 1 |
8 files changed, 0 insertions, 891 deletions
diff --git a/camel/providers/vee/.cvsignore b/camel/providers/vee/.cvsignore deleted file mode 100644 index fd6b811c68..0000000000 --- a/camel/providers/vee/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/camel/providers/vee/Makefile.am b/camel/providers/vee/Makefile.am deleted file mode 100644 index 6c0693b02d..0000000000 --- a/camel/providers/vee/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -## Process this file with automake to produce Makefile.in - -libcamelveeincludedir = $(includedir)/camel - - -providerdir = $(pkglibdir)/camel-providers/$(VERSION) - -provider_LTLIBRARIES = libcamelvee.la -provider_DATA = libcamelvee.urls - -INCLUDES = -I.. \ - -I$(srcdir)/.. \ - -I$(top_srcdir)/camel \ - -I$(top_srcdir)/intl \ - -I$(top_srcdir)/libibex \ - -I$(top_srcdir)/e-util \ - -I$(top_srcdir) \ - -I$(includedir) \ - $(GTK_INCLUDEDIR) \ - -DG_LOG_DOMAIN=\"camel-vee-provider\" - -libcamelvee_la_SOURCES = \ - camel-vee-folder.c \ - camel-vee-provider.c \ - camel-vee-store.c - -libcamelveeinclude_HEADERS = \ - camel-vee-folder.h \ - camel-vee-store.h - -libcamelvee_la_LDFLAGS = -version-info 0:0:0 - -libcamelvee_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS) -#libcamelvee_la_LIBADD = $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS) - -EXTRA_DIST = libcamelvee.urls - diff --git a/camel/providers/vee/camel-vee-folder.c b/camel/providers/vee/camel-vee-folder.c deleted file mode 100644 index 2676b34ba0..0000000000 --- a/camel/providers/vee/camel-vee-folder.c +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi <notzed@helixcode.com> - * Jeffrey Stedfast <fejj@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 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 - */ - -#include "camel-exception.h" -#include "camel-vee-folder.h" -#include "camel-folder-summary.h" -#include "camel-mime-message.h" - -#include <string.h> - -/* our message info includes the parent folder */ -typedef struct _CamelVeeMessageInfo { - CamelMessageInfo info; - CamelFolder *folder; -} CamelVeeMessageInfo; - -struct _CamelVeeFolderPrivate { - GList *folders; -}; - -#define _PRIVATE(o) (((CamelVeeFolder *)(o))->priv) - -static void vee_init (CamelFolder *folder, CamelStore *parent_store, - CamelFolder *parent_folder, const gchar *name, - gchar *separator, gboolean path_begins_with_sep, - CamelException *ex); -static void vee_sync (CamelFolder *folder, gboolean expunge, CamelException *ex); - -static GPtrArray *vee_get_uids (CamelFolder *folder); -GPtrArray *vee_get_summary (CamelFolder *folder); - -static gint vee_get_message_count (CamelFolder *folder); -static gint vee_get_unread_message_count (CamelFolder *folder); -static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex); - -static const CamelMessageInfo *vee_get_message_info (CamelFolder *folder, const char *uid); -static GPtrArray *vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex); - -static guint32 vee_get_message_flags (CamelFolder *folder, const char *uid); -static void vee_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set); -static gboolean vee_get_message_user_flag (CamelFolder *folder, const char *uid, const char *name); -static void vee_set_message_user_flag (CamelFolder *folder, const char *uid, const char *name, gboolean value); - - -static void camel_vee_folder_class_init (CamelVeeFolderClass *klass); -static void camel_vee_folder_init (CamelVeeFolder *obj); -static void camel_vee_folder_finalise (GtkObject *obj); - -static void vee_folder_build(CamelVeeFolder *vf, CamelException *ex); -static void vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex); - -static CamelFolderClass *camel_vee_folder_parent; - -enum SIGNALS { - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint -camel_vee_folder_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "CamelVeeFolder", - sizeof (CamelVeeFolder), - sizeof (CamelVeeFolderClass), - (GtkClassInitFunc) camel_vee_folder_class_init, - (GtkObjectInitFunc) camel_vee_folder_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (camel_folder_get_type (), &type_info); - } - - return type; -} - -static void -camel_vee_folder_class_init (CamelVeeFolderClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - CamelFolderClass *folder_class = (CamelFolderClass *) klass; - - camel_vee_folder_parent = gtk_type_class (camel_folder_get_type ()); - - folder_class->init = vee_init; - folder_class->sync = vee_sync; - - folder_class->get_uids = vee_get_uids; - folder_class->free_uids = camel_folder_free_deep; - folder_class->get_summary = vee_get_summary; - folder_class->free_summary = camel_folder_free_nop; - folder_class->get_message = vee_get_message; - - folder_class->get_message_info = vee_get_message_info; - - folder_class->get_message_count = vee_get_message_count; - folder_class->get_unread_message_count = vee_get_unread_message_count; - folder_class->search_by_expression = vee_search_by_expression; - - folder_class->get_message_flags = vee_get_message_flags; - folder_class->set_message_flags = vee_set_message_flags; - folder_class->get_message_user_flag = vee_get_message_user_flag; - folder_class->set_message_user_flag = vee_set_message_user_flag; - - object_class->finalize = camel_vee_folder_finalise; - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -camel_vee_folder_init (CamelVeeFolder *obj) -{ - struct _CamelVeeFolderPrivate *p; - - p = _PRIVATE(obj) = g_malloc0(sizeof(*p)); -} - -static void -camel_vee_folder_finalise (GtkObject *obj) -{ - CamelVeeFolder *vf = (CamelVeeFolder *)obj; - struct _CamelVeeFolderPrivate *p = _PRIVATE(vf); - GList *node; - - node = p->folders; - while (node) { - CamelFolder *f = node->data; - gtk_object_unref((GtkObject *)f); - node = g_list_next(node); - } - - ((GtkObjectClass *)(camel_vee_folder_parent))->finalize((GtkObject *)obj); -} - -/** - * camel_vee_folder_new: - * - * Create a new CamelVeeFolder object. - * - * Return value: A new CamelVeeFolder widget. - **/ -CamelVeeFolder * -camel_vee_folder_new (void) -{ - CamelVeeFolder *new = CAMEL_VEE_FOLDER ( gtk_type_new (camel_vee_folder_get_type ())); - return new; -} - -static void -folder_changed(CamelFolder *sub, int type, CamelVeeFolder *vf) -{ - CamelException *ex; - - ex = camel_exception_new(); - vee_folder_build_folder(vf, sub, ex); - camel_exception_free(ex); - /* FIXME: should only raise follow-on event if the result changed */ - gtk_signal_emit_by_name((GtkObject *)vf, "folder_changed", 0); -} - -/* track flag changes in the summary */ -static void -message_changed(CamelFolder *f, const char *uid, CamelVeeFolder *mf) -{ - const CamelMessageInfo *info; - CamelMessageInfo *vinfo; - CamelFlag *flag; - char *vuid; - - info = camel_folder_get_message_info(f, uid); - - vuid = g_strdup_printf("%p:%s", f, uid); - vinfo = (CamelMessageInfo *)vee_get_message_info((CamelFolder *)mf, vuid); - if (info && vinfo) { - vinfo->flags = info->flags; - camel_flag_list_free(&vinfo->user_flags); - flag = info->user_flags; - while (flag) { - camel_flag_set(&vinfo->user_flags, flag->name, TRUE); - flag = flag->next; - } - gtk_signal_emit_by_name((GtkObject *)mf, "message_changed", vinfo->uid); - } - g_free(vuid); -} - -void -camel_vee_folder_add_folder(CamelVeeFolder *vf, CamelFolder *sub) -{ - struct _CamelVeeFolderPrivate *p = _PRIVATE(vf); - CamelException *ex; - - gtk_object_ref((GtkObject *)sub); - p->folders = g_list_append(p->folders, sub); - - gtk_signal_connect((GtkObject *)sub, "folder_changed", folder_changed, vf); - gtk_signal_connect((GtkObject *)sub, "message_changed", message_changed, vf); - - ex = camel_exception_new(); - vee_folder_build_folder(vf, sub, ex); - camel_exception_free(ex); - /* FIXME: should only raise follow-on event if the result changed */ - gtk_signal_emit_by_name((GtkObject *)vf, "folder_changed", 0); -} - - -static void vee_init (CamelFolder *folder, CamelStore *parent_store, - CamelFolder *parent_folder, const gchar *name, - gchar *separator, gboolean path_begins_with_sep, - CamelException *ex) -{ - CamelVeeFolder *vf = (CamelVeeFolder *)folder; - char *namepart, *searchpart; - - namepart = g_strdup(name); - searchpart = strchr(namepart, '?'); - if (searchpart == NULL) { - /* no search, no result! */ - searchpart = "(body-contains \"=some-invalid_string-sequence=xx\")"; - } else { - *searchpart++ = 0; - } - - camel_vee_folder_parent->init (folder, parent_store, parent_folder, name, separator, TRUE, ex); - if (camel_exception_get_id (ex)) - return; - - folder->can_hold_messages = TRUE; - folder->can_hold_folders = FALSE; - folder->has_summary_capability = TRUE; - folder->has_search_capability = TRUE; - - /* FIXME: what to do about user flags if the subfolder doesn't support them? */ - folder->permanent_flags = CAMEL_MESSAGE_ANSWERED | - CAMEL_MESSAGE_DELETED | - CAMEL_MESSAGE_DRAFT | - CAMEL_MESSAGE_FLAGGED | - CAMEL_MESSAGE_SEEN; - - vf->messages = g_ptr_array_new(); - vf->messages_uid = g_hash_table_new(g_str_hash, g_str_equal); - - vf->expression = g_strdup_printf("(or\n (match-all (user-flag \"%s\"))\n %s\n)", namepart, searchpart); - vf->vname = g_strdup(namepart); - - g_free(namepart); - - vee_folder_build(vf, ex); -} - -static void -vee_sync (CamelFolder *folder, gboolean expunge, CamelException *ex) -{ - ; -} - -static gint vee_get_message_count (CamelFolder *folder) -{ - CamelVeeFolder *vf = (CamelVeeFolder *)folder; - - return vf->messages->len; -} - -static gint -vee_get_unread_message_count (CamelFolder *folder) -{ - CamelVeeFolder *vee_folder = CAMEL_VEE_FOLDER (folder); - CamelMessageInfo *info; - GPtrArray *infolist; - gint i, count = 0; - - g_return_val_if_fail (folder != NULL, -1); - - infolist = vee_folder->messages; - - for (i = 0; i < infolist->len; i++) { - info = (CamelMessageInfo *) g_ptr_array_index (infolist, i); - if (!(info->flags & CAMEL_MESSAGE_SEEN)) - count++; - } - - return count; -} - -static gboolean -get_real_message (CamelFolder *folder, const char *uid, - CamelFolder **out_folder, const char **out_uid) -{ - CamelVeeMessageInfo *mi; - - mi = (CamelVeeMessageInfo *)vee_get_message_info(folder, uid); - g_return_val_if_fail (mi != NULL, FALSE); - - *out_folder = mi->folder; - *out_uid = strchr(mi->info.uid, ':')+1; - return TRUE; -} - -static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex) -{ - const char *real_uid; - CamelFolder *real_folder; - - if (!get_real_message (folder, uid, &real_folder, &real_uid)) { - camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, - "No such message %s in %s", uid, - folder->name); - return NULL; - } - - return camel_folder_get_message (real_folder, real_uid, ex); -} - -GPtrArray *vee_get_summary (CamelFolder *folder) -{ - CamelVeeFolder *vf = (CamelVeeFolder *)folder; - - return vf->messages; -} - -static const CamelMessageInfo *vee_get_message_info (CamelFolder *f, const char *uid) -{ - CamelVeeFolder *vf = (CamelVeeFolder *)f; - - return g_hash_table_lookup(vf->messages_uid, uid); -} - -static GPtrArray *vee_get_uids (CamelFolder *folder) -{ - GPtrArray *result; - int i; - CamelVeeFolder *vf = (CamelVeeFolder *)folder; - - result = g_ptr_array_new (); - g_ptr_array_set_size (result, vf->messages->len); - for (i=0;i<vf->messages->len;i++) { - CamelMessageInfo *mi = g_ptr_array_index(vf->messages, i); - result->pdata[i] = g_strdup(mi->uid); - } - - return result; -} - -static GPtrArray * -vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex) -{ - GList *node; - GPtrArray *matches, *result = g_ptr_array_new (); - char *expr; - CamelVeeFolder *vf = (CamelVeeFolder *)folder; - struct _CamelVeeFolderPrivate *p = _PRIVATE(vf); - - expr = g_strdup_printf("(and %s %s)", vf->expression, expression); - node = p->folders; - while (node) { - CamelFolder *f = node->data; - int i; - - matches = camel_folder_search_by_expression(f, expression, ex); - for (i = 0; i < matches->len; i++) { - char *uid = matches->pdata[i]; - g_ptr_array_add(result, g_strdup_printf("%p:%s", f, uid)); - } - g_ptr_array_add (matches, NULL); - g_strfreev((char **)matches->pdata); - g_ptr_array_free(matches, FALSE); - node = g_list_next(node); - } - return result; -} - -static guint32 -vee_get_message_flags(CamelFolder *folder, const char *uid) -{ - const char *real_uid; - CamelFolder *real_folder; - - if (!get_real_message (folder, uid, &real_folder, &real_uid)) - return 0; - - return camel_folder_get_message_flags(real_folder, real_uid); -} - -static void -vee_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, - guint32 set) -{ - const char *real_uid; - CamelFolder *real_folder; - - if (!get_real_message (folder, uid, &real_folder, &real_uid)) - return; - - camel_folder_set_message_flags(real_folder, real_uid, flags, set); -} - -static gboolean -vee_get_message_user_flag(CamelFolder *folder, const char *uid, - const char *name) -{ - const char *real_uid; - CamelFolder *real_folder; - - if (!get_real_message (folder, uid, &real_folder, &real_uid)) - return FALSE; - - return camel_folder_get_message_user_flag(real_folder, real_uid, name); -} - -static void -vee_set_message_user_flag(CamelFolder *folder, const char *uid, - const char *name, gboolean value) -{ - const char *real_uid; - CamelFolder *real_folder; - - if (!get_real_message (folder, uid, &real_folder, &real_uid)) - return; - - return camel_folder_set_message_user_flag(real_folder, real_uid, name, value); -} - - -/* - need incremental update, based on folder. - Need to watch folders for changes and update accordingly. -*/ - -/* this does most of the vfolder magic */ -static void -vee_folder_build(CamelVeeFolder *vf, CamelException *ex) -{ - struct _CamelVeeFolderPrivate *p = _PRIVATE(vf); - GList *node; - - GPtrArray *messages; - GHashTable *messages_uid; - - { - int i; - - for (i=0;i<vf->messages->len;i++) { - CamelMessageInfo *mi = g_ptr_array_index(vf->messages, i); - camel_message_info_free(mi); - } - } - - messages = g_ptr_array_new(); - messages_uid = g_hash_table_new(g_str_hash, g_str_equal); - - node = p->folders; - while (node) { - GPtrArray *matches; - CamelFolder *f = node->data; - CamelVeeMessageInfo *mi; - const CamelMessageInfo *info; - int i; - - matches = camel_folder_search_by_expression(f, vf->expression, ex); - for (i = 0; i < matches->len; i++) { - info = camel_folder_get_message_info(f, matches->pdata[i]); - if (info) { - mi = g_malloc0(sizeof(*mi)); - camel_message_info_dup_to(info, (CamelMessageInfo *)mi); - g_free (mi->info.uid); - mi->info.uid = g_strdup_printf("%p:%s", f, info->uid); - mi->folder = f; - g_ptr_array_add(messages, mi); - g_hash_table_insert(messages_uid, mi->info.uid, mi); - } - } - g_ptr_array_add (matches, NULL); - g_strfreev((char **)matches->pdata); - g_ptr_array_free(matches, FALSE); - node = g_list_next(node); - } - - g_ptr_array_free(vf->messages, TRUE); - vf->messages = messages; - g_hash_table_destroy(vf->messages_uid); - vf->messages_uid = messages_uid; -} - - -/* build query contents for a single folder */ -static void -vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex) -{ - GPtrArray *matches; - CamelFolder *f = source; - CamelVeeMessageInfo *mi; - const CamelMessageInfo *info; - - GPtrArray *messages; - GHashTable *messages_uid; - int i; - - for (i=0;i<vf->messages->len;i++) { - CamelVeeMessageInfo *mi = g_ptr_array_index(vf->messages, i); - if (mi->folder == source) { - g_hash_table_remove(vf->messages_uid, mi->info.uid); - g_ptr_array_remove_index_fast(vf->messages, i); - - camel_message_info_free((CamelMessageInfo *)mi); - i--; - } - } - - messages = vf->messages; - messages_uid = vf->messages_uid; - - matches = camel_folder_search_by_expression(f, vf->expression, ex); - for (i = 0; i < matches->len; i++) { - info = camel_folder_get_message_info(f, matches->pdata[i]); - if (info) { - mi = g_malloc0(sizeof(*mi)); - camel_message_info_dup_to(info, (CamelMessageInfo*)mi); - g_free (mi->info.uid); - mi->info.uid = g_strdup_printf("%p:%s", f, info->uid); - mi->folder = f; - g_ptr_array_add(messages, mi); - g_hash_table_insert(messages_uid, mi->info.uid, mi); - } - } - g_ptr_array_add (matches, NULL); - g_strfreev((char **)matches->pdata); - g_ptr_array_free(matches, FALSE); -} - - -/* - - (match-folder "folder1" "folder2") - - */ diff --git a/camel/providers/vee/camel-vee-folder.h b/camel/providers/vee/camel-vee-folder.h deleted file mode 100644 index ea2a82a25b..0000000000 --- a/camel/providers/vee/camel-vee-folder.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * 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 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 _CAMEL_VEE_FOLDER_H -#define _CAMEL_VEE_FOLDER_H - -#include <gtk/gtk.h> -#include <camel/camel-folder.h> - -#define CAMEL_VEE_FOLDER(obj) GTK_CHECK_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder) -#define CAMEL_VEE_FOLDER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_vee_folder_get_type (), CamelVeeFolderClass) -#define IS_CAMEL_VEE_FOLDER(obj) GTK_CHECK_TYPE (obj, camel_vee_folder_get_type ()) - -typedef struct _CamelVeeFolder CamelVeeFolder; -typedef struct _CamelVeeFolderClass CamelVeeFolderClass; - -struct _CamelVeeFolder { - CamelFolder parent; - - struct _CamelVeeFolderPrivate *priv; - - char *expression; /* query expression */ - char *vname; /* local name */ - CamelFolder *local; /* local storage for folder */ - - /* FIXME: Move this to a summary object??? */ - GPtrArray *messages; /* message info's */ - GHashTable *messages_uid; -}; - -struct _CamelVeeFolderClass { - CamelFolderClass parent_class; -}; - -guint camel_vee_folder_get_type (void); -CamelVeeFolder *camel_vee_folder_new (void); - -void camel_vee_folder_add_folder(CamelVeeFolder *vf, CamelFolder *sub); - -#endif /* ! _CAMEL_VEE_FOLDER_H */ diff --git a/camel/providers/vee/camel-vee-provider.c b/camel/providers/vee/camel-vee-provider.c deleted file mode 100644 index e36e7fcff1..0000000000 --- a/camel/providers/vee/camel-vee-provider.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * 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 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 - */ - -#include "config.h" -#include "camel-vee-store.h" -#include "camel-provider.h" -#include "camel-session.h" -#include "camel-url.h" - -static CamelProvider vee_provider = { - "vfolder", - "Virtual folder email provider", - - "For reading mail as a query of another set of folders", - - "vfolder", - - 0, - - { 0, 0 }, - - NULL -}; - -void -camel_provider_module_init (CamelSession *session) -{ - vee_provider.object_types[CAMEL_PROVIDER_STORE] = - camel_vee_store_get_type(); - - vee_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); - - camel_session_register_provider (session, &vee_provider); -} diff --git a/camel/providers/vee/camel-vee-store.c b/camel/providers/vee/camel-vee-store.c deleted file mode 100644 index 4b1fc3f23b..0000000000 --- a/camel/providers/vee/camel-vee-store.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * 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 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 - */ - -#include "camel-vee-store.h" -#include "camel-vee-folder.h" - -static CamelFolder *vee_get_folder (CamelStore *store, const char *folder_name, gboolean create, CamelException *ex); -static char *vee_get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex); - -struct _CamelVeeStorePrivate { -}; - -#define _PRIVATE(o) (((CamelVeeStore *)(o))->priv) - -static void camel_vee_store_class_init (CamelVeeStoreClass *klass); -static void camel_vee_store_init (CamelVeeStore *obj); -static void camel_vee_store_finalise (GtkObject *obj); - -static CamelStoreClass *camel_vee_store_parent; - -enum SIGNALS { - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint -camel_vee_store_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "CamelVeeStore", - sizeof (CamelVeeStore), - sizeof (CamelVeeStoreClass), - (GtkClassInitFunc) camel_vee_store_class_init, - (GtkObjectInitFunc) camel_vee_store_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (camel_store_get_type (), &type_info); - } - - return type; -} - -static void - -camel_vee_store_class_init (CamelVeeStoreClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - CamelStoreClass *store_class = (CamelStoreClass *) klass; - - camel_vee_store_parent = gtk_type_class (camel_store_get_type ()); - - /* virtual method overload */ - store_class->get_folder = vee_get_folder; - store_class->get_folder_name = vee_get_folder_name; - - object_class->finalize = camel_vee_store_finalise; - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -camel_vee_store_init (CamelVeeStore *obj) -{ - struct _CamelVeeStorePrivate *p; - - p = _PRIVATE(obj) = g_malloc0(sizeof(*p)); -} - -static void -camel_vee_store_finalise (GtkObject *obj) -{ - ((GtkObjectClass *)(camel_vee_store_parent))->finalize((GtkObject *)obj); -} - -/** - * camel_vee_store_new: - * - * Create a new CamelVeeStore object. - * - * Return value: A new CamelVeeStore widget. - **/ -CamelVeeStore * -camel_vee_store_new (void) -{ - CamelVeeStore *new = CAMEL_VEE_STORE ( gtk_type_new (camel_vee_store_get_type ())); - return new; -} - -static CamelFolder * -vee_get_folder (CamelStore *store, const char *folder_name, gboolean create, CamelException *ex) -{ - CamelFolder *folder; - - folder = gtk_type_new (camel_vee_folder_get_type()); - - ((CamelFolderClass *)((GtkObject *)folder)->klass)->init (folder, store, NULL, folder_name, "/", TRUE, ex); - return folder; -} - -static char * -vee_get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex) -{ - return g_strdup(folder_name); -} - diff --git a/camel/providers/vee/camel-vee-store.h b/camel/providers/vee/camel-vee-store.h deleted file mode 100644 index 848769296a..0000000000 --- a/camel/providers/vee/camel-vee-store.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * 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 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 _CAMEL_VEE_STORE_H -#define _CAMEL_VEE_STORE_H - -#include <gtk/gtk.h> -#include <camel/camel-store.h> - -#define CAMEL_VEE_STORE(obj) GTK_CHECK_CAST (obj, camel_vee_store_get_type (), CamelVeeStore) -#define CAMEL_VEE_STORE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_vee_store_get_type (), CamelVeeStoreClass) -#define IS_CAMEL_VEE_STORE(obj) GTK_CHECK_TYPE (obj, camel_vee_store_get_type ()) - -typedef struct _CamelVeeStore CamelVeeStore; -typedef struct _CamelVeeStoreClass CamelVeeStoreClass; - -struct _CamelVeeStore { - CamelStore parent; - - struct _CamelVeeStorePrivate *priv; -}; - -struct _CamelVeeStoreClass { - CamelStoreClass parent_class; -}; - -guint camel_vee_store_get_type (void); -CamelVeeStore *camel_vee_store_new (void); - -#endif /* ! _CAMEL_VEE_STORE_H */ diff --git a/camel/providers/vee/libcamelvee.urls b/camel/providers/vee/libcamelvee.urls deleted file mode 100644 index 6fa58dadb5..0000000000 --- a/camel/providers/vee/libcamelvee.urls +++ /dev/null @@ -1 +0,0 @@ -vfolder |