Commit Graph

43 Commits

Author SHA1 Message Date
4
aa0a82422b Use the uid rather than vuid for unmatched. Also add the uid to unmatched
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
2001-11-30 21:38:05 +00:00
1
da698af7bf Move all searching operations outside of any locks except subfolder lock,
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
2001-11-02 19:33:16 +00:00
9
5eeda56f88 If we're not going to search on a changed uid, make sure we change out
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
2001-10-30 00:24:55 +00:00
4ca07463a0 More fixing of the license texts.
svn path=/trunk/; revision=14217
2001-10-27 18:21:05 +00:00
7
c4d87ba45a Finished implementation.
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
2001-10-27 06:00:34 +00:00
5
5b449d9ca7 Remove the stupid warning that should never have been there in the first
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
2001-10-26 00:37:52 +00:00
1
c435267723 Dont do the macro stuff - basically so you can actually debug calls.
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
2001-10-21 20:27:43 +00:00
1
e563157722 oops, dont free the vuid, since its alloca'd now.
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
2001-10-21 18:18:51 +00:00
6ff3bed14f camel-vee-folder.c (folder_changed_change): Change logic, we always add
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
2001-10-19 21:26:18 +00:00
c8b407def5 Fixes a deadlock. camel-vee-folder.c: (folder_changed_change): Ok, so dont
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
2001-10-19 20:32:22 +00:00
082e4d3c8c Typo, srlen aint right.
svn path=/trunk/; revision=13789
2001-10-19 07:03:50 +00:00
15ce527659 camel-vee-folder.c: (folder_changed_change_uid): Use alloca for vuid, and
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
2001-10-19 06:39:54 +00:00
9
0515ef5e4d Lock the right lock for unmatched subfolder list stuff. If the sub folder
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
2001-10-19 05:33:21 +00:00
2
47d5ddd057 Unhook from all events before removing folder.
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
2001-10-12 22:27:56 +00:00
1
6335fc8ec8 convert the uids list to a subset appropriate for each subfolder before
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
2001-10-11 23:39:08 +00:00
0
12c3606459 Only re-build the folder if we're expunging. Also only clear out the
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
2001-10-10 21:50:42 +00:00
f9a1de69f0 Forgot a little bit of debug.
svn path=/trunk/; revision=13534
2001-10-09 23:13:21 +00:00
9
d5e090651b Implement.
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
2001-10-09 22:26:01 +00:00
5931b31034 replace the ever-growing list of gbooleans with a single guint32 for
* 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
2001-10-09 03:07:39 +00:00
6
88186e014e Emptied VeeStorePrivate, member wasn't used.
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
2001-09-26 20:18:54 +00:00
1
0f0f01c1e0 Force a refresh of vfolders before storing their count. This essentially
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
2001-09-21 05:58:53 +00:00
0
a6aba35df1 Build the path on the folderinfo.
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
2001-09-20 22:58:23 +00:00
9
bef39dc4e0 General cleanup of camel debug printfs.
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
2001-09-19 08:28:36 +00:00
8
8347ce1403 If filter inbox is set on the store, and we're opening inbox '', then
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
2001-09-18 21:43:00 +00:00
4
466e05c024 New function, set the complete list of folders on a vfolder, all at once.
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
2001-09-15 08:12:58 +00:00
7cc3d5f443 Changed so we dont have the list changing under us, just going to the next
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
2001-07-09 01:49:41 +00:00
d0eee48606 Move this before the camel_vee_folder_remove_folder because that function
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
2001-07-05 16:40:45 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
4ca5cdfb10 Note: Except for the info_free(), the NULL checks are g_return's. I felt
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
2001-06-18 21:08:19 +00:00
7d9faeb00c Applied jacob's patches for e-poolv stuff.
2001-04-26  Not Zed  <NotZed@Ximian.com>

        * Applied jacob's patches for e-poolv stuff.

svn path=/trunk/; revision=9571
2001-04-26 01:09:05 +00:00
2ac5b884fe merge from evolution-0-10-branch to evolution-0-10-merge-0
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
2001-04-05 02:31:47 +00:00
554de99b22 Not quite finished but checking in for some local frobbing.
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
2001-03-30 00:31:20 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
1b6fe39a3c (vee_expunge): Oops, call the class sync, not superclass sync.
svn path=/trunk/; revision=9006
2001-03-29 02:10:03 +00:00
90f1194b43 Access the folder directly from the message info.
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
2001-03-29 02:03:06 +00:00
0fc9632e42 Fix a cut n paste bug, we want uid_removed not uid_changed deref, fixes
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
2001-03-27 10:10:16 +00:00
7e4fb782fa Move all of the camel_vee_folder_construct() internals here.
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
2001-03-27 04:35:18 +00:00
efddd51d3b Use camel_vtrash_folder_new() to create the vtrash folder now.
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
2001-03-27 01:41:21 +00:00
1d80d46ed5 Added folder_created event here.
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
2001-03-26 23:10:40 +00:00
0ec6ccc4df Return -1 on fail. (camel_filter_driver_filter_folder): Same.
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
2001-03-21 21:45:26 +00:00
56737afcb1 Don't allow the user to copy a message to or from the vtrash folder. Set
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
2001-03-13 18:59:32 +00:00
ab118da377 New function to remove a folder from a vfolder.
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
2001-03-02 23:37:43 +00:00
c81bce50bb Removed all files.
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
2001-02-21 20:30:29 +00:00