Commit Graph

1410 Commits

Author SHA1 Message Date
7cd517dc60 Implemented nntp_folder_search_by_expression and nntp_folder_search_free.
2001-07-02  Sam Creasey <sammy@oh.verio.com>

        * providers/nntp/camel-nntp-folder.c: Implemented
        nntp_folder_search_by_expression and
        nntp_folder_search_free.  Basic search functionality e.g. unread
        marking now works for NNTP folders.

        * camel_filter_search.c (get_size): Added get-size sexp directive
        to get the size of a message for filters.

        * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
        Always check with the NNTP server after summary load -- this
        function now always expires old summary entries and syncs with
        the news server.

        * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
        Only fetch headers for articles not already logged in
        the summary file.

        * providers/nntp/camel-nntp-grouplist.c
        (camel_nntp_get_grouplist_from_*): change from g_list_append()
        to g_list_prepend() + g_list_reverse.  Traversing 40,000
        element linked lists sucks.

        * providers/nntp/camel-nntp-store.c (camel_nntp_command):
        Should the NNTP connection die with
        CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
        attempt.  Timing out the NNTP link is less painful this way.

svn path=/trunk/; revision=10716
2001-07-03 02:54:06 +00:00
e28ff48d57 Add comment noting that Camel actually exists now :-)
2001-07-02  Peter Williams  <peterw@ximian.com>

	* README (Introduction): Add comment noting that Camel actually
	exists now :-)

svn path=/trunk/; revision=10696
2001-07-02 18:55:54 +00:00
faac871501 new method to get an application-initialized filter driver.
* camel-session.c (camel_session_get_filter_driver): new method to
	get an application-initialized filter driver.

	* camel-filter-driver.c (camel_filter_driver_new): Remove the
	get_folder function and data args from here...
	(camel_filter_driver_set_folder_func): ...and add this function to
	set/change them.

	* providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
	this folder is INBOX and we're filtering INBOX, set a flag on the
	folder for later.
	(imap_update_summary): Add another argument (GPtrArray *recents),
	and if it's non-NULL, add the uids of any \Recent new messages to
	it.
	(camel_imap_folder_changed): If doing filtering in this folder,
	create a recents array and pass it to imap_update_summary. Then
	get a filter driver and use it to filter the recent messages.

	* providers/imap/camel-imap-summary.h:
	* providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
	support for the \Recent flag.

	* providers/imap/camel-imap-provider.c (imap_conf_entries): enable
	the "filter" option.

	* camel-types.h: add CamelFilterDriver typedef here

svn path=/trunk/; revision=10681
2001-07-02 15:03:49 +00:00
06b7f5ef95 properly return error if we can't create pipes.
2001-07-02  Not Zed  <NotZed@Ximian.com>

        * camel-lock-client.c (camel_lock_helper_init): properly return
        error if we can't create pipes.

svn path=/trunk/; revision=10677
2001-07-02 13:59:39 +00:00
7a68209879 re-enable html indexing.
2001-07-02  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c (summary_build_content_info): re-enable
        html indexing.

        * camel-mime-filter-html.c: Completely re-implemented using a
        custom parser.

svn path=/trunk/; revision=10676
2001-07-02 13:32:55 +00:00
fe8b682289 Change a camel_exception_clear to camel_exception_init to fix a
* tests/misc/url.c (main): Change a camel_exception_clear to
	camel_exception_init to fix a sometimes-crash

svn path=/trunk/; revision=10675
2001-07-02 13:06:56 +00:00
e64a02be08 Added Originator: header as a header to look for when looking for the
2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c: Added Originator: header as a header to look
	for when looking for the mailing list.

svn path=/trunk/; revision=10603
2001-06-29 18:24:30 +00:00
f57c621992 Build the test-crlf test program.
2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/mime-filter/Makefile.am: Build the test-crlf test program.

	* tests/mime-filter/test-crlf.c: New test suite for the crlf
	filter.

	* camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
	decode dots.

