platform/upstream/evolution-data-server.git
23 years agoAdded Originator: header as a header to look for when looking for the
Jeffrey Stedfast [Fri, 29 Jun 2001 18:24:30 +0000 (18:24 +0000)]
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.

23 years agoBuild the test-crlf test program.
Jeffrey Stedfast [Fri, 29 Jun 2001 18:09:45 +0000 (18:09 +0000)]
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.

23 years agossh
Jose Maria Celorio [Fri, 29 Jun 2001 06:23:57 +0000 (06:23 +0000)]
ssh

23 years agoAdd a CamelMimeFilterStripHeader that removes a header from mime output. Used
Peter Williams [Thu, 28 Jun 2001 20:35:43 +0000 (20:35 +0000)]
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.

23 years agoFix a memory leak. Also if the decoded value is NULL, that means it wasn't
Jeffrey Stedfast [Thu, 28 Jun 2001 16:52:23 +0000 (16:52 +0000)]
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.

23 years agoIf the folder is frozen, don't refresh, just record that we need to do it
Dan Winship [Thu, 28 Jun 2001 16:50:09 +0000 (16:50 +0000)]
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

23 years agoInitialize the private send_lock. (camel_transport_finalize): Free the
Jeffrey Stedfast [Wed, 27 Jun 2001 22:43:00 +0000 (22:43 +0000)]
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.

23 years agoUpdated to match the current API.
Jeffrey Stedfast [Wed, 27 Jun 2001 22:21:05 +0000 (22:21 +0000)]
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().

23 years agoUse the new header_address_fold.
Jeffrey Stedfast [Wed, 27 Jun 2001 22:14:20 +0000 (22:14 +0000)]
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.

23 years agoSince we want an error opening a folder to result in the message being
Jeffrey Stedfast [Tue, 26 Jun 2001 22:45:16 +0000 (22:45 +0000)]
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.

23 years agolock the cache around accesses
Dan Winship [Tue, 26 Jun 2001 19:20:01 +0000 (19:20 +0000)]
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...

23 years agoD'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/
Dan Winship [Tue, 26 Jun 2001 17:50:48 +0000 (17:50 +0000)]
D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/

        * camel-service.c (camel_service_get_url): D'oh.
        s/FALSE/CAMEL_URL_HIDE_PASSWORD/

23 years agoconstify args
Dan Winship [Tue, 26 Jun 2001 16:50:46 +0000 (16:50 +0000)]
constify args

* camel-url.c (camel_url_encode): constify args

23 years agog_strdup() the message source here or we will have problems later when we
Jeffrey Stedfast [Tue, 26 Jun 2001 00:18:23 +0000 (00:18 +0000)]
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 ;-)

23 years agoFix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a
Dan Winship [Mon, 25 Jun 2001 15:40:30 +0000 (15:40 +0000)]
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.

23 years agoUpdate the copyrights, replacing Helix Code with Ximian and
Ettore Perazzoli [Sat, 23 Jun 2001 08:51:31 +0000 (08:51 +0000)]
Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

23 years agoNew function that decides if 2 word types are mergeable. An atom and a
Jeffrey Stedfast [Thu, 21 Jun 2001 19:53:47 +0000 (19:53 +0000)]
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.

23 years agoUse camel_address_length() rather than casting and accessing data members.
Jeffrey Stedfast [Thu, 21 Jun 2001 17:19:00 +0000 (17:19 +0000)]
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.

23 years agoIf the first char of the mailing-list name is '<', chop it off to make
Jeffrey Stedfast [Wed, 20 Jun 2001 19:46:58 +0000 (19:46 +0000)]
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.

23 years agoupdated .cvsignore to ignore camel-lock-helper
Jeffrey Stedfast [Tue, 19 Jun 2001 18:51:01 +0000 (18:51 +0000)]
updated .cvsignore to ignore camel-lock-helper

23 years agoFixed a bug when not running setuid it wouldn't unlock.
Not Zed [Tue, 19 Jun 2001 14:21:05 +0000 (14:21 +0000)]
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.

23 years agoNote: Except for the info_free(), the NULL checks are g_return's. I felt
Jeffrey Stedfast [Mon, 18 Jun 2001 21:08:19 +0000 (21:08 +0000)]
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.

23 years agoRemove DB3_LDADD
Dan Winship [Mon, 18 Jun 2001 20:07:35 +0000 (20:07 +0000)]
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

23 years agoSet camel-lock-help setgid or setuid as needed
Dan Winship [Mon, 18 Jun 2001 18:17:19 +0000 (18:17 +0000)]
Set camel-lock-help setgid or setuid as needed

