aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-vee-folder.c
Commit message (Collapse)AuthorAgeFilesLines
* Use the uid rather than vuid for unmatched. Also add the uid to unmatched42001-12-011-4/+34
| | | | | | | | | | | | | | | | | | 2001-11-14 <NotZed@Ximian.com> * camel-vee-folder.c (folder_changed_remove_uid): Use the uid rather than vuid for unmatched. Also add the uid to unmatched if it wasn't in the unmatched_uids table at all. (folder_changed_change): If checking for added, if the new ones dont match, then try to add them to unmatched. Fixes #6893. * camel-folder-summary.c (camel_folder_summary_index): Change lock order, always summary_lock before ref_lock. (camel_folder_summary_array): " (camel_folder_summary_uid): " (camel_folder_summary_remove_uid): " Fixes a deadlock. svn path=/trunk/; revision=14831
* Move all searching operations outside of any locks except subfolder lock,12001-11-031-53/+80
| | | | | | | | | | 2001-11-01 <NotZed@Ximian.com> * camel-vee-folder.c (folder_changed_change): Move all searching operations outside of any locks except subfolder lock, same as build_folder. Fix for #14294. svn path=/trunk/; revision=14571
* If we're not going to search on a changed uid, make sure we change out92001-10-301-1/+3
| | | | | | | | | | 2001-10-29 <NotZed@Ximian.com> * camel-vee-folder.c (folder_changed_change): If we're not going to search on a changed uid, make sure we change out copy still. Fixes #13916. svn path=/trunk/; revision=14386
* More fixing of the license texts.Ettore Perazzoli2001-10-281-12/+11
| | | | svn path=/trunk/; revision=14217
* Finished implementation.72001-10-271-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-27 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (rename_folder): Finished implementation. * providers/local/camel-local-folder.c (local_rename): Implement local rename of folder objects. 2001-10-26 <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_class_init): Hook into rename function. (vee_rename): Implement the veefolder rename function. (camel_vee_folder_class_init): (folder_changed_change): Kill a warning with a cast. * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed event properly, also call parent to do some rename stuff. * camel-store.h: Added a CamelRenameInfo for the rename event. * camel-folder.c (camel_folder_rename): New function to rename a folder object. (camel_folder_class_init): Added a renamed event. (folder_rename): Default impl, set full_name, and set name assuming the dir separator is '/'. * camel-store.c (camel_store_class_init): Added folder_renamed event. (camel_store_rename_folder): Rename an active folder object if we have one, and update the folder table. (rename_folder): Make a default implementation that handles updating the folder tree. svn path=/trunk/; revision=14204
* Remove the stupid warning that should never have been there in the first52001-10-261-13/+42
| | | | | | | | | | | | | | | | | | | | | 2001-10-25 <NotZed@Ximian.com> * camel-search-private.c (utf8_get): Remove the stupid warning that should never have been there in the first place. * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/ * camel-pgp-context.c (pgp_verify): " * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word, append_8bit, rfc2047_encode_word, rfc2184_decode, header_decode_param): " * camel-mime-part-utils.c (convert_buffer, convert_buffer): " * camel-mime-filter-charset.c (reset, complete, filter): " svn path=/trunk/; revision=14113
* Dont do the macro stuff - basically so you can actually debug calls.12001-10-221-1/+1
| | | | | | | | | | | | | | 2001-10-21 <NotZed@Ximian.com> * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so you can actually debug calls. (camel_store_uri_cmp): New function to compare store objects. * camel-vee-folder.c (vee_folder_add_info): oops, dont free the vuid, since its alloca'd now. (folder_changed_change): Kill a compile warning. svn path=/trunk/; revision=13855
* oops, dont free the vuid, since its alloca'd now.12001-10-221-1/+0
| | | | | | | | | 2001-10-21 <NotZed@Ximian.com> * camel-vee-folder.c (vee_folder_add_info): oops, dont free the vuid, since its alloca'd now. svn path=/trunk/; revision=13851
* camel-vee-folder.c (folder_changed_change): Change logic, we always addMichael Zucci2001-10-201-15/+18
| | | | | | | | | | | camel-vee-folder.c (folder_changed_change): Change logic, we always add changed stuff if it now matches, but dont remove it unless its auto-remove, only propagate changes for it. (vee_set_message_flags): Call parent method after doing our work. (vee_set_message_user_flag): Same here. svn path=/trunk/; revision=13803
* Fixes a deadlock. camel-vee-folder.c: (folder_changed_change): Ok, so dontMichael Zucci2001-10-201-2/+1
| | | | | | | | | | Fixes a deadlock. camel-vee-folder.c: (folder_changed_change): Ok, so dont hold the subfolder lock for the whole duration of the changed event, although we probably should, requires a recursive mutex. svn path=/trunk/; revision=13802
* Typo, srlen aint right.Michael Zucci2001-10-191-1/+1
| | | | svn path=/trunk/; revision=13789
* camel-vee-folder.c: (folder_changed_change_uid): Use alloca for vuid, andMichael Zucci2001-10-191-35/+85
| | | | | | | | | | | | | | | camel-vee-folder.c: (folder_changed_change_uid): Use alloca for vuid, and not sprintf(".lengths") (vee_search_by_expression): Dont use sprintf for vuid. (vee_search_by_uids): " (vee_folder_add_info): " (folder_changed_remove_uid): " (folder_changed_change): " (folder_changed_change_uid): Also check folder_unmatched for changed uid's so we properly update/propagate unmatched changes. svn path=/trunk/; revision=13788
* Lock the right lock for unmatched subfolder list stuff. If the sub folder92001-10-191-16/+57
| | | | | | | | | | | | | | | | | | | | | | | 2001-10-19 <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the right lock for unmatched subfolder list stuff. If the sub folder is deleted & part of unmatched, or the last ref to the sub folder is gone from unmatched, blow it away completely from unmatched, but only do it once. (vee_folder_remove_folder): Added arg to kill unmatched unconditionally. Also handle deleted folders, always remove stuff. (folder_changed_change): Lock subfolder lock for entirety of operation, and also check to see if the subfolder is still there before doing any fancy work (incase it got removed while we were waiting to execute). * camel-store.c (camel_store_unsubscribe_folder): If we are unsubscribing from a folder we have loaded, set the folder deleted, as with the delete_folder case. svn path=/trunk/; revision=13786
* Unhook from all events before removing folder.22001-10-131-1/+14
| | | | | | | | | | | | | 2001-10-12 <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from all events before removing folder. (camel_vee_folder_add_folder): Hook onto delete event. (camel_vee_folder_finalise): Unhook from deleted event for suibfolder. (subfolder_deleted): When the folder is deleted, remove it from the vfolder automagically. svn path=/trunk/; revision=13639
* convert the uids list to a subset appropriate for each subfolder before12001-10-121-8/+21
| | | | | | | | | | 2001-10-11 <NotZed@Ximian.com> * camel-vee-folder.c (vee_search_by_uids): convert the uids list to a subset appropriate for each subfolder before trying to search on it. svn path=/trunk/; revision=13607
* Only re-build the folder if we're expunging. Also only clear out the02001-10-111-5/+7
| | | | | | | | | | 2001-10-10 <NotZed@Ximian.com> * camel-vee-folder.c (vee_sync): Only re-build the folder if we're expunging. Also only clear out the changed folders list if we're expungung and everything worked. svn path=/trunk/; revision=13573
* Forgot a little bit of debug.Michael Zucci2001-10-101-1/+1
| | | | svn path=/trunk/; revision=13534
* Implement.92001-10-101-141/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-09 <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (spool_search_by_uids): Implement. * providers/imap/camel-imap-search.c (imap_body_contains): If searching a sub-set of the total message count, then use a UID range to search only specific messages. * camel-vee-folder.c (vee_folder_change_match): Removed. (folder_changed_add_uid): Helper func for changed code. (folder_changed_remove_uid): " (folder_changed_change_uid): " (folder_changed): Rewritten. Supports proper auto-updating of changes, but not removals till a sync occurs. (vee_search_by_uids): Implement. (folder_changed): Changed to call an async threaded function to do the actual folder updating. * camel-folder-summary.c (camel_flag_list_copy): New func to copy a whole list of flags. (camel_tag_list_copy): New func to copy a whole list of flags. * providers/imap/camel-imap-folder.c (imap_search_by_uids): Implement. * providers/local/camel-local-folder.c (local_search_by_uids): Implement. * camel-folder.c (camel_folder_search_by_uids): New function, search a subset of uid's. (search_by_uids): Default impl, return error. svn path=/trunk/; revision=13532
* replace the ever-growing list of gbooleans with a single guint32 forDan Winship2001-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | * camel-folder.h (struct _CamelFolder): replace the ever-growing list of gbooleans with a single guint32 for flags. * camel-folder.c: Update folder flag setting/checking. * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init): * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): * providers/local/camel-spool-folder.c (spool_init, camel_spool_folder_new): * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): * providers/local/camel-local-folder.c (local_init): * providers/imap/camel-imap-folder.c (camel_imap_folder_init, camel_imap_folder_new): * camel-vtrash-folder.c (camel_vtrash_folder_init): * camel-vee-folder.c (camel_vee_folder_init): * camel-digest-folder.c (camel_digest_folder_init): update folder flag setting. svn path=/trunk/; revision=13509
* Emptied VeeStorePrivate, member wasn't used.62001-09-271-11/+19
| | | | | | | | | | | | | | | | | | | | | | 2001-09-26 <NotZed@Ximian.com> * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used. * camel-vee-folder.c (camel_vee_folder_set_expression): Lock changed list separately. (camel_vee_folder_remove_folder): " (camel_vee_folder_set_folders): Use changed_lock for changed list. (vee_refresh_info): Use changed_lock, also just grab the list, reset it in the lock, and do the work unlocked. (vee_sync): Use changed lock for changed list. (folder_changed): ". All this kills a deadlock with sync/expunge. * camel-private.h (CamelVeeFolderPrivate): Added a new lock for the folders-changed list. (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c, thanks to a pedantic. svn path=/trunk/; revision=13163
* Force a refresh of vfolders before storing their count. This essentially12001-09-211-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | 2001-09-21 <NotZed@Ximian.com> * camel-vee-store.c (vee_get_folder_info): Force a refresh of vfolders before storing their count. This essentially makes 'get_folderinfo' refresh all vfolders, so that get-mail works as expected. * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists. (folder_changed): If we're not autoupdating the folder, then add this folder to the list of 'changed' folders for this vfolder. (camel_vee_folder_set_expression): Reset the folders_changed list. (camel_vee_folder_remove_folder): Remove the folder from the folders_changed list. (camel_vee_folder_set_folders): If we have a folder already, but its changed, use this opportunity to update it. (vee_sync): Remove any synced folders from the folders_changed list. (vee_refresh_info): Refresh folder, re-run queries on any changed folders. svn path=/trunk/; revision=13045
* Build the path on the folderinfo.02001-09-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-20 <NotZed@Ximian.com> * providers/local/camel-maildir-store.c (camel_folder_info_new): Build the path on the folderinfo. * providers/local/camel-spool-store.c (get_folder_info): If we have this folder open, then set unread from the folder itself. (get_folder_info): Change the INBOX path to not include the leading /. * providers/local/camel-spool-folder.c (camel_spool_folder_construct): Fix path. (camel_spool_folder_construct): Properly setup the url field when we say we've got a new folder created. * providers/imap/camel-imap-store.c (unsubscribe_folder): Build path on folderinfo. * camel-store.c (camel_folder_info_build_path): Prepend / to path. * camel-vee-folder.c (camel_vee_folder_construct): Use macro for unmatched folder name. (camel_vee_folder_new): " * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched folder name. (vee_delete_folder): " (vee_rename_folder): " (vee_get_folder): Prepend / onto path. (vee_delete_folder): Setup path in folderinfo. (vee_get_folder_info): Fix path in folderinfo. * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for unmatched (internal) name. svn path=/trunk/; revision=13022
* General cleanup of camel debug printfs.92001-09-191-5/+5
| | | | | | | | | | | | | | | | | 2001-09-19 <NotZed@Ximian.com> * General cleanup of camel debug printfs. * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if the error indicates file locking isn't supported on this filesystem. Still return a warning just incase (if its the first time). Might fix a lot of reported bugs. * providers/local/camel-spool-store.c (get_folder_info): Dont include the empty // host part in the uri. This 'breaks' the service lookup. svn path=/trunk/; revision=12973
* If filter inbox is set on the store, and we're opening inbox '', then82001-09-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-18 <NotZed@Ximian.com> * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): If filter inbox is set on the store, and we're opening inbox '', then enable filtering on new messages. * providers/local/camel-local-folder.c (camel_local_folder_construct): After loading the summary, check it, and only abort if that fails. Also maintain the changes count. * providers/local/camel-local-summary.c (camel_local_summary_load): Remove summary_check code from here. (camel_local_summary_check): Sync index/summary here, if we were successful. * providers/local/camel-spool-folder.c (camel_spool_folder_new): If we have filter-new-messages-on-inbox set and we just opened inbox, turn on filtering on this folder. (camel_spool_folder_construct): Keep track of changes for the folder, so that filter-new-messages works right (?) * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX' as the folder name, not the path. * camel-folder-search.c (search_not): Modified patch from <peterw@ximian.com> since the summary is messageinfo's, not strings. ** Ok so the problem with the stuff below is that maildir/spool 'summary_load' throws away all events, including recents, joy eh? * providers/local/camel-maildir-summary.c (maildir_summary_check): Add new messages to the recent changeinfo. * providers/local/camel-spool-summary.c: Mark 'new' message as recent, for later processing if required (i.e. 'filter new messages'). * camel-store.c (construct): new function, cascade up construct method and check for 'filter' param, and set accordingly for any one that might want it. * providers/imap/camel-imap-store.c (construct): map the param_filter_inbox flag to the store->flags as CAMEL_STORE_FILTER_INBOX. * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to filter inbox. * providers/imap/camel-imap-folder.h: Removed do_filtering flag from CamelImapFolder. * providers/imap/camel-imap-folder.c (imap_update_summary): Remove the 'recents' parameter, use the 'changes' parameter instead to convey this info. (camel_imap_folder_changed): Changed for update_summary api change. Now always just emit the changed event if we have any changes to report, filtering code removed, handled upstream. (filter_proc): (filter_free): Removed old filtering code. (camel_imap_folder_new): Set the filter_recent flag on the folder if we're the inbox and filtering of inbox is enabled. * camel-folder.c (folder_changed): If we have 'recent' messages, and are set to filter recents, then freeze the folder and launch a thread to do the processing (or similar if threading not enabled). (thaw): Make sure we emit the changed signal outside of owning the lock and if things have changed. Also, no longer bother downgrading folder_changed events to message_changed events. * camel-folder.h (struct _CamelFolder): Added filter_recent flag -> signifies all recent messages in folder should be filtered. * camel-session.c: (camel_session_thread_msg_new, camel_session_thread_msg_free, camel_session_thread_queue, camel_session_thread_wait): code to handle async operations as part of camel processing. (camel_session_finalise): free thread_lock, destroy thread, active hash, etc. (camel_session_init): init thread, active hash, etc. (camel_session_class_init): Init virtual functions. (session_thread_msg_new, session_thread_msg_free, session_thread_destroy, session_thread_received, session_thread_queue, session_thread_wait): default implementation of session threads stuff. 2001-09-17 <NotZed@Ximian.com> * camel-folder.c (camel_folder_change_info_recent_uid): New function to add a 'recent' uid to the change info. (camel_folder_change_info_clear): Clear recent list. (camel_folder_change_info_free): Free recent list. (camel_folder_change_info_new): Setup recent list. * camel-folder.h: Added a uid_recent item to the folder_changed event data. * providers/local/camel-maildir-store.c (scan_dir): Free new in the right block. * providers/local/camel-local-provider.c: Add local config entries to filter on new messages in spool and maildir provider. * camel-vee-folder.c (vee_folder_construct): Remove the assertion which stops ? in names from being allowed. svn path=/trunk/; revision=12956
* New function, set the complete list of folders on a vfolder, all at once.42001-09-151-19/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-14 <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_set_folders): New function, set the complete list of folders on a vfolder, all at once. (camel_vee_folder_set_expression): If we set the query to be the same thing, dont do anything. * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for this store. * camel-store.c (camel_store_init): Enable vtrash by default via flags. (camel_store_get_trash): REturn NULL if the store doesn't support vtrash. (init_trash): Dont init if store doesn't support vtrash. * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store supports vtrash. 2001-09-13 <NotZed@Ximian.com> * camel-vee-store.c (vee_get_folder_info): Implement. (build_info): Used to build a folder record from the folders hashtable. (vee_delete_folder): Implemented, remove folder from hashtable. (vee_rename_folder): Implemented, remove old folder from hashtable, add new one and rename its guts too. * camel-store.c (camel_store_rename_folder): Do nothing if we're not asked to actually change names. Also dont do the renamed cache check till after we've called the subclass. (camel_store_delete_folder): Call the subclass delete firs,t then make sure the cache is right. * camel-vee-folder.c (vee_folder_construct): Remove support for name?query syntax to setup vfolder. Abort if such syntax is used. (camel_vee_folder_new): Removed code that handles ? syntax, etc. (vee_folder_build_folder): Handle unset expression, treat it as an empty search. (camel_vee_folder_set_expression): Oops, actually set the expression. * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use name?query syntax to setup vfolder, but set the expression directly. Also fixes a small memleak. 2001-09-12 <NotZed@Ximian.com> * camel-store.c (camel_store_delete_folder): Fixed warnings with a cast. (camel_store_rename_folder): " svn path=/trunk/; revision=12854
* Changed so we dont have the list changing under us, just going to the nextNot Zed2001-07-091-2/+3
| | | | | | | | | | | | 2001-07-06 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we dont have the list changing under us, just going to the next node before we call a function that might change the list is potentially dangerous (slight mod of peters fix). Hmm, i think it would've double-unref'd it too(?) svn path=/trunk/; revision=10900
* Move this before the camel_vee_folder_remove_folder because that functionPeter Williams2001-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | 2001-07-05 Peter Williams <peterw@ximian.com> * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the camel_vee_folder_remove_folder because that function modifies p->folders messing up our iteration. (camel_vee_folder_finalise): Don't unref our summary; camel-folder now does this. * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject. * camel-object.c (obj_init): Clear 'destroying'. (camel_object_unref): If 'destroying' then do not send the finalize event and do not call finalize functions. Otherwise, set destroying so just in case we get refed (eg event code) we don't get doubly finalized. svn path=/trunk/; revision=10811
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-3/+3
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* Note: Except for the info_free(), the NULL checks are g_return's. I feltJeffrey Stedfast2001-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 2001-06-18 Jeffrey Stedfast <fejj@ximian.com> Note: Except for the info_free(), the NULL checks are g_return's. I felt that since g_free() handles NULL that our _free() functions should also. * camel-folder.c (camel_folder_change_info_free): Check to make sure that the info pointer isn't NULL. (camel_folder_change_info_change_uid): Same. (camel_folder_change_info_changed): Same. (camel_folder_change_info_remove_uid): Same. (camel_folder_change_info_add_uid): Same. (camel_folder_change_info_build_diff): Same. (camel_folder_change_info_cat): Same. (camel_folder_change_info_add_source): Same. (camel_folder_change_info_add_source_list): Same. (camel_folder_change_info_add_update): Same. (camel_folder_change_info_add_update_list): Same. svn path=/trunk/; revision=10280
* Applied jacob's patches for e-poolv stuff.Not Zed2001-04-261-2/+5
| | | | | | | | 2001-04-26 Not Zed <NotZed@Ximian.com> * Applied jacob's patches for e-poolv stuff. svn path=/trunk/; revision=9571
* merge from evolution-0-10-branch to evolution-0-10-merge-0Not Zed2001-04-051-1/+1
| | | | | | | | 2001-04-05 Not Zed <NotZed@Ximian.com> * merge from evolution-0-10-branch to evolution-0-10-merge-0 svn path=/trunk/; revision=9194
* Not quite finished but checking in for some local frobbing.Not Zed2001-03-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host name info when done ... blah blah. * camel-sasl-kerberos4.c (krb4_challenge): Free host name info after we're done with it. * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name info after we're done with it. * camel-remote-store.c (remote_connect): Free the host name info from get_host after we're finished with it. * camel-service.c (camel_get_host_byname): New function to lookup a name, and still be cancellable. (camel_free_host): And a function to free the structure returned. (camel_service_gethost): Call get_host_byname for this. svn path=/trunk/; revision=9033
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-2/+4
| | | | svn path=/trunk/; revision=9024
* (vee_expunge): Oops, call the class sync, not superclass sync.Michael Zucci2001-03-291-1/+3
| | | | svn path=/trunk/; revision=9006
* Access the folder directly from the message info.Not Zed2001-03-291-92/+95
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Not Zed <NotZed@Ximian.com> * camel-vtrash-folder.c (vtrash_move_messages_to): Access the folder directly from the message info. (vtrash_move_messages_to): I think we also need to call the real move_messages_to, and not try and bypass the lock, since we dont have the lock for that folder. * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so subclasses can get to it. * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you add a vfolder to itself. (folder_changed): (vee_folder_remove_folder): (vee_folder_build_folder): Copy changes before triggering changed events, so we can do them outside of locks. (camel_vee_folder_get_message_folder): Removed function. (camel_vee_folder_hash_folder): Made public (renamed from hash_folder), simply for subclasses (probably not needed). svn path=/trunk/; revision=9004
* Fix a cut n paste bug, we want uid_removed not uid_changed deref, fixesNot Zed2001-03-271-1/+1
| | | | | | | | | 2001-03-27 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we want uid_removed not uid_changed deref, fixes bug #1999. svn path=/trunk/; revision=8973
* Move all of the camel_vee_folder_construct() internals here.Jeffrey Stedfast2001-03-271-5/+24
| | | | | | | | | | | | | | 2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-vee-folder.c (vee_folder_construct): Move all of the camel_vee_folder_construct() internals here. (camel_vee_folder_construct): This function basically becomes a wrapper for vee_folder_construct and also checks to make sure that the UNMATCHED vfodler is constructed otherwise constructs it. (camel_vee_folder_new): Call vee_folder_construct() instead so that we don't get into a dead-lock. svn path=/trunk/; revision=8964
* Use camel_vtrash_folder_new() to create the vtrash folder now.Jeffrey Stedfast2001-03-271-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (init_trash): Use camel_vtrash_folder_new() to create the vtrash folder now. * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for our vTrash folders. * camel-folder.c (camel_folder_copy_messages_to): Don't watch for vtrash folders anymore. (camel_folder_move_messages_to): Same. * camel-vee-folder.c (camel_vee_folder_class_init): Update. (vee_move_messages_to): Rewrite to use the new move API. * camel-filter-driver.c (do_copy): Updated to reflect copy_message_to changes. Create a temporary uid array and use that. (do_move): Same. (camel_filter_driver_filter_message): And again, here... * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Update to the new API. (imap_move_messages_to): Same. (get_uid_set): New function to create a `set' string based on an array of UIDs for use with imap_copy_messages_to. * camel-folder.c (camel_folder_copy_messages_to): Replaces camel_folder_copy_message_to (camel_folder_move_message_to): Replaces camel_folder_move_message_to. svn path=/trunk/; revision=8960
* Added folder_created event here.Not Zed2001-03-271-594/+559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-27 Not Zed <NotZed@Ximian.com> * camel-vee-store.c (vee_get_folder): Added folder_created event here. * camel-vee-folder.c (unmatched_finalise): Removed, moved into main finalise code. (message_changed): Just create a new change entry and promote it to a folder_changed thing. (vee_sync): Always rebuild folder on sync, even when not expunge. (folder_changed): If not autoupdating, make sure we remove any removed entries. (vee_folder_build_folder): (vee_folder_remove_folder): NOP if we're called on folder_unmatched. (vee_search_by_expression): Only search each folder once. Should we also order the result in summary order? 2001-03-20 Not Zed <NotZed@Ximian.com> * camel-store.c (init_trash): Fix calling for vee_folder_new(). * camel-folder-summary.c (camel_folder_summary_remove_index): Optimise slightly, use ptr_array_remove_index rather than have to search for the index by using summary_remove. * camel-vee-folder.h: Removed local member from VeeFolder, since it was never used. * camel-vee-store.c (camel_vee_store_finalise): Setup finalise function. * camel-vee-folder.c (camel_vee_folder_set_expression): New function to set the query of an existing vfolder. (camel_vee_folder_construct): New function for convenience/subclasses. (camel_vee_folder_new): Removed exception parameter, no longer needed (since we dont search yet). (camel_vee_folder_new): Changed to use folder_construct, and no longer raise the folder created signal. (vee_folder_build_folder): Make it return error on exception, so we can work without exceptions. (vee_folder_remove_folder): Use remove index rather than remove_uid, this is ok since we have the summary locked for our own access. (camel_vee_folder_add_folder): Only add the folder to the unmatched private if it is not a private folder. (camel_vee_folder_remove_folder): Only remove the folder from unmatched if it is not private. (vee_expunge): Just call sync with expunge set. (vee_sync): If expunging, also refresh the search. (vee_folder_build_folder): We do our own locking now, removed from callers, also trigger changed events here too (within locks), fixed callers appropriately. (vee_folder_remove_folder): Do our own locking, and trigger changed events. (vee_folder_add_info): Renamed of vee_folder_add, we now take a hash of the folder name, rather than use the folders address. (hash_folder): Convert a folder name into an 8 character hash. (vee_get_message, vee_search_by_expression, vee_set_message_flags, vee_set_message_user_flag, vee_move_message_to): Changed the uid to be an 8 byte hash + original uid, with no ':' anymore. svn path=/trunk/; revision=8957
* Return -1 on fail. (camel_filter_driver_filter_folder): Same.Jeffrey Stedfast2001-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | 2001-03-21 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Return -1 on fail. (camel_filter_driver_filter_folder): Same. (camel_filter_driver_filter_mbox): Same. (camel_filter_driver_filter_folder): Return -1 if an exception was set as well. 2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): Free the expected host. (camel_tcp_stream_openssl_new): Now takes a Service and an expected_host. Set them. svn path=/trunk/; revision=8871
* Don't allow the user to copy a message to or from the vtrash folder. SetJeffrey Stedfast2001-03-141-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.c (camel_folder_copy_message_to): Don't allow the user to copy a message to or from the vtrash folder. Set an exception if they try. (camel_folder_move_message_to): This one is a bit more complicated: 1) If the user tried to move a message from the vtrash into the original folder, just undelete the message. 2) If the user tries to move the message to the vtrash folder, then just mark the message as deleted. 3) If the user tries to move the message from the vTrash to a folder other than the original, use the original folder as the source. As another optimization, I've made it so that if the user tries to move a message to the same folder, just no-op. (move_message_to): Unset the deleted flag before moving (assuming it's there). (copy_message_to): Same. * camel-vee-folder.c (camel_vee_folder_get_message_folder): New convenience function to get the folder from which the message uid is derived from. svn path=/trunk/; revision=8677
* New function to remove a folder from a vfolder.Not Zed2001-03-031-1/+65
| | | | | | | | | | | 2001-03-03 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (vee_folder_remove_folder): New function to remove a folder from a vfolder. (camel_vee_folder_remove_folder): New public function to remove a folder from a vfolder. svn path=/trunk/; revision=8532
* Removed all files.Not Zed2001-02-221-0/+942
2001-02-22 Not Zed <NotZed@Ximian.com> * providers/vee/*: Removed all files. * camel-private.h: Move camel-vee-private.h stuff into here. * camel-session.c: Move the vee_provider here, and initialise it always as part of a session. The vfolder provider is always available. * providers/Makefile.am: Remove "vee" from the build list, now built as part of the main library. * Makefile.am (libcamelinclude_HEADERS): (libcamel_la_SOURCES): Added camel-vee-store.[ch], camel-vee-folder.[ch]. svn path=/trunk/; revision=8340