svn path=/trunk/; revision=10602
2001-06-29 18:09:45 +00:00
3d8a94b125 ssh
svn path=/trunk/; revision=10592
2001-06-29 06:23:57 +00:00
6ffa930086 Add a CamelMimeFilterStripHeader that removes a header from mime output. Used
by sendmail to strip the BCC from the email while still sending to the BCC
recipients.

camel:

2001-06-28  Peter Williams  <peterw@ximian.com>

        * camel-mime-filter-stripheader.c: New file. Filter that strips a
        header from mime output.

        * camel-mime-filter-stripheader.h: New file. Header for the above.

        * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader
        filter to remove the "Bcc" header.

        * Makefile.am: Add the stripheader files.

        * tests/lib/Makefile.am (INCLUDES): Get this to compile again.

        * tests/mime-filter/test-stripheader.c: New file. Test suite for
        the CamelMimeFilterStripHeader.

        * tests/mime-filter/Makefile.am: New test section: mime filters.

mail:

2001-06-28  Peter Williams  <peterw@ximian.com>

        * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal;
        this unsets the BCC recipients and so doesn't send to the Bcc'd
        people at all.

svn path=/trunk/; revision=10576
2001-06-28 20:35:43 +00:00
b7e09293e9 Fix a memory leak. Also if the decoded value is NULL, that means it wasn't
2001-06-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_decode_param_list): Fix a memory
	leak. Also if the decoded value is NULL, that means it wasn't
	encoded so we don't want to toss the old value.
	(header_param_list_format_append): Correctly wrap long parameter
	values according to rfc2184.

svn path=/trunk/; revision=10566
2001-06-28 16:52:23 +00:00
a357fc5b44 If the folder is frozen, don't refresh, just record that we need to do it
* providers/imap/camel-imap-folder.c (imap_refresh_info): If the
	folder is frozen, don't refresh, just record that we need to do it
	later.
	(imap_append_online): If the APPEND doesn't trigger an immediate
	EXISTS response (because the folder isn't the selected folder, or
	because the server doesn't do that until the next command), call
	imap_refresh_info on the folder.
	(imap_copy_online): Likewise. (Replacing the unconditional NOOP
	that was there before, which absolutely killed filter performance
	by forcing the IMAP provider to switch back and forth between
	folders after every copy or move.)
	(imap_thaw): If the folder needs a refresh, do it.

	* camel-folder.c (camel_folder_is_frozen): New method

svn path=/trunk/; revision=10565
2001-06-28 16:50:09 +00:00
3797918d01 Initialize the private send_lock. (camel_transport_finalize): Free the
2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-transport.c (camel_transport_init): Initialize the private
	send_lock.
	(camel_transport_finalize): Free the private send_lock.
	(camel_transport_get_type): Set the init and finalize functions.
	(camel_transport_send): Lock the transport.
	(camel_transport_send_to): Same.

	* camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.

svn path=/trunk/; revision=10547
2001-06-27 22:43:00 +00:00
5a223c85b9 Updated to match the current API.
2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/folder/test9.c (main): Updated to match the current API.

	* tests/folder/test3.c: #include <gtk/gtk.h> since we use
	gtk_init().

svn path=/trunk/; revision=10546
2001-06-27 22:21:05 +00:00
016826bc8a Use the new header_address_fold.
2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-internet-address.c
	(camel_internet_address_encode_address): Use the new
	header_address_fold.

	* camel-mime-utils.c: Removed some old #if 0'd code of mine.
	(rfc2047_encode_word): If enclen is 0, don't write an encoded word
	token (=?iso-8859-7?Q??= would be an invalid token).
	(header_address_fold): New function to wrap address headers -
	header_fold() was force-wrapping rfc2047 encoded words which was
	making the test suite fail. The *real* solution, however, is to
	not create rfc2047 encoded words longer than 72 chars.

svn path=/trunk/; revision=10545
2001-06-27 22:14:20 +00:00
2d93db72a0 Since we want an error opening a folder to result in the message being
2001-06-26  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-driver.c (open_folder): Since we want an error
	opening a folder to result in the message being copied to Inbox
	(assuming no other filters get a chance to `move` it), don't
	record any exceptions that may occur in this function.

svn path=/trunk/; revision=10515
2001-06-26 22:45:16 +00:00
4fb01ff2ff lock the cache around accesses
* providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
	imap_append_offline, imap_append_online,
	camel_imap_folder_changed): lock the cache around accesses

	* providers/imap/camel-imap-store.c (get_folder_online): ref the
	newly-created folder (as current_folder) before calling
	camel_imap_folder_selected, in case that needs to do something
	that causes another folder to become current...

