aboutsummaryrefslogtreecommitdiffstats
path: root/camel
Commit message (Collapse)AuthorAgeFilesLines
* add a "GList *authtypes", so you can get the list of authtypes used by aDan Winship2001-03-2215-282/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-provider.h: (CamelProvider) add a "GList *authtypes", so you can get the list of authtypes used by a provider without needing to have an actual CamelService object handy. (Will be needed by the new config druid.) (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test the URL part stuff, since the way it works is too complicated and everyone always does it wrong. * camel-service.c (camel_service_query_auth_types): Remove the @connected arg again: if you don't want to connect, you can just get the list of authtypes off the provider. (camel_service_free_auth_types): Remove this. All existing implementations do authtypes the same way, so just say the caller should "g_list_free" the list. (Oh, look, removing this function doesn't actually cause the mailer to not build. How 'bout that.) (construct, get_path): Use the new URL part macros. * camel-remote-store.c (remote_query_auth_types): Update (remote_free_auth_types): Nuke (camel_remote_store_authtype_list): New function for use by subclasses. * providers/imap/camel-imap-provider.c: * providers/pop3/camel-pop3-provider.c: * providers/smtp/camel-smtp-provider.c: Update CamelProvider structures. (camel_provider_module_init): Put all the SSL parts together so there's only 1 #ifdef. Set up the provider authtypes field using the SASL, CamelRemoteStore, and standard authtypes, as appropriate. Copy that from the normal provider to the SSL provider. * providers/local/camel-local-provider.c: * providers/sendmail/camel-sendmail-provider.c: * camel-session.c: Update CamelProvider structures. * providers/imap/camel-imap-store.c (query_auth_types): * providers/pop3/camel-pop3-store.c (query_auth_types): Update * providers/smtp/camel-smtp-store.c (query_auth_types): Update. Remove the no_authtype, because that's what "ALLOW_AUTH" rather than "NEED_AUTH" means. (free_auth_types): Nuke. svn path=/trunk/; revision=8872
* Return -1 on fail. (camel_filter_driver_filter_folder): Same.Jeffrey Stedfast2001-03-226-30/+63
| | | | | | | | | | | | | | | | | | | | 2001-03-21 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Return -1 on fail. (camel_filter_driver_filter_folder): Same. (camel_filter_driver_filter_mbox): Same. (camel_filter_driver_filter_folder): Return -1 if an exception was set as well. 2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): Free the expected host. (camel_tcp_stream_openssl_new): Now takes a Service and an expected_host. Set them. svn path=/trunk/; revision=8871
* Function to check if the store is online and set an exception if not.Dan Winship2001-03-219-190/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (camel_imap_store_check_online): Function to check if the store is online and set an exception if not. Currently controlled by an environment variable, but eventually there will be both a global (session-level) setting and a per-store setting. (construct): Set up storage_path and base_url here rather than at connect-time. (imap_auth_loop): Split out from imap_connect. (imap_setup_online): Split out from imap_connect. Do the post-authentication connection setup, and cache the results to disk. (imap_setup_offline): Set up a CamelImapStore with information saved from a previous imap_setup_online. (imap_connect): If online, do connect_to_server(), imap_auth_loop(), and imap_setup_online(). Otherwise, do imap_setup_offline(). (get_folder, get_folder_info): Add offline support. (create_folder, subscribe_folder, unsubscribe_folder): Disable these when offline (for now). * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Remove the sync'ing-with-server stuff... it's done by camel_imap_folder_selected now, which only gets called if the store is online. (camel_imap_folder_selected): add the code removed from camel_imap_folder_new. Besides simplifying the folder_new and summary_new code, this also means now that we'll DTRT if a folder's UIDVALIDITY changes while we're connected. Also, when that happens, clear the message cache explicitly. (imap_refresh_info, imap_sync): These are no-ops when offline. (imap_expunge, imap_append_message, imap_copy_message_to, imap_search_by_expression): These don't yet work offline. (imap_get_message, camel_imap_folder_fetch_data): Return an error when trying to fetch a non-cached body part when we're offline. * providers/imap/camel-imap-summary.c (camel_imap_summary_new): Rewrite to not check the validity here. (We'll do it from camel_imap_folder_selected instead.) * providers/imap/camel-imap-command.c (camel_imap_command): Call camel_imap_folder_selected even when the selection is all we're doing, to match the changes in camel-imap-folder.c. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_clear): New function to clear out a message cache. svn path=/trunk/; revision=8851
* Added $(EXTRA_GNOME_CFLAGS)Christopher James Lahey2001-03-202-0/+5
| | | | | | | | 2001-03-19 Christopher James Lahey <clahey@ximian.com> * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS) svn path=/trunk/; revision=8838
* Set the errbuf to NULL after freeing it? I don't think this should fix bugJeffrey Stedfast2001-03-192-0/+7
| | | | | | | | | | 2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf to NULL after freeing it? I don't think this should fix bug #1801 but I guess it can't hurt. svn path=/trunk/; revision=8818
* Protect against a possibly NULL exception.Jeffrey Stedfast2001-03-192-1/+7
| | | | | | | | | 2001-03-18 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c (remote_recv_line): Protect against a possibly NULL exception. svn path=/trunk/; revision=8811
* Document and modify to return a boolean value denoting whether or notJeffrey Stedfast2001-03-193-21/+90
| | | | | | | | | | | | | | | | | | 2001-03-18 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Document and modify to return a boolean value denoting whether or not errors occured during processing. (camel_filter_driver_filter_mbox): Same as above and also modified to check return codes of filter_message rather than relying only on whether or not the exception was set (as it's possible to pass in NULL for the exception). (camel_filter_driver_filter_folder): Same as above. * camel-mime-utils.c (header_param_list_format_append): Quote the param value if it contains whitespace as well. svn path=/trunk/; revision=8808
* Quote the param value if it contains whitespace as well.Jeffrey Stedfast2001-03-192-1/+6
| | | | | | | | | 2001-03-18 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_param_list_format_append): Quote the param value if it contains whitespace as well. svn path=/trunk/; revision=8804
* Don't include system include dir.Jeffrey Stedfast2001-03-184-4/+12
| | | | | | | | | | | | | 2001-03-17 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Don't include system include dir. * camel.c: Use quotes around the nss.h include so it doesn't try to use the systen nss.h file. * camel-tcp-stream-ssl.c: Same here. svn path=/trunk/; revision=8786
* Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check theNot Zed2001-03-172-0/+7
| | | | | | | | | | 2001-03-17 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-summary.c (maildir_summary_sync): Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check the maildir directory for new/updated messages at sync time. svn path=/trunk/; revision=8781
* Implemented. (ref_message_info): And default implementation.Not Zed2001-03-175-3/+204
| | | | | | | | | | | | | | | | | | | 2001-03-17 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_ref_message_info): Implemented. (ref_message_info): And default implementation. * camel-folder.h: Added ref_message_info virtual method. 2001-03-16 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new_summary): New function to create a thread tree from a supplied summary array. (camel_folder_thread_messages_destroy): Handle thread trees generated by the above function properly. svn path=/trunk/; revision=8774
* Same.Jeffrey Stedfast2001-03-173-2/+8
| | | | | | | | | | 2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * camel-private.h: Same. * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s svn path=/trunk/; revision=8767
* removed camel-stream-ssl.c and camel-stream-ssl.hJeffrey Stedfast2001-03-172-316/+0
| | | | svn path=/trunk/; revision=8765
* Print info about the issuer of the certificate.Jeffrey Stedfast2001-03-179-82/+170
| | | | | | | | | | | | | | | | | | | | 2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the issuer of the certificate. * providers/smtp/camel-smtp-transport.c (smtp_connect): Use camel_tcp_stream_get_socket(). * camel-tcp-stream-openssl.c (stream_get_socket): Implemented. * camel-tcp-stream-ssl.c (stream_get_socket): Implemented. * camel-tcp-stream-raw.c (stream_get_socket): Implemented. * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function. svn path=/trunk/; revision=8764
* Added #include <config.h>Kjartan Maraas2001-03-172-0/+8
| | | | | | | | 2001-03-16 Kjartan Maraas <kmaraas@gnome.org> * providers/pop3/camel-pop3-folder.c: Added #include <config.h> svn path=/trunk/; revision=8762
* Don't use getdomainname: it's NIS crap, not DNS.Dan Winship2001-03-172-6/+9
| | | | | | | * camel-mime-utils.c (header_msgid_generate): Don't use getdomainname: it's NIS crap, not DNS. svn path=/trunk/; revision=8761
* Don't use the hardcoded cert db directory, use the one passed in.Jeffrey Stedfast2001-03-163-14/+134
| | | | | | | | | | | | | | | | | 2001-03-15 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): Don't use the hardcoded cert db directory, use the one passed in. * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default implementation. Not that we'll use this though, since this is the default implementation provided by NSS anyway. This more or less serves as a reference in case we want to change anything. (ssl_auth_cert): Same. (ssl_bad_cert): Changed the prompt string and free it when we're done. svn path=/trunk/; revision=8753
* translate NIL to "" in fetch body part responseDan Winship2001-03-161-1/+3
| | | | svn path=/trunk/; revision=8744
* First batch of disconnected IMAP-related stuff. This adds localDan Winship2001-03-1613-268/+786
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caching of message parts, but NOT any actual disconnected support. (But it should speed up IMAP use.) * providers/imap/camel-imap-message-cache.c: New class for caching message data to disk, and removing it when it's no longer relevant. Will eventually also support merging message parts together to save on files. Or maybe using a db instead of files? * providers/imap/camel-imap-private.h: Add a cache_lock to CamelImapFolderPrivate. This lock must be recursive, so make both locks EMutexes rather than GMutex. * providers/imap/camel-imap-folder.c (parse_fetch_response): "The only FETCH response parser you need!" Replaces the various almost-correct bits of code formerly scattered throughout this file with a single fully-correct function that can handle any FETCH response at any time, so we don't get confused by seeing a flags update when we were only expecting a message body, etc. (camel_imap_folder_fetch_data): FETCH a message body part either from the cache or the server (camel_imap_folder_changed): Remove expunged messages from the message cache. (camel_imap_folder_new): Change to take a directory instead of a summary file name. Create a CamelImapMessageCache for the folder. (imap_finalize): Unref the message cache. (camel_imap_folder_selected, imap_rescan, get_content, get_message, imap_get_message, imap_update_summary): Redone a bunch to use parse_fetch_data, CamelImapMessageCache, etc. * providers/imap/camel-imap-store.c (get_folder): Pass directory name to camel_imap_folder_new, not summary filename. Use e_path_to_physical to generate a path with /subfolders/ inserted between directory components. * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new): Call camel_imap_folder_fetch_data (with cache_only TRUE) and if the data is cached, return an online datawrapper rather than an offline one. (write_to_stream): Use camel_imap_folder_fetch_data (with cache_only FALSE) here too * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from skip_list and made non-static. svn path=/trunk/; revision=8743
* Uninclude prnetdb.h since it's not needed here.Jeffrey Stedfast2001-03-165-7/+16
| | | | | | | | | | | | | | | | 2001-03-15 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not needed here. * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here instead of making camel-tcp-stream-ssl.h include it. Prevents some header bloat. * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and NSS_CFLAGS. svn path=/trunk/; revision=8738
* Update for using CamelTcpStreams and also for using SSL.Jeffrey Stedfast2001-03-153-20/+52
| | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for using CamelTcpStreams and also for using SSL. * providers/smtp/libcamelsmtp.urls: defined "ssmtp" * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP provider. (camel_provider_module_init): Register the Secure SMTP provider. svn path=/trunk/; revision=8728
* defined "ssmtp"Jeffrey Stedfast2001-03-155-10/+50
| | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/libcamelsmtp.urls: defined "ssmtp" * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP provider. (camel_provider_module_init): Register the Secure SMTP provider. svn path=/trunk/; revision=8726
* also change the protocol name in the providersJeffrey Stedfast2001-03-152-2/+2
| | | | svn path=/trunk/; revision=8725
* Check for "simap" instead of "imaps".Jeffrey Stedfast2001-03-155-5/+18
| | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_connect): Check for "simap" instead of "imaps". * providers/pop3/camel-pop3-store.c (pop3_connect): Change the port to be 995 for spop. * providers/pop3/libcamelpop3.urls: Change to "spop". * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to correspond to /etc/services. svn path=/trunk/; revision=8724
* Check to see if we are using "pops" and then set the appropriate SSLJeffrey Stedfast2001-03-154-3/+54
| | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see if we are using "pops" and then set the appropriate SSL settings. * providers/pop3/libcamelpop3.urls: Add "pops" * providers/pop3/camel-pop3-provider.c: Defined the pops provider. (camel_provider_module_init): Register the pops provider. svn path=/trunk/; revision=8723
* Ya know what? Lets not ref the service because otherwise we'll startJeffrey Stedfast2001-03-152-2/+9
| | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what? Lets not ref the service because otherwise we'll start having the same problems we had back with vtrash. Besides, since the store owns the stream, it's not like the store is going anywhere without the stream anyway. (camel_tcp_stream_ssl_finalize): No need to unref the service. svn path=/trunk/; revision=8722
* Pass the service into the SSL stream, not the session.Jeffrey Stedfast2001-03-154-22/+37
| | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c (remote_connect): Pass the service into the SSL stream, not the session. * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the service to NULL. (camel_tcp_stream_ssl_finalize): Unref the service. (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather than a CamelSession arg. svn path=/trunk/; revision=8720
* So it turns out that NSS_Init *isn't* idempotent, so we have to protectJeffrey Stedfast2001-03-157-29/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): So it turns out that NSS_Init *isn't* idempotent, so we have to protect against initializing it more than once(contrary to what their design specs suggest). * camel-session.c (camel_session_get_service): Use camel_exception_is_set() - Makes no difference but it's more consistant with how we normally do it. * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this. * providers/imap/camel-imap-provider.c: Define the imaps provider. (camel_provider_module_init): Register the imaps provider. * camel-provider.c (camel_provider_init): Only add the protocol to the hash table if it's non empty. Also, g_strdup() the filename into the hash table. * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! So the service's URL isn't set until after this is initialized. This means we can't check for SSL here. (imap_connect): Set the SSL options here instead. svn path=/trunk/; revision=8718
* Eek! So the service's URL isn't set until after this is initialized. ThisJeffrey Stedfast2001-03-154-15/+21
| | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! So the service's URL isn't set until after this is initialized. This means we can't check for SSL here. (imap_connect): Set the SSL options here instead. svn path=/trunk/; revision=8715
* Numerous fixes to get it to build correctly with NSS enabled.Jeffrey Stedfast2001-03-159-16/+56
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c: Numerous fixes to get it to build correctly with NSS enabled. * camel-remote-store.c (remote_connect): Pass in the session and expected host args, oops. * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined. * providers/imap/camel-imap-store.c (camel_imap_store_init): Check to see if we are supposed to use SSL and set the options accordingly. (imap_connect): Return FALSE here instead of NULL. * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL. * providers/imap/libcamelimap.urls: Add "imaps" which is the protocol for Secure IMAP. svn path=/trunk/; revision=8711
* AddedJeffrey Stedfast2001-03-155-0/+613
| | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.[c,h]: Added * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build. * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL svn path=/trunk/; revision=8710
* re-constify inbuf, to remove a warning.Not Zed2001-03-1410-16/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Not Zed <NotZed@Ximian.com> * camel-mime-filter-charset.c (filter, complete): re-constify inbuf, to remove a warning. * camel-mime-parser.c (folder_scan_step): When we're out of data, run the filter_complete. For some reason the logic that was there was never being run, always try it now, i think it was to work around a buggy filter, rather than fix it the right way. * camel-folder-summary.c (summary_build_content_info): If indexing html parts, use the html filter to convert it to some indexable format. (summary_build_content_info): Reset the filters before adding them back to the stream, if they get re-used in a given instance (likely). * Makefile.am (libcamelinclude_HEADERS): Added camel-mime-filter-html.[ch]. (INCLUDES): Added xml clags 2001-03-05 Not Zed <NotZed@Ximian.com> * camel-folder-search.c (camel_folder_search_class_init): Setup a new function, "uid" which matches uids. (search_uid): Implement the "match uid" command. svn path=/trunk/; revision=8705
* Check for a new type of mailing list header.Jeffrey Stedfast2001-03-143-0/+6
| | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Check for a new type of mailing list header. svn path=/trunk/; revision=8702
* Made cancellable. (stream_write): Same. (stream_connect): Removed checksJeffrey Stedfast2001-03-143-42/+114
| | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-raw.c (stream_read): Made cancellable. (stream_write): Same. (stream_connect): Removed checks for DIVINE_INTERVENTION as the code worked fine. * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it wasn't really needed. (set_errno): New function to set errno based on the NSPR error code. (stream_read): If an error occured, call set_errno(). (stream_write): Same. svn path=/trunk/; revision=8701
* Added camel-tcp-stream-ssl to the build.Jeffrey Stedfast2001-03-143-0/+10
| | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-tcp-stream-ssl to the build. * camel-remote-store.h: Add a use_ssl member to the CamelRemoteStore object. svn path=/trunk/; revision=8698
* Oops. Make this a subclass of CamelTcpStream, not CamelStream.Jeffrey Stedfast2001-03-147-126/+163
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type): Oops. Make this a subclass of CamelTcpStream, not CamelStream. * camel-types.h: Add the defs for CamelTcpStream and CamelTcpStreamRaw * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to the build. * camel-remote-store.c (remote_connect): Update to use CamelTcpStreams. * camel-tcp-stream-raw.c (stream_connect): Made cancellable by copying the currently used code in camel-remote-store.c. (stream_setsockopt): Oops, flags = fcntl (..., GET_FL); (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of CamelTcpStream, not CamelStream. svn path=/trunk/; revision=8697
* Since all of the Mozilla libs (including NSPR and NSS) correctly handleJeffrey Stedfast2001-03-143-3/+33
| | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): Since all of the Mozilla libs (including NSPR and NSS) correctly handle reinitializations, we might as well init both NSPR and NSS in camel_init so we can be sure of that these libs have been initialized. (camel_shutdown): New function to call the NSS cleanup stuff. svn path=/trunk/; revision=8690
* Don't allow the user to copy a message to or from the vtrash folder. SetJeffrey Stedfast2001-03-144-34/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.c (camel_folder_copy_message_to): Don't allow the user to copy a message to or from the vtrash folder. Set an exception if they try. (camel_folder_move_message_to): This one is a bit more complicated: 1) If the user tried to move a message from the vtrash into the original folder, just undelete the message. 2) If the user tries to move the message to the vtrash folder, then just mark the message as deleted. 3) If the user tries to move the message from the vTrash to a folder other than the original, use the original folder as the source. As another optimization, I've made it so that if the user tries to move a message to the same folder, just no-op. (move_message_to): Unset the deleted flag before moving (assuming it's there). (copy_message_to): Same. * camel-vee-folder.c (camel_vee_folder_get_message_folder): New convenience function to get the folder from which the message uid is derived from. svn path=/trunk/; revision=8677
* When trying again after a failed password attempt, check if the connectionDan Winship2001-03-142-0/+12
| | | | | | | | * providers/imap/camel-imap-store.c (imap_connect): When trying again after a failed password attempt, check if the connection got dropped (which Courier will do) and deal accordingly. svn path=/trunk/; revision=8675
* More fixing for exim: It can't deal with "-tif", you need to say "-t -iDan Winship2001-03-142-10/+17
| | | | | | | | * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to, sendmail_send): More fixing for exim: It can't deal with "-tif", you need to say "-t -i -f". svn path=/trunk/; revision=8674
* Rename the folder to "Trash" and i18nify it.Jeffrey Stedfast2001-03-132-1/+6
| | | | | | | | | 2001-03-12 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (init_trash): Rename the folder to "Trash" and i18nify it. svn path=/trunk/; revision=8646
* Comment out everything unless HAVE_NSS is defined.Jeffrey Stedfast2001-03-113-15/+38
| | | | | | | | | | | | | 2001-03-09 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS is defined. * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use nspr's error code stuff. (stream_write): Same. svn path=/trunk/; revision=8626
* Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No promptJeffrey Stedfast2001-03-104-83/+36
| | | | | | | | | | | | | | 2001-03-09 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (camel_session_query_authenticator): Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to the user. This will be needed by the SSL/TLS code to come. Also changed the return value to a gpointer rather than a char* to allow the returning of TRUE/FALSE values. * camel.c: Wrap stuff with HAVE_NSS svn path=/trunk/; revision=8623
* Remove the "-U" for now, because it breaks exim's "sendmail" wrapper. (AndDan Winship2001-03-102-2/+8
| | | | | | | | | | * providers/sendmail/camel-sendmail-transport.c (sendmail_send, sendmail_send_to): Remove the "-U" for now, because it breaks exim's "sendmail" wrapper. (And it doesn't actually do all that much to sendmail's behavior, and it was working fine before anyway.) svn path=/trunk/; revision=8621
* Fix a bug that could make this walk off the end of a string. (The bug hasDan Winship2001-03-102-3/+10
| | | | | | | | * camel-mime-utils.c (header_fold): Fix a bug that could make this walk off the end of a string. (The bug has been there since December... maybe this will fix some unreproduceable crashes?) svn path=/trunk/; revision=8619
* Changes so that the folder gets added to the vtrash reguardless of whetherJeffrey Stedfast2001-03-092-9/+22
| | | | | | | | | | | | 2001-03-08 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): Changes so that the folder gets added to the vtrash reguardless of whether or not the store is holding it's own folder lookup hash. (init_trash): Oops, lets try locking the cache before we go and add all the cached folders to the vtrash. svn path=/trunk/; revision=8609
* These fixes make it so that the CamelStore does not actually hold a ref onJeffrey Stedfast2001-03-092-27/+54
| | | | | | | | | | | | | | | | | | | | 2001-03-08 Jeffrey Stedfast <fejj@ximian.com> These fixes make it so that the CamelStore does not actually hold a ref on it's vTrash folder. The vTrash folder is now created ONLY when it is requested. This solves the problem of not being able to unref a Store and have it disconnect/finalize like we expect it to. * camel-store.c (init_trash): When we create the vtrash, add all previously opened folders to it and hook on to the finalize event so that we can then set the store->vtrash to NULL. (get_trash): If a vtrash folder for the store doesn't exist, init_trash() and then try. (construct): No longer need this. (camel_store_class_init): Don't override the construct method. (camel_store_finalize): We no longer hold a ref on the vtrash so don't unref it. svn path=/trunk/; revision=8595
* Implement. (get_trash): Implement. (camel_pop3_store_class_init): OverrideJeffrey Stedfast2001-03-082-0/+31
| | | | | | | | | | | | | | | | 2001-03-07 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (init_trash): Implement. (get_trash): Implement. (camel_pop3_store_class_init): Override the default init_trash and get_trash virtual functions. Hopefully this should fix the problem of pop3 sotre's not disconnecting after the send&recv code finishes downloading mail. Wonder if I should override the default implementation for the mbox, mh, and maildir too? svn path=/trunk/; revision=8592
* (remote_recv_line): Fix another problem...Dan Winship2001-03-082-1/+3
| | | | svn path=/trunk/; revision=8585
* Remove some unused stuffDan Winship2001-03-074-71/+4
| | | | | | | | * providers/local/camel-mbox-provider.c: * providers/vee/.cvsignore: * providers/vee/libcamelvee.urls: Remove some unused stuff svn path=/trunk/; revision=8582
* Return the return value of camel_service_connect rather than returningDan Winship2001-03-072-4/+10
| | | | | | | | | | * camel-remote-store.c (camel_remote_store_connected): Return the return value of camel_service_connect rather than returning !camel_exception_is_set(), since that will be wrong if ex==NULL... Fixes a crash in the IMAP keepalive code, but this same problem probably exists in other places too... svn path=/trunk/; revision=8580
* Redone so as to save on memory allocations and speed.Jeffrey Stedfast2001-03-073-54/+63
| | | | | | | | | 2001-03-06 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-digest-md5.c (compute_response): Redone so as to save on memory allocations and speed. svn path=/trunk/; revision=8573
* Don't return NULL if the token is non-NULL. This is why:Jeffrey Stedfast2001-03-064-3/+37
| | | | | | | | | | | | | | | | | | | | | 2001-03-05 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-plain.c (plain_challenge): Don't return NULL if the token is non-NULL. This is why: sending : AUTH PLAIN received: 334 ok. go on. <-- this is why sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI= received: 235 {mp005-rz3} go ahead * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here. (camel_sasl_authtype_list): And here too. * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype. * camel-sasl-plain.h: extern the camel_sasl_plain_authtype. svn path=/trunk/; revision=8562
* i18n'd some strings in here.Jeffrey Stedfast2001-03-063-9/+68
| | | | | | | | | | | | | 2001-03-05 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_connect): i18n'd some strings in here. * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep trying to authenticate until either we succeed or until the user cancels. svn path=/trunk/; revision=8561
* Wrote a new version of header_fold() that takes a 'force' option and usesJeffrey Stedfast2001-03-052-1/+141
| | | | | | | | | | | | | | | | | | 2001-03-04 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Wrote a new version of header_fold() that takes a 'force' option and uses another new function called header_fold_next_space() in place of strchr(inptr, ' ') to get the next whitespace char. The idea of header_fold_next_space() is to not treat spaces between a set of quotes as a space - this way it will be possible to fold (for example) the Content-Type MIME header without worrying about breaking up a boundary string. Note: This code is #if 0'd out until Zucchi approves of the patch. Another Note: We will probably still want to use the "don't fold this header" hash lookup for headers like the Message-Id and possibly a few others. svn path=/trunk/; revision=8552
* Make sure there is a space between the name and the address tokens.Jeffrey Stedfast2001-03-052-1/+5
| | | | | | | | | | 2001-03-04 Jeffrey Stedfast <fejj@ximian.com> * camel-internet-address.c (camel_internet_address_encode_address): Make sure there is a space between the name and the address tokens. svn path=/trunk/; revision=8551
* encoded string segments need to be at least 8 chars (7 doesn't leave roomJeffrey Stedfast2001-03-052-18/+29
| | | | | | | | | | | | | 2001-03-04 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (rfc2047_decode_word): encoded string segments need to be at least 8 chars (7 doesn't leave room for an ecoding value. To be more realistic, even 8 chars isn't enough as this assumes there is no charset nor any encoded text. If the encoding value is not 'Q' or 'B', then return NULL. This fixes bug #1689. svn path=/trunk/; revision=8550
* New function to remove a folder from a vfolder.Not Zed2001-03-033-1/+73
| | | | | | | | | | | 2001-03-03 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (vee_folder_remove_folder): New function to remove a folder from a vfolder. (camel_vee_folder_remove_folder): New public function to remove a folder from a vfolder. svn path=/trunk/; revision=8532
* Doh! Set the CAMEL_URL_ALLOW_AUTH flag.Jeffrey Stedfast2001-03-032-1/+4
| | | | | | | | | | | | 2001-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-provider.c: Doh! Set the CAMEL_URL_ALLOW_AUTH flag. * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): Updated with the extended AUTH return codes. svn path=/trunk/; revision=8530
* oops, forgot the changelogJeffrey Stedfast2001-03-031-0/+5
| | | | svn path=/trunk/; revision=8528
* Updated with the extended AUTH return codes.Jeffrey Stedfast2001-03-031-1/+14
| | | | | | | | | 2001-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): Updated with the extended AUTH return codes. svn path=/trunk/; revision=8527
* oops, the return code is 235 on success, not 234Jeffrey Stedfast2001-03-031-1/+1
| | | | svn path=/trunk/; revision=8526
* Don't forget to unref the SASL object.Jeffrey Stedfast2001-03-034-52/+205
| | | | | | | | | | | | | | | | | | | | 2001-03-02 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (try_auth): Don't forget to unref the SASL object. * providers/smtp/camel-smtp-transport.c (query_auth_types): Implemented. (smtp_auth): Implemented. (smtp_helo): Don't bother parsing the authtypes if we already have them. (smtp_connect): call smtp_auth() here if we found any authtypes. (smtp_disconnect): Updated as I now use a hash table for the supported authtypes rather than a linked list. (esmtp_get_authtypes): modify to use a hash table instead of a linked list and also use isspace() rather than == ' '. svn path=/trunk/; revision=8525
* Use "-f" to set the envelope from address so bounces go to the rightDan Winship2001-03-022-10/+41
| | | | | | | | | * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to, sendmail_send): Use "-f" to set the envelope from address so bounces go to the right place. Also, pass "-U" since the man page says we're supposed to... svn path=/trunk/; revision=8521
* #include "camel-sasl-digest-md5.h" (camel_sasl_authtype_list): addJeffrey Stedfast2001-03-025-0/+922
| | | | | | | | | | | | | | 2001-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl.c: #include "camel-sasl-digest-md5.h" (camel_sasl_authtype_list): add DIGEST-MD5 stuff here. (camel_sasl_authtype): And here too. (camel_sasl_new): And here... * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has been tested and proven to work). svn path=/trunk/; revision=8513
* Add an "authtypes" hash table to CamelImapStore recording the supportedDan Winship2001-03-026-286/+151
| | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c: Add an "authtypes" hash table to CamelImapStore recording the supported authtypes. (connect_to_server): Record supported authtypes in the authtypes hash rather than the capabilities bitmask, since now the IMAP code is no longer responsible for keeping track of which authtypes we support. (query_auth_types): Use camel_sasl_authtype_list to get the SASL-supported authtypes. (try_auth): New function to try a SASL auth mechanism. Sort of formerly imap_try_kerberos_v4_auth. (imap_connect): Get rid of the krb4-specific bits and genericize them for any SASL authtype. * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved into camel-imap-store.c since it's now constant size) and the KRB4_CFLAGS and KRB4_LDFLAGS references. svn path=/trunk/; revision=8463
* Take a GByteArray as input as well. Comment that you can pass %NULL forDan Winship2001-03-0211-386/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input as well. Comment that you can pass %NULL for @token to get the initial auth data for mechanisms that are client-initiated. (camel_sasl_challenge_base64): Convenience function for protocols that use base64-encoded SASL. (camel_sasl_authenticated): Implement this... (it was prototyped already) (camel_sasl_new): Function to take a service name, a mechanism name, and a CamelService, and return a CamelSasl for it. (camel_sasl_authtype, camel_sasl_authtype_list): Functions to return CamelServiceAuthType information about SASL mechanisms, to allow providers to deal with them generically. * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for CamelSasl changes. Both of these are single-round (client-initiated) mechanisms, so they don't need to keep state. (camel_sasl_plain_new): Removed; use camel_sasl_new instead. (Can't get rid of camel_sasl_anonymous_new though...) * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes. (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead. (cram_md5_challenge): Use md5_get_digest where possible, and various other minor simplifications. CRAM-MD5 only has a single round, so there's no need to keep track of state. This code is now tested (against Cyrus IMAPd) and known to work. * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes. Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that isn't needed between rounds. (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead (krb4_challenge): Fix up the logic I broke in my previous "at least make it compile" fixes, update to match other changes, and remove IMAP-isms that shouldn't be in the generic code. This still isn't tested, because we're stuck behind a NAT right now... svn path=/trunk/; revision=8462
* Don't base64 encode the data, leave that up to the provider to do if itJeffrey Stedfast2001-03-022-8/+8
| | | | | | | | | | | | | | 2001-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the data, leave that up to the provider to do if it needs to. Also save on some memory allocations and stuff. * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get rid of the need for the temp buf as we can just write it to the GByteArray. svn path=/trunk/; revision=8456
* remove mime-utils header for base64 stuff.Jeffrey Stedfast2001-03-022-2/+0
| | | | svn path=/trunk/; revision=8455
* Don't base64 encode the data, leave that up to the provider to do if itJeffrey Stedfast2001-03-023-9/+14
| | | | | | | | | | | | 2001-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the data, leave that up to the provider to do if it needs to. Also save on some memory allocations and stuff. * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. svn path=/trunk/; revision=8454
* Reconstify variables to match iconv.Not Zed2001-03-023-4/+15
| | | | | | | | | | | | 2001-03-02 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word): Reconstify variables to match iconv. * camel-search-private.c (camel_ustrstrcase): Change some assertions back into valid returns. svn path=/trunk/; revision=8452
* camel depends on krb4 now (where available), for camel-sasl-kerberos4.cDan Winship2001-03-024-9/+26
| | | | | | | | | | * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on krb4 now (where available), for camel-sasl-kerberos4.c * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if it works yet. svn path=/trunk/; revision=8451
* Assert url_string != NULL.Peter Williams2001-03-012-1/+7
| | | | | | | | 2001-03-01 Peter Williams <peterw@ximian.com> * camel-url.c (camel_url_new): Assert url_string != NULL. svn path=/trunk/; revision=8439
* oops, not empty string - need to base64 encode it, which is just "="Jeffrey Stedfast2001-03-011-1/+1
| | | | svn path=/trunk/; revision=8434
* Added camel-sasl-anonymous.[c,h] to the build.Jeffrey Stedfast2001-03-016-2/+256
| | | | | | | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build. * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS * camel-sasl-plain.c (plain_challenge): Oops, have a state for setting sasl->authenticated = TRUE; * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. svn path=/trunk/; revision=8433
* A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01Jeffrey Stedfast2001-03-011-1/+1
| | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_date): A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01 04:59:41"). Fixes bug #1633. svn path=/trunk/; revision=8432
* A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01Jeffrey Stedfast2001-03-013-5/+16
| | | | | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_date): A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01 04:59:41"). Fixes bug #1633. * camel-filter-driver.c (camel_filter_driver_filter_folder): Check to make sure message isn't NULL. svn path=/trunk/; revision=8431
* If we get back 0 bytes from camel_stream_buffer_gets, that means theDan Winship2001-03-012-0/+12
| | | | | | | | | * camel-remote-store.c (remote_recv_line): If we get back 0 bytes from camel_stream_buffer_gets, that means the socket got disconnected, so set an exception. (Noticed because of a message that crashes our IMAP server when you try to look at it. :) svn path=/trunk/; revision=8429
* Added camel-sasl*.[c,h] to the build.Jeffrey Stedfast2001-03-0113-25/+972
| | | | | | | | | | | | | | | | | | | | | | 2001-02-28 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-sasl*.[c,h] to the build. * camel-sasl.[c,h]: new "abstract" SASL class * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4 * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5 * camel-sasl-plain.[c,h]: new SASL class for PLAIN * providers/imap/camel-imap-auth.c: Removed the base64 functions. * camel-mime-utils.c (base64_encode_simple): Moved here from camel-imap-auth.c (base64_decode_simple): Same. svn path=/trunk/; revision=8428
* Group messages into sets with the same flags and use the IMAP message setDan Winship2001-02-272-33/+156
| | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (imap_sync): Group messages into sets with the same flags and use the IMAP message set notation rather than doing a separate STORE FLAGS for each one. This cuts the network traffic down to just a handful of commands per sync rather than one per changed message. Removed the progress notification stuff since it's no longer meaningful and should hopefully be unnecessary. (imap_copy_message_to): move the former sync_message function into here, since it's no longer shared with imap_sync. svn path=/trunk/; revision=8396
* Made thread-safe and moved to above the test code.Jeffrey Stedfast2001-02-274-17/+105
| | | | | | | | | | | | | | | | | | 2001-02-26 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Made thread-safe and moved to above the test code. * camel-mime-message.c (camel_mime_message_init): Set the message_id to NULL. (camel_mime_message_finalize): Free the message_id. (camel_mime_message_set_message_id): New function to set the Message-Id. (camel_mime_message_get_message_id): New function to get the Message-Id. (process_header): Decode the message-id. svn path=/trunk/; revision=8393
* fixed a compile warning in camel-store.Jeffrey Stedfast2001-02-251-1/+0
| | | | svn path=/trunk/; revision=8382
* init the vTrash folder here instead of in store_init.Jeffrey Stedfast2001-02-252-18/+36
| | | | | | | | | | | | 2001-02-24 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (construct): init the vTrash folder here instead of in store_init. (camel_store_class_init): init service_class->construct. (camel_store_finalize): We only need to unref the vtrash folder. (init_trash): don't create a vstore since we don't need it. svn path=/trunk/; revision=8378
* init get_trash and init_trash. (camel_store_init): call the virtualJeffrey Stedfast2001-02-244-11/+125
| | | | | | | | | | | | | | | | | | 2001-02-23 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_class_init): init get_trash and init_trash. (camel_store_init): call the virtual init_trash function. (camel_store_finalize): unref the vtrash folder/store if present. (camel_store_get_folder): Add the new folder to the vtrash vfolder. (init_trash): default implementation of init_trash. (get_trash): default implementation of get_trash. * camel-vee-store.c (vee_init_trash): No-op. (vee_get_trash): return NULL svn path=/trunk/; revision=8368
* Doh, cut and paste problem, use mlist not cc.Michael Zucci2001-02-234-11/+31
| | | | | | | | | | | * camel-folder-summary.c (camel_message_info_new_from_header): Doh, cut and paste problem, use mlist not cc. * camel-folder.c (move_message_to): (copy_message_to): If the source folder doesn't support a summary, dont try and get the message info from it. svn path=/trunk/; revision=8361
* Implement a pseudo-header "x-camel-mlist" which just looks up in theNot Zed2001-02-234-2/+19
| | | | | | | | | | | | | 2001-02-23 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (check_header): Implement a pseudo-header "x-camel-mlist" which just looks up in the message info for a match. * camel-folder-search.c (check_header): Add pseudo-header "x-camel-mlist" which can be used to match on mailing list. svn path=/trunk/; revision=8355
* Add some internal progress reporting. (imap_rescan): Do some progressNot Zed2001-02-233-1/+28
| | | | | | | | | | | | | 2001-02-23 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_sync): Add some internal progress reporting. (imap_rescan): Do some progress reporting. * camel-mime-part.c (init_header_name_table): Add the message-id to the formatted table, so we dont try and wrap it, and break it. svn path=/trunk/; revision=8350
* Remove the 'FIXME: remove because this isn't required...' comment forJeffrey Stedfast2001-02-234-23/+62
| | | | | | | | | | | | | | | | | | | 2001-02-22 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.h: Remove the 'FIXME: remove because this isn't required...' comment for copy_message_to since we now need and cherish its existance in the filter-driver code ;-) * camel-filter-driver.c (camel_filter_driver_filter_message): Now takes a UID and CamelFolder arguments (which can be NULL) to allow for possible optimizations when copying messages between folders on the same store. (camel_filter_driver_filter_mbox): Updated (passes NULL for both since this case can't be optimized anyway). (camel_filter_driver_filter_folder): Updated to pass in the uid and folder of the message. svn path=/trunk/; revision=8346
* #define this as the set of all IMAP system flagsDan Winship2001-02-223-1/+19
| | | | | | | | | | | | | * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS): #define this as the set of all IMAP system flags * providers/imap/camel-imap-folder.c (sync_message): after syncing flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS) rather than just "flags", since any other flags won't have been synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting lost. svn path=/trunk/; revision=8344
* Removed all files.Not Zed2001-02-2212-170/+73
| | | | | | | | | | | | | | | | | | | | | 2001-02-22 Not Zed <NotZed@Ximian.com> * providers/vee/*: Removed all files. * camel-private.h: Move camel-vee-private.h stuff into here. * camel-session.c: Move the vee_provider here, and initialise it always as part of a session. The vfolder provider is always available. * providers/Makefile.am: Remove "vee" from the build list, now built as part of the main library. * Makefile.am (libcamelinclude_HEADERS): (libcamel_la_SOURCES): Added camel-vee-store.[ch], camel-vee-folder.[ch]. svn path=/trunk/; revision=8340
* Removed, not used. (camel_vee_folder_new): Removed call to build_folder.Not Zed2001-02-224-110/+148
| | | | | | | | | | | | | | | | | | | | | | 2001-02-22 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (vee_folder_build): Removed, not used. (camel_vee_folder_new): Removed call to build_folder. (vee_get_message): Dont try and free the mi if we didn't get it. * camel-folder.c (camel_folder_change_info_new): Added a hash table of what we have in the lists, plus moved private things into private pointer. (camel_folder_change_info_add_source): Fixed up private accesses. (camel_folder_change_info_add_uid): Changed to use a hashtable to see if we already have the uid, etc. (camel_folder_change_info_remove_uid): Similar. (change_info_remove): Likewise. (camel_folder_change_info_clear): Fixes for privatisations. (camel_folder_change_info_free): " svn path=/trunk/; revision=8339
* Fixes for IMAP4-pre-rev1 from Torsten Schulz.Dan Winship2001-02-222-2/+13
| | | | | | | * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for IMAP4-pre-rev1 from Torsten Schulz. svn path=/trunk/; revision=8318
* Take the ^Header: part out of the expression, since we look that upNot Zed2001-02-204-25/+66
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-20 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out of the expression, since we look that up ourselves. (header_raw_check_mailing_list): When getting the match, get match 1, not match 0, we dont want the full string match. * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for summary change. (message_info_new): Extract the mlist info from the headers. (message_info_load): Load mlist from summary. (message_info_save): Save mlist to summary. (message_info_free): Save the mlist entry. (camel_message_info_new_from_header): Extract mailing list header. (camel_message_info_dup_to): Copy the mlist entry. (camel_message_info_free): Free mlist. (message_info_dump): Dump the mlist. * camel-folder-summary.h: Add an mlist (mailing list) string to the summary. svn path=/trunk/; revision=8295
* Added flags argument. (message_changed): Add support for the auto-updateNot Zed2001-02-209-123/+541
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-19 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added flags argument. (message_changed): Add support for the auto-update flag, in which case we auto-match the content as it changes. (camel_vee_folder_init): Remoive "DYNAMIC" optionality (camel_vee_folder_finalise): " (vee_expunge): As we expunge folders, re-sync their content by rerunning the query. * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to folder new. 2001-02-18 Not Zed <NotZed@Ximian.com> * providers/vee/Makefile.am (noinst_HEADERS): Added camel-vee-private.h. * providers/vee/camel-vee-private.h: New file to add locking stuff for vee folders. * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add locking around unmatched setup. (camel_vee_folder_init): Setup lock. (camel_vee_folder_finalise): Free locks. (folder_changed): Add locking. (unmatched_finalise): " (message_changed): " (vee_folder_build): " 2001-02-17 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid doesn't exist before adding it. 2001-02-16 Not Zed <NotZed@Ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create a new virtual virtual folder UNMATCHED, to store all messages that dont match other vfolders. (unmatched_folder_changed): When a vfolder issues a changed event, use its info to update the unmatched folder info. (unmatched_finalise): When a vfolder is finalised, remove any uids it has as if we had a removed event for it. svn path=/trunk/; revision=8276
* Thaw the defaultfolder. (camel_filter_driver_set_default_folder): Thaw theJeffrey Stedfast2001-02-172-3/+16
| | | | | | | | | | | 2001-02-16 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the defaultfolder. (camel_filter_driver_set_default_folder): Thaw the defaultfolder we're about to replace, and freeze the new defaultfolder. svn path=/trunk/; revision=8259
* Emit the folder_created signal here.Jeffrey Stedfast2001-02-167-80/+183
| | | | | | | | | | | | | | | | | | | | | | | 2001-02-15 Jeffrey Stedfast <fejj@ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit the folder_created signal here. * providers/local/camel-local-folder.c (camel_local_folder_construct): Emit the folder_created signal. * providers/local/camel-local-store.c (delete_folder): On error, free the 'name' string so we don't leak. Also emit the folder_deleted signal. * providers/imap/camel-imap-store.c (subscribe_folder): Emit the folder_created signal. (unsubscribe_folder): Emit the folder_deleted signal. * camel-store.c (camel_store_class_init): Added folder_created and folder_deleted signal defs. svn path=/trunk/; revision=8246
* Deal with out-of-order References headers so they don't cause messages toDan Winship2001-02-162-2/+14
| | | | | | | | * camel-folder-thread.c (container_parent_child): Deal with out-of-order References headers so they don't cause messages to disappear in threaded view. svn path=/trunk/; revision=8245
* IMAP4 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead inDan Winship2001-02-162-3/+14
| | | | | | | | * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead in that case. svn path=/trunk/; revision=8244
* Changed this code to match the glibc iconv signature.Christopher James Lahey2001-02-153-5/+11
| | | | | | | | | | 2001-02-14 Christopher James Lahey <clahey@ximian.com> * camel-mime-filter-charset.c (complete, filter), camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): Changed this code to match the glibc iconv signature. svn path=/trunk/; revision=8238
* (create_folder): Oops, and fix bug involving namespacesDan Winship2001-02-152-5/+5
| | | | svn path=/trunk/; revision=8233
* New method to create a folder when you don't know its full name.Dan Winship2001-02-154-9/+95
| | | | | | | | | * camel-store.c (camel_store_create_folder): New method to create a folder when you don't know its full name. * providers/imap/camel-imap-store.c (create_folder): Implement. svn path=/trunk/; revision=8231
* Add address headers to list that we dont fold when writing. The areNot Zed2001-02-134-8/+73
| | | | | | | | | | | | | | | | | | | | | 2001-02-12 Not Zed <NotZed@Ximian.com> * camel-mime-part.c (init_header_name_table): Add address headers to list that we dont fold when writing. The are properly formatted as we build them. (write_to_stream): DOH, lookup the header name in the formatted hash table, not the value, that would never have worked. * camel-internet-address.c (camel_internet_address_encode_address): Changed to take a parameter saying how much we've printed so far. We now fold the header as we format it. We dont fold addresses, even if they are too long, we simply put them on another line by themselves: this should make the result more parsable by mailers that can't handle split up addresses (which are legal). (internet_encode): Fix for changes to above. svn path=/trunk/; revision=8198
* mbox, mh, and maildir camel-url's need absolute paths.Jeffrey Stedfast2001-02-133-3/+11
| | | | | | | | | | | 2001-02-12 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c: mbox, mh, and maildir camel-url's need absolute paths. * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag. svn path=/trunk/; revision=8193
* save, THEN commitDan Winship2001-02-101-4/+6
| | | | svn path=/trunk/; revision=8146
* Rewrite a bunch. Replace the existing folder cache stuff with much simplerDan Winship2001-02-1015-449/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-store.c: Rewrite a bunch. Replace the existing folder cache stuff with much simpler code that still handles all the existing cases. Now the folder hash table is always created by the base class, using hash and compare functions provided by the class implementation. (If they are set to NULL, CamelStore won't cache folders.) lookup_folder, cache_folder, and uncache_folder are no longer class methods, and get_name is gone completely. (camel_store_get_inbox): Renamed from camel_store_get_default_folder, since that wasn't being used, and this is what we actually need. (camel_store_get_root_folder): Removed, since it's not needed for anything given get_folder_info. * camel-remote-store.c: * providers/local/camel-local-store.c: * providers/local/camel-mbox-store.c: * providers/local/camel-mh-store.c: * providers/local/camel-maildir-store.c: * providers/nntp/camel-nntp-store.c: * providers/pop3/camel-pop3-store.c: * providers/vee/camel-vee-store.c: Minor updates for CamelStore changes * providers/imap/camel-imap-store.c (camel_imap_store_class_init): Update for CamelStore changes. (hash_folder_name, compare_folder_name): treat INBOX case-insensitively, otherwise use g_str_hash and g_str_equal. * camel-service.c (camel_service_construct): Remove camel_service_new and create camel_service_construct (as a class method) in its place. * camel-session.c (camel_session_get_service): Use camel_object_new and camel_service_construct to replace camel_service_new. * providers/local/camel-local-store.c (construct): Append a '/' to the URL path if it doesn't end with one svn path=/trunk/; revision=8145
* Oops, include the camel-tcp-stream-ssl header instead of the raw one.Jeffrey Stedfast2001-02-082-1/+6
| | | | | | | | | 2001-01-31 Jeffrey Stedfast <fejj@helixcode.com> * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl header instead of the raw one. svn path=/trunk/; revision=8103
* Added more test rules.Jeffrey Stedfast2001-02-082-0/+3
| | | | svn path=/trunk/; revision=8102
* Changed to push the operation into a status stack.Not Zed2001-02-0812-296/+729
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-07 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_start): Changed to push the operation into a status stack. (camel_operation_progress): Changed to only accept % complete. (camel_operation_reset): Free status stack as well. * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the octect count from the return line, and pass it to get_additional_data(). (pop3_refresh_info): Added status stuff. * providers/pop3/camel-pop3-store.c (camel_pop3_command_get_additional_data): Added a total bytes expected argument for progress reporting & fixed callers. (camel_pop3_command_get_additional_data): Added progress reporting. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): (mbox_summary_sync_quick): (summary_rebuild): Added progress reporting stuff. svn path=/trunk/; revision=8095
* Macro for making comparisons easy. (camel_ustrcasecmp): UseJeffrey Stedfast2001-02-082-6/+20
| | | | | | | | | | | | | | | | | | | 2001-02-07 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making comparisons easy. (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for end-of-string before the utf-8 error check. (camel_ustrncasecmp): Same. (camel_search_header_match): Strip leading spaces before doing anything else. Also use vlen and mlen so as to not need to do 500 strlen()'s. (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the comparison part of the loop because of short-circuit expression evaluation. (blame JPR if this is the wrong term!) (camel_ustrncasecmp): Same. svn path=/trunk/; revision=8057
* Macro for making comparisons easy. (camel_ustrcasecmp): UseJeffrey Stedfast2001-02-082-52/+48
| | | | | | | | | | | | | | | 2001-02-07 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making comparisons easy. (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for end-of-string before the utf-8 error check. (camel_ustrncasecmp): Same. (camel_search_header_match): Strip leading spaces before doing anything else. Also use vlen and mlen so as to not need to do 500 strlen()'s. svn path=/trunk/; revision=8055
* Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_tJeffrey Stedfast2001-02-074-58/+94
| | | | | | | | | | 2001-02-06 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_t (camel_ustrncasecmp): Same. svn path=/trunk/; revision=8026
* Made these pass char ** as the second parameter to iconv.Christopher James Lahey2001-02-073-5/+11
| | | | | | | | | | 2001-02-06 Christopher James Lahey <clahey@ximian.com> * camel-mime-filter-charset.c (complete, filter), camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): Made these pass char ** as the second parameter to iconv. svn path=/trunk/; revision=8022
* Added xml-* files.Jeffrey Stedfast2001-02-061-1/+1
| | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * .cvsignore: Added xml-* files. svn path=/trunk/; revision=8014
* Removed unwanted header. It was never put in for a reason. Stop fixingNot Zed2001-02-065-11/+229
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-06 Not Zed <NotZed@Ximian.com> * camel-search-private.c: Removed unwanted header. It was never put in for a reason. Stop fixing irrelevant warnings. (camel_ustrstrcase): Our own strstrcase impl for utf8 strings. (camel_ustrcasecmp): Ditto for strcasecmp. (camel_ustrncasecmp): And strncasecmp. (utf8_get): Simpler interface to utf8 string processing. (camel_search_header_match): Use the new things. 2001-02-05 Not Zed <NotZed@Ximian.com> * camel-folder.c (get_summary): Removed some old variables/a small memleak. (free_summary): Removed old variables. * camel-mime-utils.c (header_raw_check_mailing_list): New utility function to get the mailing list (if any) that a set of headers came from. svn path=/trunk/; revision=8008
* Added a missing #include.Christopher James Lahey2001-02-063-0/+9
| | | | | | | | | | 2001-02-05 Christopher James Lahey <clahey@helixcode.com> * camel-stream-fs.c: Added a missing #include. * camel-search-private.c: Added a missing #include. svn path=/trunk/; revision=7999
* Oops. Change this too.Jeffrey Stedfast2001-02-062-2/+5
| | | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c (remote_query_auth_types): Oops. Change this too. svn path=/trunk/; revision=7992
* Updated.Jeffrey Stedfast2001-02-068-109/+140
| | | | | | | | | | | | | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated. * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): Updated. * providers/pop3/camel-pop3-store.c (query_auth_types): Updated. * providers/imap/camel-imap-store.c (query_auth_types): Updated. * camel-service.c (camel_service_query_auth_types): Now takes a boolean value to specify whether or not to connect when constructing a supported authtype list. svn path=/trunk/; revision=7979
* Revert jeff's earlier change, the change below is the more-correct fix.Not Zed2001-02-053-23/+31
| | | | | | | | | | | | | | 2001-02-05 Not Zed <NotZed@Ximian.com> * camel-stream-filter.c (do_write): Revert jeff's earlier change, the change below is the more-correct fix. All his was doing was ignoring the return code & looping actually :) * camel-stream-fs.c (stream_write): Since we are non-blocking on the outgoing fd, keep looping if writing out large blocks, so we can keep checking for cancel, etc. svn path=/trunk/; revision=7966
* When we drop a fake node, dont skip checking the next in the list.Not Zed2001-02-052-1/+16
| | | | | | | | | | | | 2001-02-02 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new): When we drop a fake node, dont skip checking the next in the list. (camel_folder_thread_messages_new): Add an assertion check just to make sure we dont get any pseudo nodes, and spit a warning if we do. svn path=/trunk/; revision=7965
* Make do_write loop until the entire buffer is written.Jeffrey Stedfast2001-02-053-6/+15
| | | | | | | | | 2001-02-04 Jeffrey Stedfast <fejj@ximian.com> * camel-stream-filter.c (do_write): Make do_write loop until the entire buffer is written. svn path=/trunk/; revision=7963
* Add missing header for cancel check stuff.Not Zed2001-02-024-4/+25
| | | | | | | | | | | | | | | | 2001-02-02 Not Zed <NotZed@Ximian.com> * camel-stream-fs.c: Add missing header for cancel check stuff. * camel-session.c (camel_cancel_cancel): Fix a wrong cast. * camel-mime-part.c (init_header_name_table): Setup a new table header_formatted_table, that lists headers that we dont want to fold (they've already been folded). (write_to_stream): Check for already formatted headers, and dont try and fold them. This is a fix for bug #1097. svn path=/trunk/; revision=7941
* If we are folding, drop the space at the end of the line.Not Zed2001-02-012-0/+8
| | | | | | | | | 2001-02-01 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (header_fold): If we are folding, drop the space at the end of the line. svn path=/trunk/; revision=7928
* Remvoe the stream locking here. I think this was leading to a deadlockNot Zed2001-01-302-4/+6
| | | | | | | | | | 2001-01-30 Not Zed <NotZed@Ximian.com> * camel-remote-store.c (timeout_cb): Remvoe the stream locking here. I think this was leading to a deadlock when a keepalive is being sent, in imap. svn path=/trunk/; revision=7898
* Include the terminating NUL in the calculated string length. This hitNot Zed2001-01-292-1/+7
| | | | | | | | | | 2001-01-29 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Include the terminating NUL in the calculated string length. This hit memcheck. svn path=/trunk/; revision=7884
* Oops.Michael Zucci2001-01-252-0/+321
| | | | svn path=/trunk/; revision=7801
* Changed the subject search to handle case sensitive when it is mixed case.Not Zed2001-01-257-565/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-25 Not Zed <NotZed@Ximian.com> * tests/folder/test3.c: Changed the subject search to handle case sensitive when it is mixed case. * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c (noinst_HEADERS): Added camel-search-private.h * camel-folder-search.c (check_header): New function to do the work of the various header checks. (search_header_matches): (search_header_starts_with): (search_header_ends_with): (search_header_contains): Use check_header to do the work. (build_match_regex): Removed. * camel-search-private.c (header_soundex): New function to match words to phrases using soundex algorithm. * camel-filter-search.c (soundexcmp): Removed. (check_match): Moved to search-private.h 2001-01-24 Not Zed <NotZed@Ximian.com> * camel-search-private.c (camel_search_build_match_regex): Added extra flags, so the same function can be used for start/end/whole/partial matches. (camel_search_header_match): Convenience function to check a single header against all sorts of different matches. * providers/imap/camel-imap-search.c (imap_body_contains): Fix for e_sexp api changes. * camel-folder-search.c: Fix for e_sexp api changes. (search_header_contains): Free args/quit on unknown header. (search_header_matches): " (search_header_starts_with): " (search_header_ends_with): " (match_message): Add an exception argument. (search_body_contains): Free args/quit on fatal error. (message_body_contains): Removed (moved to camel-search-private.c), fixed callers. * camel-filter-search.c: Fix for e_sexp api changes. (build_match_regex, message_body_contains): Moved into camel-filter-private.c Fixed callers. (check_header): moved guts to camel-search-private, and changed to use regex's for everything. Just calls that with the right args. (check_header): GEts the header, decodes it, and checks for failure, and whatnot. (check_match): Removed. (header_soundex): Changed significantly. Now it soundexes each word in the header separately, and compares it to the first argument. * tests/folder/test9.c (main): Fix for api changes. (main): Added tests to see that invalid match and action rules are properly detected. * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove the 'finished message' bit. (camel_filter_driver_filter_message): Remove an accidentally checked in debug. (camel_filter_driver_filter_message): Fix for e-sexp api changes. svn path=/trunk/; revision=7796
* Added tests to see that invalid match and action rules are properlyNot Zed2001-01-242-0/+59
| | | | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * tests/folder/test9.c (main): Added tests to see that invalid match and action rules are properly detected. svn path=/trunk/; revision=7767
* Fix for api changes.Not Zed2001-01-242-3/+5
| | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * tests/folder/test9.c (main): Fix for api changes. svn path=/trunk/; revision=7765
* (camel_filter_driver_filter_message): Remove an accidentallyMichael Zucci2001-01-242-1/+2
| | | | | | checked in debug. svn path=/trunk/; revision=7762
* Remove the 'finished message' bit.Not Zed2001-01-242-2/+7
| | | | | | | | | 2001-01-24 Not Zed <NotZed@Ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove the 'finished message' bit. svn path=/trunk/; revision=7761
* Add a lock around the delayed loading, so two threads won't try to do itDan Winship2001-01-244-2/+46
| | | | | | | | * providers/imap/camel-imap-wrapper.c: Add a lock around the delayed loading, so two threads won't try to do it at the same time. svn path=/trunk/; revision=7752
* Set the CamelFolder::name to just the base part of the vfolder name (theDan Winship2001-01-232-2/+8
| | | | | | | | * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the CamelFolder::name to just the base part of the vfolder name (the non-query part) svn path=/trunk/; revision=7743
* Perform error checking on parsing/execution.Not Zed2001-01-234-12/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-23 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (camel_filter_search_match): Perform error checking on parsing/execution. * camel-folder-search.c (camel_folder_search_execute_expression): Perform error handling on search expression. (CamelFolderSearchPrivate): Add a camelexception for error returns. (camel_folder_search_execute_expression): Setup exception pointer. (search_match_all): Quit on error. * 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=7739
* Removed some debug 'warnings', as they should now be displayed at theNot Zed2001-01-234-30/+87
| | | | | | | | | | | | | | | | | | | | | 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
* avoid /0 by updating after we've done the sync. (close_folders): Setup theNot Zed2001-01-232-2/+11
| | | | | | | | | | 2001-01-23 Not Zed <NotZed@Ximian.com> * camel-filter-driver.c (close_folder): avoid /0 by updating after we've done the sync. (close_folders): Setup the first progress report to start it off. svn path=/trunk/; revision=7734
* Change the callbacks in this file to match the callback function types.Christopher James Lahey2001-01-232-1/+6
| | | | | | | | | 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-2215-2/+55
| | | | | | | | | 2001-01-22 Not Zed <NotZed@Ximian.com> * .cvsignore */*/.cvsignore: Added profiling temp files. svn path=/trunk/; revision=7705
* When removing phantom nodes, check for the end node too.Not Zed2001-01-224-18/+26
| | | | | | | | | | | | 2001-01-22 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new): When removing phantom nodes, check for the end node too. * camel-filter-driver.[ch]: Changed status vars to be CAMEL_FILTER_STATUS_ etc. svn path=/trunk/; revision=7700
* Make the output a little prettier. Okay, so I'm anal...Jeffrey Stedfast2001-01-223-17/+10
| | | | | | | | | 2001-01-21 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_param_list_format_append): Make the output a little prettier. Okay, so I'm anal... svn path=/trunk/; revision=7692
* Added an exception to CamelFilterGetFolderFunc.Not Zed2001-01-213-19/+48
| | | | | | | | | | | | | | | | | | | | | | 2001-01-21 Not Zed <NotZed@Ximian.com> * camel-filter-driver.h: Added an exception to CamelFilterGetFolderFunc. * camel-filter-driver.c (camel_filter_driver_filter_message): Remove source parameter, as it is determined elsewhere now. (camel_filter_driver_filter_folder): Same here. (camel_filter_driver_filter_mbox): And here. (do_move): If we cannot open a folder, quit, rather than ignoring it. (do_copy): Here too. (open_folder): Pass an exception into get_folder callback. (camel_filter_driver_filter_folder): Report that we're syncing, when we are. (camel_filter_driver_filter_mbox): And here too. (close_folder): And here. svn path=/trunk/; revision=7671
* (subscribe_folder): add a missing UNLOCKDan Winship2001-01-202-0/+2
| | | | svn path=/trunk/; revision=7657
* Set the deleted bit *before* copying to the default folder, this way ifJeffrey Stedfast2001-01-202-4/+11
| | | | | | | | | | | 2001-01-19 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Set the deleted bit *before* copying to the default folder, this way if they are importing mail and have a rule to delete it, it doesn't get copied to the default folder un-deleted. svn path=/trunk/; revision=7651
* If LISTing a subscribed folder doesn't return a LIST response, just ignoreDan Winship2001-01-202-3/+13
| | | | | | | | | * 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-192-2/+6
| | | | | | | | 2001-01-19 Kjartan Maraas <kmaraas@gnome.org> * providers/smtp/camel-smtp-provider.c: Mark strings for translation. svn path=/trunk/; revision=7643
* Add a percentage complete indicator to the status thing.Not Zed2001-01-193-18/+33
| | | | | | | | | | | | 2001-01-19 Not Zed <NotZed@Ximian.com> * camel-filter-driver.c (report_status): Add a percentage complete indicator to the status thing. (camel_filter_driver_filter_mbox): Add percentage complete to reporting. (camel_filter_driver_filter_folder): Same. svn path=/trunk/; revision=7635
* More tweaking... skip separator characters after the namespace character.Dan Winship2001-01-193-3/+19
| | | | | | | | | | | | | | | * 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-192-1/+8
| | | | | | | | * 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-183-4/+16
| | | | | | | | | | | | | | | 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
* Make sure that the message-info is non-null before we go accessing innerJeffrey Stedfast2001-01-182-1/+10
| | | | | | | | | | | | 2001-01-17 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (camel_folder_summary_load): Make sure that the message-info is non-null before we go accessing inner parts of it and/or adding it to the summary array. I may not have handled the error correctly, but it does seem to work correctly. If NotZed could double-check this it'd be great. svn path=/trunk/; revision=7608
* New smtp error-code to string mapping function. (smtp_connect): Use theJeffrey Stedfast2001-01-182-10/+106
| | | | | | | | | | | | | | | | | | | | 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
* Add an int i so this code will compile. Should I be worried about how wellJeffrey Stedfast2001-01-172-1/+8
| | | | | | | | | | 2001-01-16 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (camel_folder_summary_array): Add an int i so this code will compile. Should I be worried about how well this code will work? ;-) svn path=/trunk/; revision=7562
* Index: ChangeLogMichael Zucci2001-01-1717-28/+1896
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/camel/ChangeLog,v retrieving revision 1.684 diff -r1.684 ChangeLog 0a1,34 > 2001-01-17 Not Zed <NotZed@Ximian.com> > > * camel-folder.c (free_summary): Call > camel_folder_summary_array_free() to do the work. > (get_summary): Use camel_folder_summary_array() to get the array > atomically. These fixes allow folder/test8 to work again, and fix > a sort of race where the summary size can change while we were > making a copy of it. > > * camel-folder-summary.c (camel_folder_summary_array): Get the > summary array atomically, so it can't contain empty records. > (camel_folder_summary_array_free): And free it. > > * tests/lib/camel-test.c (die): If we are verbose & in threads, > then goto sleep so we can debug. > > * tests/folder/test8.c (worker): Add a missing pull() for > comnparing content. > > * camel-filter-search.c: Fix the symbol table, so match-all is an > immediate function, as it should be. > > * tests/folder/test9.c (main): New test, tests some filtering > things. > > * tests/message/test3.c (main): Dont use a boundary string with > spaces in it. Folding can corrupt it. Maybe the folding isn't > working entirely right, but anyway. > > * camel-session.c: Debug out the debug. > > * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug > a messageinfo leak. > 1a36,94 > > * camel-filter-search.c (header_exists): Changed to support > multiple args (or'd together). > (header_contains): Cleaned up to match the search code. Why did > fejj change it? I'll never know. > (header_matches): > (header_starts_with): > (header_ends_with): Big cleanup of fejj's "i'm the cut & paste > king" code. Also properly handle or'ing of additional args to > match what the folder-search code should do. > (check_match): New function which does the annoying matching > stuff (for header matches). > (check_header): Similarly, handles or'ing of the matches together. > (header_contains): > (header_matches): > (header_starts_with): > (header_ends_with): Call check_header to do the actual work. > (header_soundex): And here too. > (match_all): Yeah like match-all isn't passed expression results, > its passed expression terms. Fix this so match-all works like it > should, by executing the contained expression. > (message_body_contains): Copied directly from > camel-folder-search.c, a more robust/faster/simpler body search > code. > (mime_part_matches): Removed entirely. > (handle_multipart): Removed entirely. > (build_match_regex): Copied from camel-folder-search. Builds a > set of simple strings into a regex pattern that matches any of > them (for faster & simpler matching). Expanded to accept regex > patterns itself, so it can merge them together. > (body_contains): Use build match/match message to match using a > built regex. > (body_regex): Likewise, this time we tell it we're building a > regex though. > (header_full_regex): Use build_match_regex to take the drudgery > out of it, and expand it to handle multiple regex's at once. > (get_full_header): slightly cleaner (well i dunno, the sprintf > stuff just got to me). > (header_regex): Cleaned up to use build_match_Regex too, and to > properly check types. > (filter_message_search): Just allocate 'fms' on the stack. > > * camel-filter-driver.c (camel_filter_driver_finalise): > (camel_filter_driver_init): > (camel_filter_driver_class_init): > (camel_filter_driver_get_type): Changed from gtk object to camel > object. > (camel_filter_driver_add_rule): New function to add a rule to be > processed in sexp form. > (camel_filter_driver_init): Init the rules list. > (camel_filter_driver_finalise): Clear the rules/rules list. > (camel_filter_driver_filter_message): Scan rules list directly > rather than creating on the fly. > > * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h > (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken > from filter-driver, which can drive, uh, filters based on sexp's. > (libcamelinclude_HEADERS): > (libcamel_la_SOURCES): Added camel-filter-search.[ch] svn path=/trunk/; revision=7560
* Delayed loading of IMAP message parts.Dan Winship2001-01-1713-183/+996
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fcntl(fd, F_GETFL) returns the flags as the return value, not via a passedDan Winship2001-01-174-14/+31
| | | | | | | | | | | | | | | | | | * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt): * camel-stream-fs.c (stream_read, stream_write): * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL) returns the flags as the return value, not via a passed in pointer. And F_SETFL looks for an int, not a long, and you have to pass it what it's expecting because it's a va_arg parameter. (Yes, the man page lies on Linux. But check the UNIX98 spec or the glibc source.) Also, fix another bug in socket_connect: if we manage to connect right away, unset O_NONBLOCK so it doesn't mess us up later. Fixes a bunch of problems with non-blocking I/O being done in the allegedly-blocking case and then returning EWOULDBLOCK. svn path=/trunk/; revision=7555
* set to nntp if ENABLE_NNTP (SUBDIRS): use $(NNTP_DIR)Chris Toshok2001-01-172-1/+10
| | | | | | | | | 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-172-2/+6
| | | | | | | | | 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-166-5/+121
| | | | | | | | | | | | | | | | | | | | | | | | 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-168-17/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* If the close() is successful, set the fd to -1.Jeffrey Stedfast2001-01-166-50/+34
| | | | | | | | | | | | | | | | | | | | | 2001-01-15 Jeffrey Stedfast <fejj@ximian.com> * camel-stream-fs.c (stream_close): If the close() is successful, set the fd to -1. * camel-tcp-stream-raw.c: Removed the disconnect() method. (stream_close): If the close() is successful, set the sockfd to -1. * camel-tcp-stream-ssl.c: Removed the disconnect() method. (stream_close): If the close() is successful, set the sockfd to NULL. * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed, easier to just use the close() method as it did the same thing anyway. svn path=/trunk/; revision=7522
* Updated to be able to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.Jeffrey Stedfast2001-01-162-2/+35
| | | | | | | | | | | 2001-01-15 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able to get the CAMEL_SOCKOPT_NONBLOCKING socket opt. (stream_setsockopt): Updated to be able to set the CAMEL_SOCKOPT_NONBLOCKING socket opt. svn path=/trunk/; revision=7519
* Lock around the imap_rescan, which needs it.Peter Williams2001-01-162-0/+7
| | | | | | | | | 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
* A cancellable connection routine. (remote_send_string): Return cancelledNot Zed2001-01-155-24/+434
| | | | | | | | | | | | | | | 2001-01-15 Not Zed <NotZed@Ximian.com> * camel-remote-store.c (socket_connect): A cancellable connection routine. (remote_send_string): Return cancelled exception if we were. (remote_send_stream): " (remote_recv_line): " * camel-stream-fs.c (stream_read): First cut at cancellation stuff. Its looking a bit ugly. svn path=/trunk/; revision=7496
* Uses an SSL socket now although there's still a few things missing (likeJeffrey Stedfast2001-01-153-13/+55
| | | | | | | | | | | | | 2001-01-15 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now although there's still a few things missing (like certificate handling and such). * camel.c (camel_ssl_init): A replacement function for camel_init() that also initializes SSL. svn path=/trunk/; revision=7494
* Implemented. (stream_setsockopt): Implemented.Jeffrey Stedfast2001-01-155-2/+227
| | | | | | | | | | | | | | | | 2001-01-14 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented. (stream_setsockopt): Implemented. * camel-tcp-stream-raw.c (stream_getsockopt): Implemented. (stream_setsockopt): Implemented. * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method. (camel_tcp_stream_setsockopt): Another new method. I think you get the idea of what these are for so I won't explain them. svn path=/trunk/; revision=7491
* New CamelTcpStream class that implements nspr sockets and eventually willJeffrey Stedfast2001-01-146-14/+557
| | | | | | | | | | | | | | | | 2001-01-14 Jeffrey Stedfast <fejj@helixcode.com> * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that implements nspr sockets and eventually will use nss for SSL/TLS. Currently doesn't do any SSL/TLS but it should still work. It's functionally equivalent to CamelTcpStreamRaw at the moment only it uses nspr i/o. * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that implements native sockets. Should be usable but may have some bugs yet. svn path=/trunk/; revision=7489
* New abstract class for TCP streams. The next step is to write childJeffrey Stedfast2001-01-143-0/+202
| | | | | | | | | | | | | 2001-01-13 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The next step is to write child classes (CamelTcpStreamBSD and CamelTcpStreamSSL). The BSD stream will use normal BSD sockets while SSL will use Mozilla's NSPR and NSS libraries to do Secure Socket Layers which wille ventually replace CamelStreamSSL which I just commit'd. Oh well. svn path=/trunk/; revision=7488
* New stream for handling SSL/TLS connections.Jeffrey Stedfast2001-01-143-0/+321
| | | | | | | | | 2001-01-13 Jeffrey Stedfast <fejj@ximian.com> * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS connections. svn path=/trunk/; revision=7486
* (camel_folder_thread_messages_new): Added casts to rmeove someMichael Zucci2001-01-122-3/+5
| | | | | | warnings for the analites out there. svn path=/trunk/; revision=7426
* Perform a final pass, removing any pseudo nodes we added earlier. QuickNot Zed2001-01-122-0/+33
| | | | | | | | | | 2001-01-12 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new): Perform a final pass, removing any pseudo nodes we added earlier. Quick patch to test the idea. svn path=/trunk/; revision=7424
* (imap_copy_message_to): Fix this up: sync flags to the serverDan Winship2001-01-122-33/+57
| | | | | | | | | | | 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-122-30/+40
| | | | | | | | | * 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-124-4/+93
| | | | | | | | | | | | | | * 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
* Fix a locking problem. (One branch of an if statement was returning withDan Winship2001-01-122-6/+8
| | | | | | | | | * camel-folder.c (camel_folder_copy_message_to): Fix a locking problem. (One branch of an if statement was returning with the lock still locked.) Also remove the deprecation comments, to match move_message_to. svn path=/trunk/; revision=7409
* Changed the descriptions for mh, mbox, and maildir to be moreJeffrey Stedfast2001-01-112-3/+8
| | | | | | | | | 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-119-9/+29
| | | | | | | | | | | | | | | | | * 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-114-1/+72
| | | | | | | | | | | | | | | * 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-108-207/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1010-100/+50
| | | | | | | | | | | | | | | | | | | | | | | | 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-062-6/+35
| | | | | | | | | | | | 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
* Remove conflict thingie from a while backJP Rosevear2001-01-051-1/+0
| | | | svn path=/trunk/; revision=7259
* oops, forgot the changelog entryJP Rosevear2001-01-051-0/+18
| | | | svn path=/trunk/; revision=7258
* fix includes for compilationJP Rosevear2001-01-059-5/+17
| | | | | | | | | | | | | | | | | | | | | | 2001-01-04 JP Rosevear <jpr@helixcode.com> * tests/lib/Makefile.am: fix includes for compilation * tests/message/Makefile.am: Build test3 again * tests/message/test2.c: Kill warnings with header includes * tests/message/test3.c: ditto * tests/lib/streams.c: ditto * tests/lib/camel-test.c: ditto * tests/lib/messages.c: ditto * tests/lib/folders.c: ditto svn path=/trunk/; revision=7253
* 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-052-0/+514
| | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Fix two problems in figuring out server-expunged messages. svn path=/trunk/; revision=7247
* If we have a lot of messages changed, promote it to a folder changedNot Zed2001-01-042-1/+6
| | | | | | | | | 2001-01-04 Not Zed <NotZed@HelixCode.com> * camel-folder.c (thaw): If we have a lot of messages changed, promote it to a folder changed event. svn path=/trunk/; revision=7245
* Implemented. (search_header_exists): Implemented.Jeffrey Stedfast2001-01-043-2/+271
| | | | | | | | | | | 2000-01-03 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder-search.c (search_header_matches): Implemented. (search_header_exists): Implemented. (search_header_starts_with): Implemented. (search_header_ends_with): Implemented. svn path=/trunk/; revision=7243
* Initialize the exists variable so that we don't do random things if theChristopher James Lahey2001-01-042-1/+7
| | | | | | | | | | 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
* REmove warning, this isn't really deprecated, sigh.Not Zed2001-01-033-4/+9
| | | | | | | | | | | 2000-12-29 Not Zed <NotZed@HelixCode.com> * camel-folder.c (camel_folder_move_message_to): REmove warning, this isn't really deprecated, sigh. * camel-mime-utils.c (header_fold): Comment out some debug. svn path=/trunk/; revision=7222
* 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-0326-4611/+5
| | | | | | | | | 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-038-404/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* New function to return just foo/bar with no parameters.Dan Winship2001-01-034-1/+16
| | | | | | | | | | * camel-mime-utils.c (header_content_type_simple): New function to return just foo/bar with no parameters. * camel-data-wrapper.c (get_mime_type): Use header_content_type_simple rather than header_content_type_format. svn path=/trunk/; revision=7213
* Remove this. It was only a thin wrapper around struct _header_content_typeDan Winship2000-12-2916-369/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | * gmime-content-field.[ch]: Remove this. It was only a thin wrapper around struct _header_content_type anyway, and didn't match the naming scheme of anything else. * Makefile.am: Remove gmime-content-field.[ch] * camel.h: Remove gmime-content-field.h * camel-types.h: Add CamelContentType as a typedef for struct _header_content_type (especially for use outside of camel). * camel-multipart.c: * camel-mime-part.c: * camel-mime-message.c: * camel-folder-summary.c: * camel-folder-search.c: * camel-data-wrapper.[ch]: Use CamelContentType and header_content_type_* functions rather than the GMime stuff. * camel-mime-part-utils.c: * camel-medium.c: Remove unused gmime-content-field.h include. svn path=/trunk/; revision=7186
* Fix the APOP check to not crash on servers that don't return anyDan Winship2000-12-282-7/+15
| | | | | | | | * 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-242-0/+2
| | | | svn path=/trunk/; revision=7156
* clean up a stubborn and hard to remove imap_folder->summary.Michael Zucci2000-12-243-5/+6
| | | | 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-2452-1275/+2979
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-232-12/+27
| | | | | | | | | | * 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-229-441/+228
| | | | | | | | | | | | | | | | | | * 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
* Update the doc comment: since it always NUL-terminates the buffer, itDan Winship2000-12-223-4/+15
| | | | | | | | | | | | | * camel-stream-buffer.c (camel_stream_buffer_gets): Update the doc comment: since it always NUL-terminates the buffer, it reads at most @max-1 bytes, not @max. * camel-remote-store.c (remote_recv_line): Fix the "did camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug when reading lines longer than 1024 characters (eg, IMAP SEARCH responses in very large folders). svn path=/trunk/; revision=7117
* Oops. Don't do "FETCH 1:0" when the folder is empty.Dan Winship2000-12-202-31/+48
| | | | | | | | | | * 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-204-62/+105
| | | | | | | | | | | | | | | | | | * 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-196-21/+194
| | | | | | | | | | | | | | | | | | | | | * 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
* When checking to see if we need to fold the header, when we come accross aJeffrey Stedfast2000-12-162-1/+8
| | | | | | | | | | | 2000-12-15 Jeffrey Stedfast <fejj@helixcode.com> * camel-mime-utils.c (header_fold): When checking to see if we need to fold the header, when we come accross a \n, make sure to start at p + 1 the next time through the loop or else we get into an infinite loop. svn path=/trunk/; revision=7055
* change a bunch of IS_CAMEL_* macros to CAMEL_IS_*Dan Winship2000-12-1449-60/+65
| | | | | | | * Namespace cleanup: change a bunch of IS_CAMEL_* macros to CAMEL_IS_* svn path=/trunk/; revision=6972
* add #include <sys/types.h> for freebsd.Chris Toshok2000-12-142-0/+6
| | | | | | | | | 2000-12-13 Chris Toshok <toshok@helixcode.com> * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for freebsd. svn path=/trunk/; revision=6971
* Added #ifndef NO_WARNINGS around a #warning. Added (void) to the prototypeChristopher James Lahey2000-12-139-26/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-12 Christopher James Lahey <clahey@helixcode.com> * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef NO_WARNINGS around a #warning. Added (void) to the prototype and declaration of camel_message_info_new. * camel-mime-message.h: Added an include for camel-mime-filter-bestenc.h. Added a prototype for camel_mime_message_set_best_encoding. Reformatted prototypes to line up. * camel-mime-parser.c: Added #if d(!)0 around the states string lookup table since it's only used in debugging output. * camel-seekable-substream.c (stream_flush): Added a cast. * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>. * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid and flags const to fix warnings here. * providers/imap/camel-imap-store.c (get_folder_info): Made p const to fix warnings here. svn path=/trunk/; revision=6954
* Add missing .h file. (From campd.)Dan Winship2000-12-132-6/+6
| | | | | | * tests/lib/Makefile.am: Add missing .h file. (From campd.) svn path=/trunk/; revision=6951
* Remove use of linewrap filter. Headers are now wrapped. encode_8bitMichael Zucci2000-12-117-77/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of linewrap filter. Headers are now wrapped. encode_8bit already enforces a 998 octet line limit. (smtp_data): Also fixed a memleak, we always have to unref our own copy of the filters. We also dont need to remove them manually, so dont bother. The type's an int too ... * camel-internet-address.c (internet_unformat): When scanning past quotes, remove them also. (camel_internet_address_format_address): If the name contains "'s, or ','s then strip and quotes and wrap the whole lot in one set of quotes. * Makefile.am (noinst_HEADERS): We dont want to install camel-charset-map-private.h, ever. There are probably other similar files ..? * camel-mime-part.c (write_to_stream): Fold header lines appropriately as we're writing them out. * camel-mime-utils.c (header_fold): Add a new argument, headerlen, tells it how long the associated header token is. (header_fold): Also,k check to see if we need to fold first, using a better algorithm, and also accept already-folded lines, and re-process accordingly. (rfc2047_decode_word): Add a little buffer space to iconv output for shifting overheads? (rfc2047_decode_word): finish the iconv with a null call, to flush shift state, etc. (rfc2047_encode_word): Attempt to break up long words into appropriately sized, independent, chunks. See rfc2047, section 2. (header_decode_mailbox): Dont add in extra spaces into the output if we are decoding adjacent encoded words. We can only guess this case, as some broken mailers put encoded words inside quoted words. (header_encode_phrase): Dont merge words if they are going to end up too long. Also change back ot only merge consecutive words of the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or 'iam an. idiot' -> iam "an." idiot svn path=/trunk/; revision=6902
* Hrm, we actually want to call set_header, not add_header here, probablyNot Zed2000-12-113-18/+67
| | | | | | | | | | | | | | | | | | | | | 2000-12-11 Not Zed <NotZed@HelixCode.com> * camel-medium.c (camel_medium_set_header): Hrm, we actually want to call set_header, not add_header here, probably explains some duplicate X-Evolution headers i was trying to track down. Also changed the api to handle a NULL value == remove the header. * providers/local/camel-maildir-summary.c (maildir_summary_decode_x_evolution): Always return error, we dont use x-evolution for maildir. (maildir_summary_encode_x_evolution): Always return a NULL string, likewise. (maildir_summary_add): Hook in here, since the _new function doesn't have access to any flags from the caller. If we have flags, then update the filename again. Not ideal, but should work. svn path=/trunk/; revision=6897
* oopsMichael Zucci2000-12-091-0/+198
| | | | svn path=/trunk/; revision=6864
* ShushJP Rosevear2000-12-091-0/+7
| | | | svn path=/trunk/; revision=6863
* Remove test3 from build until the files show upJP Rosevear2000-12-092-3/+7
| | | | | | | | | | | | | | 2000-12-08 JP Rosevear <jpr@helixcode.com> * tests/message/Makefile.am: Remove test3 from build until the files show up 2000-12-08 JP Rosevear <jpr@helixcode.com> * Makefile.am: Remove files from extra_dist since they are already listed svn path=/trunk/; revision=6861
* Change the sign of the default date offset when none is supplied.Not Zed2000-12-082-2/+10
| | | | | | | | | | | 2000-12-09 Not Zed <NotZed@HelixCode.com> * camel-mime-message.c (camel_mime_message_set_date): Change the sign of the default date offset when none is supplied. (camel_mime_message_set_date): Also do dst if its dst (forward 1 hour). Fixes #928 + some. svn path=/trunk/; revision=6860
* Change line no format so that emacs can detect it.Not Zed2000-12-084-4/+12
| | | | | | | | | 2000-12-06 Not Zed <NotZed@HelixCode.com> * tests/lib/camel-test.h (check): Change line no format so that emacs can detect it. svn path=/trunk/; revision=6848
* We want to bitwise-or the server and cached flags here so that we keep theJeffrey Stedfast2000-12-072-2/+13
| | | | | | | | | | | 2000-12-06 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_refresh_info): We want to bitwise-or the server and cached flags here so that we keep the flags that we have set locally and set any additional flags that a parallel connection may have set. svn path=/trunk/; revision=6834
* If the data wrapper fails to be written to the stream, unref it and theJeffrey Stedfast2000-12-062-0/+11
| | | | | | | | | | 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com> * providers/smtp/camel-smtp-transport.c (smtp_data): If the data wrapper fails to be written to the stream, unref it and the filters before returning. svn path=/trunk/; revision=6804
* (imap_refresh_info): Fix a really really really dumb bug.Dan Winship2000-12-062-1/+2
| | | | svn path=/trunk/; revision=6801
* use BODY.PEEK[] rather than RFC822, so the message doesn't get marked asDan Winship2000-12-062-2/+8
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_get_message): use BODY.PEEK[] rather than RFC822, so the message doesn't get marked as \Seen. svn path=/trunk/; revision=6800
* Fix the check for "flags aren't actually changing".Dan Winship2000-12-066-14/+53
| | | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix the check for "flags aren't actually changing". * providers/local/camel-local-folder.c (local_set_message_flags, local_set_message_user_flag, local_set_message_user_tag): Don't emit message_changed unless the flags actually changed. * providers/nntp/camel-nntp-folder.c (nntp_folder_set_message_flags): Don't emit message_changed unless the flags actually changed. Fix the check for marked as seen. svn path=/trunk/; revision=6797
* Stream testing stuff.Michael Zucci2000-12-053-0/+258
| | | | svn path=/trunk/; revision=6792
* stream_flush does make sense for a substream afterall (if you have aNot Zed2000-12-0511-39/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-05 Not Zed <NotZed@HelixCode.com> * camel-seekable-substream.c (stream_flush): stream_flush does make sense for a substream afterall (if you have a stream_write). (stream_write): Implement this. (stream_seek): Change the STREAM_END behaviour to be more sane. if bounded go from the end of the bound, if unbounded, go from the end of the parent stream. * camel-stream-mem.c (stream_read): Dont return error if reading past the end of data, just return 0. * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream to be unbound. (stream_seek): Fix the logic when seeking from the end of an unbounded stream. (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then return NULL immediately. (stream_seek): Range check a SEEK_END so it fits within bound_start. 2000-12-01 Not Zed <NotZed@HelixCode.com> * tests/lib/folders.c (test_folder_basic): New test to perform basic store operations on folders (taken from folders/test1). (test_folder_message_ops): Tkane the guts out of folders/test2. svn path=/trunk/; revision=6790
* i18n-ize exception strings. (get_name): And here. (_send_to): Here too.Jeffrey Stedfast2000-12-052-49/+50
| | | | | | | | | | | | | | | | | 2000-12-04 Jeffrey Stedfast <fejj@helixcode.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize exception strings. (get_name): And here. (_send_to): Here too. (smtp_helo): And here and there... (smtp_mail): And around the square... (smtp_rcpt): Saying catch me if you can... (smtp_data): And here three. (smtp_rset): And here. (smtp_quit): And finally here. svn path=/trunk/; revision=6785
* added some imap tests, tho they dont get far yet and dontMichael Zucci2000-12-0410-291/+654
| | | | | | recover automatically. svn path=/trunk/; revision=6772
* Added system_flag to CamelFolderSearchClassJeffrey Stedfast2000-12-025-3/+98
| | | | | | | | | | | | | | | | 2000-12-01 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder-search.h: Added system_flag to CamelFolderSearchClass * camel-folder-summary.c (camel_system_flag_get): Convenience function to return whether or not a flag is set using a string as the flag name. (camel_system_flag): Return the integer value of the flag string. * camel-folder-search.c (search_system_flag): New ESExp callback for allowing vfoldering on CamelMessageInfo flags. svn path=/trunk/; revision=6763
* Don't g_return_if_fail if the service is already disconnected. JustDan Winship2000-12-023-3/+17
| | | | | | | | | | | | * camel-service.c (camel_service_disconnect): Don't g_return_if_fail if the service is already disconnected. Just return. * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Return FALSE (don't try again) if we get CAMEL_POP3_FAIL. (pop3_connect): If we don't succeed, disconnect. svn path=/trunk/; revision=6756
* Fix a possible bug where 'name' could be uninitialized.Jeffrey Stedfast2000-12-012-1/+5
| | | | | | | | | | | | | | 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): Fix a possible bug where 'name' could be uninitialized. * camel-folder-summary.c (camel_message_info_new): New convenience function, doesn't do much but it sure makes code cleaner to read. (camel_message_info_new_from_header): This one makes my life heaven. svn path=/trunk/; revision=6752
* New convenience function, doesn't do much but it sure makes code cleanerJeffrey Stedfast2000-12-013-0/+62
| | | | | | | | | | 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder-summary.c (camel_message_info_new): New convenience function, doesn't do much but it sure makes code cleaner to read. (camel_message_info_new_from_header): This one makes my life heaven. svn path=/trunk/; revision=6749
* Handle the case where the summary failed to load - clear the summary andJeffrey Stedfast2000-12-012-2/+13
| | | | | | | | | | | 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-summary.c (camel_imap_summary_new): Handle the case where the summary failed to load - clear the summary and then set the dirty bit so that it is sure to save later. Is this the right fix? svn path=/trunk/; revision=6743
* Remove unused variable.Dan Winship2000-12-012-1/+5
| | | | | | | * camel-exception.c (camel_exception_setv): Remove unused variable. svn path=/trunk/; revision=6742
* Remove assertion that content is there, when it no longer can be.Not Zed2000-11-3022-279/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-30 Not Zed <NotZed@HelixCode.com> * providers/local/camel-mbox-folder.c (mbox_get_message): Remove assertion that content is there, when it no longer can be. * camel-folder-summary.h: Removed pos/bodypos/endpos from camelmeessagecontentinfo. (CamelMessageFlags): Added an attachments flag. * providers/local/camel-local-summary.h: Added load virtual function. * tests/lib/folders.c (test_message_info): Accessors. (test_folder_message): " * camel-folder-thread.c (get_root_subject): Fix accessors. (dump_tree_rec): " * camel-folder-search.c (camel_folder_search_execute_expression): Accessors for messageinfo. (search_match_all): " (search_header_contains): " (search_header_contains): " (search_body_contains): " (camel_folder_search_execute_expression): Use mepool_strdup. * providers/local/camel-mbox-summary.c (summary_update): Accessors for messageinfo. (mbox_summary_sync_full): " * providers/local/camel-mh-summary.c (remove_summary): Accessors for messageinfo. (mh_summary_check): " (mh_summary_sync_message): " (mh_summary_sync): " * providers/local/camel-mh-folder.c (mh_append_message): Use accessor for uid. * providers/local/camel-local-summary.c (local_summary_decode_x_evolution): Use accessor to uid. (local_summary_encode_x_evolution): Likewise. (message_info_new): And here. (camel_local_summary_load): Call virtual load function. (local_summary_load): Default load function, load summary. (camel_local_summary_load): Check file exists before trying to load. (camel_local_summary_construct): Turn off building content info! (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content info anymore. (camel_local_summary_load): After a successful load/check, do a save too so we dont have to go through it again randomly. * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use accessors for messageinfo. * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use accessors for uid. * providers/imap/camel-imap-folder.c (imap_refresh_info): Use accessor for uid. (imap_sync): Likewise. (imap_get_uids): Likewise. (imap_update_summary): And here. * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use accessor for uid. (vfolder_add_match): Handle estrv stuff. (vfolder_change_match): Accessor for uid. (get_real_message): " (vee_get_uids): " (vee_folder_build): " + estrv. (vee_folder_build_folder): " * providers/local/camel-maildir-folder.c (maildir_append_message): Use acccessors for uid's. (maildir_get_message): Here too. * providers/local/camel-maildir-summary.c (camel_maildir_summary_init): Setup the string count for us. (message_info_new): Access the string array directly. (message_info_free): No need to free string if using array. (camel_maildir_summary_info_to_name): Use accessor to get to uid. (remove_summary): And here. (maildir_summary_check): Likewise. (maildir_summary_sync): And here. (maildir_summary_load): Load up a cache of uid->filename mappings before loading the actual summary file. This saves us having to waste the diskspace storing the filenames in the summary itself, and also helps us sync the summary better on load. (message_info_load): If we have the load_map setup, and the uid exists, then set the filename cache from it, and update the flags from the name, incase our summary mismatches it. * camel-folder-summary.c (camel_folder_summary_init): Setup string count for compressed info record. An optional compile mode which stores all strings for a given messageinfo into a packed array, which should save 36-50 bytes/record. (camel_folder_summary_info_new): Init the string array. (message_info_new): Set the string array items, as required. (message_info_load): And here too. (message_info_save): Use accessors to get to strings. (message_info_free): Free strings as one. (camel_message_info_dup_to): Handle packed array case. (camel_folder_summary_add): Use accessors. And pack the strv before storing it. (summary_assign_uid): New function to assign a unique uid to a message, if it doesn't have one. (camel_folder_summary_add): Call assign_uid instead of doing it ourselves. (camel_folder_summary_info_new_from_parser): " (camel_folder_summary_info_new_from_message): " (camel_folder_summary_encode_string): constify. (camel_folder_summary_encode_token): " (summary_build_content_info_message): Fix accessors to messageinfo. (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of contentinfo->pos data. (camel_folder_summary_info_new_from_parser): Calculate the size based on the parser position, not the removed contentinfo stuff. (camel_folder_summary_info_new_from_message): Remove size stuff. (camel_folder_summary_offset_content): Removed, no longer means anything. (content_info_new): (content_info_load): (content_info_save): (summary_build_content_info): Remove stuff for contentinfo->pos*. (summary_build_content_info): Take a msginfo argument, set attachments flag if we find any attachments. (summary_build_content_info_message): set attachments flag if we find any attachments. (camel_folder_summary_info_new_from_parser): Always scan the content info, even if we dont save it. (camel_folder_summary_info_new_from_message): And here too. (summary_build_content_info): Only create the contentinfo stuff if we have it turned on, otherwise just parse and discard. (summary_build_content_info_message): Likewise. svn path=/trunk/; revision=6731
* Updated the gtk-doc comment.Jeffrey Stedfast2000-11-302-4/+7
| | | | | | | | | 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com> * camel-store.c (camel_store_get_folder): Updated the gtk-doc comment. svn path=/trunk/; revision=6725
* Use iconv instead of unicode_iconv.Dan Winship2000-11-303-27/+31
| | | | | | | * camel-mime-utils.c: * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv. svn path=/trunk/; revision=6721
* Fix some off-by-one-ness.Dan Winship2000-11-303-4/+12
| | | | | | | | | | * providers/imap/camel-imap-command.c (imap_read_untagged): Fix some off-by-one-ness. * camel-stream-buffer.c (stream_read): Fix another bug found in previously-unused code here. svn path=/trunk/; revision=6718
* Builddir != srcdir loving.Ettore Perazzoli2000-11-293-1/+8
| | | | svn path=/trunk/; revision=6712
* Add a missed unref.Not Zed2000-11-2924-119/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-29 Not Zed <NotZed@HelixCode.com> * tests/message/test2.c (main): Add a missed unref. * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set ourselves as the owner of the byte-array. Weird, someone has modified this file (its been reindented), but i can't see any changelogs ... * tests/lib/messages.c (content_finalise): Fix memleak in tester, free byte array when our content object is deleted. * camel-folder-search.c (camel_folder_search_finalize): Yeah great, so the sexp is a gtk object, not a camel object. Isn't that going to be fun to fix? * camel-session.c (camel_session_finalise): Free the storage path. * providers/local/camel-local-store.c (camel_local_store_init): If store->folders is setup, free it first, then overwrite. Hmm, this seems a bit crappy to me. * camel-store.c (camel_store_init): Dont setup store->folders if its already setup. * camel-exception.c (camel_exception_setv): Removed a memleak. no need to strdup after a strdup_printf!!! * camel-address.c (camel_address_finalize): Free the address ptrarray, once finished. * providers/local/camel-local-folder.c (local_finalize): Make sure we dont leave the folder locked on close. (local_finalize): Free summary/search. * providers/local/camel-mh-summary.c (mh_summary_next_uid_string): Small memleak, always free name after using it. * camel-mime-part.c (set_content_object): Free txt after setting the header. * providers/local/camel-maildir-summary.c (maildir_summary_check): Fix a memleak, close the dir after scanning new. (message_info_free): Added so we can free the filename cached in the messageinfo. (camel_maildir_summary_finalise): Free the hostname. * tests/folder/test[12].c (main): Clear out camel-test before starting. * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick): Because encode_x_evolution folds the line (sigh, because encode_param does, unlike every other function in camel-mime-utils), unfold the encoded result before comparing. (mbox_summary_sync_quick): Another small memleak, free xevnew once finished with it. * camel-mime-utils.c (header_decode_quoted_string): Removed a redundant check for c=0. (header_unfold): New function to un-fold headers. * providers/local/camel-local-summary.c (local_summary_encode_x_evolution): some problems with encoding tags, using the wrong output strings. (local_summary_encode_x_evolution): We dont need to append a ; either, param_list_format_append() will do it for us. ` svn path=/trunk/; revision=6711
* ShushJP Rosevear2000-11-294-0/+32
| | | | svn path=/trunk/; revision=6709
* Add USE_FLOCK, USE_FCNTL, USE_FLOCKJP Rosevear2000-11-292-5/+4
| | | | | | | | | | | | | | 2000-11-28 JP Rosevear <jpr@helixcode.com> * acconfig.h: Add USE_FLOCK, USE_FCNTL, USE_FLOCK * configure.in: Auto* magic for various camel locking types 2000-11-28 JP Rosevear <jpr@helixcode.com> * camel-lock.c: No longer hard code the enabled lock types svn path=/trunk/; revision=6703
* Don't set exception to g_strerror (errno) when nread == 0, because itDan Winship2000-11-292-1/+6
| | | | | | | | * camel-remote-store.c (remote_recv_line): Don't set exception to g_strerror (errno) when nread == 0, because it won't have been set. svn path=/trunk/; revision=6702
* Don't try to free things if they haven't been set yet.Dan Winship2000-11-292-2/+9
| | | | | | | * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to free things if they haven't been set yet. svn path=/trunk/; revision=6698
* send NULL so we don't have to clear the exceptionJeffrey Stedfast2000-11-291-2/+1
| | | | svn path=/trunk/; revision=6696
* Clear the exception if EHLO fails before trying HELO in the cases whereJeffrey Stedfast2000-11-292-0/+8
| | | | | | | | | | 2000-11-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the exception if EHLO fails before trying HELO in the cases where the SMTP provider doesn't announce its ESMTPness. svn path=/trunk/; revision=6695
* Set the info size's properly, oops!Not Zed2000-11-2823-55/+1184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-28 Not Zed <NotZed@HelixCode.com> * providers/local/camel-maildir-summary.c (camel_maildir_summary_init): Set the info size's properly, oops! * tests/lib/folders.[ch]: Folder testing helpers. * tests/folder/test2.c: Test basic message ops on folders. * tests/folder/test1.c (main): Test basic folder ops on (local) stores. * providers/local/camel-local-provider.c (camel_provider_module_init): Removed some debug. * providers/local/camel-maildir-folder.c (camel_maildir_folder_class_init): fix parent class. * providers/local/camel-mh-folder.c (camel_mh_folder_class_init): Fix parent class (damn cut & paste). * providers/local/camel-maildir-store.c (get_folder): Call parent impl. (camel_maildir_store_class_init): Fix parent class setup. (delete_folder): Check the folder exists before trying to delete it. (delete_folder): Try and make the delete operation atomic/rollback failures. e.g. if one directory isn't empty, then create the other empty ones back. Also clear the tmp directory fully first. * providers/local/camel-mbox-store.c (get_folder): Call parent impl. (camel_mbox_store_class_init): parent class is camel_local_store, not camel_folder, oops. (delete_folder): Return an error if it doesn't exist, rather than covering it up. * providers/local/camel-mh-store.c (get_folder): Call parent impl. (camel_mh_store_class_init): fix parent class setup. (delete_folder): Error if it doesn't exist now. * camel-folder.c (camel_folder_move_message_to): (camel_folder_copy_message_to): Added warnings as these functions are going to be removed later. * camel-store.c (camel_store_get_root_folder): Fix for an early api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since its a flag. (camel_store_get_default_folder): And here too. * providers/local/camel-local-store.c (xrename): Handle renaming folders differently to renaming files. (get_default_folder_name): local stores dont have a default folder, so make it so. Or at least, it doesn't seem to make sense to have one. (get_root_folder_name): Same for root. (get_folder): Added parent implementation, that makes sure the service path exists, if we are creating a new folder (but doesn't create the folder). 2000-11-27 Not Zed <NotZed@HelixCode.com> * providers/local/camel-local-store.c (xrename): Fixed races. Use link/unlink, rather than rename, to properly detect overwriting another file. And allow some files to be missing. * providers/Makefile.am: Removed mh, mbox, added local, to the default. svn path=/trunk/; revision=6693
* add scan = scan->next; to avoid infinite loopRadek Doulik2000-11-282-0/+7
| | | | | | | | | | 2000-11-28 Radek Doulik <rodo@helixcode.com> * providers/local/camel-local-summary.c (local_summary_decode_x_evolution): add scan = scan->next; to avoid infinite loop svn path=/trunk/; revision=6690
* Make this gratuitously more complicated. No wait, I mean, fix bugs. NowDan Winship2000-11-283-52/+105
| | | | | | | | | | | | | * providers/imap/camel-imap-command.c (imap_read_untagged): Make this gratuitously more complicated. No wait, I mean, fix bugs. Now fully handles NULs in the data stream (which "can't happen" but do) and also handles responses containing multiple literals. Also does less copying than the original code. * camel-stream-buffer.c (stream_read): Fix a bug that could make it lose sync and/or overrun buffers. svn path=/trunk/; revision=6688
* Remove "complete" fieldJP Rosevear2000-11-282-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-27 JP Rosevear <jpr@helixcode.com> * conduit/address-conduit.h: Remove "complete" field * conduit/address-conduit.c (print_local): Make it print useful debug info (print_remote): ditto (local_record_from_ecard): Make sure phone numbers get out to the pilot (ecard_from_remote_record): Set phone strings to "" if they are null (sequence_complete): unref the book view (view_cb): ref the book view (free_prepare): do nothing * backend/pas/pas-backend-file.c (pas_backend_file_book_view_free): Destroy the card lists with the rest of the view. (pas_backend_file_changes): Don't destroy the card lists here (pas_backend_file_book_view_free): Free the card/id lists in the change context here, the correct place. (pas_backend_file_changes): instead of here... 2000-11-27 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit.c (free_prepare): Ditto * conduits/calendar/calendar-conduit.c (free_prepare): Adjust free_prepare to the correct signal parameters. Don't actually do anything - there is a semantic discrepancy that needs to be resolved. 2000-11-27 JP Rosevear <jpr@helixcode.com> * providers/local/.cvsignore: shush svn path=/trunk/; revision=6681