aboutsummaryrefslogtreecommitdiffstats
path: root/camel
Commit message (Collapse)AuthorAgeFilesLines
* er, OptionSetJeffrey Stedfast2001-05-131-1/+1
| | | | svn path=/trunk/; revision=9785
* s/SSL_Enable/SSL_SetOptionJeffrey Stedfast2001-05-131-1/+1
| | | | svn path=/trunk/; revision=9784
* Decode Content-Location, either correctly or Netscape-generated-brokenly.Dan Winship2001-05-125-0/+64
| | | | | | | | | | | * 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. svn path=/trunk/; revision=9772
* Don't check the initial auth response until we get into the while-loopJeffrey Stedfast2001-05-122-9/+20
| | | | | | | | | | | 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). svn path=/trunk/; revision=9771
* Make this return CamelStream * (like the other stream new functions)Dan Winship2001-05-123-5/+10
| | | | | | | | * camel-stream-null.c (camel_stream_null_new): Make this return CamelStream * (like the other stream new functions) instead of CamelStreamNull * svn path=/trunk/; revision=9760
* call SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,Chris Toshok2001-05-112-1/+8
| | | | | | | | | | 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. svn path=/trunk/; revision=9751
* Don't abort if the Service is NULL, this is perfectly valid for cipherJeffrey Stedfast2001-05-112-1/+5
| | | | | | | | | 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. svn path=/trunk/; revision=9748
* Pass appropriate parameters to CF_CLASS and add comment explaining why myPeter Williams2001-05-102-1/+9
| | | | | | | | | | 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. svn path=/trunk/; revision=9742
* Set the disconnected status. (camel_disco_store_can_work_offline): ReturnDan Winship2001-05-1010-10/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 svn path=/trunk/; revision=9738
* remove something jeff didn't mean to commitDan Winship2001-05-101-1/+1
| | | | svn path=/trunk/; revision=9737
* Wrap the content-id with <>'s.Jeffrey Stedfast2001-05-103-3/+17
| | | | | | | | | 2001-05-09 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the content-id with <>'s. svn path=/trunk/; revision=9734
* Add support for using OpenSSL.Jeffrey Stedfast2001-05-087-30/+109
| | | | | | | | | | | | | | | | | | | | | | 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! svn path=/trunk/; revision=9697
* Fix another build problem. (Um, anyone else could have done this...)Dan Winship2001-05-062-1/+5
| | | | | | | * Makefile.am (libcamelinclude_HEADERS): Fix another build problem. (Um, anyone else could have done this...) svn path=/trunk/; revision=9687
* Fix up refcounting on current_folder.Dan Winship2001-05-044-4/+14
| | | | | | | | | | * 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. svn path=/trunk/; revision=9667
* new abstract class for disconnectable remote storesDan Winship2001-05-0414-536/+1174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. svn path=/trunk/; revision=9659
* Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" intoDan Winship2001-05-034-18/+31
| | | | | | | | | | | | | | | | * 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...) svn path=/trunk/; revision=9649
* Fix this up... it was losing count in some cases and giving a more verboseDan Winship2001-05-032-14/+12
| | | | | | | | * 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. svn path=/trunk/; revision=9644
* Rescue the KPOP code from bit rot.Dan Winship2001-05-022-23/+21
| | | | | | | * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit rot. svn path=/trunk/; revision=9643
* Remove the last argument from camel_session_alert_user.Anders Carlsson2001-05-021-1/+1
| | | | | | | | | 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. svn path=/trunk/; revision=9640
* Redo command locking. Since command_lock is recursive, we can just get aDan Winship2001-05-027-197/+234
| | | | | | | | | | | | | | | | | | | | | | | | | * 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. svn path=/trunk/; revision=9639
* remove unused assignment that calls non-existent function.Dan Winship2001-05-011-2/+0
| | | | svn path=/trunk/; revision=9636
* Support the IMAP UIDPLUS extension (RFC 2359), which lets youDan Winship2001-05-016-73/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=9635
* New-and-improved version of get_uid_set() from camel-imap-folder.c. LooksDan Winship2001-05-014-38/+89
| | | | | | | | | | | | | | * 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 svn path=/trunk/; revision=9632
* Redo this a lot so that instead of having a class full of callbacks, weDan Winship2001-04-2810-244/+361
| | | | | | | | | | | | | | | | | | | | | | * 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. svn path=/trunk/; revision=9617
* Automagically call camel_shutdown() atexit() ;-) (camel_init): AlsoJeffrey Stedfast2001-04-273-16/+25
| | | | | | | | | | | | | | 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. svn path=/trunk/; revision=9609
* #include <sys/types.h> for off_t.Jeffrey Stedfast2001-04-272-0/+5
| | | | | | | | 2001-04-26 Jeffrey Stedfast <fejj@ximian.com> * camel-file-utils.h: #include <sys/types.h> for off_t. svn path=/trunk/; revision=9593
* #include "nss.h" rather than <nss.h> due to the non-mozilla nss.h file ↵Jeffrey Stedfast2001-04-271-2/+3
| | | | | | living in /usr/include svn path=/trunk/; revision=9592
* New file, with the int, string, time_t, and off_t encode/decode routinesDan Winship2001-04-279-363/+447
| | | | | | | | | | | | | | | | | | | | | | | | | * 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. svn path=/trunk/; revision=9590
* Remove UNICODE_CFLAGS (and some other stuff that's redundant withDan Winship2001-04-2713-103/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. svn path=/trunk/; revision=9585
* Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.Dan Winship2001-04-272-9/+8
| | | | | | | * camel-service.c (get_host): Use e_gethostbyname_r. (camel_service_gethost): Remove unused var. svn path=/trunk/; revision=9583
* Applied jacob's patches for e-poolv stuff.Not Zed2001-04-267-67/+122
| | | | | | | | 2001-04-26 Not Zed <NotZed@Ximian.com> * Applied jacob's patches for e-poolv stuff. svn path=/trunk/; revision=9571
* Add camel-vee-folder.h and camel-digest-folder.hJeffrey Stedfast2001-04-242-0/+4
| | | | | | | | | | | 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. svn path=/trunk/; revision=9531
* New class that can be used to browse a multipart/digest message as if itJeffrey Stedfast2001-04-245-1/+366
| | | | | | | | | 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. svn path=/trunk/; revision=9530
* Oops, don't use the return value of iconv() as a string length, it onlyJeffrey Stedfast2001-04-233-3/+10
| | | | | | | | | | | 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. svn path=/trunk/; revision=9495
* Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.Mikael Hallendal2001-04-232-1/+6
| | | | | | | | | 2001-04-23 Mikael Hallendal <micke@codefactory.se> * providers/nntp/Makefile.am (INCLUDES): Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS. svn path=/trunk/; revision=9494
* Implemented using the secmime.h convenience functions. (smime_clearsign):Jeffrey Stedfast2001-04-214-15/+754
| | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=9480
* Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):Jeffrey Stedfast2001-04-202-5/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-19 Jeffrey Stedfast <fejj@ximian.com> * camel-pkcs7-context.c (pkcs7_sign): Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd): Convenience function to try a 0-length key on the certificate db - if this works then there is no need to prompt the user. (get_password): Callback to get the password. (camel_cipher_hash_to_nss): Convenience function to convert a CamelCipherHash to an NSS HASH_HashType. (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag. (pkcs7_digest): Digest function for use with pkcs7_sign(). (sign_encode_cb): Callback to write the signed data to the output stream. (pkcs7_verify): Hacked on a bit more but am still a bit on the confused side. This might work but I wouldn't hold my breath. The sign/clearsign should be close if not correct, but this one...god only knows. (pkcs7_decrypt): Implemented. (pkcs7_encrypt): Implemented (mostly, still need to handle when 'sign' is TRUE). svn path=/trunk/; revision=9461
* Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):Jeffrey Stedfast2001-04-202-7/+307
| | | | | | | | | | | | | | | | | | | | | | | 2001-04-19 Jeffrey Stedfast <fejj@ximian.com> * camel-pkcs7-context.c (pkcs7_sign): Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd): Convenience function to try a 0-length key on the certificate db - if this works then there is no need to prompt the user. (get_password): Callback to get the password. (camel_cipher_hash_to_nss): Convenience function to convert a CamelCipherHash to an NSS HASH_HashType. (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag. (pkcs7_digest): Digest function for use with pkcs7_sign(). (sign_encode_cb): Callback to write the signed data to the output stream. (pkcs7_verify): Hacked on a bit more but am still a bit on the confused side. This might work but I wouldn't hold my breath. The sign/clearsign should be close if not correct, but this one...god only knows. svn path=/trunk/; revision=9460
* missed this with the last commit (pop3 and imap memory leaks)Dan Winship2001-04-191-0/+14
| | | | svn path=/trunk/; revision=9453
* Free base_url and storage_path.Dan Winship2001-04-193-5/+33
| | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (camel_imap_store_finalize): Free base_url and storage_path. * providers/pop3/camel-pop3-store.c (finalize): Free the implementation string. (camel_pop3_command): Clarify documentation to mention that @ex isn't set (and *@ret is) on CAMEL_POP3_ERR. (connect_to_server): Set @ex properly on CAMEL_POP3_ERR. * providers/pop3/camel-pop3-folder.c (pop3_refresh_info, pop3_get_message): Set @ex properly on CAMEL_POP3_ERR. svn path=/trunk/; revision=9450
* New source files to handle Pkcs7 encryption, decryption, signing, andJeffrey Stedfast2001-04-184-0/+330
| | | | | | | | | | | 2001-04-17 Jeffrey Stedfast <fejj@ximian.com> * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7 encryption, decryption, signing, and verifying. Not yet complete. I'm sensing this is going to take a while seeing as how NSS is just so well documented. svn path=/trunk/; revision=9435
* more memory leaksDan Winship2001-04-182-0/+7
| | | | svn path=/trunk/; revision=9431
* don't use g_return'sJeffrey Stedfast2001-04-171-2/+3
| | | | svn path=/trunk/; revision=9396
* Don't we want to tell where we are by using the start of the message? IJeffrey Stedfast2001-04-172-5/+14
| | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we want to tell where we are by using the start of the message? I think this should be using camel_mime_parser_tell_start_from() instead. Also divide by the size *before* multiplying by 100 so that we don't overflow the int which was giving us negative values for our progress status (oops). svn path=/trunk/; revision=9394
* Added a prototype for stamp().Jeffrey Stedfast2001-04-174-1/+11
| | | | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-operation.c: Added a prototype for stamp(). * camel-charset-map.c (camel_charset_locale_name): #include string.h so we don't get a warning about strchr being undefined and also init charset to NULL. * camel-pgp-context.c (pgp_verify): Go back to doing the utf8 conversion by hand so that we don't depend on gal. svn path=/trunk/; revision=9388
* Go back to doing the utf8 conversion by hand so that we don't depend onJeffrey Stedfast2001-04-172-4/+46
| | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Go back to doing the utf8 conversion by hand so that we don't depend on gal. svn path=/trunk/; revision=9387
* oops, forgot to commit this with the last filesJeffrey Stedfast2001-04-171-1/+0
| | | | svn path=/trunk/; revision=9384
* Remove the EXTRA_GNOME_CFLAGS include.Jeffrey Stedfast2001-04-1711-21/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include. * camel-store.c (camel_mkdir_hier): Convenience function that it seems a number of camel-store implementations used gal for. * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * providers/nntp/camel-imap-store.c: Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * camel-session.c (camel_session_get_storage_path): Don't depend on e_mkdir_heir() anymore, use the CamelStore version. * camel-folder-search.h: Removed gal dependency, why was this even there in the first place? * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h here, so remove it. * string-utils.c (strstrcase): New function, well more like old function brought back to life so we don't have to depend on gal. * providers/imap/camel-imap-store.c (imap_store_setup_online): Use strstrcase rather than e_strstrcase so we don't depend on gal. (get_unread_online): Same here. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use strstrcase. svn path=/trunk/; revision=9383
* eh?Jeffrey Stedfast2001-04-171-2/+0
| | | | svn path=/trunk/; revision=9377
* oops, &patternJeffrey Stedfast2001-04-161-2/+2
| | | | svn path=/trunk/; revision=9334
* regex doesn't set errno and regcomp returns 0 on success and any otherJeffrey Stedfast2001-04-162-5/+21
| | | | | | | | | | 2001-04-15 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_raw_check_mailing_list): regex doesn't set errno and regcomp returns 0 on success and any other value for an error (so don't *just* check for -1). svn path=/trunk/; revision=9333
* Check to make sure the context is a valid context in all the userJeffrey Stedfast2001-04-152-0/+15
| | | | | | | | | 2001-04-14 Jeffrey Stedfast <fejj@ximian.com> * camel-cipher-context.c: Check to make sure the context is a valid context in all the user functions. svn path=/trunk/; revision=9314
* s/imap_store/store/, fixing a typo that was causing the build to fail.Jon Trowbridge2001-04-142-5/+9
| | | | | | | | | | 2001-04-13 Jon Trowbridge <trow@ximian.com> * providers/imap/camel-imap-store.c (imap_disconnect): s/imap_store/store/, fixing a typo that was causing the build to fail. svn path=/trunk/; revision=9306
* Make the (previously unused) get-source command actually do the rightJon Trowbridge2001-04-143-4/+22
| | | | | | | | | | | | | | | | | | | | | | 2001-04-13 Jon Trowbridge <trow@gnu.org> * camel-filter-search.c (get_source): Make the (previously unused) get-source command actually do the right thing, properly shrouding any passed-in source and falling back to use the source attached to the mime message. 2001-04-13 Jon Trowbridge <trow@gnu.org> * filtertypes.xml: Add XML specs for source account filtering. * filter-element.c (filter_element_new_type_name): Recognize type "source", construct a FilterSource. * filter-source.c: Added. A FilterElement for the account e-mail comes from. svn path=/trunk/; revision=9304
* Plug leaks.Dan Winship2001-04-146-10/+41
| | | | | | | | | | | | | | | | * camel-object.c (camel_object_hook_event): * camel-uid-cache.c (camel_uid_cache_get_new_uids): * camel-url.c (camel_url_new_with_base): Plug leaks. * camel-remote-store.c (camel_remote_store_init): Don't re-initialize the folders hash table. * providers/imap/camel-imap-store.c (imap_disconnect): Free authtypes since they'll be re-read on re-connect. (get_folder_info): Free folderinfos that we're discarding from the list. svn path=/trunk/; revision=9302
* Oops, lets not get into a recursive call here ;-)Jeffrey Stedfast2001-04-135-15/+24
| | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not get into a recursive call here ;-) * tests/smime/pgp.c: Updated to reflect changes to the PGP code. * tests/smime/pgp-mime.c: Same. svn path=/trunk/; revision=9287
* Updated to reflect the few changes made to the CamelPgpContext class.Jeffrey Stedfast2001-04-138-313/+662
| | | | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-mime.c: Updated to reflect the few changes made to the CamelPgpContext class. * camel-pgp-context.c: Updated to subclass of CamelCipherContext. * camel-cipher-context.[c,h]: New base class for CamelPgpContext. Also contains the replacement for CamelPgpValidity, CamelCipherValidity. svn path=/trunk/; revision=9283
* Fix a pair of array bounds reads noted by purifyDan Winship2001-04-132-2/+7
| | | | | | | * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds reads noted by purify svn path=/trunk/; revision=9282
* oh, and the tcp-stream headers.Jeffrey Stedfast2001-04-131-0/+3
| | | | svn path=/trunk/; revision=9281
* #include the pgp stuff.Jeffrey Stedfast2001-04-132-0/+6
| | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel.h: #include the pgp stuff. svn path=/trunk/; revision=9280
* Plug memory leaks.Dan Winship2001-04-133-0/+8
| | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_remove): * camel-url.c (camel_url_to_string): Plug memory leaks. svn path=/trunk/; revision=9271
* s/IMAP/SMTPJeffrey Stedfast2001-04-121-1/+1
| | | | svn path=/trunk/; revision=9265
* Simplify peterw's imap_is_atom_char fix.Dan Winship2001-04-122-2/+7
| | | | | | | * providers/imap/camel-imap-utils.c (imap_parse_string_generic): Simplify peterw's imap_is_atom_char fix. svn path=/trunk/; revision=9250
* Added pgp-mime.c to the tests.Jeffrey Stedfast2001-04-127-26/+155
| | | | | | | | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/Makefile.am: Added pgp-mime.c to the tests. * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions. * Makefile.am: Add camel-pgp-mime.[c,h] to the build. * camel-pgp-mime.c: Made a number of fixes to get it to compile and also fixed a few logic errors (mostly forgetting to reset streams) so that it worked (thanks to the pgp-mime test program). svn path=/trunk/; revision=9247
* Check if gethostbyname_r take five paramsJP Rosevear2001-04-128-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-11 JP Rosevear <jpr@ximian.com> * configure.in: Check if gethostbyname_r take five params * acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS 2001-04-11 JP Rosevear <jpr@ximian.com> * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome files are included in the top level camel headers and the gtk include dir is now versioned and such * providers/local/Makefile.am: ditto * providers/pop3/Makefile.am: ditto * providers/smtp/Makefile.am: ditto * providers/sendmail/Makefile.am: ditto * camel-service.c: use five arg version of gethostbyname_r if appropriate (camel_get_host_byname): check if msg->herr is non-zero instead of checking if msg->hp is null since we may not always have msg->hp svn path=/trunk/; revision=9239
* add camel-charset-map.h to the list of includesJeffrey Stedfast2001-04-111-0/+1
| | | | svn path=/trunk/; revision=9238
* Use camel_charset_locale_name() to get the locale charset rather thanJeffrey Stedfast2001-04-114-3/+58
| | | | | | | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-digest-md5.c (digest_response): Use camel_charset_locale_name() to get the locale charset rather than checking the CHARSET environment variable. This is a much less ugly hack. Also: If we fail to be able to convert to UTF8, then disavow all knowledge of the charset parameter. * camel-charset-map.c (camel_charset_locale_name): New function to return the locale charset (or NULL if US-ASCII). svn path=/trunk/; revision=9237
* Use e_utf8_from_locale_string() rather than trying to do it manually sinceJeffrey Stedfast2001-04-112-26/+10
| | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_verify): Use e_utf8_from_locale_string() rather than trying to do it manually since Lauris's version works much better. svn path=/trunk/; revision=9236
* Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.cJeffrey Stedfast2001-04-1010-28/+182
| | | | | | | | | | | | | 2001-04-06 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.c and Makefile.am * tests/smime/pgp.c: New test suite for PGP functions. * camel-pgp-context.c: Various fixes to get it to build. svn path=/trunk/; revision=9213
* It would be a good idea to recognize '\0'. Before, this code was runningPeter Williams2001-04-082-1/+8
| | | | | | | | | | | 001-04-07 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It would be a good idea to recognize '\0'. Before, this code was running off the ends of strings and intermittently coredumping (if it didn't hit an imap_atom_char first) -- whoops! svn path=/trunk/; revision=9202
* merge from evolution-0-10-branch to evolution-0-10-merge-0Not Zed2001-04-059-26/+257
| | | | | | | | 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
* Added tests/ back inJeffrey Stedfast2001-04-043-131/+219
| | | | | | | | | | | | | | | 2001-04-03 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added tests/ back in * camel-mime-utils.c (header_decode_text): Ignore whitespace between encoded words (there were a few cases where it didn't before). (header_encode_string): Preserve whitespace between words that are to be encoded by encoding them too. (header_encode_phrase): Same here but with phrases. svn path=/trunk/; revision=9158
* (imap_update_summary): When reading message flags, set theDan Winship2001-04-042-2/+13
| | | | | | | | server_flags field as well, and don't overwrite any flags set by camel_folder_summary_info_new_from_message. Might help with some of the flag problems... svn path=/trunk/; revision=9149
* (imap_get_message): If the server_level < IMAP4rev1, always fetchDan Winship2001-04-042-3/+9
| | | | | | | messages all-at-once, since they don't support the [#.MIME] syntax. svn path=/trunk/; revision=9145
* If we don't change any flags or expunge, send a NOOP to give the server aDan Winship2001-04-042-1/+17
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_sync): If we don't change any flags or expunge, send a NOOP to give the server a chance to send EXISTS, etc, messages. svn path=/trunk/; revision=9142
* Remove the "quick_login" member, which is unnecessary.Dan Winship2001-04-0312-44/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-service.h: Remove the "quick_login" member, which is unnecessary. * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the references to quick_login and fix this to use the CamelSasl interfaces correctly to do the same thing. (connect_to_server): Split this out of smtp_connect (smtp_connect): Use connect_to_server. When re-EHLO'ing after auth, ignore errors. (query_auth_types): Use connect_to_server rather than smtp_connect, so it doesn't try to authenticate. Add LOGIN authtype to the list of authtypes to check for. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): Add LOGIN authtype to the authtypes list explicitly. * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here: it's not a real SASL authtype and is only used for SMTP. * camel-sasl-plain.c: * camel-sasl-login.c: * camel-sasl-kerberos4.c: * camel-sasl-cram-md5.c: * camel-sasl-anonymous.c: * providers/pop3/camel-pop3-provider.c: Remove "quick_login" argument from authtypes. svn path=/trunk/; revision=9100
* marked report status strings for tanslation, fixes #1973Gediminas Paulauskas2001-04-032-7/+11
| | | | svn path=/trunk/; revision=9099
* mutex lock & unlock the context. (camel_pgp_clearsign): Same.Jeffrey Stedfast2001-04-022-0/+55
| | | | | | | | | | | | 2001-04-02 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the context. (camel_pgp_clearsign): Same. (camel_pgp_verify): Same. (camel_pgp_encrypt): Same. (camel_pgp_decrypt): And finally here... svn path=/trunk/; revision=9096
* Update the function prototypes to match those found inJeffrey Stedfast2001-04-025-8/+585
| | | | | | | | | | | | | | | | 2001-04-02 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.h: Update the function prototypes to match those found in camel-pgp-context.c. * camel-pgp-context.c: Updated. * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented. (camel_pgp_mime_part_verify): Implemented. (camel_pgp_mime_part_encrypt): Implemented. (camel_pgp_mime_part_decrypt): Implemented. svn path=/trunk/; revision=9095
* New files to handle the LOGIN SASL mechanism.Jeffrey Stedfast2001-04-028-23/+241
| | | | | | | | | | | | | | | | | | | 2001-04-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL mechanism. * camel-sasl-plain.c: Removed the definition of camel_sasl_login_authtype. * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an alias to PLAIN. I was wrong. These two SASL objects have to be separate. * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to check for and use authmech->quick_login when available. svn path=/trunk/; revision=9088
* Updated the authtypes here too.Jeffrey Stedfast2001-04-023-4/+13
| | | | | | | | | 2001-04-01 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-provider.c: Updated the authtypes here too. svn path=/trunk/; revision=9087
* Updated the authtype values.Jeffrey Stedfast2001-04-0212-11/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-plain.c: * camel-sasl-anonymous.c: * camel-sasl-digest-md5.c: * camel-sasl-cram-md5.c: * camel-sasl-kerberos4.c: Updated the authtype values. * camel-service.h: Added another field to CamelServiceAuthType that specifies whether or not the mechanism supports "quick auth" which means that the client can send the initial challenge in the AUTH request. * camel-sasl.c (camel_sasl_new): Add support for LOGIN. (camel_sasl_authtype_list): Here too. (camel_sasl_authtype): And finally here. * camel-sasl-plain.c: Define camel_sasl_login_authtype. * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref the SASL object if it exists. svn path=/trunk/; revision=9086
* Move things around here to make this all work right again (so you don'tDan Winship2001-03-312-47/+35
| | | | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server, query_auth_types, pop3_connect): Move things around here to make this all work right again (so you don't get prompted for a password when checking the supported authtypes.) svn path=/trunk/; revision=9056
* Add support for converting e-mail addresses to links. (is_email_address):Jon Trowbridge2001-03-312-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-30 Jon Trowbridge <trow@ximian.com> * e-html-utils.c (e_text_to_html_full): Add support for converting e-mail addresses to links. (is_email_address): Added. Identifies e-mail addresses. (email_address_extract): Added. Extracts a copy of the e-mail address from the text. * e-html-utils.h (E_TEXT_TO_HTML_CONVERT_ADDRESSES): Added. * e-url.c (e_url_shroud): Added. Copy a url, replacing any plaintext passwords with a single *. (e_url_equal): Compare two urls, taking into account that they may or may not be shrouded. 2001-03-30 Jon Trowbridge <trow@ximian.com> * camel-mime-message.c (camel_mime_message_set_source): Shrould our source URL before putting it into X-Evolution-Source. 2001-03-30 Jon Trowbridge <trow@ximian.com> * mail-display.c (mail_text_write): Add (commented-out) E_TEXT_TO_HTML_CONVERT_ADDRESSES. * mail-config.c (mail_config_get_account_by_source_url): Call e_url_equal to compare URLs. svn path=/trunk/; revision=9050
* removed a g_warning for debuggingJeffrey Stedfast2001-03-301-2/+0
| | | | svn path=/trunk/; revision=9037
* Don't blindly append "/INBOX", construct a CamelURL and set the path thatJeffrey Stedfast2001-03-302-7/+44
| | | | | | | | | | | | | | 2001-03-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info): Don't blindly append "/INBOX", construct a CamelURL and set the path that way. (parse_list_response_as_folder_info): Don't blindly append "/<foldername>", construct a CamelURL and set the path that way instead. (get_folders_offline): And again here. svn path=/trunk/; revision=9036
* Dont overwrite an exception if we got one already. Added camel_operationNot Zed2001-03-302-10/+25
| | | | | | | | | | 2001-03-30 Not Zed <NotZed@Ximian.com> * camel-service.c (camel_get_host_byname): Dont overwrite an exception if we got one already. Added camel_operation status to it, and comment out some debug. svn path=/trunk/; revision=9034
* Not quite finished but checking in for some local frobbing.Not Zed2001-03-309-17/+163
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Added #include <libgnome/gnome-paper.h>Jon Trowbridge2001-03-304-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Jon Trowbridge <trow@ximian.com> * printing/e-contact-print.c: Added #include <libgnome/gnome-paper.h> * printing/e-contact-print-envelope.c: Added #include <time.h> and #include <libgnome/gnome-paper.h> * gui/component/select-names/e-select-names-completion.c (match_email): Better handle matching of "nameless" contacts. * backend/ebook/e-destination.c (e_destination_get_string): Better handle the case of a "nameless" contact. 2001-03-29 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Save the source URL using camel_mime_message_set_source. * camel-mime-message.c (camel_mime_message_set_source): Renamed camel_mime_message_set_identity to this. Sets the X-Evolution-Source header. (camel_mime_message_get_source): Returns the X-Evolution-Source header. 2001-03-29 Jon Trowbridge <trow@ximian.com> * mail-callbacks.c: Added #include <time.h> to get things to compile. * mail-callbacks.c (mail_generate_reply): Look at the X-Evolution-Source header, and try to find a corresponding account. If this works, send the mail from this account. If not, use the default account. * mail-ops.c (send_queue_send): Strip out the X-Evolution-Source header before sending. * mail-config.c (mail_config_get_account_by_source_url): Added. Look up accounts by source URL. svn path=/trunk/; revision=9032
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-30116-165/+510
| | | | svn path=/trunk/; revision=9024
* change "gboolean show_passwd" to "guint32 flags".Dan Winship2001-03-306-24/+38
| | | | | | | | | | | | | | | | | | * camel-url.c (camel_url_to_string): change "gboolean show_passwd" to "guint32 flags". * tests/misc/url.c (main): Update calls to camel_url_to_string * providers/imap/camel-imap-store.c (construct): Call camel_url_to_string with flags to hide password, authtype, and params to create the base_url. (etc): Update for the fact that the base_url no longer has the "/" at the end. * camel-service.c (construct): Update calls to camel_url_to_string (pass CAMEL_URL_HIDE_PASSWORD) svn path=/trunk/; revision=9014
* New class for PGP encrypting, decrypting, signing and verifying. Next I'llJeffrey Stedfast2001-03-293-0/+1603
| | | | | | | | | | | 2001-03-28 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.[c,h]: New class for PGP encrypting, decrypting, signing and verifying. Next I'll be moving the contents of mail/mail-crypto into Camel. These files will basically replace mail/openpgp-utils.[c,h]. svn path=/trunk/; revision=9008
* Optimise the match "" case, just match everything in the folder (if weNot Zed2001-03-292-2/+14
| | | | | | | | | 2001-03-29 Not Zed <NotZed@Ximian.com> * camel-folder-search.c (search_body_contains): Optimise the match "" case, just match everything in the folder (if we have it). svn path=/trunk/; revision=9007
* (vee_expunge): Oops, call the class sync, not superclass sync.Michael Zucci2001-03-292-1/+4
| | | | svn path=/trunk/; revision=9006
* Access the folder directly from the message info.Not Zed2001-03-294-105/+139
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add the port (if user defined) to the path to fix bug #1996.Jeffrey Stedfast2001-03-282-0/+13
| | | | | | | | | | | 2001-03-27 Jeffrey Stedfast <fejj@ximian.com> * camel-service.c (get_path): Add the port (if user defined) to the path to fix bug #1996. Danw: I'm iffy on the "fix" so I'd like you to comment. svn path=/trunk/; revision=8986
* If we aren't going to even check the resp/free buffer that gets returnedJeffrey Stedfast2001-03-283-5/+15
| | | | | | | | | | | | | | | 2001-03-27 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't going to even check the resp/free buffer that gets returned from camel_pop3_command, don't even bother using it. Send in NULL instead. (pop3_get_message): Check to make sure that the `result' string is non-NULL. It's possible that some POP servers may return with "+OK\r\n<message>..." rather than the expected "+OK ### octets\r\n<message>..." svn path=/trunk/; revision=8985
* Unref the html filter when done. (summary_build_content_info): DisableNot Zed2001-03-272-5/+16
| | | | | | | | | | | 2001-03-27 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_finalize): Unref the html filter when done. (summary_build_content_info): Disable using the html parser to help index html mails until it gets sorted out. svn path=/trunk/; revision=8975
* Fix a cut n paste bug, we want uid_removed not uid_changed deref, fixesNot Zed2001-03-272-1/+6
| | | | | | | | | 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
* add an argument to say whether or not you want "PLAIN" in the list (so youDan Winship2001-03-277-11/+23
| | | | | | | | | | | | | | | | * camel-sasl.c (camel_sasl_authtype_list): add an argument to say whether or not you want "PLAIN" in the list (so you don't end up with "Password" twice in the config dialog). * providers/imap/camel-imap-provider.c (camel_provider_module_init): * providers/imap/camel-imap-store.c (query_auth_types): We don't want PLAIN. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): * providers/smtp/camel-smtp-transport.c (query_auth_types): But we do. svn path=/trunk/; revision=8972
* Add an "extra_conf" field to CamelProvider with structures and defines andDan Winship2001-03-2715-162/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-provider.h: Add an "extra_conf" field to CamelProvider with structures and defines and stuff, for providers to specify additional configuration options that they want. Also add a "supports ssl" flag to the provider flags. * camel-remote-store.c: add a "default_ssl_port" field. (remote_construct): If the URL has the "use_ssl" parameter, set the store's use_ssl flag. (remote_connect): If using SSL and no port specified, use the default_ssl_port rather than the default_port. * providers/smtp/camel-smtp-provider.c (smtp_provider): add CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config gui code knows that the ALLOW_USER and ALLOW_AUTH go together.) (ssmtp_provider): gone * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a flag if "use_ssl" param is set. (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather than checking if this is smtp or ssmtp. * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a bunch of IMAP-specific configuration options, like "check for new mail in all folders" (default TRUE), "show only subscribed folders" (default TRUE), "ignore server-supplied namespace", and "apply filters to INBOX" (not yet implemented). (imap_provider): We support SSL and we no longer allow a path in the URL. (namespace is handled via extra_conf) (simap_provider): Gone * providers/imap/camel-imap-store.c (camel_imap_store_init): Set default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here (construct): remove simap stuff, deal with "use_lsub", "namespace", "check_all", and "filter" parameters. Set base_url to not include params. (imap_store_setup_online): Don't ask for the namespace if it was set explicitly. Don't get subscribed folders if !use_lsub. (imap_concat): Fix a bug. (get_folder_info): Support for not checking all folders. * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep on server" (currently still implemented by the mailer code, not here), "delete after N days" (not yet implemented). (pop3_provider): we support SSL (spop_provider): gone * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set default_ssl_port (pop3_connect): Remove spop code svn path=/trunk/; revision=8968
* Fix parsing of params. (output_param): And unparsing...Dan Winship2001-03-271-2/+7
| | | | | | | * camel-url.c (camel_url_new_with_base): Fix parsing of params. (output_param): And unparsing... svn path=/trunk/; revision=8967
* Rewrite to use imap_store->namespace, not service->url->pathDan Winship2001-03-271-8/+12
| | | | | | | * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite to use imap_store->namespace, not service->url->path svn path=/trunk/; revision=8966
* Move all of the camel_vee_folder_construct() internals here.Jeffrey Stedfast2001-03-272-5/+34
| | | | | | | | | | | | | | 2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-vee-folder.c (vee_folder_construct): Move all of the camel_vee_folder_construct() internals here. (camel_vee_folder_construct): This function basically becomes a wrapper for vee_folder_construct and also checks to make sure that the UNMATCHED vfodler is constructed otherwise constructs it. (camel_vee_folder_new): Call vee_folder_construct() instead so that we don't get into a dead-lock. svn path=/trunk/; revision=8964
* Use camel_vtrash_folder_new() to create the vtrash folder now.Jeffrey Stedfast2001-03-2710-183/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (init_trash): Use camel_vtrash_folder_new() to create the vtrash folder now. * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for our vTrash folders. * camel-folder.c (camel_folder_copy_messages_to): Don't watch for vtrash folders anymore. (camel_folder_move_messages_to): Same. * camel-vee-folder.c (camel_vee_folder_class_init): Update. (vee_move_messages_to): Rewrite to use the new move API. * camel-filter-driver.c (do_copy): Updated to reflect copy_message_to changes. Create a temporary uid array and use that. (do_move): Same. (camel_filter_driver_filter_message): And again, here... * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Update to the new API. (imap_move_messages_to): Same. (get_uid_set): New function to create a `set' string based on an array of UIDs for use with imap_copy_messages_to. * camel-folder.c (camel_folder_copy_messages_to): Replaces camel_folder_copy_message_to (camel_folder_move_message_to): Replaces camel_folder_move_message_to. svn path=/trunk/; revision=8960
* Added folder_created event here.Not Zed2001-03-277-610/+668
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* When writing the last token (if not rfc2047 encoded), don't useJeffrey Stedfast2001-03-272-1/+5
| | | | | | | | | | 2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_text): When writing the last token (if not rfc2047 encoded), don't use g_string_append_len, use append_latin1. svn path=/trunk/; revision=8954
* Don't spew a warning if the message-id wasn't set by the application, notJeffrey Stedfast2001-03-272-10/+12
| | | | | | | | | | 2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-message.c (write_to_stream): Don't spew a warning if the message-id wasn't set by the application, not a big deal since we create one right here. svn path=/trunk/; revision=8952
* Rename this from "PLAIN" to "Password": there's no reason the user needsDan Winship2001-03-271-2/+2
| | | | | | | | * camel-sasl-plain.c (camel_sasl_plain_authtype): Rename this from "PLAIN" to "Password": there's no reason the user needs to see the SASL mechanism name. svn path=/trunk/; revision=8950
* keep a reference on the store's current_folder.Dan Winship2001-03-273-2/+17
| | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command): keep a reference on the store's current_folder. * providers/imap/camel-imap-store.c (camel_imap_store_finalize): (imap_disconnect): unref the current_folder before clearing it. svn path=/trunk/; revision=8945
* Add missing accessor.Dan Winship2001-03-263-0/+10
| | | | | | * camel-url.c (camel_url_get_param): Add missing accessor. svn path=/trunk/; revision=8943
* New. Return the provider for a URL.Dan Winship2001-03-263-18/+71
| | | | | | | * camel-session.c (camel_session_get_provider): New. Return the provider for a URL. svn path=/trunk/; revision=8941
* eh, changed my mind, put the exception back in camel_url_new()Dan Winship2001-03-264-13/+10
| | | | svn path=/trunk/; revision=8934
* New URL parser with full RFC1808 relative URL support. Yum.Dan Winship2001-03-269-199/+523
| | | | | | | | | | | | | | | | * camel-url.c (camel_url_new_with_base): New URL parser with full RFC1808 relative URL support. Yum. (camel_url_new): Wrapper around camel_url_new_with_base now. Removed the CamelException since no one ever used it... * tests/Makefile.am: add misc subdir * tests/misc/url.c: relative URL test cases from RFC 1808 * camel-session.c (camel_session_get_service): Update camel_url_new call. svn path=/trunk/; revision=8933
* Don't use copy_to if the source folder doesn't support summary info's.Jeffrey Stedfast2001-03-252-4/+13
| | | | | | | | | | | | | 2001-03-25 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (do_copy): Don't use copy_to if the source folder doesn't support summary info's. (do_move): Same. (camel_filter_driver_filter_message): And again here. I think this will fix the problem of "colour" tags not staying with the message when it's copied to a folder during the filter process. svn path=/trunk/; revision=8925
* Do charset conversion on the username param here if needed.Jeffrey Stedfast2001-03-252-4/+49
| | | | | | | | | | | 2001-03-24 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-digest-md5.c (digest_response): Do charset conversion on the username param here if needed. (parse_server_challenge): Protect against possibly empty-string charset values. svn path=/trunk/; revision=8920
* Added. Call me old-fashioned, but I just prefer to have a real API ratherJon Trowbridge2001-03-234-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-23 Jon Trowbridge <trow@ximian.com> * gui/widgets/e-minicard-widget.c (e_minicard_widget_set_card): Added. Call me old-fashioned, but I just prefer to have a real API rather than doing everything via gtk_object_get/set-type calls. (e_minicard_widget_set_arg): Changed to call e_minicard_widget_set_card. * backend/ebook/e-book-util.c: Small changes to get rid of compiler warnings. (Casting out const, removed unused variables, etc.) Removed some debugging messages. * gui/component/addressbook-factory.c (main): Added call to e_address_popup_factory_init. * gui/component/e-address-popup.c: Added. A popup gadget that is invoked (as a bonobo control) when an address is left-clicked in the mailer. The addressbook is queries, and the address is either displayed as a minicard (if it already exists) or in a "generic format". A button is provided for editting/adding the contact. Some of the semantics of this widget are a bit... non-standard, because of bonobo issues. I can't really seem to replicate popup-menu behavior because of how bonobo propogates events, etc. so I've tried to produce something that I think is non-annoying. YMMV. 2001-03-23 Jon Trowbridge <trow@ximian.com> * mail-display.c (handle_embedded_address_object): #ifdef away some code I don't quite want to delete yet. (html_button_press_event): Remove some of Radek's placeholder code, replace it with code to create my AddressPopup bonobo control. * mail-format.c: Remove some obsolete code that if #ifdef-ed out a while ago. * mail-ops.c (send_queue_send): Strip out the X-Evolution-Identity header when sending. 2001-03-23 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Don't call camel_mime_message_set_identity. (The call is commented out, left over from some earlier experimentation that I want to be able to remember later...) * camel-mime-message.c (camel_mime_message_set_identity): Added. A function to set the X-Evolution-Identity header. svn path=/trunk/; revision=8916
* Don't look at untagged responses other than "* BYE"...Dan Winship2001-03-235-85/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (imap_read_response): Don't look at untagged responses other than "* BYE"... (camel_imap_response_free): ...do it here instead... (camel_imap_response_free_without_processing): ...but not here. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Remove the "EXISTS" line from the response so camel_imap_response_free won't try to process it. (camel_imap_folder_selected): If we get an EXISTS response mixed in with the FETCH responses, record the new EXISTS value. Use camel_imap_response_free_without_processing so that an EXISTS response won't cause a loop. (imap_rescan): Use camel_imap_response_free_without_processing. (imap_update_summary): Use camel_imap_response_free_without_processing. If an EXISTS response shows up, call imap_update_summary again to get the new messages. (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't deal with RFC822.HEADER responses. * providers/imap/camel-imap-store.c (get_folder_info): Fix an uninitialized variable svn path=/trunk/; revision=8905
* add a "GList *authtypes", so you can get the list of authtypes used by aDan Winship2001-03-2215-282/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-provider.h: (CamelProvider) add a "GList *authtypes", so you can get the list of authtypes used by a provider without needing to have an actual CamelService object handy. (Will be needed by the new config druid.) (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test the URL part stuff, since the way it works is too complicated and everyone always does it wrong. * camel-service.c (camel_service_query_auth_types): Remove the @connected arg again: if you don't want to connect, you can just get the list of authtypes off the provider. (camel_service_free_auth_types): Remove this. All existing implementations do authtypes the same way, so just say the caller should "g_list_free" the list. (Oh, look, removing this function doesn't actually cause the mailer to not build. How 'bout that.) (construct, get_path): Use the new URL part macros. * camel-remote-store.c (remote_query_auth_types): Update (remote_free_auth_types): Nuke (camel_remote_store_authtype_list): New function for use by subclasses. * providers/imap/camel-imap-provider.c: * providers/pop3/camel-pop3-provider.c: * providers/smtp/camel-smtp-provider.c: Update CamelProvider structures. (camel_provider_module_init): Put all the SSL parts together so there's only 1 #ifdef. Set up the provider authtypes field using the SASL, CamelRemoteStore, and standard authtypes, as appropriate. Copy that from the normal provider to the SSL provider. * providers/local/camel-local-provider.c: * providers/sendmail/camel-sendmail-provider.c: * camel-session.c: Update CamelProvider structures. * providers/imap/camel-imap-store.c (query_auth_types): * providers/pop3/camel-pop3-store.c (query_auth_types): Update * providers/smtp/camel-smtp-store.c (query_auth_types): Update. Remove the no_authtype, because that's what "ALLOW_AUTH" rather than "NEED_AUTH" means. (free_auth_types): Nuke. svn path=/trunk/; revision=8872
* Return -1 on fail. (camel_filter_driver_filter_folder): Same.Jeffrey Stedfast2001-03-226-30/+63
| | | | | | | | | | | | | | | | | | | | 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
* Function to check if the store is online and set an exception if not.Dan Winship2001-03-219-190/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (camel_imap_store_check_online): Function to check if the store is online and set an exception if not. Currently controlled by an environment variable, but eventually there will be both a global (session-level) setting and a per-store setting. (construct): Set up storage_path and base_url here rather than at connect-time. (imap_auth_loop): Split out from imap_connect. (imap_setup_online): Split out from imap_connect. Do the post-authentication connection setup, and cache the results to disk. (imap_setup_offline): Set up a CamelImapStore with information saved from a previous imap_setup_online. (imap_connect): If online, do connect_to_server(), imap_auth_loop(), and imap_setup_online(). Otherwise, do imap_setup_offline(). (get_folder, get_folder_info): Add offline support. (create_folder, subscribe_folder, unsubscribe_folder): Disable these when offline (for now). * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Remove the sync'ing-with-server stuff... it's done by camel_imap_folder_selected now, which only gets called if the store is online. (camel_imap_folder_selected): add the code removed from camel_imap_folder_new. Besides simplifying the folder_new and summary_new code, this also means now that we'll DTRT if a folder's UIDVALIDITY changes while we're connected. Also, when that happens, clear the message cache explicitly. (imap_refresh_info, imap_sync): These are no-ops when offline. (imap_expunge, imap_append_message, imap_copy_message_to, imap_search_by_expression): These don't yet work offline. (imap_get_message, camel_imap_folder_fetch_data): Return an error when trying to fetch a non-cached body part when we're offline. * providers/imap/camel-imap-summary.c (camel_imap_summary_new): Rewrite to not check the validity here. (We'll do it from camel_imap_folder_selected instead.) * providers/imap/camel-imap-command.c (camel_imap_command): Call camel_imap_folder_selected even when the selection is all we're doing, to match the changes in camel-imap-folder.c. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_clear): New function to clear out a message cache. svn path=/trunk/; revision=8851
* Added $(EXTRA_GNOME_CFLAGS)Christopher James Lahey2001-03-202-0/+5
| | | | | | | | 2001-03-19 Christopher James Lahey <clahey@ximian.com> * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS) svn path=/trunk/; revision=8838
* Set the errbuf to NULL after freeing it? I don't think this should fix bugJeffrey Stedfast2001-03-192-0/+7
| | | | | | | | | | 2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf to NULL after freeing it? I don't think this should fix bug #1801 but I guess it can't hurt. svn path=/trunk/; revision=8818
* Protect against a possibly NULL exception.Jeffrey Stedfast2001-03-192-1/+7
| | | | | | | | | 2001-03-18 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c (remote_recv_line): Protect against a possibly NULL exception. svn path=/trunk/; revision=8811
* Document and modify to return a boolean value denoting whether or notJeffrey Stedfast2001-03-193-21/+90
| | | | | | | | | | | | | | | | | | 2001-03-18 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Document and modify to return a boolean value denoting whether or not errors occured during processing. (camel_filter_driver_filter_mbox): Same as above and also modified to check return codes of filter_message rather than relying only on whether or not the exception was set (as it's possible to pass in NULL for the exception). (camel_filter_driver_filter_folder): Same as above. * camel-mime-utils.c (header_param_list_format_append): Quote the param value if it contains whitespace as well. svn path=/trunk/; revision=8808
* Quote the param value if it contains whitespace as well.Jeffrey Stedfast2001-03-192-1/+6
| | | | | | | | | 2001-03-18 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_param_list_format_append): Quote the param value if it contains whitespace as well. svn path=/trunk/; revision=8804
* Don't include system include dir.Jeffrey Stedfast2001-03-184-4/+12
| | | | | | | | | | | | | 2001-03-17 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Don't include system include dir. * camel.c: Use quotes around the nss.h include so it doesn't try to use the systen nss.h file. * camel-tcp-stream-ssl.c: Same here. svn path=/trunk/; revision=8786
* Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check theNot Zed2001-03-172-0/+7
| | | | | | | | | | 2001-03-17 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-summary.c (maildir_summary_sync): Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check the maildir directory for new/updated messages at sync time. svn path=/trunk/; revision=8781
* Implemented. (ref_message_info): And default implementation.Not Zed2001-03-175-3/+204
| | | | | | | | | | | | | | | | | | | 2001-03-17 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_ref_message_info): Implemented. (ref_message_info): And default implementation. * camel-folder.h: Added ref_message_info virtual method. 2001-03-16 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new_summary): New function to create a thread tree from a supplied summary array. (camel_folder_thread_messages_destroy): Handle thread trees generated by the above function properly. svn path=/trunk/; revision=8774
* Same.Jeffrey Stedfast2001-03-173-2/+8
| | | | | | | | | | 2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * camel-private.h: Same. * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s svn path=/trunk/; revision=8767
* removed camel-stream-ssl.c and camel-stream-ssl.hJeffrey Stedfast2001-03-172-316/+0
| | | | svn path=/trunk/; revision=8765
* Print info about the issuer of the certificate.Jeffrey Stedfast2001-03-179-82/+170
| | | | | | | | | | | | | | | | | | | | 2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the issuer of the certificate. * providers/smtp/camel-smtp-transport.c (smtp_connect): Use camel_tcp_stream_get_socket(). * camel-tcp-stream-openssl.c (stream_get_socket): Implemented. * camel-tcp-stream-ssl.c (stream_get_socket): Implemented. * camel-tcp-stream-raw.c (stream_get_socket): Implemented. * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function. svn path=/trunk/; revision=8764
* Added #include <config.h>Kjartan Maraas2001-03-172-0/+8
| | | | | | | | 2001-03-16 Kjartan Maraas <kmaraas@gnome.org> * providers/pop3/camel-pop3-folder.c: Added #include <config.h> svn path=/trunk/; revision=8762
* Don't use getdomainname: it's NIS crap, not DNS.Dan Winship2001-03-172-6/+9
| | | | | | | * camel-mime-utils.c (header_msgid_generate): Don't use getdomainname: it's NIS crap, not DNS. svn path=/trunk/; revision=8761
* Don't use the hardcoded cert db directory, use the one passed in.Jeffrey Stedfast2001-03-163-14/+134
| | | | | | | | | | | | | | | | | 2001-03-15 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): Don't use the hardcoded cert db directory, use the one passed in. * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default implementation. Not that we'll use this though, since this is the default implementation provided by NSS anyway. This more or less serves as a reference in case we want to change anything. (ssl_auth_cert): Same. (ssl_bad_cert): Changed the prompt string and free it when we're done. svn path=/trunk/; revision=8753
* translate NIL to "" in fetch body part responseDan Winship2001-03-161-1/+3
| | | | svn path=/trunk/; revision=8744
* First batch of disconnected IMAP-related stuff. This adds localDan Winship2001-03-1613-268/+786
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caching of message parts, but NOT any actual disconnected support. (But it should speed up IMAP use.) * providers/imap/camel-imap-message-cache.c: New class for caching message data to disk, and removing it when it's no longer relevant. Will eventually also support merging message parts together to save on files. Or maybe using a db instead of files? * providers/imap/camel-imap-private.h: Add a cache_lock to CamelImapFolderPrivate. This lock must be recursive, so make both locks EMutexes rather than GMutex. * providers/imap/camel-imap-folder.c (parse_fetch_response): "The only FETCH response parser you need!" Replaces the various almost-correct bits of code formerly scattered throughout this file with a single fully-correct function that can handle any FETCH response at any time, so we don't get confused by seeing a flags update when we were only expecting a message body, etc. (camel_imap_folder_fetch_data): FETCH a message body part either from the cache or the server (camel_imap_folder_changed): Remove expunged messages from the message cache. (camel_imap_folder_new): Change to take a directory instead of a summary file name. Create a CamelImapMessageCache for the folder. (imap_finalize): Unref the message cache. (camel_imap_folder_selected, imap_rescan, get_content, get_message, imap_get_message, imap_update_summary): Redone a bunch to use parse_fetch_data, CamelImapMessageCache, etc. * providers/imap/camel-imap-store.c (get_folder): Pass directory name to camel_imap_folder_new, not summary filename. Use e_path_to_physical to generate a path with /subfolders/ inserted between directory components. * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new): Call camel_imap_folder_fetch_data (with cache_only TRUE) and if the data is cached, return an online datawrapper rather than an offline one. (write_to_stream): Use camel_imap_folder_fetch_data (with cache_only FALSE) here too * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from skip_list and made non-static. svn path=/trunk/; revision=8743
* Uninclude prnetdb.h since it's not needed here.Jeffrey Stedfast2001-03-165-7/+16
| | | | | | | | | | | | | | | | 2001-03-15 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not needed here. * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here instead of making camel-tcp-stream-ssl.h include it. Prevents some header bloat. * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and NSS_CFLAGS. svn path=/trunk/; revision=8738
* Update for using CamelTcpStreams and also for using SSL.Jeffrey Stedfast2001-03-153-20/+52
| | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for using CamelTcpStreams and also for using SSL. * providers/smtp/libcamelsmtp.urls: defined "ssmtp" * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP provider. (camel_provider_module_init): Register the Secure SMTP provider. svn path=/trunk/; revision=8728
* defined "ssmtp"Jeffrey Stedfast2001-03-155-10/+50
| | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/libcamelsmtp.urls: defined "ssmtp" * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP provider. (camel_provider_module_init): Register the Secure SMTP provider. svn path=/trunk/; revision=8726
* also change the protocol name in the providersJeffrey Stedfast2001-03-152-2/+2
| | | | svn path=/trunk/; revision=8725
* Check for "simap" instead of "imaps".Jeffrey Stedfast2001-03-155-5/+18
| | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_connect): Check for "simap" instead of "imaps". * providers/pop3/camel-pop3-store.c (pop3_connect): Change the port to be 995 for spop. * providers/pop3/libcamelpop3.urls: Change to "spop". * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to correspond to /etc/services. svn path=/trunk/; revision=8724
* Check to see if we are using "pops" and then set the appropriate SSLJeffrey Stedfast2001-03-154-3/+54
| | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see if we are using "pops" and then set the appropriate SSL settings. * providers/pop3/libcamelpop3.urls: Add "pops" * providers/pop3/camel-pop3-provider.c: Defined the pops provider. (camel_provider_module_init): Register the pops provider. svn path=/trunk/; revision=8723
* Ya know what? Lets not ref the service because otherwise we'll startJeffrey Stedfast2001-03-152-2/+9
| | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what? Lets not ref the service because otherwise we'll start having the same problems we had back with vtrash. Besides, since the store owns the stream, it's not like the store is going anywhere without the stream anyway. (camel_tcp_stream_ssl_finalize): No need to unref the service. svn path=/trunk/; revision=8722
* Pass the service into the SSL stream, not the session.Jeffrey Stedfast2001-03-154-22/+37
| | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c (remote_connect): Pass the service into the SSL stream, not the session. * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the service to NULL. (camel_tcp_stream_ssl_finalize): Unref the service. (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather than a CamelSession arg. svn path=/trunk/; revision=8720
* So it turns out that NSS_Init *isn't* idempotent, so we have to protectJeffrey Stedfast2001-03-157-29/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): So it turns out that NSS_Init *isn't* idempotent, so we have to protect against initializing it more than once(contrary to what their design specs suggest). * camel-session.c (camel_session_get_service): Use camel_exception_is_set() - Makes no difference but it's more consistant with how we normally do it. * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this. * providers/imap/camel-imap-provider.c: Define the imaps provider. (camel_provider_module_init): Register the imaps provider. * camel-provider.c (camel_provider_init): Only add the protocol to the hash table if it's non empty. Also, g_strdup() the filename into the hash table. * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! So the service's URL isn't set until after this is initialized. This means we can't check for SSL here. (imap_connect): Set the SSL options here instead. svn path=/trunk/; revision=8718
* Eek! So the service's URL isn't set until after this is initialized. ThisJeffrey Stedfast2001-03-154-15/+21
| | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! So the service's URL isn't set until after this is initialized. This means we can't check for SSL here. (imap_connect): Set the SSL options here instead. svn path=/trunk/; revision=8715
* Numerous fixes to get it to build correctly with NSS enabled.Jeffrey Stedfast2001-03-159-16/+56
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c: Numerous fixes to get it to build correctly with NSS enabled. * camel-remote-store.c (remote_connect): Pass in the session and expected host args, oops. * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined. * providers/imap/camel-imap-store.c (camel_imap_store_init): Check to see if we are supposed to use SSL and set the options accordingly. (imap_connect): Return FALSE here instead of NULL. * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL. * providers/imap/libcamelimap.urls: Add "imaps" which is the protocol for Secure IMAP. svn path=/trunk/; revision=8711
* AddedJeffrey Stedfast2001-03-155-0/+613
| | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.[c,h]: Added * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build. * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL svn path=/trunk/; revision=8710
* re-constify inbuf, to remove a warning.Not Zed2001-03-1410-16/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Not Zed <NotZed@Ximian.com> * camel-mime-filter-charset.c (filter, complete): re-constify inbuf, to remove a warning. * camel-mime-parser.c (folder_scan_step): When we're out of data, run the filter_complete. For some reason the logic that was there was never being run, always try it now, i think it was to work around a buggy filter, rather than fix it the right way. * camel-folder-summary.c (summary_build_content_info): If indexing html parts, use the html filter to convert it to some indexable format. (summary_build_content_info): Reset the filters before adding them back to the stream, if they get re-used in a given instance (likely). * Makefile.am (libcamelinclude_HEADERS): Added camel-mime-filter-html.[ch]. (INCLUDES): Added xml clags 2001-03-05 Not Zed <NotZed@Ximian.com> * camel-folder-search.c (camel_folder_search_class_init): Setup a new function, "uid" which matches uids. (search_uid): Implement the "match uid" command. svn path=/trunk/; revision=8705
* Check for a new type of mailing list header.Jeffrey Stedfast2001-03-143-0/+6
| | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Check for a new type of mailing list header. svn path=/trunk/; revision=8702
* Made cancellable. (stream_write): Same. (stream_connect): Removed checksJeffrey Stedfast2001-03-143-42/+114
| | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-raw.c (stream_read): Made cancellable. (stream_write): Same. (stream_connect): Removed checks for DIVINE_INTERVENTION as the code worked fine. * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it wasn't really needed. (set_errno): New function to set errno based on the NSPR error code. (stream_read): If an error occured, call set_errno(). (stream_write): Same. svn path=/trunk/; revision=8701
* Added camel-tcp-stream-ssl to the build.Jeffrey Stedfast2001-03-143-0/+10
| | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-tcp-stream-ssl to the build. * camel-remote-store.h: Add a use_ssl member to the CamelRemoteStore object. svn path=/trunk/; revision=8698
* Oops. Make this a subclass of CamelTcpStream, not CamelStream.Jeffrey Stedfast2001-03-147-126/+163
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type): Oops. Make this a subclass of CamelTcpStream, not CamelStream. * camel-types.h: Add the defs for CamelTcpStream and CamelTcpStreamRaw * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to the build. * camel-remote-store.c (remote_connect): Update to use CamelTcpStreams. * camel-tcp-stream-raw.c (stream_connect): Made cancellable by copying the currently used code in camel-remote-store.c. (stream_setsockopt): Oops, flags = fcntl (..., GET_FL); (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of CamelTcpStream, not CamelStream. svn path=/trunk/; revision=8697
* Since all of the Mozilla libs (including NSPR and NSS) correctly handleJeffrey Stedfast2001-03-143-3/+33
| | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): Since all of the Mozilla libs (including NSPR and NSS) correctly handle reinitializations, we might as well init both NSPR and NSS in camel_init so we can be sure of that these libs have been initialized. (camel_shutdown): New function to call the NSS cleanup stuff. svn path=/trunk/; revision=8690
* Don't allow the user to copy a message to or from the vtrash folder. SetJeffrey Stedfast2001-03-144-34/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* When trying again after a failed password attempt, check if the connectionDan Winship2001-03-142-0/+12
| | | | | | | | * providers/imap/camel-imap-store.c (imap_connect): When trying again after a failed password attempt, check if the connection got dropped (which Courier will do) and deal accordingly. svn path=/trunk/; revision=8675
* More fixing for exim: It can't deal with "-tif", you need to say "-t -iDan Winship2001-03-142-10/+17
| | | | | | | | * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to, sendmail_send): More fixing for exim: It can't deal with "-tif", you need to say "-t -i -f". svn path=/trunk/; revision=8674
* Rename the folder to "Trash" and i18nify it.Jeffrey Stedfast2001-03-132-1/+6
| | | | | | | | | 2001-03-12 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (init_trash): Rename the folder to "Trash" and i18nify it. svn path=/trunk/; revision=8646
* Comment out everything unless HAVE_NSS is defined.Jeffrey Stedfast2001-03-113-15/+38
| | | | | | | | | | | | | 2001-03-09 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS is defined. * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use nspr's error code stuff. (stream_write): Same. svn path=/trunk/; revision=8626
* Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No promptJeffrey Stedfast2001-03-104-83/+36
| | | | | | | | | | | | | | 2001-03-09 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (camel_session_query_authenticator): Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to the user. This will be needed by the SSL/TLS code to come. Also changed the return value to a gpointer rather than a char* to allow the returning of TRUE/FALSE values. * camel.c: Wrap stuff with HAVE_NSS svn path=/trunk/; revision=8623
* Remove the "-U" for now, because it breaks exim's "sendmail" wrapper. (AndDan Winship2001-03-102-2/+8
| | | | | | | | | | * providers/sendmail/camel-sendmail-transport.c (sendmail_send, sendmail_send_to): Remove the "-U" for now, because it breaks exim's "sendmail" wrapper. (And it doesn't actually do all that much to sendmail's behavior, and it was working fine before anyway.) svn path=/trunk/; revision=8621
* Fix a bug that could make this walk off the end of a string. (The bug hasDan Winship2001-03-102-3/+10
| | | | | | | | * camel-mime-utils.c (header_fold): Fix a bug that could make this walk off the end of a string. (The bug has been there since December... maybe this will fix some unreproduceable crashes?) svn path=/trunk/; revision=8619
* Changes so that the folder gets added to the vtrash reguardless of whetherJeffrey Stedfast2001-03-092-9/+22
| | | | | | | | | | | | 2001-03-08 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): Changes so that the folder gets added to the vtrash reguardless of whether or not the store is holding it's own folder lookup hash. (init_trash): Oops, lets try locking the cache before we go and add all the cached folders to the vtrash. svn path=/trunk/; revision=8609
* These fixes make it so that the CamelStore does not actually hold a ref onJeffrey Stedfast2001-03-092-27/+54
| | | | | | | | | | | | | | | | | | | | 2001-03-08 Jeffrey Stedfast <fejj@ximian.com> These fixes make it so that the CamelStore does not actually hold a ref on it's vTrash folder. The vTrash folder is now created ONLY when it is requested. This solves the problem of not being able to unref a Store and have it disconnect/finalize like we expect it to. * camel-store.c (init_trash): When we create the vtrash, add all previously opened folders to it and hook on to the finalize event so that we can then set the store->vtrash to NULL. (get_trash): If a vtrash folder for the store doesn't exist, init_trash() and then try. (construct): No longer need this. (camel_store_class_init): Don't override the construct method. (camel_store_finalize): We no longer hold a ref on the vtrash so don't unref it. svn path=/trunk/; revision=8595
* Implement. (get_trash): Implement. (camel_pop3_store_class_init): OverrideJeffrey Stedfast2001-03-082-0/+31
| | | | | | | | | | | | | | | | 2001-03-07 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (init_trash): Implement. (get_trash): Implement. (camel_pop3_store_class_init): Override the default init_trash and get_trash virtual functions. Hopefully this should fix the problem of pop3 sotre's not disconnecting after the send&recv code finishes downloading mail. Wonder if I should override the default implementation for the mbox, mh, and maildir too? svn path=/trunk/; revision=8592
* (remote_recv_line): Fix another problem...Dan Winship2001-03-082-1/+3
| | | | svn path=/trunk/; revision=8585
* Remove some unused stuffDan Winship2001-03-074-71/+4
| | | | | | | | * providers/local/camel-mbox-provider.c: * providers/vee/.cvsignore: * providers/vee/libcamelvee.urls: Remove some unused stuff svn path=/trunk/; revision=8582
* Return the return value of camel_service_connect rather than returningDan Winship2001-03-072-4/+10
| | | | | | | | | | * camel-remote-store.c (camel_remote_store_connected): Return the return value of camel_service_connect rather than returning !camel_exception_is_set(), since that will be wrong if ex==NULL... Fixes a crash in the IMAP keepalive code, but this same problem probably exists in other places too... svn path=/trunk/; revision=8580
* Redone so as to save on memory allocations and speed.Jeffrey Stedfast2001-03-073-54/+63
| | | | | | | | | 2001-03-06 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-digest-md5.c (compute_response): Redone so as to save on memory allocations and speed. svn path=/trunk/; revision=8573
* Don't return NULL if the token is non-NULL. This is why:Jeffrey Stedfast2001-03-064-3/+37
| | | | | | | | | | | | | | | | | | | | | 2001-03-05 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-plain.c (plain_challenge): Don't return NULL if the token is non-NULL. This is why: sending : AUTH PLAIN received: 334 ok. go on. <-- this is why sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI= received: 235 {mp005-rz3} go ahead * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here. (camel_sasl_authtype_list): And here too. * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype. * camel-sasl-plain.h: extern the camel_sasl_plain_authtype. svn path=/trunk/; revision=8562
* i18n'd some strings in here.Jeffrey Stedfast2001-03-063-9/+68
| | | | | | | | | | | | | 2001-03-05 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_connect): i18n'd some strings in here. * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep trying to authenticate until either we succeed or until the user cancels. svn path=/trunk/; revision=8561
* Wrote a new version of header_fold() that takes a 'force' option and usesJeffrey Stedfast2001-03-052-1/+141
| | | | | | | | | | | | | | | | | | 2001-03-04 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Wrote a new version of header_fold() that takes a 'force' option and uses another new function called header_fold_next_space() in place of strchr(inptr, ' ') to get the next whitespace char. The idea of header_fold_next_space() is to not treat spaces between a set of quotes as a space - this way it will be possible to fold (for example) the Content-Type MIME header without worrying about breaking up a boundary string. Note: This code is #if 0'd out until Zucchi approves of the patch. Another Note: We will probably still want to use the "don't fold this header" hash lookup for headers like the Message-Id and possibly a few others. svn path=/trunk/; revision=8552
* Make sure there is a space between the name and the address tokens.Jeffrey Stedfast2001-03-052-1/+5
| | | | | | | | | | 2001-03-04 Jeffrey Stedfast <fejj@ximian.com> * camel-internet-address.c (camel_internet_address_encode_address): Make sure there is a space between the name and the address tokens. svn path=/trunk/; revision=8551
* encoded string segments need to be at least 8 chars (7 doesn't leave roomJeffrey Stedfast2001-03-052-18/+29
| | | | | | | | | | | | | 2001-03-04 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (rfc2047_decode_word): encoded string segments need to be at least 8 chars (7 doesn't leave room for an ecoding value. To be more realistic, even 8 chars isn't enough as this assumes there is no charset nor any encoded text. If the encoding value is not 'Q' or 'B', then return NULL. This fixes bug #1689. svn path=/trunk/; revision=8550
* New function to remove a folder from a vfolder.Not Zed2001-03-033-1/+73
| | | | | | | | | | | 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
* Doh! Set the CAMEL_URL_ALLOW_AUTH flag.Jeffrey Stedfast2001-03-032-1/+4
| | | | | | | | | | | | 2001-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-provider.c: Doh! Set the CAMEL_URL_ALLOW_AUTH flag. * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): Updated with the extended AUTH return codes. svn path=/trunk/; revision=8530
* oops, forgot the changelogJeffrey Stedfast2001-03-031-0/+5
| | | | svn path=/trunk/; revision=8528
* Updated with the extended AUTH return codes.Jeffrey Stedfast2001-03-031-1/+14
| | | | | | | | | 2001-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): Updated with the extended AUTH return codes. svn path=/trunk/; revision=8527
* oops, the return code is 235 on success, not 234Jeffrey Stedfast2001-03-031-1/+1
| | | | svn path=/trunk/; revision=8526
* Don't forget to unref the SASL object.Jeffrey Stedfast2001-03-034-52/+205
| | | | | | | | | | | | | | | | | | | | 2001-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (try_auth): Don't forget to unref the SASL object. * providers/smtp/camel-smtp-transport.c (query_auth_types): Implemented. (smtp_auth): Implemented. (smtp_helo): Don't bother parsing the authtypes if we already have them. (smtp_connect): call smtp_auth() here if we found any authtypes. (smtp_disconnect): Updated as I now use a hash table for the supported authtypes rather than a linked list. (esmtp_get_authtypes): modify to use a hash table instead of a linked list and also use isspace() rather than == ' '. svn path=/trunk/; revision=8525
* Use "-f" to set the envelope from address so bounces go to the rightDan Winship2001-03-022-10/+41
| | | | | | | | | * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to, sendmail_send): Use "-f" to set the envelope from address so bounces go to the right place. Also, pass "-U" since the man page says we're supposed to... svn path=/trunk/; revision=8521
* #include "camel-sasl-digest-md5.h" (camel_sasl_authtype_list): addJeffrey Stedfast2001-03-025-0/+922
| | | | | | | | | | | | | | 2001-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl.c: #include "camel-sasl-digest-md5.h" (camel_sasl_authtype_list): add DIGEST-MD5 stuff here. (camel_sasl_authtype): And here too. (camel_sasl_new): And here... * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has been tested and proven to work). svn path=/trunk/; revision=8513
* Add an "authtypes" hash table to CamelImapStore recording the supportedDan Winship2001-03-026-286/+151
| | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c: Add an "authtypes" hash table to CamelImapStore recording the supported authtypes. (connect_to_server): Record supported authtypes in the authtypes hash rather than the capabilities bitmask, since now the IMAP code is no longer responsible for keeping track of which authtypes we support. (query_auth_types): Use camel_sasl_authtype_list to get the SASL-supported authtypes. (try_auth): New function to try a SASL auth mechanism. Sort of formerly imap_try_kerberos_v4_auth. (imap_connect): Get rid of the krb4-specific bits and genericize them for any SASL authtype. * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved into camel-imap-store.c since it's now constant size) and the KRB4_CFLAGS and KRB4_LDFLAGS references. svn path=/trunk/; revision=8463
* Take a GByteArray as input as well. Comment that you can pass %NULL forDan Winship2001-03-0211-386/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input as well. Comment that you can pass %NULL for @token to get the initial auth data for mechanisms that are client-initiated. (camel_sasl_challenge_base64): Convenience function for protocols that use base64-encoded SASL. (camel_sasl_authenticated): Implement this... (it was prototyped already) (camel_sasl_new): Function to take a service name, a mechanism name, and a CamelService, and return a CamelSasl for it. (camel_sasl_authtype, camel_sasl_authtype_list): Functions to return CamelServiceAuthType information about SASL mechanisms, to allow providers to deal with them generically. * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for CamelSasl changes. Both of these are single-round (client-initiated) mechanisms, so they don't need to keep state. (camel_sasl_plain_new): Removed; use camel_sasl_new instead. (Can't get rid of camel_sasl_anonymous_new though...) * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes. (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead. (cram_md5_challenge): Use md5_get_digest where possible, and various other minor simplifications. CRAM-MD5 only has a single round, so there's no need to keep track of state. This code is now tested (against Cyrus IMAPd) and known to work. * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes. Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that isn't needed between rounds. (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead (krb4_challenge): Fix up the logic I broke in my previous "at least make it compile" fixes, update to match other changes, and remove IMAP-isms that shouldn't be in the generic code. This still isn't tested, because we're stuck behind a NAT right now... svn path=/trunk/; revision=8462
* Don't base64 encode the data, leave that up to the provider to do if itJeffrey Stedfast2001-03-022-8/+8
| | | | | | | | | | | | | | 2001-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the data, leave that up to the provider to do if it needs to. Also save on some memory allocations and stuff. * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get rid of the need for the temp buf as we can just write it to the GByteArray. svn path=/trunk/; revision=8456
* remove mime-utils header for base64 stuff.Jeffrey Stedfast2001-03-022-2/+0
| | | | svn path=/trunk/; revision=8455
* Don't base64 encode the data, leave that up to the provider to do if itJeffrey Stedfast2001-03-023-9/+14
| | | | | | | | | | | | 2001-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the data, leave that up to the provider to do if it needs to. Also save on some memory allocations and stuff. * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. svn path=/trunk/; revision=8454
* Reconstify variables to match iconv.Not Zed2001-03-023-4/+15
| | | | | | | | | | | | 2001-03-02 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word): Reconstify variables to match iconv. * camel-search-private.c (camel_ustrstrcase): Change some assertions back into valid returns. svn path=/trunk/; revision=8452
* camel depends on krb4 now (where available), for camel-sasl-kerberos4.cDan Winship2001-03-024-9/+26
| | | | | | | | | | * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on krb4 now (where available), for camel-sasl-kerberos4.c * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if it works yet. svn path=/trunk/; revision=8451
* Assert url_string != NULL.Peter Williams2001-03-012-1/+7
| | | | | | | | 2001-03-01 Peter Williams <peterw@ximian.com> * camel-url.c (camel_url_new): Assert url_string != NULL. svn path=/trunk/; revision=8439
* oops, not empty string - need to base64 encode it, which is just "="Jeffrey Stedfast2001-03-011-1/+1
| | | | svn path=/trunk/; revision=8434
* Added camel-sasl-anonymous.[c,h] to the build.Jeffrey Stedfast2001-03-016-2/+256
| | | | | | | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build. * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS * camel-sasl-plain.c (plain_challenge): Oops, have a state for setting sasl->authenticated = TRUE; * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. svn path=/trunk/; revision=8433
* A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01Jeffrey Stedfast2001-03-011-1/+1
| | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_date): A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01 04:59:41"). Fixes bug #1633. svn path=/trunk/; revision=8432
* A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01Jeffrey Stedfast2001-03-013-5/+16
| | | | | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_date): A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01 04:59:41"). Fixes bug #1633. * camel-filter-driver.c (camel_filter_driver_filter_folder): Check to make sure message isn't NULL. svn path=/trunk/; revision=8431
* If we get back 0 bytes from camel_stream_buffer_gets, that means theDan Winship2001-03-012-0/+12
| | | | | | | | | * camel-remote-store.c (remote_recv_line): If we get back 0 bytes from camel_stream_buffer_gets, that means the socket got disconnected, so set an exception. (Noticed because of a message that crashes our IMAP server when you try to look at it. :) svn path=/trunk/; revision=8429
* Added camel-sasl*.[c,h] to the build.Jeffrey Stedfast2001-03-0113-25/+972
| | | | | | | | | | | | | | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-sasl*.[c,h] to the build. * camel-sasl.[c,h]: new "abstract" SASL class * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4 * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5 * camel-sasl-plain.[c,h]: new SASL class for PLAIN * providers/imap/camel-imap-auth.c: Removed the base64 functions. * camel-mime-utils.c (base64_encode_simple): Moved here from camel-imap-auth.c (base64_decode_simple): Same. svn path=/trunk/; revision=8428
* Group messages into sets with the same flags and use the IMAP message setDan Winship2001-02-272-33/+156
| | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (imap_sync): Group messages into sets with the same flags and use the IMAP message set notation rather than doing a separate STORE FLAGS for each one. This cuts the network traffic down to just a handful of commands per sync rather than one per changed message. Removed the progress notification stuff since it's no longer meaningful and should hopefully be unnecessary. (imap_copy_message_to): move the former sync_message function into here, since it's no longer shared with imap_sync. svn path=/trunk/; revision=8396
* Made thread-safe and moved to above the test code.Jeffrey Stedfast2001-02-274-17/+105
| | | | | | | | | | | | | | | | | | 2001-02-26 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Made thread-safe and moved to above the test code. * camel-mime-message.c (camel_mime_message_init): Set the message_id to NULL. (camel_mime_message_finalize): Free the message_id. (camel_mime_message_set_message_id): New function to set the Message-Id. (camel_mime_message_get_message_id): New function to get the Message-Id. (process_header): Decode the message-id. svn path=/trunk/; revision=8393
* fixed a compile warning in camel-store.Jeffrey Stedfast2001-02-251-1/+0
| | | | svn path=/trunk/; revision=8382
* init the vTrash folder here instead of in store_init.Jeffrey Stedfast2001-02-252-18/+36
| | | | | | | | | | | | 2001-02-24 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (construct): init the vTrash folder here instead of in store_init. (camel_store_class_init): init service_class->construct. (camel_store_finalize): We only need to unref the vtrash folder. (init_trash): don't create a vstore since we don't need it. svn path=/trunk/; revision=8378
* init get_trash and init_trash. (camel_store_init): call the virtualJeffrey Stedfast2001-02-244-11/+125
| | | | | | | | | | | | | | | | | | 2001-02-23 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_class_init): init get_trash and init_trash. (camel_store_init): call the virtual init_trash function. (camel_store_finalize): unref the vtrash folder/store if present. (camel_store_get_folder): Add the new folder to the vtrash vfolder. (init_trash): default implementation of init_trash. (get_trash): default implementation of get_trash. * camel-vee-store.c (vee_init_trash): No-op. (vee_get_trash): return NULL svn path=/trunk/; revision=8368
* Doh, cut and paste problem, use mlist not cc.Michael Zucci2001-02-234-11/+31
| | | | | | | | | | | * camel-folder-summary.c (camel_message_info_new_from_header): Doh, cut and paste problem, use mlist not cc. * camel-folder.c (move_message_to): (copy_message_to): If the source folder doesn't support a summary, dont try and get the message info from it. svn path=/trunk/; revision=8361
* Implement a pseudo-header "x-camel-mlist" which just looks up in theNot Zed2001-02-234-2/+19
| | | | | | | | | | | | | 2001-02-23 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (check_header): Implement a pseudo-header "x-camel-mlist" which just looks up in the message info for a match. * camel-folder-search.c (check_header): Add pseudo-header "x-camel-mlist" which can be used to match on mailing list. svn path=/trunk/; revision=8355
* Add some internal progress reporting. (imap_rescan): Do some progressNot Zed2001-02-233-1/+28
| | | | | | | | | | | | | 2001-02-23 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_sync): Add some internal progress reporting. (imap_rescan): Do some progress reporting. * camel-mime-part.c (init_header_name_table): Add the message-id to the formatted table, so we dont try and wrap it, and break it. svn path=/trunk/; revision=8350
* Remove the 'FIXME: remove because this isn't required...' comment forJeffrey Stedfast2001-02-234-23/+62
| | | | | | | | | | | | | | | | | | | 2001-02-22 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.h: Remove the 'FIXME: remove because this isn't required...' comment for copy_message_to since we now need and cherish its existance in the filter-driver code ;-) * camel-filter-driver.c (camel_filter_driver_filter_message): Now takes a UID and CamelFolder arguments (which can be NULL) to allow for possible optimizations when copying messages between folders on the same store. (camel_filter_driver_filter_mbox): Updated (passes NULL for both since this case can't be optimized anyway). (camel_filter_driver_filter_folder): Updated to pass in the uid and folder of the message. svn path=/trunk/; revision=8346
* #define this as the set of all IMAP system flagsDan Winship2001-02-223-1/+19
| | | | | | | | | | | | | * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS): #define this as the set of all IMAP system flags * providers/imap/camel-imap-folder.c (sync_message): after syncing flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS) rather than just "flags", since any other flags won't have been synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting lost. svn path=/trunk/; revision=8344
* Removed all files.Not Zed2001-02-2212-170/+73
| | | | | | | | | | | | | | | | | | | | | 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
* Removed, not used. (camel_vee_folder_new): Removed call to build_folder.Not Zed2001-02-224-110/+148
| | | | | | | | | | | | | | | | | | | | | | 2001-02-22 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (vee_folder_build): Removed, not used. (camel_vee_folder_new): Removed call to build_folder. (vee_get_message): Dont try and free the mi if we didn't get it. * camel-folder.c (camel_folder_change_info_new): Added a hash table of what we have in the lists, plus moved private things into private pointer. (camel_folder_change_info_add_source): Fixed up private accesses. (camel_folder_change_info_add_uid): Changed to use a hashtable to see if we already have the uid, etc. (camel_folder_change_info_remove_uid): Similar. (change_info_remove): Likewise. (camel_folder_change_info_clear): Fixes for privatisations. (camel_folder_change_info_free): " svn path=/trunk/; revision=8339
* Fixes for IMAP4-pre-rev1 from Torsten Schulz.Dan Winship2001-02-222-2/+13
| | | | | | | * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for IMAP4-pre-rev1 from Torsten Schulz. svn path=/trunk/; revision=8318
* Take the ^Header: part out of the expression, since we look that upNot Zed2001-02-204-25/+66
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-20 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out of the expression, since we look that up ourselves. (header_raw_check_mailing_list): When getting the match, get match 1, not match 0, we dont want the full string match. * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for summary change. (message_info_new): Extract the mlist info from the headers. (message_info_load): Load mlist from summary. (message_info_save): Save mlist to summary. (message_info_free): Save the mlist entry. (camel_message_info_new_from_header): Extract mailing list header. (camel_message_info_dup_to): Copy the mlist entry. (camel_message_info_free): Free mlist. (message_info_dump): Dump the mlist. * camel-folder-summary.h: Add an mlist (mailing list) string to the summary. svn path=/trunk/; revision=8295
* Added flags argument. (message_changed): Add support for the auto-updateNot Zed2001-02-209-123/+541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-19 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added flags argument. (message_changed): Add support for the auto-update flag, in which case we auto-match the content as it changes. (camel_vee_folder_init): Remoive "DYNAMIC" optionality (camel_vee_folder_finalise): " (vee_expunge): As we expunge folders, re-sync their content by rerunning the query. * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to folder new. 2001-02-18 Not Zed <NotZed@Ximian.com> * providers/vee/Makefile.am (noinst_HEADERS): Added camel-vee-private.h. * providers/vee/camel-vee-private.h: New file to add locking stuff for vee folders. * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add locking around unmatched setup. (camel_vee_folder_init): Setup lock. (camel_vee_folder_finalise): Free locks. (folder_changed): Add locking. (unmatched_finalise): " (message_changed): " (vee_folder_build): " 2001-02-17 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid doesn't exist before adding it. 2001-02-16 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create a new virtual virtual folder UNMATCHED, to store all messages that dont match other vfolders. (unmatched_folder_changed): When a vfolder issues a changed event, use its info to update the unmatched folder info. (unmatched_finalise): When a vfolder is finalised, remove any uids it has as if we had a removed event for it. svn path=/trunk/; revision=8276
* Thaw the defaultfolder. (camel_filter_driver_set_default_folder): Thaw theJeffrey Stedfast2001-02-172-3/+16
| | | | | | | | | | | 2001-02-16 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the defaultfolder. (camel_filter_driver_set_default_folder): Thaw the defaultfolder we're about to replace, and freeze the new defaultfolder. svn path=/trunk/; revision=8259
* Emit the folder_created signal here.Jeffrey Stedfast2001-02-167-80/+183
| | | | | | | | | | | | | | | | | | | | | | | 2001-02-15 Jeffrey Stedfast <fejj@ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit the folder_created signal here. * providers/local/camel-local-folder.c (camel_local_folder_construct): Emit the folder_created signal. * providers/local/camel-local-store.c (delete_folder): On error, free the 'name' string so we don't leak. Also emit the folder_deleted signal. * providers/imap/camel-imap-store.c (subscribe_folder): Emit the folder_created signal. (unsubscribe_folder): Emit the folder_deleted signal. * camel-store.c (camel_store_class_init): Added folder_created and folder_deleted signal defs. svn path=/trunk/; revision=8246
* Deal with out-of-order References headers so they don't cause messages toDan Winship2001-02-162-2/+14
| | | | | | | | * camel-folder-thread.c (container_parent_child): Deal with out-of-order References headers so they don't cause messages to disappear in threaded view. svn path=/trunk/; revision=8245
* IMAP4 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead inDan Winship2001-02-162-3/+14
| | | | | | | | * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead in that case. svn path=/trunk/; revision=8244
* Changed this code to match the glibc iconv signature.Christopher James Lahey2001-02-153-5/+11
| | | | | | | | | | 2001-02-14 Christopher James Lahey <clahey@ximian.com> * camel-mime-filter-charset.c (complete, filter), camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): Changed this code to match the glibc iconv signature. svn path=/trunk/; revision=8238
* (create_folder): Oops, and fix bug involving namespacesDan Winship2001-02-152-5/+5
| | | | svn path=/trunk/; revision=8233
* New method to create a folder when you don't know its full name.Dan Winship2001-02-154-9/+95
| | | | | | | | | * camel-store.c (camel_store_create_folder): New method to create a folder when you don't know its full name. * providers/imap/camel-imap-store.c (create_folder): Implement. svn path=/trunk/; revision=8231
* Add address headers to list that we dont fold when writing. The areNot Zed2001-02-134-8/+73
| | | | | | | | | | | | | | | | | | | | | 2001-02-12 Not Zed <NotZed@Ximian.com> * camel-mime-part.c (init_header_name_table): Add address headers to list that we dont fold when writing. The are properly formatted as we build them. (write_to_stream): DOH, lookup the header name in the formatted hash table, not the value, that would never have worked. * camel-internet-address.c (camel_internet_address_encode_address): Changed to take a parameter saying how much we've printed so far. We now fold the header as we format it. We dont fold addresses, even if they are too long, we simply put them on another line by themselves: this should make the result more parsable by mailers that can't handle split up addresses (which are legal). (internet_encode): Fix for changes to above. svn path=/trunk/; revision=8198
* mbox, mh, and maildir camel-url's need absolute paths.Jeffrey Stedfast2001-02-133-3/+11
| | | | | | | | | | | 2001-02-12 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c: mbox, mh, and maildir camel-url's need absolute paths. * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag. svn path=/trunk/; revision=8193
* save, THEN commitDan Winship2001-02-101-4/+6
| | | | svn path=/trunk/; revision=8146
* Rewrite a bunch. Replace the existing folder cache stuff with much simplerDan Winship2001-02-1015-449/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-store.c: Rewrite a bunch. Replace the existing folder cache stuff with much simpler code that still handles all the existing cases. Now the folder hash table is always created by the base class, using hash and compare functions provided by the class implementation. (If they are set to NULL, CamelStore won't cache folders.) lookup_folder, cache_folder, and uncache_folder are no longer class methods, and get_name is gone completely. (camel_store_get_inbox): Renamed from camel_store_get_default_folder, since that wasn't being used, and this is what we actually need. (camel_store_get_root_folder): Removed, since it's not needed for anything given get_folder_info. * camel-remote-store.c: * providers/local/camel-local-store.c: * providers/local/camel-mbox-store.c: * providers/local/camel-mh-store.c: * providers/local/camel-maildir-store.c: * providers/nntp/camel-nntp-store.c: * providers/pop3/camel-pop3-store.c: * providers/vee/camel-vee-store.c: Minor updates for CamelStore changes * providers/imap/camel-imap-store.c (camel_imap_store_class_init): Update for CamelStore changes. (hash_folder_name, compare_folder_name): treat INBOX case-insensitively, otherwise use g_str_hash and g_str_equal. * camel-service.c (camel_service_construct): Remove camel_service_new and create camel_service_construct (as a class method) in its place. * camel-session.c (camel_session_get_service): Use camel_object_new and camel_service_construct to replace camel_service_new. * providers/local/camel-local-store.c (construct): Append a '/' to the URL path if it doesn't end with one svn path=/trunk/; revision=8145
* Oops, include the camel-tcp-stream-ssl header instead of the raw one.Jeffrey Stedfast2001-02-082-1/+6
| | | | | | | | | 2001-01-31 Jeffrey Stedfast <fejj@helixcode.com> * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl header instead of the raw one. svn path=/trunk/; revision=8103
* Added more test rules.Jeffrey Stedfast2001-02-082-0/+3
| | | | svn path=/trunk/; revision=8102
* Changed to push the operation into a status stack.Not Zed2001-02-0812-296/+729
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-07 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_start): Changed to push the operation into a status stack. (camel_operation_progress): Changed to only accept % complete. (camel_operation_reset): Free status stack as well. * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the octect count from the return line, and pass it to get_additional_data(). (pop3_refresh_info): Added status stuff. * providers/pop3/camel-pop3-store.c (camel_pop3_command_get_additional_data): Added a total bytes expected argument for progress reporting & fixed callers. (camel_pop3_command_get_additional_data): Added progress reporting. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): (mbox_summary_sync_quick): (summary_rebuild): Added progress reporting stuff. svn path=/trunk/; revision=8095
* Macro for making comparisons easy. (camel_ustrcasecmp): UseJeffrey Stedfast2001-02-082-6/+20
| | | | | | | | | | | | | | | | | | | 2001-02-07 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making comparisons easy. (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for end-of-string before the utf-8 error check. (camel_ustrncasecmp): Same. (camel_search_header_match): Strip leading spaces before doing anything else. Also use vlen and mlen so as to not need to do 500 strlen()'s. (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the comparison part of the loop because of short-circuit expression evaluation. (blame JPR if this is the wrong term!) (camel_ustrncasecmp): Same. svn path=/trunk/; revision=8057
* Macro for making comparisons easy. (camel_ustrcasecmp): UseJeffrey Stedfast2001-02-082-52/+48
| | | | | | | | | | | | | | | 2001-02-07 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making comparisons easy. (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for end-of-string before the utf-8 error check. (camel_ustrncasecmp): Same. (camel_search_header_match): Strip leading spaces before doing anything else. Also use vlen and mlen so as to not need to do 500 strlen()'s. svn path=/trunk/; revision=8055
* Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_tJeffrey Stedfast2001-02-074-58/+94
| | | | | | | | | | 2001-02-06 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_t (camel_ustrncasecmp): Same. svn path=/trunk/; revision=8026
* Made these pass char ** as the second parameter to iconv.Christopher James Lahey2001-02-073-5/+11
| | | | | | | | | | 2001-02-06 Christopher James Lahey <clahey@ximian.com> * camel-mime-filter-charset.c (complete, filter), camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): Made these pass char ** as the second parameter to iconv. svn path=/trunk/; revision=8022
* Added xml-* files.Jeffrey Stedfast2001-02-061-1/+1
| | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * .cvsignore: Added xml-* files. svn path=/trunk/; revision=8014
* Removed unwanted header. It was never put in for a reason. Stop fixingNot Zed2001-02-065-11/+229
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-06 Not Zed <NotZed@Ximian.com> * camel-search-private.c: Removed unwanted header. It was never put in for a reason. Stop fixing irrelevant warnings. (camel_ustrstrcase): Our own strstrcase impl for utf8 strings. (camel_ustrcasecmp): Ditto for strcasecmp. (camel_ustrncasecmp): And strncasecmp. (utf8_get): Simpler interface to utf8 string processing. (camel_search_header_match): Use the new things. 2001-02-05 Not Zed <NotZed@Ximian.com> * camel-folder.c (get_summary): Removed some old variables/a small memleak. (free_summary): Removed old variables. * camel-mime-utils.c (header_raw_check_mailing_list): New utility function to get the mailing list (if any) that a set of headers came from. svn path=/trunk/; revision=8008
* Added a missing #include.Christopher James Lahey2001-02-063-0/+9
| | | | | | | | | | 2001-02-05 Christopher James Lahey <clahey@helixcode.com> * camel-stream-fs.c: Added a missing #include. * camel-search-private.c: Added a missing #include. svn path=/trunk/; revision=7999
* Oops. Change this too.Jeffrey Stedfast2001-02-062-2/+5
| | | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c (remote_query_auth_types): Oops. Change this too. svn path=/trunk/; revision=7992
* Updated.Jeffrey Stedfast2001-02-068-109/+140
| | | | | | | | | | | | | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated. * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): Updated. * providers/pop3/camel-pop3-store.c (query_auth_types): Updated. * providers/imap/camel-imap-store.c (query_auth_types): Updated. * camel-service.c (camel_service_query_auth_types): Now takes a boolean value to specify whether or not to connect when constructing a supported authtype list. svn path=/trunk/; revision=7979
* Revert jeff's earlier change, the change below is the more-correct fix.Not Zed2001-02-053-23/+31
| | | | | | | | | | | | | | 2001-02-05 Not Zed <NotZed@Ximian.com> * camel-stream-filter.c (do_write): Revert jeff's earlier change, the change below is the more-correct fix. All his was doing was ignoring the return code & looping actually :) * camel-stream-fs.c (stream_write): Since we are non-blocking on the outgoing fd, keep looping if writing out large blocks, so we can keep checking for cancel, etc. svn path=/trunk/; revision=7966
* When we drop a fake node, dont skip checking the next in the list.Not Zed2001-02-052-1/+16
| | | | | | | | | | | | 2001-02-02 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new): When we drop a fake node, dont skip checking the next in the list. (camel_folder_thread_messages_new): Add an assertion check just to make sure we dont get any pseudo nodes, and spit a warning if we do. svn path=/trunk/; revision=7965
* Make do_write loop until the entire buffer is written.Jeffrey Stedfast2001-02-053-6/+15
| | | | | | | | | 2001-02-04 Jeffrey Stedfast <fejj@ximian.com> * camel-stream-filter.c (do_write): Make do_write loop until the entire buffer is written. svn path=/trunk/; revision=7963
* Add missing header for cancel check stuff.Not Zed2001-02-024-4/+25
| | | | | | | | | | | | | | | | 2001-02-02 Not Zed <NotZed@Ximian.com> * camel-stream-fs.c: Add missing header for cancel check stuff. * camel-session.c (camel_cancel_cancel): Fix a wrong cast. * camel-mime-part.c (init_header_name_table): Setup a new table header_formatted_table, that lists headers that we dont want to fold (they've already been folded). (write_to_stream): Check for already formatted headers, and dont try and fold them. This is a fix for bug #1097. svn path=/trunk/; revision=7941
* If we are folding, drop the space at the end of the line.Not Zed2001-02-012-0/+8
| | | | | | | | | 2001-02-01 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (header_fold): If we are folding, drop the space at the end of the line. svn path=/trunk/; revision=7928
* Remvoe the stream locking here. I think this was leading to a deadlockNot Zed2001-01-302-4/+6
| | | | | | | | | | 2001-01-30 Not Zed <NotZed@Ximian.com> * camel-remote-store.c (timeout_cb): Remvoe the stream locking here. I think this was leading to a deadlock when a keepalive is being sent, in imap. svn path=/trunk/; revision=7898
* Include the terminating NUL in the calculated string length. This hitNot Zed2001-01-292-1/+7
| | | | | | | | | | 2001-01-29 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Include the terminating NUL in the calculated string length. This hit memcheck. svn path=/trunk/; revision=7884
* Oops.Michael Zucci2001-01-252-0/+321
| | | | svn path=/trunk/; revision=7801
* Changed the subject search to handle case sensitive when it is mixed case.Not Zed2001-01-257-565/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-25 Not Zed <NotZed@Ximian.com> * tests/folder/test3.c: Changed the subject search to handle case sensitive when it is mixed case. * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c (noinst_HEADERS): Added camel-search-private.h * camel-folder-search.c (check_header): New function to do the work of the various header checks. (search_header_matches): (search_header_starts_with): (search_header_ends_with): (search_header_contains): Use check_header to do the work. (build_match_regex): Removed. * camel-search-private.c (header_soundex): New function to match words to phrases using soundex algorithm. * camel-filter-search.c (soundexcmp): Removed. (check_match): Moved to search-private.h 2001-01-24 Not Zed <NotZed@Ximian.com> * camel-search-private.c (camel_search_build_match_regex): Added extra flags, so the same function can be used for start/end/whole/partial matches. (camel_search_header_match): Convenience function to check a single header against all sorts of different matches. * providers/imap/camel-imap-search.c (imap_body_contains): Fix for e_sexp api changes. * camel-folder-search.c: Fix for e_sexp api changes. (search_header_contains): Free args/quit on unknown header. (search_header_matches): " (search_header_starts_with): " (search_header_ends_with): " (match_message): Add an exception argument. (search_body_contains): Free args/quit on fatal error. (message_body_contains): Removed (moved to camel-search-private.c), fixed callers. * camel-filter-search.c: Fix for e_sexp api changes. (build_match_regex, message_body_contains): Moved into camel-filter-private.c Fixed callers. (check_header): moved guts to camel-search-private, and changed to use regex's for everything. Just calls that with the right args. (check_header): GEts the header, decodes it, and checks for failure, and whatnot. (check_match): Removed. (header_soundex): Changed significantly. Now it soundexes each word in the header separately, and compares it to the first argument. * tests/folder/test9.c (main): Fix for api changes. (main): Added tests to see that invalid match and action rules are properly detected. * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove the 'finished message' bit. (camel_filter_driver_filter_message): Remove an accidentally checked in debug. (camel_filter_driver_filter_message): Fix for e-sexp api changes. svn path=/trunk/; revision=7796
* Added tests to see that invalid match and action rules are properlyNot Zed2001-01-242-0/+59
| | | | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * tests/folder/test9.c (main): Added tests to see that invalid match and action rules are properly detected. svn path=/trunk/; revision=7767
* Fix for api changes.Not Zed2001-01-242-3/+5
| | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * tests/folder/test9.c (main): Fix for api changes. svn path=/trunk/; revision=7765
* (camel_filter_driver_filter_message): Remove an accidentallyMichael Zucci2001-01-242-1/+2
| | | | | | checked in debug. svn path=/trunk/; revision=7762
* Remove the 'finished message' bit.Not Zed2001-01-242-2/+7
| | | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove the 'finished message' bit. svn path=/trunk/; revision=7761
* Add a lock around the delayed loading, so two threads won't try to do itDan Winship2001-01-244-2/+46
| | | | | | | | * providers/imap/camel-imap-wrapper.c: Add a lock around the delayed loading, so two threads won't try to do it at the same time. svn path=/trunk/; revision=7752
* Set the CamelFolder::name to just the base part of the vfolder name (theDan Winship2001-01-232-2/+8
| | | | | | | | * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the CamelFolder::name to just the base part of the vfolder name (the non-query part) svn path=/trunk/; revision=7743