svn path=/trunk/; revision=10509
2001-06-26 19:20:01 +00:00
9dfc5f64b5 D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/
* camel-service.c (camel_service_get_url): D'oh.
        s/FALSE/CAMEL_URL_HIDE_PASSWORD/

svn path=/trunk/; revision=10505
2001-06-26 17:50:48 +00:00
9d51a76fa1 constify args
* camel-url.c (camel_url_encode): constify args

svn path=/trunk/; revision=10503
2001-06-26 16:50:46 +00:00
48d1ac7ba4 constify args
* camel-url.c (camel_url_encode): constify args

svn path=/trunk/; revision=10501
2001-06-26 16:14:10 +00:00
3570cc5bbf g_strdup() the message source here or we will have problems later when we
2001-06-25  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-search.c (get_source): g_strdup() the message
	source here or we will have problems later when we go to free the
	result ;-)

svn path=/trunk/; revision=10498
2001-06-26 00:18:23 +00:00
834e3b7f7e Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a
* providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
	doesn't allow an extra argument to AUTHENTICATE to avoid a useless
	round trip like some other SASL bindings do.

	* providers/imap/camel-imap-command.c (imap_read_response): Deal
	with IMAP servers that (incorrectly) return "+\r\n" rather than
	"+ \r\n" for an empty continuation response.
	(camel_imap_response_extract_continuation): Likewise.

svn path=/trunk/; revision=10480
2001-06-25 15:40:30 +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
34bc515362 New function that decides if 2 word types are mergeable. An atom and a
2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (word_types_compatable): New function that
	decides if 2 word types are mergeable. An atom and a qstring are
	mergeable; 2 qstrings are mergeable; and 2 encoded words are
	mergeable.
	(header_encode_phrase_merge_words): If 2 words are merged, the new
	word type is the MAX of the combined types. This means that if we
	merge a qstring and an atom, the resulting word type is a
	qstring.

	* camel-internet-address.c (internet_format):
	s/g_string_sprintfa/g_string_append since this makes more sense in
	this particular case.
	(internet_encode): Same here.

svn path=/trunk/; revision=10377
2001-06-21 19:53:47 +00:00
1b2f9e9c12 Use camel_address_length() rather than casting and accessing data members.
2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_send): Use
	camel_address_length() rather than casting and accessing data
	members.

svn path=/trunk/; revision=10365
2001-06-21 17:19:00 +00:00
fcc4195845 If the first char of the mailing-list name is '<', chop it off to make
2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_raw_check_mailing_list): If the first
	char of the mailing-list name is '<', chop it off to make Ettore
	happy. Fixes bug #2153.

svn path=/trunk/; revision=10347
2001-06-20 19:46:58 +00:00
a49a5bdcf4 updated .cvsignore to ignore camel-lock-helper
svn path=/trunk/; revision=10297
2001-06-19 18:51:01 +00:00
ea61a81256 Fixed a bug when not running setuid it wouldn't unlock.
2001-06-19  Not Zed  <NotZed@Ximian.com>

        * camel-lock-helper.c (unlock_id): Fixed a bug when not running
        setuid it wouldn't unlock.

        * camel-movemail.c (camel_movemail): use new
        locking daemon, also return an error code.

