From 7dea6c9dc22d7be2f2069bb2372d2df9df2abdd5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 27 Aug 2003 19:50:25 +0000 Subject: implement PERSISTENT_PROPERTIES, for index mode. 2003-08-27 Not Zed * providers/local/camel-local-folder.c (local_getv): implement PERSISTENT_PROPERTIES, for index mode. * camel-object.c (cobject_state_read): Also add property reading, and bump version to 1. (cobject_state_write): add persistent property writing. 2003-08-26 Not Zed * camel-folder.c (folder_getv): chain up properly. * camel-file-utils.c (camel_file_util_savename): helper to create a .#filename filename. * providers/local/camel-local-folder.c (camel_local_folder_construct): init meta-data for local folders. (local_getv): chain up properly, if args are not processed, rather than don't if they aren't. 2003-08-23 Not Zed * camel-object.c (cobject_class_init): added a new event, meta_changed. (camel_object_meta_set, camel_object_meta_get): meta-data api. (camel_object_free_hooks): Free meta-data if it is set on the object. * providers/local/camel-local-folder.c (camel_local_folder_get_type): setup a property list for local folders, just 'index_body' at present. svn path=/trunk/; revision=22388 --- camel/camel-folder.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'camel/camel-folder.c') diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 9a20e81ffd..00106ca86a 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -245,7 +245,7 @@ camel_folder_construct (CamelFolder *folder, CamelStore *parent_store, folder->parent_store = parent_store; if (parent_store) - camel_object_ref (CAMEL_OBJECT (parent_store)); + camel_object_ref(parent_store); folder->name = g_strdup (name); folder->full_name = g_strdup (full_name); @@ -311,7 +311,7 @@ static int folder_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args) { CamelFolder *folder = (CamelFolder *)object; - int i, count=args->argc; + int i; guint32 tag; for (i=0;iargc;i++) { @@ -377,18 +377,17 @@ folder_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args) case CAMEL_FOLDER_ARG_INFO_ARRAY: *arg->ca_ptr = camel_folder_summary_array(folder->summary); break; + case CAMEL_FOLDER_ARG_PROPERTIES: + *arg->ca_ptr = NULL; + break; default: - count--; continue; } arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE; } - if (count) - return parent_class->getv(object, ex, args); - - return 0; + return parent_class->getv(object, ex, args); } static void @@ -408,6 +407,9 @@ folder_free(CamelObject *o, guint32 tag, void *val) case CAMEL_FOLDER_ARG_INFO_ARRAY: camel_folder_summary_array_free(folder->summary, val); break; + case CAMEL_FOLDER_ARG_PROPERTIES: + g_slist_free(val); + break; default: parent_class->free(o, tag, val); } -- cgit v1.2.3