From d0a6ed17b65560ed07ed005b38fab449dc507aef Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 3 Jun 2002 02:56:35 +0000 Subject: setup/free the mech string. 2002-06-02 Not Zed * camel-sasl.c (camel_sasl_new): (camel_sasl_finalize): setup/free the mech string. * camel-sasl.h: Added 'mech' mechanism string. 2002-06-01 Not Zed * providers/imap/camel-imap-folder.c (imap_getv): Implement. Only the object_description arg. (camel_imap_folder_get_type): Init parent_class holder. * providers/local/camel-local-folder.c (local_getv): Implement, object_description arg. * camel-folder.c (folder_getv): Implement, add a bunch of args you can get -> camel_folder_get_unread_count etc will be going RSN i hope. (camel_folder_finalize): Free cached description string. * camel-object.c (cobject_getv): Implement CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the object. (camel_object_getv): (camel_object_get): (camel_object_setv): (camel_object_set): Take object = void *, to simplify usage. (camel_object_setv): Removed unecessary locals. (camel_object_getv): Same. (camel_object_free): New method, free an arg, upto implementations whether args are static/const or not. (cobject_free): Implement a dummy do nothing free. 2002-05-31 Not Zed * camel-vee-folder.c (camel_vee_folder_get_location): new function to get the real location (folder) (and uid) of a vfolder object. Using the folderinfo, since we already have it, maybe it should use the uid. svn path=/trunk/; revision=17073 --- camel/camel-vee-folder.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'camel/camel-vee-folder.c') diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 11912e3637..2ef25935b8 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -512,6 +512,38 @@ camel_vee_folder_hash_folder(CamelFolder *folder, char buffer[8]) } } +/** + * camel_vee_folder_get_location: + * @vf: + * @vinfo: + * @realuid: if not NULL, set to the uid of the real message, must be + * g_free'd by caller. + * + * Find the real folder (and uid) + * + * Return value: + **/ +CamelFolder * +camel_vee_folder_get_location(CamelVeeFolder *vf, const CamelVeeMessageInfo *vinfo, char **realuid) +{ + /* locking? yes? no? although the vfolderinfo is valid when obtained + the folder in it might not necessarily be so ...? */ + if (CAMEL_IS_VEE_FOLDER(vinfo->folder)) { + CamelFolder *folder; + const CamelVeeMessageInfo *vfinfo; + + vfinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info(vinfo->folder, camel_message_info_uid(vinfo)+8); + folder = camel_vee_folder_get_location((CamelVeeFolder *)vinfo->folder, vfinfo, realuid); + camel_folder_free_message_info(vinfo->folder, (CamelMessageInfo *)vfinfo); + return folder; + } else { + if (realuid) + *realuid = g_strdup(camel_message_info_uid(vinfo)+8); + + return vinfo->folder; + } +} + static void vee_refresh_info(CamelFolder *folder, CamelException *ex) { CamelVeeFolder *vf = (CamelVeeFolder *)folder; -- cgit