svn path=/trunk/; revision=10287
2001-06-19 14:21:05 +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
a0c711d6c4 Remove DB3_LDADD
* tests/stream/Makefile.am (LDADD):
	* tests/smime/Makefile.am (LDADD):
	* tests/misc/Makefile.am (LDADD):
	* tests/message/Makefile.am (LDADD):
	* tests/folder/Makefile.am (LDADD): Remove DB3_LDADD

svn path=/trunk/; revision=10272
2001-06-18 20:07:35 +00:00
a53478f0bf Set camel-lock-help setgid or setuid as needed
* Makefile.am (install-exec-local): Set camel-lock-help setgid or
	setuid as needed

svn path=/trunk/; revision=10267
2001-06-18 18:17:19 +00:00
e905364bee Only create a missing uid if we have indexing turned on.
2001-06-18  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c
        (camel_folder_summary_info_new_from_parser): Only create a missing
        uid if we have indexing turned on.

        * camel-lock-helper.c (setup_process): Function to setup
        process/sanity/security checks.  Change to the real uid as soon as
        we can.
        (lock_path): First try to lock as the real uid, if that fails, try
        the root uid.
        (unlock_id): Unlock as the uid we created the lock as.

        * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
        location.

        * providers/local/camel-spool-folder.c (spool_lock): Implemented,
        using lock helper locking.  Need to work out if the locking
        requires a root created lock?
        (spool_unlock): Likewise.

2001-06-15  Not Zed  <NotZed@Ximian.com>

        * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
        .locks, keeping them active, removing them, etc.  What real perms it
        needs is a little system dependent.

2001-06-14  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-maildir-store.c (get_folder_info): Implement.
        (scan_dir): Does the work of scanning for maildir directories.

2001-06-13  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-store.c (get_folder_info):
        Implemented, just returns a hardcoded INBOX folder.
        (free_folder_info): implemented, free's the 1 possible level of
        folder info.

        * providers/local/camel-spool-folder.c
        (camel_spool_folder_construct): Set the real unread message
        count on the folder_created thing.

svn path=/trunk/; revision=10261
2001-06-18 14:36:44 +00:00
b0bac93a1e Return the largest real UID in the cache (as an integer). Eventually to be
* providers/imap/camel-imap-message-cache.c
	(camel_imap_message_cache_max_uid): Return the largest real UID in
	the cache (as an integer). Eventually to be used for an
	optimization in the new-message fetch code.
	(cache_put): Keep track of max_uid.

svn path=/trunk/; revision=10254
2001-06-15 18:47:04 +00:00
9a52bdf0d1 Added Mailing-List header regex so that we can do mlist magic on that
2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c: Added Mailing-List header regex so that we
	can do mlist magic on that header.

svn path=/trunk/; revision=10242
2001-06-14 22:32:35 +00:00
b1359d0e45 Properly handle correct and incorrect (for the common case, ie Outlook and
2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_decode_param): Properly handle
	correct and incorrect (for the common case, ie Outlook and
	Netscape/Mozilla) rfc2184 values.
	(header_decode_rfc2184_param): Get the param name and see if we
	should expect a rfc2184 parameter value.
	(rfc2184_decode): Decode a rfc2184 value.
	(hex_decode): hex decode a string.
	(header_decode_param_list): Handle rfc2184 encoded parameters (ie
	parameters that have been split and perhaps encoded).
	(header_param_list_format_append): Encode the value before seeing
	if it will fit on the line. If the value does get encoded, be sure
	to put a '*' before the equal-sign.
	(header_encode_param): New function to rfc2184 encode a parameter
	value (maybe it should be renamed?)

apparently with my last commit, I had also commit'd this but didn't realise it.

svn path=/trunk/; revision=10241
2001-06-14 22:24:59 +00:00
9df60c5c8f Don't try to format the Reply-To header - we don't want to wrap the
2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part.c (init_header_name_table): Don't try to format
	the Reply-To header - we don't want to wrap the reply-to address.

