aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-26 05:40:58 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-26 05:40:58 +0800
commit1ead1f0174023636e3dc62f554f8c57749a8ec82 (patch)
tree72821cf8f129393d3598575b189e7a7dc42baa44 /camel/providers
parent60f52f5eaedd302180188c671ab9298b23119930 (diff)
downloadgsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.tar
gsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.tar.gz
gsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.tar.bz2
gsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.tar.lz
gsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.tar.xz
gsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.tar.zst
gsoc2013-evolution-1ead1f0174023636e3dc62f554f8c57749a8ec82.zip
Removed camel-simple-data-wrapper again. Less code to maintain == better
2000-05-25 NotZed <NotZed@HelixCode.com> * Makefile.am (libcamel_la_SOURCES): Removed camel-simple-data-wrapper again. Less code to maintain == better code. * camel-data-wrapper.c (construct_from_stream): Fixes for bug where text attachments dont work. Made data-wrapper concrete for the second time. svn path=/trunk/; revision=3207
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/vee/camel-vee-folder.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/camel/providers/vee/camel-vee-folder.c b/camel/providers/vee/camel-vee-folder.c
index 3d4050cf19..25922ed13f 100644
--- a/camel/providers/vee/camel-vee-folder.c
+++ b/camel/providers/vee/camel-vee-folder.c
@@ -365,6 +365,7 @@ vee_folder_build(CamelVeeFolder *vf, CamelException *ex)
g_free(mi->info.from);
g_free(mi->info.uid);
camel_flag_list_free(&mi->info.user_flags);
+ g_free(mi);
}
}
@@ -416,6 +417,75 @@ vee_folder_build(CamelVeeFolder *vf, CamelException *ex)
}
+/* build query contents for a single folder */
+static void
+vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex)
+{
+ struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
+ GList *node;
+
+ GList *matches, *match;
+ CamelFolder *f = source;
+ CamelVeeMessageInfo *mi;
+ const CamelMessageInfo *info;
+ CamelFlag *flag;
+
+ 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);
+
+ g_free(mi->info.subject);
+ g_free(mi->info.to);
+ g_free(mi->info.from);
+ g_free(mi->info.uid);
+ camel_flag_list_free(&mi->info.user_flags);
+ g_free(mi);
+ i--;
+ }
+ }
+ }
+
+ messages = vf->messages;
+ messages_uid = vf->messages_uid;
+
+ matches = camel_folder_search_by_expression(f, vf->expression, ex);
+ match = matches;
+ while (match) {
+ info = camel_folder_summary_get_by_uid(f, match->data);
+ if (info) {
+ mi = g_malloc0(sizeof(*mi));
+ mi->info.subject = g_strdup(info->subject);
+ mi->info.to = g_strdup(info->to);
+ mi->info.from = g_strdup(info->from);
+ mi->info.uid = g_strdup_printf("%p:%s", f, info->uid);
+ mi->info.flags = info->flags;
+ mi->info.size = info->size;
+ mi->info.date_sent = info->date_sent;
+ mi->info.date_received = info->date_received;
+ flag = info->user_flags;
+ while (flag) {
+ camel_flag_set(&mi->info.user_flags, flag->name, TRUE);
+ flag = flag->next;
+ }
+ mi->info.content = NULL;
+ mi->folder = f;
+ g_ptr_array_add(messages, mi);
+ g_hash_table_insert(messages_uid, mi->info.uid, mi);
+ }
+ match = g_list_next(match);
+ }
+ g_list_free(matches);
+}
+
+
/*
(match-folder "folder1" "folder2")