aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
Commit message (Collapse)AuthorAgeFilesLines
* General cleanup of camel debug printfs.92001-09-195-10/+12
| | | | | | | | | | | | | | | | | 2001-09-19 <NotZed@Ximian.com> * General cleanup of camel debug printfs. * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if the error indicates file locking isn't supported on this filesystem. Still return a warning just incase (if its the first time). Might fix a lot of reported bugs. * providers/local/camel-spool-store.c (get_folder_info): Dont include the empty // host part in the uri. This 'breaks' the service lookup. svn path=/trunk/; revision=12973
* If filter inbox is set on the store, and we're opening inbox '', then82001-09-1913-110/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-18 <NotZed@Ximian.com> * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): If filter inbox is set on the store, and we're opening inbox '', then enable filtering on new messages. * providers/local/camel-local-folder.c (camel_local_folder_construct): After loading the summary, check it, and only abort if that fails. Also maintain the changes count. * providers/local/camel-local-summary.c (camel_local_summary_load): Remove summary_check code from here. (camel_local_summary_check): Sync index/summary here, if we were successful. * providers/local/camel-spool-folder.c (camel_spool_folder_new): If we have filter-new-messages-on-inbox set and we just opened inbox, turn on filtering on this folder. (camel_spool_folder_construct): Keep track of changes for the folder, so that filter-new-messages works right (?) * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX' as the folder name, not the path. * camel-folder-search.c (search_not): Modified patch from <peterw@ximian.com> since the summary is messageinfo's, not strings. ** Ok so the problem with the stuff below is that maildir/spool 'summary_load' throws away all events, including recents, joy eh? * providers/local/camel-maildir-summary.c (maildir_summary_check): Add new messages to the recent changeinfo. * providers/local/camel-spool-summary.c: Mark 'new' message as recent, for later processing if required (i.e. 'filter new messages'). * camel-store.c (construct): new function, cascade up construct method and check for 'filter' param, and set accordingly for any one that might want it. * providers/imap/camel-imap-store.c (construct): map the param_filter_inbox flag to the store->flags as CAMEL_STORE_FILTER_INBOX. * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to filter inbox. * providers/imap/camel-imap-folder.h: Removed do_filtering flag from CamelImapFolder. * providers/imap/camel-imap-folder.c (imap_update_summary): Remove the 'recents' parameter, use the 'changes' parameter instead to convey this info. (camel_imap_folder_changed): Changed for update_summary api change. Now always just emit the changed event if we have any changes to report, filtering code removed, handled upstream. (filter_proc): (filter_free): Removed old filtering code. (camel_imap_folder_new): Set the filter_recent flag on the folder if we're the inbox and filtering of inbox is enabled. * camel-folder.c (folder_changed): If we have 'recent' messages, and are set to filter recents, then freeze the folder and launch a thread to do the processing (or similar if threading not enabled). (thaw): Make sure we emit the changed signal outside of owning the lock and if things have changed. Also, no longer bother downgrading folder_changed events to message_changed events. * camel-folder.h (struct _CamelFolder): Added filter_recent flag -> signifies all recent messages in folder should be filtered. * camel-session.c: (camel_session_thread_msg_new, camel_session_thread_msg_free, camel_session_thread_queue, camel_session_thread_wait): code to handle async operations as part of camel processing. (camel_session_finalise): free thread_lock, destroy thread, active hash, etc. (camel_session_init): init thread, active hash, etc. (camel_session_class_init): Init virtual functions. (session_thread_msg_new, session_thread_msg_free, session_thread_destroy, session_thread_received, session_thread_queue, session_thread_wait): default implementation of session threads stuff. 2001-09-17 <NotZed@Ximian.com> * camel-folder.c (camel_folder_change_info_recent_uid): New function to add a 'recent' uid to the change info. (camel_folder_change_info_clear): Clear recent list. (camel_folder_change_info_free): Free recent list. (camel_folder_change_info_new): Setup recent list. * camel-folder.h: Added a uid_recent item to the folder_changed event data. * providers/local/camel-maildir-store.c (scan_dir): Free new in the right block. * providers/local/camel-local-provider.c: Add local config entries to filter on new messages in spool and maildir provider. * camel-vee-folder.c (vee_folder_construct): Remove the assertion which stops ? in names from being allowed. svn path=/trunk/; revision=12956
* Don't process the ImapResponse data, we don't want to block forever onJeffrey Stedfast2001-09-181-3/+18
| | | | | | | | | | | | 2001-09-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (delete_folder): Don't process the ImapResponse data, we don't want to block forever on data we don't care about... (create_folder): Use get_folders_online() instead of get_folder_info_online(). svn path=/trunk/; revision=12932
* Don't process the ImapResponse data, we don't want to block forever onJeffrey Stedfast2001-09-181-8/+5
| | | | | | | | | | 2001-09-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (delete_folder): Don't process the ImapResponse data, we don't want to block forever on data we don't care about... svn path=/trunk/; revision=12918
* Do error-checking based on function return values rather than exceptionsJeffrey Stedfast2001-09-141-7/+7
| | | | | | | | | | | 2001-09-13 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-folder.c (mbox_append_message): Do error-checking based on function return values rather than exceptions as it's possible for them to be NULL. (mbox_get_message): Same. svn path=/trunk/; revision=12814
* Pass an exception to the cache. (imap_append_online): Same.Jeffrey Stedfast2001-09-143-33/+56
| | | | | | | | | | | | | | | | | | | | | | 2001-09-13 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_append_offline): Pass an exception to the cache. (imap_append_online): Same. (imap_append_resyncing): Here too. (imap_copy_offline): And here. (handle_copyuid): Pass NULL as the exception here... (parse_fetch_response): And finally here. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_insert): (insert_setup): (camel_imap_message_cache_insert_stream): (camel_imap_message_cache_insert_wrapper): (camel_imap_message_cache_copy): Take an exception argument and set it on error. svn path=/trunk/; revision=12813
* Pass in a hashtalbe used for finding visited nodes. (inode_hash):02001-09-111-26/+69
| | | | | | | | | | | | | | | | | 2001-09-10 <NotZed@Ximian.com> * providers/local/camel-maildir-store.c (get_folder_info): Pass in a hashtalbe used for finding visited nodes. (inode_hash): (inode_equal): (inode_free): Helper functions for visited node checks, hashes on inode + device number. (scan_dir): Dont re-visited directories we've already visited, use inodes + device number. Also, if the folder doesn't contain cur/tmp/new, mark it as noselect, but continue to recurse folders, if asked. svn path=/trunk/; revision=12760
* Progress reporting while moving messages.02001-09-111-4/+4
| | | | | | | | | | | | | | | 2001-09-10 <NotZed@Ximian.com> * camel-folder.c (move_messages_to): Progress reporting while moving messages. * camel-store.c (camel_store_delete_folder): Make sure we remove the folder from our vtrash, if we have it in our opened set, and also remove it from our hashtable. (camel_store_rename_folder): Remove the old folder name from the folder cahce, if it is there. svn path=/trunk/; revision=12758
* Forgot to return the newly allocated msg.02001-09-101-0/+2
| | | | | | | | | 2001-09-10 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot to return the newly allocated msg. svn path=/trunk/; revision=12729
* Likewise.Not Zed2001-09-082-8/+8
| | | | | | | | | | | | | | | 2001-09-08 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-summary.c (spool_summary_sync_full): Likewise. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): Fix the wording. * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl call in cancellable read case. Also, loop while we get EINTR. This might fix some weird reconnect behaviour with pop. (stream_write): " svn path=/trunk/; revision=12700
* Make sure to unref the mime filters when we finish with them.Jeffrey Stedfast2001-09-081-0/+2
| | | | | | | | | 2001-09-07 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to unref the mime filters when we finish with them. svn path=/trunk/; revision=12689
* s/Synchronising/Synchronizing/. (mbox_summary_sync_quick): Likewise.Ettore Perazzoli2001-09-081-4/+4
| | | | | | | | | * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): s/Synchronising/Synchronizing/. (mbox_summary_sync_quick): Likewise. (summary_rebuild): s/Summarising/Summarizing/. svn path=/trunk/; revision=12683
* Thread function to perform filtering. (filter_free): Free the filter62001-09-073-3/+123
| | | | | | | | | | | | | | | | | | | | | | | 2001-09-06 <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (filter_proc): Thread function to perform filtering. (filter_free): Free the filter object. (camel_imap_folder_changed): If we have threads enabled, then queue up a request to perform filtering. For bug #4422. * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a new 'imap msg'. (camel_imap_msg_queue): Queue an 'imap msg'. (async_received): Handle receiving of imap msg in async thread. (async_destroy): Handle destroying of imap msg. (camel_imap_store_finalize): Destroy thread when done. (camel_imap_store_init): Setup thread. * providers/imap/camel-imap-store.h: Added an ethread to the store, for async processing. svn path=/trunk/; revision=12666
* Fix this to always set an exception if it returns POP3_FAIL, asDan Winship2001-09-072-6/+8
| | | | | | | | | | * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this to always set an exception if it returns POP3_FAIL, as documented. * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Revert. svn path=/trunk/; revision=12654
* Set an exception on POP3_FAIL as well.Jeffrey Stedfast2001-09-071-3/+5
| | | | | | | | | 2001-09-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set an exception on POP3_FAIL as well. svn path=/trunk/; revision=12653
* #ifdef out the "delete after N days" option in pop3_conf_entries, since itDan Winship2001-09-071-0/+2
| | | | | | | | * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete after N days" option in pop3_conf_entries, since it won't be done for 1.0. svn path=/trunk/; revision=12651
* Do a clean disconnect.Jeffrey Stedfast2001-09-051-1/+1
| | | | | | | | 2001-09-04 Jeffrey Stedfast <fejj@ximian.com> * camel-service.c (camel_service_finalize): Do a clean disconnect. svn path=/trunk/; revision=12593
* Return the default folder (ie. INBOX) rather than saying we don't supportJeffrey Stedfast2001-08-311-3/+1
| | | | | | | | | | 2001-08-30 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-spool-store.c (get_inbox): Return the default folder (ie. INBOX) rather than saying we don't support an inbox. svn path=/trunk/; revision=12535
* Add progress reporting to deleting messages. Dont change the calculationNot Zed2001-08-291-2/+9
| | | | | | | | | | 2001-08-29 Not Zed <NotZed@Ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress reporting to deleting messages. Dont change the calculation to a bloody float. Bug #6189. svn path=/trunk/; revision=12512
* Whoops. Double-free and FMR = bad.Peter Williams2001-08-291-2/+3
| | | | | | | | | 2001-08-28 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (create_folder): Whoops. Double-free and FMR = bad. svn path=/trunk/; revision=12505
* Changed the description/names of some of the local providers to try andJeffrey Stedfast2001-08-282-15/+14
| | | | | | | | | | | | | | | 2001-08-27 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c: Changed the description/names of some of the local providers to try and clarify the meanings. * providers/pop3/camel-pop3-provider.c: Simplify the POP description - we want short but sweet. * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP svn path=/trunk/; revision=12486
* s/IMAPv4/IMAPJeffrey Stedfast2001-08-281-1/+1
| | | | | | | | 2001-08-27 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP svn path=/trunk/; revision=12485
* ["Summarising" and "Synchronising" are spelt with a "s" in ENGLISH]Not Zed2001-08-252-8/+8
| | | | | | | | | | | | | | | 2001-08-25 Not Zed <NotZed@Ximian.com> ["Summarising" and "Synchronising" are spelt with a "s" in ENGLISH] * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick): s/Synchronizing/Synchronising/. * providers/local/camel-mbox-summary.c (summary_rebuild): s/Summarizing/Summarising/ svn path=/trunk/; revision=12470
* Revert Not Zed's previous commits as they apparently can cause seriousPeter Williams2001-08-252-5/+5
| | | | | | | | | 2001-08-24 Peter Williams <peterw@ximian.com> * Revert Not Zed's previous commits as they apparently can cause serious data loss for POP3 users. svn path=/trunk/; revision=12461
* s/Synchronising/Synchronizing/.Ettore Perazzoli2001-08-251-3/+3
| | | | | | | | | | * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick): s/Synchronising/Synchronizing/. * providers/local/camel-mbox-summary.c (summary_rebuild): s/Summarising/Summarizing/ svn path=/trunk/; revision=12444
* Likewise.Not Zed2001-08-242-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-24 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-summary.c (summary_rebuild): Likewise. * providers/local/camel-mbox-summary.c (summary_rebuild): Summarising is spelt with an s. 2001-08-23 Not Zed <NotZed@Ximian.com> * camel-mime-part.c (write_to_stream): If we have rawtext, then dont do any charset conversion, only encoding/crlf conversion. * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext' member, says the character encoding is raw, not utf8. * providers/local/camel-spool-summary.c (spool_summary_sync_quick): Synchronising is spelt with an s, not a z. (spool_summary_sync_full): " * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): No, synchronising is spelt with an s. (mbox_summary_sync_quick): " * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Remove the warnings which aren't going anywhere fast. (convert_buffer): Function to convert a bytearray of textual content from one charset to another. If the charset doesn't exist or fails, then do no conversion. (simple_data_wrapper_construct_from_parser): First, read in data, then try and convert it using the specified charset if supplied. If that fails, then dont do any conversion, and leave as raw. Also, if we have any x-* charsets, then dont do any processing. svn path=/trunk/; revision=12429
* Add a missing \n to the end of a printf.Peter Williams2001-08-242-2/+2
| | | | | | | | | | | 2001-08-23 Peter Williams <peterw@ximian.com> * providers/local/camel-mbox-summary.c (summary_rebuild): Add a missing \n to the end of a printf. * providers/local/camel-spool-summary.c (summary_rebuild): Same. svn path=/trunk/; revision=12421
* oops, don't need that extra statementJeffrey Stedfast2001-08-231-3/+0
| | | | svn path=/trunk/; revision=12386
* Oops. Fixed a mis-use of GPtrArray. If we set_size, then usingJeffrey Stedfast2001-08-231-2/+4
| | | | | | | | | | | 2001-08-22 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Oops. Fixed a mis-use of GPtrArray. If we set_size, then using g_ptr_array_add will assume `size' elements have already been initialized and will start appending on to the end. svn path=/trunk/; revision=12385
* Turn on --batch and reenable gpg keyserver lookups. (pgp_decrypt): DisableJeffrey Stedfast2001-08-221-3/+3
| | | | | | | | | | 2001-08-21 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable gpg keyserver lookups. (pgp_decrypt): Disable keyserver lookups if we are disconnected. svn path=/trunk/; revision=12372
* s/Synchronising/Synchronizing/. (mbox_summary_sync_quick): Likewise.Ettore Perazzoli2001-08-202-4/+4
| | | | | | | | | | | * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): s/Synchronising/Synchronizing/. (mbox_summary_sync_quick): Likewise. * providers/local/camel-spool-summary.c (spool_summary_sync_full): Likewise. (spool_summary_sync_quick): Likewise. svn path=/trunk/; revision=12269
* Get the entire directory structure for the folder we just created, meaningJeffrey Stedfast2001-08-203-17/+98
| | | | | | | | | | | | | 2001-08-20 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (create_folder): Get the entire directory structure for the folder we just created, meaning if we created a folder named "test.mailbox" where test didn't previously exist, get the listing for "test" and "test.mailbox". * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New function. svn path=/trunk/; revision=12258
* Make sure the generated UID is non-NULL before appending it to the arrayJeffrey Stedfast2001-08-201-5/+2
| | | | | | | | | | 2001-08-19 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make sure the generated UID is non-NULL before appending it to the array of UIDs. How would this even happen? I have no clue... svn path=/trunk/; revision=12225
* Start scanning new messages at maxuid + 1 rather than uidval + 1? MaybeJeffrey Stedfast2001-08-181-35/+35
| | | | | | | | | | 2001-08-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Start scanning new messages at maxuid + 1 rather than uidval + 1? Maybe I'm missing the logic, but anyways...this might fix bug #5348. svn path=/trunk/; revision=12170
* If we are online and message flags have changed in the current folder,Jeffrey Stedfast2001-08-174-24/+47
| | | | | | | | | | | | | | | | | | 2001-08-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_keepalive): If we are online and message flags have changed in the current folder, sync the flags else do a NOOP. This fixes bug #4666. Also lock around the NOOP command. * providers/imap/camel-imap-folder.c (imap_sync_online): Don't ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like this (and maybe others too?) so what we'll do instead is to send "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear all the flags (since this is in essence what we want to do anyway). svn path=/trunk/; revision=12136
* Don't ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't likeJeffrey Stedfast2001-08-171-9/+22
| | | | | | | | | | | | | 2001-08-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_sync_online): Don't ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like this (and maybe others too?) so what we'll do instead is to send "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear all the flags (since this is in essence what we want to do anyway). svn path=/trunk/; revision=12131
* Fix this again. Sigh. Problem of namespace = "" may not yet be completelyPeter Williams2001-08-171-1/+1
| | | | | | | | | | 2001-08-16 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (imap_connect_online): Fix this again. Sigh. Problem of namespace = "" may not yet be completely solved. svn path=/trunk/; revision=12095
* Oh crap, huge killer typo.Peter Williams2001-08-151-1/+1
| | | | | | | | | 2001-08-15 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (imap_connect_online): Oh crap, huge killer typo. svn path=/trunk/; revision=12048
* Canonicalize store->namespace to end in store->dir_sep, once both valuesPeter Williams2001-08-151-1/+11
| | | | | | | | | | | 2001-08-14 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (imap_connect_online): Canonicalize store->namespace to end in store->dir_sep, once both values are known. The %F-related code makes this assumption. Probably fixes a bug reported on the mailing list. svn path=/trunk/; revision=12040
* We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-141-14/+14
| | | | | | | | | | | | | 2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? (camel_store_get_folder): Nevermind, reverted the fix. (camel_store_get_folder): No, I wasn't on crack before after all...if we don't ref here, then we're open to a race condition later. svn path=/trunk/; revision=11973
* Fix a leak.Peter Williams2001-08-143-5/+24
| | | | | | | | | | | | | | 2001-08-13 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (delete_folder): Fix a leak. * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah, handle when namespace = NULL (can happen upon initial open of mailbox.) * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Don't crash when %F'ing with an empty folder name and NULL namespace. svn path=/trunk/; revision=11971
* We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-142-17/+18
| | | | | | | | | 2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? svn path=/trunk/; revision=11968
* s/summarising/summarizing/. (summary_rebuild): Likewise.Ettore Perazzoli2001-08-122-7/+7
| | | | | | | | | | | | | | * providers/local/camel-spool-summary.c (summary_rebuild): s/summarising/summarizing/. (summary_rebuild): Likewise. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): s/summarise/summarize/. (mbox_summary_sync_quick): Likewise. (summary_rebuild): Likewise. (mbox_summary_check): Likewise. svn path=/trunk/; revision=11919
* Added an assert - at this point a backtrace would be more useful than aJeffrey Stedfast2001-08-112-6/+19
| | | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_quote_string): Added an assert - at this point a backtrace would be more useful than a transaction log for debugging. svn path=/trunk/; revision=11902
* Return FALSE here, not NULL.Jeffrey Stedfast2001-08-111-1/+1
| | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_command_start): Return FALSE here, not NULL. svn path=/trunk/; revision=11893
* tedfast <fejj@ximian.com>Jeffrey Stedfast2001-08-111-4/+4
| | | | | | | | | tedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Don't g_strdup() the uid into the trigger_event call. svn path=/trunk/; revision=11892
* Don't g_strdup() the uid into the trigger_event call.Jeffrey Stedfast2001-08-111-17/+17
| | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Don't g_strdup() the uid into the trigger_event call. svn path=/trunk/; revision=11891
* Set the total bytes expected to 0 if the response is empty too.Jeffrey Stedfast2001-08-111-3/+4
| | | | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set the total bytes expected to 0 if the response is empty too. (pop3_refresh_info): Return of there was an error generating pop3 uids. svn path=/trunk/; revision=11886
* Set the total bytes expected to 0 if the response is empty too.Jeffrey Stedfast2001-08-112-8/+8
| | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set the total bytes expected to 0 if the response is empty too. svn path=/trunk/; revision=11885
* A quoted string cannot contain \n's so check for those as well.Jeffrey Stedfast2001-08-104-190/+187
| | | | | | | | | | 2001-08-09 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A quoted string cannot contain \n's so check for those as well. (imap_atom_specials): Update this to fix bug #6553. svn path=/trunk/; revision=11845
* Modify to take a headers_only argument which will then only fetch messageJeffrey Stedfast2001-08-071-9/+7
| | | | | | | | | | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Modify to take a headers_only argument which will then only fetch message headers. (pop3_generate_uids): Pass in TRUE for headers_only. (pop3_get_message): Pass in FALSE for headers_only and move the camel_operation() stuff out of get_message_stream and in to here instead. (pop3_generate_uids): We also need to be using i+ 1 as the id since we are starting at 0. svn path=/trunk/; revision=11722
* New internal function to get a message stream by message sequence id (soJeffrey Stedfast2001-08-071-68/+119
| | | | | | | | | | | | | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): New internal function to get a message stream by message sequence id (so that we can share code between pop3_get_message and pop3_generate_uids). (pop3_get_message): Use pop3_get_message_stream. (pop3_generate_uids): New function to generate UIDs based on the message - this fixes bug #1256. (pop3_refresh_info): If the server doesn't support UIDL, call pop3_generate_uids to get our list of UIDs. * providers/imap/camel-imap-store.c (get_folder_info_online): Don't strstr for noselect=yes, that's just plain broken. svn path=/trunk/; revision=11721
* Don't strstr for noselect=yes, that's just plain broken.Jeffrey Stedfast2001-08-072-33/+46
| | | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Don't strstr for noselect=yes, that's just plain broken. svn path=/trunk/; revision=11714
* Fix off-by-one error in cleaning up deleted messages at the end of theDan Winship2001-08-071-1/+1
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one error in cleaning up deleted messages at the end of the folder. Fixes bug #5585 and maybe others. svn path=/trunk/; revision=11712
* Do a refresh_info on the selected folder before looking at its unreadDan Winship2001-08-071-7/+6
| | | | | | | | * providers/imap/camel-imap-store.c (get_folder_info_online): Do a refresh_info on the selected folder before looking at its unread count. Should fix bug #4944. svn path=/trunk/; revision=11710
* Completely hide the namespace from everything external to the IMAP code,Peter Williams2001-08-075-66/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-06 Peter Williams <peterw@ximian.com> Completely hide the namespace from everything external to the IMAP code, which Dan W says is the way it should be. * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Add a new %F argument, which is like %S but will add the namespace (for folder names). (camel_imap_command): Use %F here. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Changed to strip out the namespec when returning *folder. In order to do this we need to be passed the CamelImapStore. (imap_concat): Move to here from camel-imap-store.c, un-static (imap_namespace_concat): New function, adds the namespace to the folder name, unless it's INBOX. * providers/imap/camel-imap-utils.h: Prototypes. * providers/imap/camel-imap-store.c (imap_connect_online): Extra arg to imap_parse_list_response. (imap_connect_offline): Here too. (get_folder_status): Use %F. (get_folder_online): Here too. (delete_folder): Here too. (create_folder): Here too, and arg to imap_parse_list_response. (parse_list_response_as_folder_info): Arg to i_p_l_r. (get_subscribed_folders_by_hand): Use %F. (get_folders_online): Here too. (get_folder_info_online): Instead of checking for NULL @name, check for name = NULL or "", and set to "" instead of namespace. Pass "" instead of namespace to camel_folder_info_build. (subscribe_folder): Use %F. (unsubscribe_folder): Here too. * providers/imap/camel-imap-folder.c (imap_get_full_name): This now just returns folder->full_name. (do_append): Use %F (do_copy): Here too. svn path=/trunk/; revision=11705
* First check to make sure that service->url->authmech is non-NULL beforeJeffrey Stedfast2001-08-041-14/+14
| | | | | | | | | | 2001-08-03 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): First check to make sure that service->url->authmech is non-NULL before passing it into strcmp to avoid a segfault. svn path=/trunk/; revision=11618
* special case popb4smtp auth before we try and connect, and do the magicNot Zed2001-08-032-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-03 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): special case popb4smtp auth before we try and connect, and do the magic here first. 2001-08-02 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for POPB4SMTP separate to the esmtp auth list. (smtp_auth): If creating the sasl object means it is already authenticated, then exit early. Sort of 'clean hack' to help popb4smtp work. (smtp_auth): Unref the sasl object, clean up a memleak i think. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): Added POPB4SMTP auth type. * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type. * camel-sasl-popb4smtp.c: New file for pop before smtp 'authentication'. * Makefile.am (libcamel_la_SOURCES, HEADERS): Add camel-sasl-popb4smtp.[ch]. svn path=/trunk/; revision=11615
* If we fail to get the lock, make sure we close our locking fd, and resetNot Zed2001-08-011-1/+7
| | | | | | | | | | 2001-08-01 Not Zed <NotZed@Ximian.com> * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to get the lock, make sure we close our locking fd, and reset it. Fixes the crash part of 5095. svn path=/trunk/; revision=11538
* Slightly re-arranged filter/change notification logic. If we;re filtering,Not Zed2001-08-011-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-01 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Slightly re-arranged filter/change notification logic. If we;re filtering, freeze the folder till we're finished to smooth the ui for new mail. 2001-07-31 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_init): Chagned mutexes to e_mutexes, folder lock recursive. This fixes the imap filtering bug, or at least some cases of it. (camel_folder_finalize): Free mutexes. * camel-private.h (CamelFolderPrivate): Changed mutexes to e_mutexes. 2001-07-25 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_change_info_*): Change the return if fail's into asserts. (camel_folder_change_info_free): Don't let it accept a NULL argument. This isn't g_lib so we dont have to. svn path=/trunk/; revision=11537
* Send an IMAP command, but don't wait for responses.Dan Winship2001-07-274-233/+483
| | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command_start): Send an IMAP command, but don't wait for responses. (camel_imap_command_response): Read a single line of response from the server. (camel_imap_command, etc): Reimplement in terms of the new code. * providers/imap/camel-imap-folder.c (imap_rescan): Use camel_imap_command_start and camel_imap_command_response, and call camel_operation_progress after each line read from the server. (imap_update_summary): Likewise, although with more fudging on the precentages... Also, fix this so that if none of the new messages are cached, it only does a single FETCH, and if some of them are cached, it does two FETCHes (one to get the UIDs, FLAGS, and SIZEs, and another to get the bodies of all of the messages that aren't cached now that it knows the relevant UIDs). This should speed up startup a bunch (especially if you have high bandwidth but also high latency to the IMAP server). svn path=/trunk/; revision=11430
* Change the break into a continue, we should process as many as we canNot Zed2001-07-251-1/+1
| | | | | | | | | | | | | | | | 2001-07-24 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Change the break into a continue, we should process as many as we can find. * camel-folder.c (camel_folder_move_messages_to): If we have no uid's to copy, exit here before going any further. Some code internally [imap] assumes there are uids to copy otherwise it can segfault. (camel_folder_copy_messages_to): Same. svn path=/trunk/; revision=11392
* Added some operation progress reporting. Actual data transfer is 'tricky'Not Zed2001-07-232-11/+27
| | | | | | | | | | | | | | | | | | | | 2001-07-23 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo, send_to): Added some operation progress reporting. Actual data transfer is 'tricky' because of the layers used. (smtp_auth): Instead of checking exception_is_set, use challenge==NULL to test if sasl_challenge_base64 failed. * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove peters changes below and put in a better fix. These functions already return -1 on error, just use that, and not worry about building our own exception redundantly. * camel-service.c (camel_get_host_byname): Turn the progress into a transient event. svn path=/trunk/; revision=11301
* More usage fixes for CamelException. Check our own exception forPeter Williams2001-07-211-2/+6
| | | | | | | | | | 2001-07-20 Peter Williams <peterw@ximian.com> * providers/local/camel-mbox-summary.c (mbox_summary_sync): More usage fixes for CamelException. Check our own exception for summary_update and xfer it out if an error occurred. svn path=/trunk/; revision=11273
* Fixed a compiler warning about returning without a value in a non-voidJeffrey Stedfast2001-07-201-1/+1
| | | | | | | | | | 2001-07-19 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (create_folder): Fixed a compiler warning about returning without a value in a non-void function. Blah. svn path=/trunk/; revision=11247
* In camel:Peter Williams2001-07-201-29/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-19 Peter Williams <peterw@ximian.com> Policy change: NULL url's are no longer allowed in CamelFolderInfos. They used to signify that the folder was, in IMAP jargon, NoSelect; now the same effect is achieved by adding a "noselect=yes" parameter to the end of the URL. As far as I know, IMAP is the only affected provider. * providers/imap/camel-imap-store.c (delete_folder): New function. Implement folder deletion. (camel_imap_store_class_init): Set the delete_folder class function here. (get_folder_status): New function. Utility wrapper around the STATUS command. (create_folder): If the parent folder is NoSelect but is empty, delete it and recreate it as a a subfolder-containing folder. If it is NoSelect but contains messages, set an exception. (parse_list_response_as_folder_info): Always set the FolderInfo's URL, but add a NoSelect parameter if it isn't selectable. (get_folder_info_online): Change logic of removing the namespace to reflect URL change. Same for logic of checking unread counts. (get_folder_info_online): Use get_folder_status to simplify this. * camel-store.c (camel_folder_info_build): When creating dummy parents, copy the child's URL and set the NoSelect parameter. In mail: 2001-07-19 Peter Williams <peterw@ximian.com> Track the NoSelect changes in Camel. * mail-callbacks.c (create_folders): We don't need to check if the URL is NULL or not anymore. * component-factory.c (create_noselect_control): New function. Create a dummy control for folders that can't contain messages (ie \NoSelect) (create_view): If the URI says the folder is noselect, make a dummy control. FIXME: still should merge in the global UI elements. (xfer_folder): Don't allow the operation if the destination is NoSelect. (destination_folder_handle_motion): Ditto. (destination_folder_handle_drop): Ditto. svn path=/trunk/; revision=11237
* Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's request.Peter Williams2001-07-191-67/+12
| | | | | | | | | 2001-07-19 Peter Williams <peterw@ximian.com> * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's request. svn path=/trunk/; revision=11226
* Clean up some exception misusage.Peter Williams2001-07-181-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-17 Peter Williams <peterw@ximian.com> Clean up some exception misusage. * providers/imap/camel-imap-command.c (camel_imap_command): Use our own internal exception for sending the string and transfer it to @ex if anything goes wrong. (imap_read_response): Use our own internal exception for reading the untagged responses and blah blah blah. * camel-session.c (get_service): Use our own internal exception when constructing the service and transfer it to @ex if anything goes wrong. * camel-remote-store.c (remote_recv_line): Instead of having gboolean exception, use our own internal exception and copy it to @ex if anything goes wrong. * camel-store.c (store_sync): Create an internal exception because sync_folder() checks it for validity. Transfer it to @ex when done. * camel-exception.c (camel_exception_get_description): If @ex is NULL, complain - passing NULL exceptions to Camel is okay, but there should be no circumstances under which they're then examined. (camel_exception_get_id): Same here, (camel_exception_xfer): NULL-protect and warn if transferring from a NULL exception. svn path=/trunk/; revision=11177
* Given: 4 EXISTS 1 EXPUNGE We have to pass 3, not 4 toDan Winship2001-07-171-0/+7
| | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_response_free): Given: * 4 EXISTS * 1 EXPUNGE We have to pass 3, not 4 to camel_imap_folder_changed for the exists count. Fixes ximian bug #2112 (finally!). svn path=/trunk/; revision=11133
* If the message info for an expunged message is NULL, then just break out -Jeffrey Stedfast2001-07-151-0/+6
| | | | | | | | | | | 2001-07-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): If the message info for an expunged message is NULL, then just break out - maybe a message was expunged that we were never notified even existed? svn path=/trunk/; revision=11106
* We now use a structure as the bucket data rather than just a cache levelJeffrey Stedfast2001-07-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-13 Jeffrey Stedfast <fejj@ximian.com> * camel-uid-cache.c (camel_uid_cache_new): We now use a structure as the bucket data rather than just a cache level so set the save state to TRUE. (maybe_write_uid): We only save the uid if the cache levels are the same *and* if the save state is TRUE. (free_uid): Free the state value. (camel_uid_cache_get_new_uids): New uids that get added to the cache start with a save state of FALSE. (camel_uid_cache_save_uid): Set the save state of the uid to TRUE. What should we do if the uid isn't already in the cache? Currently I make it add the uid, but maybe it shouldn't? * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update to reflect CamelFilterDriver API changes. * camel-filter-driver.c (camel_filter_driver_filter_folder): Take a cache argument so we can tell the cache whether or not the uid should be saved (meaning we have successfully filtered it). svn path=/trunk/; revision=11084
* Removed some code i wasn't supposed to commit.Not Zed2001-07-121-2/+14
| | | | | | | | | | | | | | | 2001-07-12 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): Removed some code i wasn't supposed to commit. * providers/local/camel-local-summary.c (local_summary_add): Only set info->size if it is not zero. (local_summary_add): If we dont get a size from the info passed in, calculate it using a null stream write. Should do #4392. svn path=/trunk/; revision=11025
* Run the filter in its own thread to prevent locking issues.Peter Williams2001-07-121-12/+68
| | | | | | | | | | | 2001-07-11 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Run the filter in its own thread to prevent locking issues. (imap_filter_timeout): New function that does the filtering called as a CamelSession timeout. svn path=/trunk/; revision=11011
* Create the messageinfo itself, so we can properly set the size.Not Zed2001-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-11 Not Zed <NotZed@Ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create the messageinfo itself, so we can properly set the size. * camel-movemail.c (camel_movemail_solaris): Write out the from line between each message. 2001-07-10 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-summary.c (local_summary_add): Copy the size across from the source message info if supplied. * camel-stream-null.c: Added a 'written' member which keeps track of how much has been written to the stream. * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL defined, then use the solaris movemail to quote from lines that sendmail didn't. (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined. svn path=/trunk/; revision=10989
* Oops, e_poolv_set free's it for us, so dont double-free here.Not Zed2001-07-091-1/+0
| | | | | | | | | 2001-07-09 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-summary.c (maildir_summary_sync): Oops, e_poolv_set free's it for us, so dont double-free here. svn path=/trunk/; revision=10902
* Fixes bug #1138.Jeffrey Stedfast2001-07-071-0/+9
| | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-maildir-store.c (get_inbox): Fixes bug #1138. svn path=/trunk/; revision=10860
* Make the `day-of-month' digit take up 2 chars by using "%2d". Fixes bugJeffrey Stedfast2001-07-071-1/+1
| | | | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-summary.c (camel_mbox_summary_build_from): Make the `day-of-month' digit take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers like Pine. svn path=/trunk/; revision=10858
* Set the pipe fd's to nonblocking.Jeffrey Stedfast2001-07-071-2/+2
| | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's to nonblocking. svn path=/trunk/; revision=10847
* Add locking to camel_nntp_get_grouplist_from_server().Joe Shaw2001-07-064-2/+35
| | | | | | | | | | | | | | | | | | | | | | 2001-07-06 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-grouplist.c: Add locking to camel_nntp_get_grouplist_from_server(). * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_EXTENSIONS_SUPPORTED (202). * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes out of this, but that's what was already there...) Also, put some locking around it. (finalize): e_mutex_destroy() the command lock (camel_nntp_store_init): e_mutex_new() the command lock. * providers/nntp/camel-nntp-store.h: Add locking macros. svn path=/trunk/; revision=10838
* Added an assert to make sure that `mi' isn't NULL.Jeffrey Stedfast2001-07-061-2/+6
| | | | | | | | | | | | | | 2001-07-05 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (camel_message_info_string): Added an assert to make sure that `mi' isn't NULL. (camel_message_info_set_string): Same. * providers/imap/camel-imap-command.c (camel_imap_response_free): Create and use a temporary CamelException for use with camel_imap_folder_changed. svn path=/trunk/; revision=10834
* When indexing a new record, create a pseudo word 'ibexindexed' so we canNot Zed2001-07-051-19/+17
| | | | | | | | | | | | | | | | | | | | | | | 2001-07-05 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): When indexing a new record, create a pseudo word 'ibexindexed' so we can always tell that a message has already been idnexed, even if it contains no words of its own. Things like maildir use this check to see if its already been processed, and it matters if it is incorrect in this case (not just wasted cycles). (camel_folder_summary_info_new_from_parser): And same here. * providers/local/camel-maildir-summary.c (maildir_summary_sync): Changed the logicfor epoolv code to be different, we dont need to update hash references or any tricky stuff. (maildir_summary_check): Samehere. * camel-folder-summary.h: Removed include of e-memory.h. svn path=/trunk/; revision=10785
* Added NNTP_NO_PERMISSION (502) to the list of response codes.Joe Shaw2001-07-042-1/+7
| | | | | | | | | | | | | 2001-07-03 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION (502) to the list of response codes. * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying to reconnect, get extensions, etc. Just give up and return FALSE. svn path=/trunk/; revision=10769
* Doh. Don't remove things from the hash table while foreach'ing it. (AndDan Winship2001-07-032-23/+49
| | | | | | | | | | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_clear): Doh. Don't remove things from the hash table while foreach'ing it. (And can't use foreach_remove either because we have to remove them in a weird order). Fixes #3618. * providers/imap/camel-imap-folder.c (imap_get_message): If the server returns OK from the FETCH BODY, but there's no parseable BODY response, it's probably because there's an UN-parseable BODY response, implying the message is badly formatted, MIMEwise. In that case, fall back to fetching the message as a single part. svn path=/trunk/; revision=10748
* Implemented nntp_folder_search_by_expression and nntp_folder_search_free.Sam Creasey2001-07-037-33/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-02 Sam Creasey <sammy@oh.verio.com> * providers/nntp/camel-nntp-folder.c: Implemented nntp_folder_search_by_expression and nntp_folder_search_free. Basic search functionality e.g. unread marking now works for NNTP folders. * camel_filter_search.c (get_size): Added get-size sexp directive to get the size of a message for filters. * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): Always check with the NNTP server after summary load -- this function now always expires old summary entries and syncs with the news server. * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers): Only fetch headers for articles not already logged in the summary file. * providers/nntp/camel-nntp-grouplist.c (camel_nntp_get_grouplist_from_*): change from g_list_append() to g_list_prepend() + g_list_reverse. Traversing 40,000 element linked lists sucks. * providers/nntp/camel-nntp-store.c (camel_nntp_command): Should the NNTP connection die with CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry attempt. Timing out the NNTP link is less painful this way. svn path=/trunk/; revision=10716
* new method to get an application-initialized filter driver.Dan Winship2001-07-025-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-session.c (camel_session_get_filter_driver): new method to get an application-initialized filter driver. * camel-filter-driver.c (camel_filter_driver_new): Remove the get_folder function and data args from here... (camel_filter_driver_set_folder_func): ...and add this function to set/change them. * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If this folder is INBOX and we're filtering INBOX, set a flag on the folder for later. (imap_update_summary): Add another argument (GPtrArray *recents), and if it's non-NULL, add the uids of any \Recent new messages to it. (camel_imap_folder_changed): If doing filtering in this folder, create a recents array and pass it to imap_update_summary. Then get a filter driver and use it to filter the recent messages. * providers/imap/camel-imap-summary.h: * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add support for the \Recent flag. * providers/imap/camel-imap-provider.c (imap_conf_entries): enable the "filter" option. * camel-types.h: add CamelFilterDriver typedef here svn path=/trunk/; revision=10681
* sshJose Maria Celorio2001-06-291-0/+6
| | | | svn path=/trunk/; revision=10592
* Add a CamelMimeFilterStripHeader that removes a header from mime output. UsedPeter Williams2001-06-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by sendmail to strip the BCC from the email while still sending to the BCC recipients. camel: 2001-06-28 Peter Williams <peterw@ximian.com> * camel-mime-filter-stripheader.c: New file. Filter that strips a header from mime output. * camel-mime-filter-stripheader.h: New file. Header for the above. * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader filter to remove the "Bcc" header. * Makefile.am: Add the stripheader files. * tests/lib/Makefile.am (INCLUDES): Get this to compile again. * tests/mime-filter/test-stripheader.c: New file. Test suite for the CamelMimeFilterStripHeader. * tests/mime-filter/Makefile.am: New test section: mime filters. mail: 2001-06-28 Peter Williams <peterw@ximian.com> * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal; this unsets the BCC recipients and so doesn't send to the Bcc'd people at all. svn path=/trunk/; revision=10576
* If the folder is frozen, don't refresh, just record that we need to do itDan Winship2001-06-292-5/+41
| | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (imap_refresh_info): If the folder is frozen, don't refresh, just record that we need to do it later. (imap_append_online): If the APPEND doesn't trigger an immediate EXISTS response (because the folder isn't the selected folder, or because the server doesn't do that until the next command), call imap_refresh_info on the folder. (imap_copy_online): Likewise. (Replacing the unconditional NOOP that was there before, which absolutely killed filter performance by forcing the IMAP provider to switch back and forth between folders after every copy or move.) (imap_thaw): If the folder needs a refresh, do it. * camel-folder.c (camel_folder_is_frozen): New method svn path=/trunk/; revision=10565
* lock the cache around accessesDan Winship2001-06-272-5/+14
| | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (camel_imap_folder_selected, imap_append_offline, imap_append_online, camel_imap_folder_changed): lock the cache around accesses * providers/imap/camel-imap-store.c (get_folder_online): ref the newly-created folder (as current_folder) before calling camel_imap_folder_selected, in case that needs to do something that causes another folder to become current... svn path=/trunk/; revision=10509
* g_strdup() the message source here or we will have problems later when weJeffrey Stedfast2001-06-261-2/+2
| | | | | | | | | | 2001-06-25 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-search.c (get_source): g_strdup() the message source here or we will have problems later when we go to free the result ;-) svn path=/trunk/; revision=10498
* Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid aDan Winship2001-06-252-10/+6
| | | | | | | | | | | | | * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a useless round trip like some other SASL bindings do. * providers/imap/camel-imap-command.c (imap_read_response): Deal with IMAP servers that (incorrectly) return "+\r\n" rather than "+ \r\n" for an empty continuation response. (camel_imap_response_extract_continuation): Likewise. svn path=/trunk/; revision=10480
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-2368-118/+118
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* Use camel_address_length() rather than casting and accessing data members.Jeffrey Stedfast2001-06-221-3/+3
| | | | | | | | | | 2001-06-21 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_send): Use camel_address_length() rather than casting and accessing data members. svn path=/trunk/; revision=10365
* Only create a missing uid if we have indexing turned on.Not Zed2001-06-186-44/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-18 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_parser): Only create a missing uid if we have indexing turned on. * camel-lock-helper.c (setup_process): Function to setup process/sanity/security checks. Change to the real uid as soon as we can. (lock_path): First try to lock as the real uid, if that fails, try the root uid. (unlock_id): Unlock as the uid we created the lock as. * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper location. * providers/local/camel-spool-folder.c (spool_lock): Implemented, using lock helper locking. Need to work out if the locking requires a root created lock? (spool_unlock): Likewise. 2001-06-15 Not Zed <NotZed@Ximian.com> * camel-lock-helper.c: Setuid Lock helper process. Creates and manages .locks, keeping them active, removing them, etc. What real perms it needs is a little system dependent. 2001-06-14 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-store.c (get_folder_info): Implement. (scan_dir): Does the work of scanning for maildir directories. 2001-06-13 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder_info): Implemented, just returns a hardcoded INBOX folder. (free_folder_info): implemented, free's the 1 possible level of folder info. * providers/local/camel-spool-folder.c (camel_spool_folder_construct): Set the real unread message count on the folder_created thing. svn path=/trunk/; revision=10261
* Return the largest real UID in the cache (as an integer). Eventually to beDan Winship2001-06-162-0/+19
| | | | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_max_uid): Return the largest real UID in the cache (as an integer). Eventually to be used for an optimization in the new-message fetch code. (cache_put): Keep track of max_uid. svn path=/trunk/; revision=10254
* A new provider, for spool mailboxes. Mostly a cut and paste of the mboxNot Zed2001-06-1210-2/+2378
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-12 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-*.[ch]: A new provider, for spool mailboxes. Mostly a cut and paste of the mbox code, but not a subclass CamelLocal*. Not tested a lot, doesn't lock yet, use with extreme caution. * tests/lib/folders.c (test_folder_message_ops): Added spool arg, spool folders can't be deleted, renamed, etc. (test_folder_basic): Same. * tests/folder/test2.c (main): Added checks for spool type. * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD): Added db3 flags, so make check compiles, doesn't run though. 2001-05-24 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-provider.c (camel_provider_module_init): Added spool provider. svn path=/trunk/; revision=10198
* Don't fetch the UID and FLAGS of messages we don't know about yet, sinceDan Winship2001-06-061-30/+34
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch the UID and FLAGS of messages we don't know about yet, since they'll just get discarded. svn path=/trunk/; revision=10132
* Remove this evolutionary dead endDan Winship2001-05-3010-1689/+0
| | | | svn path=/trunk/; revision=10042
* Create a CamelDiscoDiary. (imap_disconnect_offline): And free it.Dan Winship2001-05-307-72/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (imap_connect_online, imap_connect_offline): Create a CamelDiscoDiary. (imap_disconnect_offline): And free it. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): If RESYNCING, don't do any sort of checking that the remote folder matches the summary, beyond making sure that the UIDVALIDITY is correct. (imap_rescan): Add a missing camel_folder_summary_info_free when removing a UID from the summary. (imap_expunge_uids_offline): Implement. Fairly simple. (imap_expunge_uids_resyncing): Implement. If the store supports UIDPLUS, we can just use imap_expunge_uids_online. If not, we need to temporarily undelete any messages marked deleted on the server that aren't supposed to get expunged. (imap_append_offline): Implement, using cache and summary operations, and triggering the folder_changed event by hand. (imap_append_resyncing): Implement. Redo imap_append_online a bit in the process to make them able to share more code. (imap_copy_offline): Implement. (imap_copy_online): Move parts of this out into a helper. (imap_copy_resyncing): Implement. In most cases this is just like imap_copy_online, but if you are copying a message that was itself copied or appended into the folder, and the server doesn't do UIDPLUS, it will be necessary to replace at least part of the copy operation with one or more appends. * providers/imap/camel-imap-command.c (imap_read_response): Don't record the current folder in the response when in RESYNCING mode. (This means that EXISTS and EXPUNGE responses won't be processed, which is needed because the summary may not match the folder at this point.) (imap_read_response): On error, call camel_imap_response_free_without_processing, not camel_imap_response_free. * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make this work better when operating on UIDs that aren't in the summary. * providers/imap/camel-imap-summary.c (camel_imap_summary_add_offline): New routine used by imap_append_offline and imap_copy_offline to create new summary entries. svn path=/trunk/; revision=10041
* Add a "need_rescan" flag saying if we want to rescan the entire folder forDan Winship2001-05-273-24/+43
| | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag saying if we want to rescan the entire folder for flag changes next time it's selected. (camel_imap_folder_init): Set need_rescan TRUE. (camel_imap_folder_selected): If need_rescan is TRUE, call imap_rescan. (imap_refresh_info): Only do a full rescan if need_rescan is TRUE. Otherwise just do a NOOP, making this a MUCH more lightweight operation. Also, don't call imap_rescan directly if the folder isn't selected, since that could end up causing the folder to be scanned *twice* (imap_rescan -> camel_imap_command -> camel_imap_folder_selected -> imap_rescan). (imap_rescan): Set need_rescan FALSE. (imap_sync_online): Don't NOOP if no changes were pushed: the caller will call refresh_info if it wants to poll for changes. Fixes evolution-mail doing lots of unnecessary extra work at quit time. svn path=/trunk/; revision=10010
* Oops. Use a strNcmp to make sure the response begins with a 334 code, notJeffrey Stedfast2001-05-261-1/+1
| | | | | | | | | | 2001-05-25 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a strNcmp to make sure the response begins with a 334 code, not a strcmp. Duh. svn path=/trunk/; revision=10004
* remove the summary info so we are not out-of-sync with the maildir folder.Jeffrey Stedfast2001-05-263-71/+88
| | | | | | | | | | | | | | | | 2001-05-25 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-maildir-folder.c (maildir_append_message): remove the summary info so we are not out-of-sync with the maildir folder. * providers/local/camel-mh-folder.c (mh_append_message): remove the summary info so we are not out-of-sync with the mh folder. * providers/local/camel-mbox-folder.c (mbox_append_message): remove the summary info so we are not out-of-sync with the mbox. svn path=/trunk/; revision=9996
* s/folder_deleted/folder_created - result of a bad copy/paste.Jeffrey Stedfast2001-05-241-1/+1
| | | | | | | | | | 2001-05-23 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-folder.c (camel_local_folder_construct): s/folder_deleted/folder_created - result of a bad copy/paste. svn path=/trunk/; revision=9957
* Optimize the match "" case.Jeffrey Stedfast2001-05-241-17/+30
| | | | | | | | | 2001-05-23 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-search.c (imap_body_contains): Optimize the match "" case. svn path=/trunk/; revision=9955
* Store the CamelFolderInfo tree that was returned fromJeffrey Stedfast2001-05-221-4/+4
| | | | | | | | | | | | | | 2001-05-21 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Store the CamelFolderInfo tree that was returned from camel_folder_info_build() in a new variable, 'tree', rather than 'fi' since we later use 'fi' when syncing folders. Not only does this fix a memory leak, but it also fixes the bug where the user would only see the last folder in the folder list and/or it's subfolders. svn path=/trunk/; revision=9911
* Don't check the initial auth response until we get into the while-loopJeffrey Stedfast2001-05-121-9/+13
| | | | | | | | | | | 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
* Pass appropriate parameters to CF_CLASS and add comment explaining why myPeter Williams2001-05-101-1/+3
| | | | | | | | | | 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-102-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-101-1/+1
| | | | | | | | | 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-082-2/+11
| | | | | | | | | | | | | | | | | | | | | | 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 up refcounting on current_folder.Dan Winship2001-05-041-2/+6
| | | | | | | | | | * 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-045-508/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-033-18/+19
| | | | | | | | | | | | | | | | * 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-031-14/+8
| | | | | | | | * 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-021-23/+16
| | | | | | | * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit rot. svn path=/trunk/; revision=9643
* Redo command locking. Since command_lock is recursive, we can just get aDan Winship2001-05-026-197/+211
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-015-73/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-013-38/+77
| | | | | | | | | | | | | | * 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-283-18/+14
| | | | | | | | | | | | | | | | | | | | | | * 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
* New file, with the int, string, time_t, and off_t encode/decode routinesDan Winship2001-04-273-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-273-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Applied jacob's patches for e-poolv stuff.Not Zed2001-04-262-10/+18
| | | | | | | | 2001-04-26 Not Zed <NotZed@Ximian.com> * Applied jacob's patches for e-poolv stuff. svn path=/trunk/; revision=9571
* Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.Mikael Hallendal2001-04-231-1/+1
| | | | | | | | | 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
* 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
* Don't we want to tell where we are by using the start of the message? IJeffrey Stedfast2001-04-171-5/+5
| | | | | | | | | | | | | 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
* Remove the EXTRA_GNOME_CFLAGS include.Jeffrey Stedfast2001-04-174-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* s/imap_store/store/, fixing a typo that was causing the build to fail.Jon Trowbridge2001-04-141-4/+4
| | | | | | | | | | 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
* Plug leaks.Dan Winship2001-04-141-1/+10
| | | | | | | | | | | | | | | | * 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
* Plug memory leaks.Dan Winship2001-04-131-0/+1
| | | | | | | | * 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-121-2/+2
| | | | | | | * providers/imap/camel-imap-utils.c (imap_parse_string_generic): Simplify peterw's imap_is_atom_char fix. svn path=/trunk/; revision=9250
* Check if gethostbyname_r take five paramsJP Rosevear2001-04-125-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* It would be a good idea to recognize '\0'. Before, this code was runningPeter Williams2001-04-081-1/+1
| | | | | | | | | | | 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-052-1/+5
| | | | | | | | 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
* (imap_update_summary): When reading message flags, set theDan Winship2001-04-041-2/+9
| | | | | | | | 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-041-3/+6
| | | | | | | 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-041-1/+11
| | | | | | | | * 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-033-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* New files to handle the LOGIN SASL mechanism.Jeffrey Stedfast2001-04-021-9/+24
| | | | | | | | | | | | | | | | | | | 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-021-2/+5
| | | | | | | | | 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-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-311-47/+28
| | | | | | | | | * 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
* 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-301-7/+34
| | | | | | | | | | | | | | 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
* Not quite finished but checking in for some local frobbing.Not Zed2001-03-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host name info when done ... blah blah. * camel-sasl-kerberos4.c (krb4_challenge): Free host name info after we're done with it. * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name info after we're done with it. * camel-remote-store.c (remote_connect): Free the host name info from get_host after we're finished with it. * camel-service.c (camel_get_host_byname): New function to lookup a name, and still be cancellable. (camel_free_host): And a function to free the structure returned. (camel_service_gethost): Call get_host_byname for this. svn path=/trunk/; revision=9033
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-3035-51/+125
| | | | svn path=/trunk/; revision=9024
* change "gboolean show_passwd" to "guint32 flags".Dan Winship2001-03-301-14/+8
| | | | | | | | | | | | | | | | | | * 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
* If we aren't going to even check the resp/free buffer that gets returnedJeffrey Stedfast2001-03-281-4/+3
| | | | | | | | | | | | | | | 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
* add an argument to say whether or not you want "PLAIN" in the list (so youDan Winship2001-03-274-4/+4
| | | | | | | | | | | | | | | | * 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-2711-159/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* 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
* Use camel_vtrash_folder_new() to create the vtrash folder now.Jeffrey Stedfast2001-03-271-50/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* keep a reference on the store's current_folder.Dan Winship2001-03-272-2/+11
| | | | | | | | | | * 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
* Don't look at untagged responses other than "* BYE"...Dan Winship2001-03-234-85/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-228-187/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Function to check if the store is online and set an exception if not.Dan Winship2001-03-218-190/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Set the errbuf to NULL after freeing it? I don't think this should fix bugJeffrey Stedfast2001-03-191-0/+1
| | | | | | | | | | 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
* Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check theNot Zed2001-03-171-0/+3
| | | | | | | | | | 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
* Print info about the issuer of the certificate.Jeffrey Stedfast2001-03-171-3/+5
| | | | | | | | | | | | | | | | | | | | 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-171-0/+4
| | | | | | | | 2001-03-16 Kjartan Maraas <kmaraas@gnome.org> * providers/pop3/camel-pop3-folder.c: Added #include <config.h> svn path=/trunk/; revision=8762
* 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-1612-268/+739
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-5/+3
| | | | | | | | | | | | | | | | 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-151-19/+47
| | | | | | | | | | | | | | | 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-154-10/+42
| | | | | | | | | | | | 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-154-5/+5
| | | | | | | | | | | | | | | | | 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-153-3/+44
| | | | | | | | | | | | | | 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
* So it turns out that NSS_Init *isn't* idempotent, so we have to protectJeffrey Stedfast2001-03-151-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-13/+12
| | | | | | | | | | | 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-153-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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
* When trying again after a failed password attempt, check if the connectionDan Winship2001-03-141-0/+8
| | | | | | | | * 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-141-10/+11
| | | | | | | | * 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
* Remove the "-U" for now, because it breaks exim's "sendmail" wrapper. (AndDan Winship2001-03-101-2/+2
| | | | | | | | | | * 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
* Implement. (get_trash): Implement. (camel_pop3_store_class_init): OverrideJeffrey Stedfast2001-03-081-0/+19
| | | | | | | | | | | | | | | | 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
* Remove some unused stuffDan Winship2001-03-073-71/+0
| | | | | | | | * providers/local/camel-mbox-provider.c: * providers/vee/.cvsignore: * providers/vee/libcamelvee.urls: Remove some unused stuff svn path=/trunk/; revision=8582
* i18n'd some strings in here.Jeffrey Stedfast2001-03-062-9/+59
| | | | | | | | | | | | | 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
* Doh! Set the CAMEL_URL_ALLOW_AUTH flag.Jeffrey Stedfast2001-03-031-1/+1
| | | | | | | | | | | | 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
* 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-033-52/+189
| | | | | | | | | | | | | | | | | | | | 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-021-10/+34
| | | | | | | | | * 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
* Add an "authtypes" hash table to CamelImapStore recording the supportedDan Winship2001-03-025-286/+134
| | | | | | | | | | | | | | | | | | | | | * 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
* Added camel-sasl*.[c,h] to the build.Jeffrey Stedfast2001-03-011-25/+1
| | | | | | | | | | | | | | | | | | | | | | 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-271-33/+144
| | | | | | | | | | | | | | * 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
* Add some internal progress reporting. (imap_rescan): Do some progressNot Zed2001-02-231-1/+18
| | | | | | | | | | | | | 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
* #define this as the set of all IMAP system flagsDan Winship2001-02-222-1/+8
| | | | | | | | | | | | | * 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-228-1312/+2
| | | | | | | | | | | | | | | | | | | | | 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-221-47/+5
| | | | | | | | | | | | | | | | | | | | | | 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-221-2/+8
| | | | | | | * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for IMAP4-pre-rev1 from Torsten Schulz. svn path=/trunk/; revision=8318
* Added flags argument. (message_changed): Add support for the auto-updateNot Zed2001-02-206-120/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Emit the folder_created signal here.Jeffrey Stedfast2001-02-164-3/+79
| | | | | | | | | | | | | | | | | | | | | | | 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
* IMAP4 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead inDan Winship2001-02-161-3/+8
| | | | | | | | * 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
* (create_folder): Oops, and fix bug involving namespacesDan Winship2001-02-151-4/+3
| | | | svn path=/trunk/; revision=8233
* New method to create a folder when you don't know its full name.Dan Winship2001-02-151-8/+39
| | | | | | | | | * 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
* mbox, mh, and maildir camel-url's need absolute paths.Jeffrey Stedfast2001-02-131-3/+3
| | | | | | | | | | | 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
* Rewrite a bunch. Replace the existing folder cache stuff with much simplerDan Winship2001-02-108-134/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Changed to push the operation into a status stack.Not Zed2001-02-084-14/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Updated.Jeffrey Stedfast2001-02-065-93/+104
| | | | | | | | | | | | | | | | | | | 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
* Include the terminating NUL in the calculated string length. This hitNot Zed2001-01-291-1/+1
| | | | | | | | | | 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
* Changed the subject search to handle case sensitive when it is mixed case.Not Zed2001-01-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a lock around the delayed loading, so two threads won't try to do itDan Winship2001-01-243-2/+40
| | | | | | | | * 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-231-2/+2
| | | | | | | | * 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
* Removed some debug 'warnings', as they should now be displayed at theNot Zed2001-01-232-14/+17
| | | | | | | | | | | | | | | | | | | | | 2001-01-23 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-summary.c (message_info_load): Removed some debug 'warnings', as they should now be displayed at the toplevel loader, and just made the code match similar code elsewhere. * providers/local/camel-mbox-summary.c (message_info_load): Error handling. (message_info_save): more error handling. * camel-folder-summary.c (message_info_load): Add error handling and sanity checking. (camel_folder_summary_load): Add error checks. (perform_content_info_load): Error + sanity checks. (content_info_load): error + sanity checks. svn path=/trunk/; revision=7737
* Change the callbacks in this file to match the callback function types.Christopher James Lahey2001-01-231-1/+1
| | | | | | | | | 2001-01-22 Christopher James Lahey <clahey@helixcode.com> * component/e-summary-url.c: Change the callbacks in this file to match the callback function types. Fixes warnings. svn path=/trunk/; revision=7723
* Added profiling temp files.Not Zed2001-01-228-0/+32
| | | | | | | | | 2001-01-22 Not Zed <NotZed@Ximian.com> * .cvsignore */*/.cvsignore: Added profiling temp files. svn path=/trunk/; revision=7705
* (subscribe_folder): add a missing UNLOCKDan Winship2001-01-201-0/+1
| | | | svn path=/trunk/; revision=7657
* If LISTing a subscribed folder doesn't return a LIST response, just ignoreDan Winship2001-01-201-3/+6
| | | | | | | | | * providers/imap/camel-imap-store.c (get_subscribed_folders_by_hand): If LISTing a subscribed folder doesn't return a LIST response, just ignore that folder. Yay RFC2060. svn path=/trunk/; revision=7650
* Mark strings for translation.Kjartan Maraas2001-01-191-2/+2
| | | | | | | | 2001-01-19 Kjartan Maraas <kmaraas@gnome.org> * providers/smtp/camel-smtp-provider.c: Mark strings for translation. svn path=/trunk/; revision=7643
* More tweaking... skip separator characters after the namespace character.Dan Winship2001-01-191-1/+1
| | | | | | | | | | | | | | | * camel-store.c (camel_folder_info_build): More tweaking... skip separator characters after the namespace character. (Gets rid of the shell folder registration warning some people have had with IMAP) * providers/imap/camel-imap-store.c (imap_connect): I'm sure there was some clever reason I was storing the flags of the folder in the hash table rather than just "1", but I don't remember what it was now. Anyway, since we only ever test NULL/non-NULL, store 1, since flags is sometimes 0. svn path=/trunk/; revision=7628
* Oops. Somewhere in one of the reorgs, the code to add new messages to theDan Winship2001-01-191-1/+2
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_update_summary): Oops. Somewhere in one of the reorgs, the code to add new messages to the CamelFolderChangeInfo structure got removed. Fix that. svn path=/trunk/; revision=7627
* Add some g_warnings() to help debug later if I ever get the segfaults IJeffrey Stedfast2001-01-181-1/+5
| | | | | | | | | | | | | | | 2001-01-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-summary.c (message_info_load): Add some g_warnings() to help debug later if I ever get the segfaults I was getting earlier. Can't seem to reproduce them after my previous "fix". * camel-folder-summary.c (camel_folder_summary_load): Undid my change here, NotZed said it was wrong and that if it gets a NULL mi then it should abort and not continue. svn path=/trunk/; revision=7609
* New smtp error-code to string mapping function. (smtp_connect): Use theJeffrey Stedfast2001-01-181-10/+90
| | | | | | | | | | | | | | | | | | | | 2001-01-17 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): New smtp error-code to string mapping function. (smtp_connect): Use the new error->string function for reporting useful errors. (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM as it seems Exchange sends back lowercase for that one single SMTP extension. Everything else is uppercase. I'm seeing a lack of love for that extension by Microsoft dudes... (smtp_mail): Use get_smtp_error_string. (smtp_rcpt): Same. (smtp_data): Same. (smtp_quit): Same. (smtp_rset): Same. svn path=/trunk/; revision=7605
* Delayed loading of IMAP message parts.Dan Winship2001-01-177-157/+884
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-types.h: typedef CamelMessageInfo and CamelMessageContentInfo here * camel-folder-summary.h: Add a "size" field to CamelMessageContentInfo. * camel-folder-summary.c (camel_folder_summary_content_info_new, camel_folder_summary_content_info_free): Renamed and made non-static for providers that construct their own content info. (content_info_load, content_info_save): load/save size * camel-data-wrapper.c (camel_data_wrapper_is_offline): New function to return if a data wrapper's contents are "offline". (So that, for example, we don't make thumbnails of images that haven't been loaded off the IMAP server yet.) Defaults to FALSE. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Fix a bug in re-selecting a folder when messages have been expunged from it by another client in the meantime. (imap_get_message): Rewrite. If the message is larger than a certain size, just create a skeleton message containing CamelImapWrappers that will read parts as needed. This way, large attachments only need to be downloaded if the user looks at them, and multipart/alternative alternatives that aren't used will never be downloaded at all. (imap_update_summary): Rewrite this a bunch too to make the parsing more robust. * providers/imap/camel-imap-summary.c (CAMEL_IMAP_SUMMARY_VERSION): bump. (camel_imap_summary_new): Set build_content to TRUE. (content_info_load, content_info_save): Only save/load the content for messages that have it. (The content info gets created as a side effect of imap_get_message.) * providers/imap/camel-imap-utils.c (imap_parse_body): New routine (and helpers) to parse an IMAP 'body' FETCH response and fill in a CamelMessageContentInfo from it. * providers/imap/Makefile.am (libcamelimap_la_SOURCES, libcamelimap_la_HEADERS): add camel-imap-wrapper. svn path=/trunk/; revision=7557
* set to nntp if ENABLE_NNTP (SUBDIRS): use $(NNTP_DIR)Chris Toshok2001-01-171-1/+5
| | | | | | | | | 2001-01-16 Chris Toshok <toshok@ximian.com> * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP (SUBDIRS): use $(NNTP_DIR) svn path=/trunk/; revision=7552
* Don't check errno as it's not being set. Fixes bug #1150.Jeffrey Stedfast2001-01-171-2/+1
| | | | | | | | | 2001-01-16 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check errno as it's not being set. Fixes bug #1150. svn path=/trunk/; revision=7547
* Ugh, this design is ugly like my butt.Jeffrey Stedfast2001-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2001-01-16 Jeffrey Stedfast <fejj@ximian.com> Ugh, this design is ugly like my butt. * camel-session.c (camel_session_query_cert_authenticator): New function which will be useful when we integrate SSL. * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate a certificate. (ssl_bad_cert): Callback that gets the reason the certificate is bad and then calls camel's cert-authenticator callback to notify the user and to allow the user to override the check. (stream_connect): Set the URL we expect to connect with and setup the auth_cert and bad_cert callbacks. (camel_tcp_stream_ssl_new): Now takes a CamelSession and a expected_host argument that it will use for certificate authentication. (camel_tcp_stream_ssl_finalize): Unref the session and free the expected_host. svn path=/trunk/; revision=7531
* Chganged len back to be unsigned. And do a simple range check on theNot Zed2001-01-163-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-16 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_decode_string): Chganged len back to be unsigned. And do a simple range check on the string value to try and detect corrupted summary files. * providers/imap/camel-imap-command.c (imap_read_untagged): Handle cancelled stream reads with an appropriate exception. * providers/imap/camel-imap-private.h: Fix the include-once macro. Doh, confliced with camel-private.h. * providers/imap/camel-imap-store.c (imap_store_refresh_folders): A copy of camel_remote_store_refresh_folders. We avoid locking each folder when we call it though. This should be removed when i can work out how to remove the folder lock from this function easily. * camel-stream-fs.c (stream_write): Fix n' argument of select. (stream_read): Likewise. * camel-remote-store.c (socket_connect): Bump the connect timeout upto 4 minutes. (socket_connect): Oops, fix the 'n' argument of select. * camel-session.c (camel_cancel_cancel): If we are given no cancellation node, then do it for all active ones. svn path=/trunk/; revision=7526
* Lock around the imap_rescan, which needs it.Peter Williams2001-01-161-0/+2
| | | | | | | | | 2001-01-15 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock around the imap_rescan, which needs it. svn path=/trunk/; revision=7513
* (imap_copy_message_to): Fix this up: sync flags to the serverDan Winship2001-01-121-33/+50
| | | | | | | | | | | before copying so that they end up correct in the remote folder. And poke the destination folder after doing the copy so it notices the new message right away. (imap_move_message_to): Call imap_copy_message_to for most of the work rather than duplicating the code (since it's much more complicated now). svn path=/trunk/; revision=7419
* Fix a bug in previous commit: don't check for deleted messages if thereDan Winship2001-01-121-30/+33
| | | | | | | | | * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Fix a bug in previous commit: don't check for deleted messages if there are no known messages in the folder (because it would end up sending "FETCH 0 ..."). svn path=/trunk/; revision=7412
* New function to check for added/deleted messages when re-selecting aDan Winship2001-01-123-4/+83
| | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): New function to check for added/deleted messages when re-selecting a folder. (imap_refresh_info, imap_rescan, imap_update_summary): Various locking tweaks that turn out to be irrelevant since command_lock is recursive, but whatever. * providers/imap/camel-imap-command.c (camel_imap_command): When selecting a new folder, call camel_imap_folder_selected on it. svn path=/trunk/; revision=7410
* Changed the descriptions for mh, mbox, and maildir to be moreJeffrey Stedfast2001-01-111-3/+3
| | | | | | | | | 2001-01-10 Jeffrey Stedfast <fejj@helixcode.com> * providers/local/camel-local-provider.c: Changed the descriptions for mh, mbox, and maildir to be more "user-friendly". svn path=/trunk/; revision=7373
* New header to prevent recursive #include problemsDan Winship2001-01-111-0/+39
| | | | | | | * providers/imap/camel-imap-types.h: New header to prevent recursive #include problems svn path=/trunk/; revision=7368
* New header to prevent recursive #include problemsDan Winship2001-01-118-9/+14
| | | | | | | | | | | | | | | | | * providers/imap/camel-imap-types.h: New header to prevent recursive #include problems * providers/imap/*.h: Replace some #includes with #include "camel-imap-types.h", remove typedefs that were moved to camel-imap-types.h * providers/imap/*.c: Add #includes to make up for #includes removed from .h files * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add camel-imap-types.h svn path=/trunk/; revision=7367
* New class function, parallel to camel_folder_sync. (The defaultDan Winship2001-01-111-0/+18
| | | | | | | | | | | | | | | * camel-store.c (camel_store_sync): New class function, parallel to camel_folder_sync. (The default implementation just calls camel_folder_sync on each cached folder.) * providers/imap/camel-imap-store.c (get_folder_info): Call camel_store_sync before doing anything else so that the IMAP server and Camel are working from the same data. Don't ask the server for the unread message count of the current folder, since UW will return often-incorrect cached data, and we can calculate it without talking to the server anyway. svn path=/trunk/; revision=7365
* Mostly IMAP changes. Use the NAMESPACE extension (whereDan Winship2001-01-103-153/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | available). Deal with servers that don't return LIST flags in response to LSUB (like UW) to get rid of the "not a selectable folder" error messages in the UI. Take advantage of the \Marked and \Unmarked flags to try to speed up the folder scan by not doing STATUS on unmarked folders. Some further tweaks on the shape of the resulting folder tree in various situations... * camel-store.h: Remove the (read) message_count, since nothing uses it, and we can speed up IMAP a bit this way. * camel-store.c (camel_folder_info_build): Redo this a bit to make it more useful for IMAP since that's the only thing that uses it. * camel-remote-store.c (camel_remote_store_connected): Public function to check if the store is connected, and try to connect it if it's not. (remote_send_string, remote_send_stream, remote_recv_line): Use that. * providers/imap/camel-imap-store.c (camel_imap_store_finalize): fix up for changes. (camel_imap_store_init): Initialize subscribed_folders to NULL rather than an empty hash table. (imap_connect): Get the list of subscribed folders here. If the server doesn't claim that any of them are either Marked or Unmarked, then assume that it doesn't do that for LSUB and remember that for later. If the server supports the NAMESPACE extension and the user didn't specify a namespace, use the server-provided one. (imap_disconnect): Free the list of subscribed folders, and the namespace. (get_folder): check camel_remote_store_connected (get_folder_info): check camel_remote_store_connected. Add a bunch of new cleverness. If we learned that the server doesn't do LSUB usefully, do a bunch of LISTs by hand. Then, if we're getting unread counts, only do it for folders that weren't listed as Unmarked. Also, deal with namespaces that end with the separator character, and update for changes to camel_folder_info_build. (folder_subscribed): Add a g_return_val_if_fail. (subscribe_folder, unsubscribe_folder): check camel_remote_store_connected. * providers/nntp/camel-nntp-store.c (build_folder_info, build_folder_info_from_grouplist, nntp_store_get_folder_info): Don't fill in message_count since it doesn't exist any more. svn path=/trunk/; revision=7343
* Kill off a long-hated Camel kludge: "empty" URLs andDan Winship2001-01-104-65/+15
| | | | | | | | | | | | | | | | | | | | | | | | query_auth_types_generic. * camel-url.c: Remove "empty" from CamelURL. (camel_url_new): No longer set it. (camel_url_to_string): Treat "" as equivalent to NULL for authmech. (Unrelated change, but it simplifies some stuff with the new config dialog.) * camel-service.c (camel_service_new): Remove url->empty check: if the URL isn't valid, we don't create the service. (camel_service_query_auth_types): No longer need to switch between generic and connected variants. * providers/smtp/camel-smtp-transport.c (query_auth_types): * providers/pop3/camel-pop3-store.c (query_auth_types): * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): * providers/imap/camel-imap-store.c (query_auth_types): * camel-remote-store.c (remote_query_auth_types): Remove generic version, rename connected version. svn path=/trunk/; revision=7327
* Dont try and unref a messageinfo that wasn't there, and use the right freeNot Zed2001-01-061-6/+27
| | | | | | | | | | | | 2001-01-06 Not Zed <NotZed@HelixCode.com> * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont try and unref a messageinfo that wasn't there, and use the right free function too. Modified patch from Iain. (vee_move_message_to): New method, call the real folders' move_message_to method. svn path=/trunk/; revision=7278
* oops. commit-oDan Winship2001-01-051-509/+0
| | | | svn path=/trunk/; revision=7252
* Fix two problems in figuring out server-expunged messages.Dan Winship2001-01-051-2/+1
| | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Fix two problems in figuring out server-expunged messages. svn path=/trunk/; revision=7251
* Fix two problems in figuring out server-expunged messages.Dan Winship2001-01-051-0/+509
| | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Fix two problems in figuring out server-expunged messages. svn path=/trunk/; revision=7247
* Initialize the exists variable so that we don't do random things if theChristopher James Lahey2001-01-041-1/+1
| | | | | | | | | | 2001-01-03 Christopher James Lahey <clahey@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Initialize the exists variable so that we don't do random things if the imap server misbehaves. svn path=/trunk/; revision=7235
* Finishing the removal of these directories.Chris Lahey2001-01-032-2/+0
| | | | svn path=/trunk/; revision=7220
* Removed these directories since they're unused.Christopher James Lahey2001-01-0325-4611/+0
| | | | | | | | | 2001-01-02 Christopher James Lahey <clahey@helixcode.com> * providers/maildir/, providers/mbox/, providers/mh/: Removed these directories since they're unused. svn path=/trunk/; revision=7219
* fix off-by-oneDan Winship2001-01-031-1/+1
| | | | svn path=/trunk/; revision=7217
* IMAP randomness.Dan Winship2001-01-037-404/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced. * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove camel-imap-stream.h * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a char ** instead of char *, to return the position at the end of parsing like the string parsing functions. (imap_parse_string_generic): New function to parse a string, nstring, or astring. (imap_parse_nstring, imap_parse_astring): Now macros (imap_parse_string): Added * providers/imap/camel-imap-folder.h: Remove the "exists" field from CamelImapFolder. * providers/imap/camel-imap-folder.c: Remove unused include of camel-imap-stream.h. (camel_imap_folder_init): Remove no-longer-relevant summary initialization. (camel_imap_folder_new): Update for imap_parse_flag_list change, exists removal, and imap_rescan. (imap_rescan): New function that does most of the work of the old imap_refresh_info, but taking "exists" as an argument instead of getting it from the folder. Also calls camel_imap_folder_changed to do the summary updating and signalling, rather than duplicating that code. (imap_refresh_info): Just call imap_rescan (using the size of the folder summary as "exists"). (imap_update_summary): Update for imap_parse_flag_list change (camel_imap_folder_changed): Update for "exists" change. svn path=/trunk/; revision=7216
* Fix the APOP check to not crash on servers that don't return anyDan Winship2000-12-281-7/+9
| | | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the APOP check to not crash on servers that don't return any information on the +OK greeting line. svn path=/trunk/; revision=7184
* (camel_imap_folder_changed): Make sure we unref the summary lookup.Michael Zucci2000-12-241-0/+1
| | | | svn path=/trunk/; revision=7156
* clean up a stubborn and hard to remove imap_folder->summary.Michael Zucci2000-12-242-5/+4
| | | | svn path=/trunk/; revision=7155
* Minor compilation fixes.Michael Zucci2000-12-242-14/+6
| | | | svn path=/trunk/; revision=7151
* Lock the command channel while searching. (imap_body_contains): IfNot Zed2000-12-2425-923/+746
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-24 Not Zed <NotZed@HelixCode.com> * providers/imap/camel-imap-search.c (imap_body_contains): Lock the command channel while searching. (imap_body_contains): If performing a whole uid search, then add references to our own summary items, dont look it up in the folder. This way they can't vanish unexpectedly. * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a private field. * providers/imap/camel-imap-private.h: Added lock for imap searches. * Merge from camel-mt-branch. * providers/imap/camel-imap-folder.c (imap_update_summary): Merge fix, use the folder->summary. (imap_get_message_flags, imap_set_message_flags, imap_get_message_user_flag, imap_set_message_user_flag): Removed again. (camel_imap_folder_init): Setup private data/lock. (imap_finalize): Free private data/search lock. (imap_search_free): Lock the search_lock. (imap_search_by_expression): Lock the search lock when using the search object. Also copy/ref hte summary, rather than getting it directly. (imap_refresh_info): Free any info lookups. Use folder->summary not imap_folder->summary. And lock around commands. svn path=/trunk/; revision=7150
* When getting the top-level folder list, include INBOX even if it's notDan Winship2000-12-231-12/+19
| | | | | | | | | | * providers/imap/camel-imap-store.c (get_folder_info): When getting the top-level folder list, include INBOX even if it's not subscribed. Don't show subscribed folders outside of the given namespace. Do a better job of pruning the namespace from the returned folder tree. svn path=/trunk/; revision=7131
* New CamelFolderSearch subclass that just reimplements body_contains (usingDan Winship2000-12-227-441/+211
| | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-search.c: New CamelFolderSearch subclass that just reimplements body_contains (using the IMAP SEARCH command). All other kinds of searching are done against the local summary. * providers/imap/camel-imap-folder.c (imap_search_by_expression): Use a CamelImapSearch to do searching. * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No longer needed. * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE #define svn path=/trunk/; revision=7119
* Oops. Don't do "FETCH 1:0" when the folder is empty.Dan Winship2000-12-201-31/+40
| | | | | | | | | | * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops. Don't do "FETCH 1:0" when the folder is empty. (imap_protocol_get_summary_specifier): Request RFC822.SIZE too. (imap_update_summary): Parse RFC822.SIZE and add it to the summary. svn path=/trunk/; revision=7088
* Add "guint32 server_flags" to CamelImapMessageInfo to keep track of theDan Winship2000-12-203-62/+89
| | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-summary.c: Add "guint32 server_flags" to CamelImapMessageInfo to keep track of the last known message flag state on the server. (message_info_save, message_info_load): Save/load the server_flags. * providers/imap/camel-imap-folder.c: Make this use CamelFolderChangeInfo and emit folder_changed notifications as it gets them rather than only on refresh_info. (imap_refresh_info): Notice flags that get cleared on the server as well as flags that get set. (imap_update_summary): Remove a comment that never actually applied to the committed code. svn path=/trunk/; revision=7086
* Change the semantics of fmt: Now %S (capital S) means an IMAP "string",Dan Winship2000-12-195-21/+175
| | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command): Change the semantics of fmt: Now %S (capital S) means an IMAP "string", (which can be sent as either a quoted string or a literal). If the server supports LITERAL+, these will be sent as extended literals (which don't require any special escaping). Otherwise they'll be sent as quoted strings (and it now properly deals with " or \ in the string). (imap_command_strdup_vprintf): Utility routine that does the real work for the functionality mentioned above. * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a string into a proper IMAP "quoted string". * providers/imap/camel-imap-store.c: * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where appropriate. svn path=/trunk/; revision=7070
* change a bunch of IS_CAMEL_* macros to CAMEL_IS_*Dan Winship2000-12-1431-31/+31
| | | | | | | * Namespace cleanup: change a bunch of IS_CAMEL_* macros to CAMEL_IS_* svn path=/trunk/; revision=6972