svn path=/trunk/; revision=10231
2001-06-14 17:16:33 +00:00
f14e85f771 A new provider, for spool mailboxes. Mostly a cut and paste of the mbox
2001-06-12  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-*.[ch]: A new provider, for spool
        mailboxes.  Mostly a cut and paste of the mbox code, but not a
        subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
        with extreme caution.

        * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
        spool folders can't be deleted, renamed, etc.
        (test_folder_basic): Same.

        * tests/folder/test2.c (main): Added checks for spool type.

        * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
        Added db3 flags, so make check compiles, doesn't run though.

2001-05-24  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-local-provider.c
        (camel_provider_module_init): Added spool provider.

svn path=/trunk/; revision=10198
2001-06-12 14:29:28 +00:00
853f81994e Add a separator between the service url and the folder name, if needed.
2001-06-07  Jon Trowbridge  <trow@ximian.com>

	* camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
	separator between the service	url and the folder name, if needed.

svn path=/trunk/; revision=10153
2001-06-08 00:41:40 +00:00
4732637722 Added an argument, so that the original source URI of the mbox can be
2001-06-07  Jon Trowbridge  <trow@ximian.com>

        * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
        an argument, so that the original source URI of the mbox can be
        passed in.  This is needed because this function is called
        post-movemail, so we are never reading from the original mbox
        anymore.  Without the original mbox URI, the X-Evolution-Source
        tag gets set incorrectly and filter-on-source will fail to work.
        (camel_filter_driver_filter_message): Also take an extra arg
        for the original source URI.  It is the original URI, not the
        source URI, that is used for filtering and for setting the
        X-Evolution-Source tag.

2001-06-07  Jon Trowbridge  <trow@ximian.com>

        * mail-ops.c (fetch_mail_fetch): Pass the original source URI
        to camel_filter_driver_filter_mbox.
        (mail_send_message): Pass NULL as the orginal source URI
        to camel_filter_driver_filter_message.

svn path=/trunk/; revision=10152
2001-06-08 00:12:52 +00:00
5772c1180d Don't fetch the UID and FLAGS of messages we don't know about yet, since
* providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
	the UID and FLAGS of messages we don't know about yet, since
	they'll just get discarded.

svn path=/trunk/; revision=10132
2001-06-06 14:30:42 +00:00
2ceef66cce Fix to not get into a recursive loop in get_type().
2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/smime/pgp.c: Fix to not get into a recursive loop in
	get_type().

	* tests/smime/pgp-mime.c: Same.

svn path=/trunk/; revision=10102
2001-06-02 21:06:42 +00:00
e86a28e484 Numerous fixes to get it to compile.
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c: Numerous fixes to get it to compile.

svn path=/trunk/; revision=10073
2001-05-31 22:30:06 +00:00
b0d14b7864 Added camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* camel.h: Added camel-cipher-context.h, camel-cms-context.h,
	camel-smime-context.h, and camel-smime-utils.h

svn path=/trunk/; revision=10067
2001-05-31 20:41:00 +00:00
fb099f5619 New virtual class for manipulating cryptographic message syntax messages
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-cms-context.[c,h]: New virtual class for manipulating
	cryptographic message syntax messages (like S/MIME).

	* camel-smime-context.[c,h]: Modified to inherit from the
	CamelCMSContext class rather than the CamelCipherContext class.

	* camel-smime.[c,h]: Removed - just use camel-smime-context
	directly.

	* camel-smime-utils.[c,h]: New source files. Moved the 2 useful
	functions from camel-smime.[c,h] into here.

svn path=/trunk/; revision=10065
2001-05-31 20:15:35 +00:00
092b7e4449 Redo the BUILD_MAP code to not depend on libunicode. Now it only generates
* camel-charset-map.c: Redo the BUILD_MAP code to not depend on
	libunicode. Now it only generates a map of "popular" 8bit
	encodings. (It's not worthwhile to support obscure encodings,
	because any mailer that supports them will support UTF8 too. And
	Chinese and Japanese use mostly the same UTF8 characters so you
	need to decide between those encodings based on the locale or
	the charset of the message you're replying to or the input
	method you used. So this is sufficient for camel_charset_best's
	use.)

	* camel-charset-map-private.h: Regenerated.

	* camel.c (camel_shutdown): Move #ifdefs around to prevent a
	warning.