* Makefile.am (install-exec-local): Set camel-lock-help setgid or
setuid as needed

23 years agoOnly create a missing uid if we have indexing turned on.
Not Zed [Mon, 18 Jun 2001 14:36:44 +0000 (14:36 +0000)]
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.

23 years agoReturn the largest real UID in the cache (as an integer). Eventually to be
Dan Winship [Fri, 15 Jun 2001 18:47:04 +0000 (18:47 +0000)]
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.

23 years agoAdded Mailing-List header regex so that we can do mlist magic on that
Jeffrey Stedfast [Thu, 14 Jun 2001 22:32:35 +0000 (22:32 +0000)]
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.

23 years agoProperly handle correct and incorrect (for the common case, ie Outlook and
Jeffrey Stedfast [Thu, 14 Jun 2001 22:24:59 +0000 (22:24 +0000)]
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.

23 years agoDon't try to format the Reply-To header - we don't want to wrap the
Jeffrey Stedfast [Thu, 14 Jun 2001 17:16:33 +0000 (17:16 +0000)]
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.

23 years agoA new provider, for spool mailboxes. Mostly a cut and paste of the mbox
Not Zed [Tue, 12 Jun 2001 14:29:28 +0000 (14:29 +0000)]
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.

23 years agoAdd a separator between the service url and the folder name, if needed.
Jon Trowbridge [Fri, 8 Jun 2001 00:41:40 +0000 (00:41 +0000)]
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.

23 years agoAdded an argument, so that the original source URI of the mbox can be
Jon Trowbridge [Fri, 8 Jun 2001 00:12:52 +0000 (00:12 +0000)]
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.

23 years agoDon't fetch the UID and FLAGS of messages we don't know about yet, since
Dan Winship [Wed, 6 Jun 2001 14:30:42 +0000 (14:30 +0000)]
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.

23 years agoFix to not get into a recursive loop in get_type().
Jeffrey Stedfast [Sat, 2 Jun 2001 21:06:42 +0000 (21:06 +0000)]
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.

23 years agoNumerous fixes to get it to compile.
Jeffrey Stedfast [Thu, 31 May 2001 22:30:06 +0000 (22:30 +0000)]
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.

23 years agoAdded camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,
Jeffrey Stedfast [Thu, 31 May 2001 20:41:00 +0000 (20:41 +0000)]
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

23 years agoNew virtual class for manipulating cryptographic message syntax messages
Jeffrey Stedfast [Thu, 31 May 2001 20:15:35 +0000 (20:15 +0000)]
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.

23 years agoRedo the BUILD_MAP code to not depend on libunicode. Now it only generates
Dan Winship [Wed, 30 May 2001 21:32:18 +0000 (21:32 +0000)]
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.

23 years agoFix an obvious typo
Dan Winship [Tue, 29 May 2001 21:07:11 +0000 (21:07 +0000)]
Fix an obvious typo

23 years agoRemove this evolutionary dead end
Dan Winship [Tue, 29 May 2001 17:10:11 +0000 (17:10 +0000)]
Remove this evolutionary dead end

23 years agoCreate a CamelDiscoDiary. (imap_disconnect_offline): And free it.
Dan Winship [Tue, 29 May 2001 17:09:12 +0000 (17:09 +0000)]
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.

23 years agoCode for logging and replaying offline operations.
Dan Winship [Tue, 29 May 2001 17:08:53 +0000 (17:08 +0000)]
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.

23 years agoUse g_strcasecmp() because some systems don't have strcasecmp(). Also,
Jeffrey Stedfast [Mon, 28 May 2001 18:47:24 +0000 (18:47 +0000)]
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.

23 years agochangelog entries for tests/ fixes committed yesterday
Dan Winship [Mon, 28 May 2001 18:30:23 +0000 (18:30 +0000)]
changelog entries for tests/ fixes committed yesterday

23 years agoFix an fd leak
Dan Winship [Sun, 27 May 2001 19:52:07 +0000 (19:52 +0000)]
Fix an fd leak

* tests/lib/messages.c (test_message_read_file): Fix an fd leak

* tests/lib/session.c, tests/lib/session.h: a CamelSession
subclass for the test programs.

* tests/lib/Makefile.am: include session.[ch]

* tests/folder/test*.c: Use a CamelTestSession from libcameltest
instead of cut+pasting everywhere.

* tests/misc/url.c (main): Update for a camel_url_new change at
some point.

* tests/*/.cvsignore: Add stuff.

* camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
mixup.

23 years agoAdd a "need_rescan" flag saying if we want to rescan the entire folder for
Dan Winship [Sat, 26 May 2001 17:17:10 +0000 (17:17 +0000)]
Add a "need_rescan" flag saying if we want to rescan the entire folder for

* providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
saying if we want to rescan the entire folder for flag changes
next time it's selected.
(camel_imap_folder_init): Set need_rescan TRUE.
(camel_imap_folder_selected): If need_rescan is TRUE, call
imap_rescan.
(imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
Otherwise just do a NOOP, making this a MUCH more lightweight
operation. Also, don't call imap_rescan directly if the folder
isn't selected, since that could end up causing the folder to be
scanned *twice* (imap_rescan -> camel_imap_command ->
camel_imap_folder_selected -> imap_rescan).
(imap_rescan): Set need_rescan FALSE.
(imap_sync_online): Don't NOOP if no changes were pushed: the
caller will call refresh_info if it wants to poll for changes.
Fixes evolution-mail doing lots of unnecessary extra work at
quit time.

23 years agoOops. Use a strNcmp to make sure the response begins with a 334 code, not
Jeffrey Stedfast [Fri, 25 May 2001 22:15:01 +0000 (22:15 +0000)]
Oops. Use a strNcmp to make sure the response begins with a 334 code, not

2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
strNcmp to make sure the response begins with a 334 code, not a
strcmp. Duh.

23 years agoremove the summary info so we are not out-of-sync with the maildir folder.
Jeffrey Stedfast [Fri, 25 May 2001 19:58:37 +0000 (19:58 +0000)]
remove the summary info so we are not out-of-sync with the maildir folder.

2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>

* providers/local/camel-maildir-folder.c (maildir_append_message):
remove the summary info so we are not out-of-sync with the maildir
folder.

* providers/local/camel-mh-folder.c (mh_append_message): remove
the summary info so we are not out-of-sync with the mh folder.

* providers/local/camel-mbox-folder.c (mbox_append_message):
remove the summary info so we are not out-of-sync with the mbox.

23 years agoOops, I spelled the get-default-db function name wrong.
Jeffrey Stedfast [Fri, 25 May 2001 01:12:26 +0000 (01:12 +0000)]
Oops, I spelled the get-default-db function name wrong.

2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (camel_smime_context_new): Oops, I spelled
the get-default-db function name wrong.

23 years agos/folder_deleted/folder_created - result of a bad copy/paste.
Jeffrey Stedfast [Thu, 24 May 2001 02:08:59 +0000 (02:08 +0000)]
s/folder_deleted/folder_created - result of a bad copy/paste.

2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>

* providers/local/camel-local-folder.c
(camel_local_folder_construct): s/folder_deleted/folder_created -
result of a bad copy/paste.

23 years agoOptimize the match "" case.
Jeffrey Stedfast [Thu, 24 May 2001 01:04:38 +0000 (01:04 +0000)]
Optimize the match "" case.

2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-search.c (imap_body_contains):
Optimize the match "" case.

23 years agoStore the CamelFolderInfo tree that was returned from
Jeffrey Stedfast [Mon, 21 May 2001 22:53:15 +0000 (22:53 +0000)]
Store the CamelFolderInfo tree that was returned from

2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-store.c (get_folder_info_online):
Store the CamelFolderInfo tree that was returned from
camel_folder_info_build() in a new variable, 'tree', rather than
'fi' since we later use 'fi' when syncing folders. Not only does
this fix a memory leak, but it also fixes the bug where the user
would only see the last folder in the folder list and/or it's
subfolders.

23 years agoThe service can be NULL here too, thanks to Wayne Davis for pointing this
Jeffrey Stedfast [Thu, 17 May 2001 00:34:02 +0000 (00:34 +0000)]
The service can be NULL here too, thanks to Wayne Davis for pointing this

2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

* camel-session.c (camel_session_forget_password): The service can
be NULL here too, thanks to Wayne Davis for pointing this out.

23 years agoWe don't need to be passed the certdb path anymore.
Jeffrey Stedfast [Wed, 16 May 2001 21:23:20 +0000 (21:23 +0000)]
We don't need to be passed the certdb path anymore.

2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (camel_smime_context_new): We don't need
to be passed the certdb path anymore.

23 years agoNew function to return an array of all headers.
Dan Winship [Wed, 16 May 2001 18:23:15 +0000 (18:23 +0000)]
New function to return an array of all headers.

* camel-medium.c (camel_medium_get_headers): New function to
return an array of all headers.
(camel_medium_free_headers): And free them.

* camel-mime-part.c (get_headers, free_headers): Implement this
for CamelMimePart. (Works for CamelMimeMessage too.)

23 years agoDon't close or free (it wasn't allocated) the certdb.
Jeffrey Stedfast [Tue, 15 May 2001 20:14:00 +0000 (20:14 +0000)]
Don't close or free (it wasn't allocated) the certdb.

2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (camel_smime_context_finalise): Don't
close or free (it wasn't allocated) the certdb.
(camel_smime_context_new): If we get a NULL certdb handle, then
don't bother trying to create a new certdb handle since NSS_Init*
should have done that.

23 years agoDon't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in
Jeffrey Stedfast [Tue, 15 May 2001 19:09:03 +0000 (19:09 +0000)]
Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in

2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

* Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
variables so we don't link in tons of extra cruft that we don't
need.

23 years agoAdded t the test suite - tests the S/MIME pkcs7 functions.
Jeffrey Stedfast [Tue, 15 May 2001 18:37:37 +0000 (18:37 +0000)]
Added t the test suite - tests the S/MIME pkcs7 functions.

2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

* tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME
pkcs7 functions.

23 years agoLots of fixes to get this to compile.
Jeffrey Stedfast [Mon, 14 May 2001 22:38:28 +0000 (22:38 +0000)]
Lots of fixes to get this to compile.

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c: Lots of fixes to get this to compile.

23 years agobah, just mod the pgp-context macro for camel_pgp_verify so that we don't have to...
Jeffrey Stedfast [Mon, 14 May 2001 22:27:29 +0000 (22:27 +0000)]
bah, just mod the pgp-context macro for camel_pgp_verify so that we don't have to pass in a useless value.

23 years agoLots of fixes to get this to almost compile. Still struggling with the
Jeffrey Stedfast [Mon, 14 May 2001 22:25:02 +0000 (22:25 +0000)]
Lots of fixes to get this to almost compile. Still struggling with the

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c: Lots of fixes to get this to almost
compile. Still struggling with the fact that CERTCertDBHandle is
an "incomplete type". *sigh*.

* camel-smime.c (camel_smime_part_verify): Updated to pass in a
hash argument to camel_smime_verify().

* camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
to the changes in the context API.

* camel-pgp-context.c (pgp_verify): Updated to take a
CamelCipherHash argument.

* camel-cipher-context.c (camel_cipher_verify): Now takes a hash
argument since the S/MIME code needs this.

23 years agoAdd camel-smime-context.[c,h] and camel-smime.[c,h] to the build.
Jeffrey Stedfast [Mon, 14 May 2001 21:14:34 +0000 (21:14 +0000)]
Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build.

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
to the build.

* camel-smime.[c,h]: New source files for manipulating S/MIME
message parts.

23 years agoReplicate the semantics of the libunicode utf8 functions by returning NULL
Jon Trowbridge [Mon, 14 May 2001 21:04:34 +0000 (21:04 +0000)]
Replicate the semantics of the libunicode utf8 functions by returning NULL

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * camel-search-private.c (utf8_get): Replicate the semantics of
        the libunicode utf8 functions by returning NULL in the arg
        on invalid utf8.

        * camel-pgp-context.c (pgp_verify): Check for valid utf8,
        terminate loop if something looks wrong.

        * camel-mime-utils.c (header_encode_phrase_get_words): Properly
        check for invalid utf8.
        (header_encode_string): Properly check for invalid utf8.

        * camel-charset-map.c (camel_charset_step): Properly check for
        invalid utf8.

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (is_citation): Check for bad utf8.

23 years agoSubclass CamelSession since we can no longer specify the passwd callback
Jeffrey Stedfast [Mon, 14 May 2001 20:08:25 +0000 (20:08 +0000)]
Subclass CamelSession since we can no longer specify the passwd callback

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* tests/folder/test9.c:
* tests/folder/test8.c:
* tests/folder/test7.c:
* tests/folder/test6.c:
* tests/folder/test5.c:
* tests/folder/test4.c:
* tests/folder/test3.c:
* tests/folder/test2.c:
* tests/folder/test1.c:
* tests/smime/pgp-mime.c:
* tests/smime/pgp.c: Subclass CamelSession since we can no longer
specify the passwd callback any other way and update code
accordingly.

23 years agoer, OptionSet
Jeffrey Stedfast [Sun, 13 May 2001 01:44:16 +0000 (01:44 +0000)]
er, OptionSet

23 years agos/SSL_Enable/SSL_SetOption
Jeffrey Stedfast [Sun, 13 May 2001 01:42:48 +0000 (01:42 +0000)]
s/SSL_Enable/SSL_SetOption

23 years agoDecode Content-Location, either correctly or Netscape-generated-brokenly.
Dan Winship [Fri, 11 May 2001 20:57:26 +0000 (20:57 +0000)]
Decode Content-Location, either correctly or Netscape-generated-brokenly.

* camel-mime-utils.c (header_location_decode): Decode
Content-Location, either correctly or Netscape-generated-brokenly.

* camel-mime-part.c (camel_mime_part_set_content_location,
camel_mime_part_get_content_location, etc): Deal with
Content-Location header.

23 years agoDon't check the initial auth response until we get into the while-loop
Jeffrey Stedfast [Fri, 11 May 2001 20:34:10 +0000 (20:34 +0000)]
Don't check the initial auth response until we get into the while-loop

2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
the initial auth response until we get into the while-loop
otherwise we have problems if the SASL mechanism supported a
client initiated challenge (like PLAIN and LOGIN do).

23 years agoMake this return CamelStream * (like the other stream new functions)
Dan Winship [Fri, 11 May 2001 17:32:02 +0000 (17:32 +0000)]
Make this return CamelStream * (like the other stream new functions)

* camel-stream-null.c (camel_stream_null_new): Make this return
CamelStream * (like the other stream new functions) instead of
CamelStreamNull *

23 years agocall SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,
Chris Toshok [Thu, 10 May 2001 22:03:08 +0000 (22:03 +0000)]
call SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,

2001-05-10  Chris Toshok  <toshok@ximian.com>

* camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
during the connect.

23 years agoDon't abort if the Service is NULL, this is perfectly valid for cipher
Jeffrey Stedfast [Thu, 10 May 2001 20:42:22 +0000 (20:42 +0000)]
Don't abort if the Service is NULL, this is perfectly valid for cipher

2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>

* camel-session.c (camel_session_get_password): Don't abort if the
Service is NULL, this is perfectly valid for cipher contexts.

23 years agoPass appropriate parameters to CF_CLASS and add comment explaining why my
Peter Williams [Thu, 10 May 2001 02:51:20 +0000 (02:51 +0000)]
Pass appropriate parameters to CF_CLASS and add comment explaining why my

2001-05-09  Peter Williams  <peterw@ximian.com>

       * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
       appropriate parameters to CF_CLASS and add comment explaining why
       my initial attempt at a solution didn't work.

23 years agoSet the disconnected status. (camel_disco_store_can_work_offline): Return
Dan Winship [Wed, 9 May 2001 21:57:32 +0000 (21:57 +0000)]
Set the disconnected status. (camel_disco_store_can_work_offline): Return

* camel-disco-store.c (camel_disco_set_status): Set the
disconnected status.
(camel_disco_store_can_work_offline): Return whether or not a
given CamelDiscoStore can work offline or not.

* camel-disco-folder.c (camel_disco_folder_cache_message):
Explicitly tell a folder to cache a message. (Better than using
get_message, because for IMAP that doesn't guarantee you'll get
all the message parts.)
(camel_disco_folder_prepare_for_offline): Prepare a folder for
offline use by caching all messages meeting given search criteria
(and doing anything else the particular folder implementation
needs).

* camel-session.c (camel_session_set_online,
camel_session_is_online): A session-wide online/offline toggle.
(camel_session_init): Set online to TRUE.

* providers/imap/camel-imap-store.c (can_work_offline):
Implementation of CamelDiscoStore::can_work_offline. (Checks that
the store has been used online at least once.)
(imap_get_folder_online, imap_get_folder_offline): Deal with
request for "inbox" properly. ("Don't you mean... 'INBOX'?").

* providers/imap/camel-imap-folder.c (imap_cache_message):
Implementation of CamelDiscoFolder::cache_message.

* camel.h: Add camel-disco-store.h and camel-disco-folder.h

23 years agoremove something jeff didn't mean to commit
Dan Winship [Wed, 9 May 2001 21:55:57 +0000 (21:55 +0000)]
remove something jeff didn't mean to commit

23 years agoWrap the content-id with <>'s.
Jeffrey Stedfast [Wed, 9 May 2001 20:17:12 +0000 (20:17 +0000)]
Wrap the content-id with <>'s.

2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
content-id with <>'s.

23 years agoAdd support for using OpenSSL.
Jeffrey Stedfast [Mon, 7 May 2001 20:33:25 +0000 (20:33 +0000)]
Add support for using OpenSSL.

2001-05-04  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (connect_to_server): Add
support for using OpenSSL.

* camel-remote-store.c (remote_connect): Add support for using the
OpenSSL implementation.

* camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
NULL as the last argument to alert_user - prototype doesn't take
that argument anymore?

* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
(ssl_verify): Use a global hash table to try and lookup the
CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
doesn't think one needs to pass data around, we should all be
living in a world of global variables, duh!

23 years agoFix another build problem. (Um, anyone else could have done this...)
Dan Winship [Sun, 6 May 2001 15:33:36 +0000 (15:33 +0000)]
Fix another build problem. (Um, anyone else could have done this...)

* Makefile.am (libcamelinclude_HEADERS): Fix another build
problem. (Um, anyone else could have done this...)

23 years agoFix up refcounting on current_folder.
Dan Winship [Fri, 4 May 2001 15:26:13 +0000 (15:26 +0000)]
Fix up refcounting on current_folder.

* providers/imap/camel-imap-store.c (get_folder_online): Fix up
refcounting on current_folder.

* camel-disco-folder.c, camel-disco-store.h: Remove
CamelDiscoDiary refs that weren't supposed to escape yet.

23 years agonew abstract class for disconnectable remote stores
Dan Winship [Thu, 3 May 2001 20:52:59 +0000 (20:52 +0000)]
new abstract class for disconnectable remote stores

* camel-disco-store.c: new abstract class for disconnectable
remote stores

* camel-disco-folder.c: new abstract class for folders on
disconnectable stores.

* Makefile.am: Add camel-disco-folder.[ch] and
camel-disco-store.[ch].

* providers/imap/camel-imap-store.c: Make this a subclass of
CamelDiscoStore, and fix up the offline interfaces for the changes
since they were first written (particularly the fact that some
IMAP stores don't just use subscribed folders).

* providers/imap/camel-imap-folder.c: Make this a subclass of
CamelDiscoFolder, although most ops still fail in disconnected
mode.

* camel-store.c (camel_store_get_folder_info): Change gboolean,
gboolean, gboolean to guint32 in the prototype for this function.

* providers/local/camel-local-store.c (get_folder_info): Update
for prototype change.

23 years agoClean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" into
Dan Winship [Wed, 2 May 2001 19:53:53 +0000 (19:53 +0000)]
Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" into

* providers/imap/camel-imap-store.h: Clean this up a bit. Add a
"tag_prefix" member. Move "useful_lsub" into capabilities.

* providers/imap/camel-imap-store.c (camel_imap_store_init):
Initialize the tag_prefix, based on a static variable.

* providers/imap/camel-imap-command.c (camel_imap_command): Use
the store's tag_prefix character rather than "A" at the start of
the tag. Makes the verbose debug output easier to parse when
connected to multiple IMAP servers. (Well, unless you're connected
to more than 26 servers...)

23 years agoFix this up... it was losing count in some cases and giving a more verbose
Dan Winship [Wed, 2 May 2001 16:50:43 +0000 (16:50 +0000)]
Fix this up... it was losing count in some cases and giving a more verbose

* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
this up... it was losing count in some cases and giving a more
verbose answer than it needed to.

23 years agoRescue the KPOP code from bit rot.
Dan Winship [Wed, 2 May 2001 13:53:21 +0000 (13:53 +0000)]
Rescue the KPOP code from bit rot.

* providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
rot.

23 years agoRemove the last argument from camel_session_alert_user.
Anders Carlsson [Tue, 1 May 2001 19:44:45 +0000 (19:44 +0000)]
Remove the last argument from camel_session_alert_user.

2001-05-01  Anders Carlsson  <andersca@codefactory.se>

* camel-tcp-stream-ssl.c (ssl_bad_cert): Remove the last argument from
camel_session_alert_user.

23 years agoRedo command locking. Since command_lock is recursive, we can just get a
Dan Winship [Tue, 1 May 2001 19:16:14 +0000 (19:16 +0000)]
Redo command locking. Since command_lock is recursive, we can just get a

* providers/imap/camel-imap-command.c (camel_imap_command): Redo
command locking. Since command_lock is recursive, we can just get
a lock here, and release it either on error, or when the caller
frees the response data. (This simplifies a lot of stuff, and
fixes some problems with camel_imap_folder_changed being called
without the command_lock locked because of the 2001-03-22 change.)

(camel_imap_response_free):
(camel_imap_response_free_without_processing):
(camel_imap_response_extract):
(camel_imap_response_extract_continuation): These all take a
CamelImapStore now as well, to deal with locking.

* providers/imap/camel-imap-private.h: Add
CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
be made to call e_mutex_assert_locked.

* providers/imap/camel-imap-folder.c, camel-imap-search.c,
camel-imap-store.c: Simplify using new locking stuff. Add a few
CAMEL_IMAP_STORE_ASSERT_LOCKED checks.

23 years agoremove unused assignment that calls non-existent function.
Dan Winship [Tue, 1 May 2001 15:44:06 +0000 (15:44 +0000)]
remove unused assignment that calls non-existent function.

23 years ago Support the IMAP UIDPLUS extension (RFC 2359), which lets you
Dan Winship [Tue, 1 May 2001 14:51:36 +0000 (14:51 +0000)]
Support the IMAP UIDPLUS extension (RFC 2359), which lets you
resync after disconnected operation more efficiently, but also
makes it possible to do appends and moves/copies more efficiently
now.

* providers/imap/camel-imap-folder.c (imap_append_message): If the
server supports UIDPLUS, grab the APPENDUID response and cache the
message into the folder's message cache.
(imap_copy_messages_to): Likewise, for COPYUID, copy any message
parts we have cached between the source and destination folder
caches.
(imap_get_message): If the entire message is already in the cache,
just return that rather than building it from parts.
(imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
the new messages first, then only fetch the headers for messages
where we don't already have the headers cached.

* providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
(cache_put): Fix refcounting stuff here.
(camel_imap_message_cache_insert_stream,
camel_imap_message_cache_insert_wrapper): New.
(camel_imap_message_cache_get): Fix a bug here so the memory
caching actually works.
(camel_imap_message_cache_copy): New routine, used by
imap_copy_messages_to.

* providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
response.

23 years agoNew-and-improved version of get_uid_set() from camel-imap-folder.c. Looks
Dan Winship [Mon, 30 Apr 2001 18:13:45 +0000 (18:13 +0000)]
New-and-improved version of get_uid_set() from camel-imap-folder.c. Looks

* providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
New-and-improved version of get_uid_set() from
camel-imap-folder.c. Looks at the summary as it goes so that if
you ask for messages 5, 6, 8, and 9, and there is no message 7,
then you get "5:9" instead of "5:6,8:9"

* providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
imap_uid_array_to_set() rather than get_uid_set().
(get_uid_set): Gone

23 years agoRedo this a lot so that instead of having a class full of callbacks, we
Dan Winship [Fri, 27 Apr 2001 21:08:08 +0000 (21:08 +0000)]
Redo this a lot so that instead of having a class full of callbacks, we

* camel-session.c: Redo this a lot so that instead of having a
class full of callbacks, we have a subclassable class. Also,
replace the increasingly horrifying
camel_session_query_authenticator with three new routines,
camel_session_get_password, camel_session_forget_password, and
camel_session_alert_user.

* camel-pgp-context.c:
* camel-pkcs7-context.c:
* camel-smime-context.c:
* providers/imap/camel-imap-store.c:
* providers/pop3/camel-pop3-store.c:
* providers/smtp/camel-smtp-transport.c:
Use camel_session_get_password / camel_session_forget_password.

* camel-tcp-stream-ssl.c (ssl_bad_cert): Use
camel_session_alert_user.

23 years agoAutomagically call camel_shutdown() atexit() ;-) (camel_init): Also
Jeffrey Stedfast [Fri, 27 Apr 2001 00:16:41 +0000 (00:16 +0000)]
Automagically call camel_shutdown() atexit() ;-) (camel_init): Also

2001-04-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel.c (camel_init): Automagically call camel_shutdown()
atexit() ;-)
(camel_init): Also initialize NSS databases as read/write for
S/MIME and if NSS fails to init, try initializing with volatile
databases.

* camel-file-utils.h: #include <sys/types.h> for off_t.

23 years ago#include <sys/types.h> for off_t.
Jeffrey Stedfast [Thu, 26 Apr 2001 20:19:48 +0000 (20:19 +0000)]
#include <sys/types.h> for off_t.

2001-04-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel-file-utils.h: #include <sys/types.h> for off_t.

23 years ago#include "nss.h" rather than <nss.h> due to the non-mozilla nss.h file living in...
Jeffrey Stedfast [Thu, 26 Apr 2001 20:09:28 +0000 (20:09 +0000)]
#include "nss.h" rather than <nss.h> due to the non-mozilla nss.h file living in /usr/include

23 years agoNew file, with the int, string, time_t, and off_t encode/decode routines
Dan Winship [Thu, 26 Apr 2001 19:44:50 +0000 (19:44 +0000)]
New file, with the int, string, time_t, and off_t encode/decode routines

* camel-file-utils.c: New file, with the int, string, time_t, and
off_t encode/decode routines from camel-folder-summary.c moved
here and renamed, for the enjoyment of non-CamelFolderSummary
subclasses.

* Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
(libcamelinclude_HEADERS): and camel-file-utils.h

* camel-folder-summary.c: Remove functions that were moved to
camel-file-utils.c, update uses of them for the new names.
(camel_folder_summary_{en,de}code_token are still here.)

* providers/local/camel-mbox-summary.c: Use camel_file_util_*
names

* providers/imap/camel-imap-summary.c: Use camel_file_util_* names

* providers/imap/camel-imap-store.c (imap_store_setup_online,
imap_store_setup_offline): Use camel_file_util_* names, which
makes much more sense since this isn't folder summary stuff.

23 years agoRemove UNICODE_CFLAGS (and some other stuff that's redundant with
Dan Winship [Thu, 26 Apr 2001 18:21:32 +0000 (18:21 +0000)]
Remove UNICODE_CFLAGS (and some other stuff that's redundant with

* Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
stuff that's redundant with EXTRA_GNOME_CFLAGS)
(libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.

* camel-search-private.c:
* camel-pgp-context.c:
* camel-mime-utils.c: Use gunicode interfaces rather than
libunicode.

* camel-charset-map.c: Use gunicode rather than libunicode. (The
charmap-regen code still depends on libunicode though.)

* camel-mime-filter-charset.h:
* tests/message/test2.c (convert): Use iconv rather than
unicode_iconv.

* providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
* providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
* providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
UNICODE_LIBS.

* camel.c (camel_init): Remove call to unicode_init.

* camel-mime-parser.c: Remove unused unicode.h include.

23 years agoUse e_gethostbyname_r. (camel_service_gethost): Remove unused var.
Dan Winship [Thu, 26 Apr 2001 16:48:35 +0000 (16:48 +0000)]
Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.

* camel-service.c (get_host): Use e_gethostbyname_r.
(camel_service_gethost): Remove unused var.

23 years agoApplied jacob's patches for e-poolv stuff.
Not Zed [Thu, 26 Apr 2001 01:09:05 +0000 (01:09 +0000)]
Applied jacob's patches for e-poolv stuff.

2001-04-26  Not Zed  <NotZed@Ximian.com>

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

23 years agoAdd camel-vee-folder.h and camel-digest-folder.h
Jeffrey Stedfast [Tue, 24 Apr 2001 00:03:29 +0000 (00:03 +0000)]
Add camel-vee-folder.h and camel-digest-folder.h

2001-04-23  Jeffrey Stedfast  <fejj@ximian.com>

* camel.h: Add camel-vee-folder.h and camel-digest-folder.h

* camel-digest-folder.[c,h]: New class that can be used to browse
a multipart/digest message as if it were a CamelFolder.

23 years agoNew class that can be used to browse a multipart/digest message as if it
Jeffrey Stedfast [Tue, 24 Apr 2001 00:01:51 +0000 (00:01 +0000)]
New class that can be used to browse a multipart/digest message as if it

2001-04-23  Jeffrey Stedfast  <fejj@ximian.com>

* camel-digest-folder.[c,h]: New class that can be used to browse
a multipart/digest message as if it were a CamelFolder.

23 years agoOops, don't use the return value of iconv() as a string length, it only
Jeffrey Stedfast [Mon, 23 Apr 2001 00:20:19 +0000 (00:20 +0000)]
Oops, don't use the return value of iconv() as a string length, it only

2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>

* camel-pgp-context.c (pgp_verify): Oops, don't use the return
value of iconv() as a string length, it only tells us the number
of non-reversable character conversions. This fixes it so we
actually see the gpg output in the message viewer.

23 years agoChanged GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
Mikael Hallendal [Mon, 23 Apr 2001 00:16:10 +0000 (00:16 +0000)]
Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.

2001-04-23  Mikael Hallendal  <micke@codefactory.se>

* providers/nntp/Makefile.am (INCLUDES):
Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.

23 years agoImplemented using the secmime.h convenience functions. (smime_clearsign):
Jeffrey Stedfast [Fri, 20 Apr 2001 21:21:34 +0000 (21:21 +0000)]
Implemented using the secmime.h convenience functions. (smime_clearsign):

2001-04-20  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (smime_sign): Implemented using the
secmime.h convenience functions.
(smime_clearsign): We just error our here, there is no clearsign
for smime.
(smime_verify): Copied code over from the pkcs7 verify - same
state, ugly and unknown :-)
(smime_encrypt): Implemented using the secmime.h convenience
functions.
(smime_decrypt): Same as the code in pkcs7-context.