svn path=/trunk/; revision=10055
2001-05-30 21:32:18 +00:00
28f5b75c16 Fix an obvious typo
svn path=/trunk/; revision=10045
2001-05-29 21:07:11 +00:00
3089422b9e Remove this evolutionary dead end
svn path=/trunk/; revision=10042
2001-05-29 17:10:11 +00:00
43795a43b5 Create a CamelDiscoDiary. (imap_disconnect_offline): And free it.
* providers/imap/camel-imap-store.c (imap_connect_online,
	imap_connect_offline): Create a CamelDiscoDiary.
	(imap_disconnect_offline): And free it.

	* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
	If RESYNCING, don't do any sort of checking that the remote folder
	matches the summary, beyond making sure that the UIDVALIDITY is
	correct.
	(imap_rescan): Add a missing camel_folder_summary_info_free when
	removing a UID from the summary.
	(imap_expunge_uids_offline): Implement. Fairly simple.
	(imap_expunge_uids_resyncing): Implement. If the store supports
	UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
	to temporarily undelete any messages marked deleted on the server
	that aren't supposed to get expunged.
	(imap_append_offline): Implement, using cache and summary
	operations, and triggering the folder_changed event by hand.
	(imap_append_resyncing): Implement. Redo imap_append_online a bit
	in the process to make them able to share more code.
	(imap_copy_offline): Implement.
	(imap_copy_online): Move parts of this out into a helper.
	(imap_copy_resyncing): Implement. In most cases this is just like
	imap_copy_online, but if you are copying a message that was itself
	copied or appended into the folder, and the server doesn't do
	UIDPLUS, it will be necessary to replace at least part of the copy
	operation with one or more appends.

	* providers/imap/camel-imap-command.c (imap_read_response): Don't
	record the current folder in the response when in RESYNCING mode.
	(This means that EXISTS and EXPUNGE responses won't be processed,
	which is needed because the summary may not match the folder at
	this point.)
	(imap_read_response): On error, call
	camel_imap_response_free_without_processing, not
	camel_imap_response_free.

	* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
	this work better when operating on UIDs that aren't in the summary.

	* providers/imap/camel-imap-summary.c
	(camel_imap_summary_add_offline): New routine used by
	imap_append_offline and imap_copy_offline to create new summary
	entries.

svn path=/trunk/; revision=10041
2001-05-29 17:09:12 +00:00
11ea26d0e3 Code for logging and replaying offline operations.
* camel-disco-diary.c: Code for logging and replaying offline
	operations.

	* camel-disco-store.c (disco_construct): Set disco->status here
	(where we can base it on the session's offline status) rather than
	at init time.
	(disco_connect): If we connect online and have a non-empty diary,
	switch to RESYNCING mode and replay the diary to the server.
	(disco_get_folder, disco_get_folder_info): Add _resyncing
	variants.

	* camel-disco-folder.c (disco_sync, disco_expunge_uids,
	disco_append_message, disco_copy_messages_to,
	disco_move_messages_to): Add _resyncing variants to switches.
	(disco_expunge_uids, disco_append_message, disco_copy_messages_to,
	disco_move_messages_to): Remove #ifdef'ed out diary code: let the
	provider do it.
	(disco_append_message): Redo the append methods to no longer
	return the UID, since we're no longer doing the logging from here.

svn path=/trunk/; revision=10040
2001-05-29 17:08:53 +00:00
e085e7e666 Use g_strcasecmp() because some systems don't have strcasecmp(). Also,
2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_set_param): Use g_strcasecmp()
	because some systems don't have strcasecmp(). Also, when removing
	a param, make sure to free the param->name too.

svn path=/trunk/; revision=10030
2001-05-28 18:47:24 +00:00