aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-folder.c
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup of lots of exception handling ; bugfixesPeter Williams2000-09-061-0/+10
| | | | svn path=/trunk/; revision=5202
* Don't save any exceptions caused by camel_imap_folder_changedJeffrey Stedfast2000-08-311-4/+24
| | | | | | | | | | | | | | | 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_command_extended): Don't save any exceptions caused by camel_imap_folder_changed (camel_imap_fetch_command): Same. * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Using a new way of calculating the first recent message that seems more accurate. Also added code to make sure we don't accidently add a duplicate summary. svn path=/trunk/; revision=5135
* Don't wrap printed strings in quotes, makes things messyJeffrey Stedfast2000-08-311-8/+10
| | | | | | | | | | | | | | | | | | | | | | 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com> * camel-remote-store.c (remote_send_string): Don't wrap printed strings in quotes, makes things messy * providers/imap/camel-imap-folder.c (imap_get_message): Updated to use the camel_imap_fetch_command * providers/imap/camel-imap-stream.c (stream_read): Updated to use camel_imap_fetch_command * providers/imap/camel-imap-store.c (camel_imap_command_extended): No longer handles FETCH requests so no longer needs to be concerned with checking to make sure that server responses are valid (they have to be). (camel_imap_fetch_command): New convenience function that handles all FETCH requests svn path=/trunk/; revision=5122
* Prevent exceptions from being overwrittenJeffrey Stedfast2000-08-301-78/+71
| | | | | | | | | | | | 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com> * camel-remote-store.c: Prevent exceptions from being overwritten * providers/imap/camel-imap-folder.c (imap_expunge): Beautified (imap_get_subfolder_names_internal): Removed old code as the replacement code has now been tested and proven to work svn path=/trunk/; revision=5107
* CamelRemoteStore: a new generic store for stores that connect to servers. ↵Peter Williams2000-08-301-147/+50
| | | | | | Prepare for the ability to cancel operations (much better exception handling). Clean up IMAP like nobody's business svn path=/trunk/; revision=5103
* Updated to check for EXPUNGE notificationsJeffrey Stedfast2000-08-301-7/+38
| | | | | | | | | | | | | | | | | | | | 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_command_extended): Updated to check for EXPUNGE notifications * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Updated to account for messages which have been expunged (now takes a new arg, a GPtrArray of message id's that have been expunged) (imap_expunge): Updated (we may want to just use the code in folder_changed now instead of doing our own summary expunging...but that can be fixed later) (imap_append_message): Updated. (imap_copy_message_to): Updated. (imap_move_message_to): Updated. svn path=/trunk/; revision=5098
* Fixed the hack around quoted string responses - should now handle themJeffrey Stedfast2000-08-291-133/+112
| | | | | | | | | | | | | 2000-08-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the hack around quoted string responses - should now handle them according to the specifications in the RFC * providers/imap/camel-imap-stream.c (stream_read): Updated to match the code currently used in camel-imap-folder.c svn path=/trunk/; revision=5092
* If the url path is "/" and the folder path is "/", just LIST "" "*" (thisJeffrey Stedfast2000-08-261-2/+2
| | | | | | | | | | | | 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): If the url path is "/" and the folder path is "/", just LIST "" "*" (this should fix some cyrus imapd problems). Also, INBOX is case insensitive so use g_strcasecmp svn path=/trunk/; revision=5038
* If the url path is "/" and the folder path is "/", just LIST "" "*" (thisJeffrey Stedfast2000-08-261-7/+31
| | | | | | | | | | | 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): If the url path is "/" and the folder path is "/", just LIST "" "*" (this should fix some cyrus imapd problems) svn path=/trunk/; revision=5036
* use BODY.PEEK, not BODY, so we don't set the message \Seen.Dan Winship2000-08-231-1/+1
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so we don't set the message \Seen. svn path=/trunk/; revision=4970
* Whole buncha leak fixes thanks to PurifyMatthew Loper2000-08-171-2/+3
| | | | svn path=/trunk/; revision=4862
* Add support for copying messagesPeter Williams2000-08-161-1/+1
| | | | svn path=/trunk/; revision=4845
* do a strcasecmp rather than just a strcmp when checking if a folder isDan Winship2000-08-141-1/+1
| | | | | | | | | * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): do a strcasecmp rather than just a strcmp when checking if a folder is "INBOX", since it is a case-insensitive name. svn path=/trunk/; revision=4801
* (imap_get_subfolder_names_internal): Add "INBOX" to the list asDan Winship2000-08-131-1/+1
| | | | | | g_malloc'ed memory, not a static string. svn path=/trunk/; revision=4792
* Don't assume the FETCH results will come back in the order they wereDan Winship2000-08-131-2/+2
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_get_summary_internal): Don't assume the FETCH results will come back in the order they were requested. svn path=/trunk/; revision=4791
* Now takes a char * parameter rather than a streamJeffrey Stedfast2000-08-131-2/+2
| | | | | | | | | | | | | | | 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_command_continuation): Now takes a char * parameter rather than a stream (camel_imap_command_continuation_with_stream): Same function as above but takes a stream parameter instead * providers/imap/camel-imap-folder.c (imap_append_message): Use camel_imap_command_continuation_with_stream svn path=/trunk/; revision=4786
* Changed param order a bit and fixed some logicJeffrey Stedfast2000-08-121-21/+39
| | | | | | | | | | | | | 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_command_continuation): Changed param order a bit and fixed some logic * providers/imap/camel-imap-folder.c (imap_append_message): Use the new multi-transactional convenience functions svn path=/trunk/; revision=4766
* New convenience function for multi-transactional commands (openingJeffrey Stedfast2000-08-121-32/+21
| | | | | | | | | | | | 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_command_preliminary): New convenience function for multi-transactional commands (opening request) (camel_imap_command_continuation): New convenience function for multi-transactional commands (followup data) svn path=/trunk/; revision=4762
* If we go over the max number of messages, don't keep requesting newJeffrey Stedfast2000-08-111-13/+17
| | | | | | | | | | 2000-08-10 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): If we go over the max number of messages, don't keep requesting new message summaries, just break. svn path=/trunk/; revision=4705
* Merge with camel-async.Peter Williams2000-08-111-36/+37
| | | | svn path=/trunk/; revision=4687
* A better way to compress leading whitespace. The code is probably invalidNot Zed2000-08-111-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-11 Not Zed <NotZed@HelixCode.com> * camel-mime-parser.c (folder_scan_header): A better way to compress leading whitespace. The code is probably invalid anyway, I dont think it will work across buffer boundaries. * providers/mbox/camel-mbox-folder.c (mbox_append_message): And write out proper format From lines here too. * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_build_from): New function to build a more compatible mbox "From " line. (camel_mbox_summary_sync): Write From lines in the proper format. 2000-08-10 Not Zed <NotZed@HelixCode.com> * providers/mh/camel-mh-store.c (get_folder): Remove warnin g. * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings with constification. * providers/imap/camel-imap-folder.c (imap_append_message): Fixed for append api change. Eek this routine seriously wastes memory. * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt. (mh_append_message): Fix for api change, and include user flags and tags in new message. * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix for search api change. * camel-folder.c (camel_folder_search_free): New function for freeing search results. (search_free): Changed my mind, implement a default that actually does something. Free as to the old interface. (camel_folder_append_message): Changed to accept a camelmessageinfo rather than flags, which just doesn't have enough info in it. (copy_message_to): Change for append_message api change. (move_message_to): Likewise. * providers/mbox/camel-mbox-folder.c (mbox_search_free): Implement. (mbox_append_message): Fix for api change, and also copy user flags/tags across to new summary. * camel-folder-search.c (search_user_tag): A search expression that returns the current use flag by name. (camel_folder_search_free_result): New function to free the result of a search. * camel-folder-summary.c: Bump summary version. (message_info_new): (message_info_load): (message_info_save): (camel_message_info_dup_to): (camel_message_info_free): Added support for arbitrary tag/value pairs (CamelTag's). (camel_tag_get): (camel_tag_set): (camel_tag_list_size): (camel_tag_list_free): Operations for working with CamelTags. svn path=/trunk/; revision=4683
* If we are trying to get a subfolder listing of the root folder, alwaysJeffrey Stedfast2000-08-081-7/+16
| | | | | | | | | | | | | | 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): If we are trying to get a subfolder listing of the root folder, always make sure INBOX is there... * providers/imap/camel-imap-utils.c (imap_parse_list_response): Check for NIL as a directory separator. svn path=/trunk/; revision=4582
* Only call imap_get_summary_internal if the folder can hold messagesJeffrey Stedfast2000-08-041-2/+4
| | | | | | | | | | | | 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only call imap_get_summary_internal if the folder can hold messages * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): Initialize the service_cache for the news/nntp providers svn path=/trunk/; revision=4519
* New and improved sexp parser. An honest try at using e-sexp is wrapped inJeffrey Stedfast2000-08-021-1/+1
| | | | | | | | | | | | | | 2000-08-01 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and improved sexp parser. An honest try at using e-sexp is wrapped in a #ifdef at the bottom of the file but is currently not used * providers/imap/camel-imap-folder.c (imap_search_by_expression): We want to do a UID SEARCH so we get UIDs back instead of sequence numbers svn path=/trunk/; revision=4461
* Some IMAP servers don't wrap the UID in ()'s so don't depend on thatJeffrey Stedfast2000-08-011-18/+18
| | | | | | | | | | 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): Some IMAP servers don't wrap the UID in ()'s so don't depend on that (imap_get_summary_internal): Same svn path=/trunk/; revision=4443
* New convenience function to translate a Camel sexp into the equivalentJeffrey Stedfast2000-08-011-15/+45
| | | | | | | | | | | | | | | | 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-utils.c (imap_translate_sexp): New convenience function to translate a Camel sexp into the equivalent IMAP sexp. * providers/imap/camel-imap-store.c: More places now use imap_next_word * providers/imap/camel-imap-folder.c (imap_search_by_expression): Implemented initial version (this may or may not work quite right) svn path=/trunk/; revision=4428
* Make sure the third word/token (whatever) is "EXPUNGE" and not somethingJeffrey Stedfast2000-07-291-24/+35
| | | | | | | | | | | | | 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_expunge): Make sure the third word/token (whatever) is "EXPUNGE" and not something else like "EXISTS" or "RECENT". When removing the message from the summary also make sure to free that data to avoid leakage. Also make sure to subtract 1 from the 'id' since IMAP starts at 1 and our summary starts at 0 :-) svn path=/trunk/; revision=4411
* fixed a few logic errorsJeffrey Stedfast2000-07-291-6/+6
| | | | svn path=/trunk/; revision=4410
* Cleaned up a bit, now uses imap_next_word() (camel_imap_command_extended):Jeffrey Stedfast2000-07-291-24/+78
| | | | | | | | | | | | | | | | | | | 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned up a bit, now uses imap_next_word() (camel_imap_command_extended): Now uses imap_next_word(). When checking for RECENT, allow the first digit of the recent-count be between 0 and 9 inclusive instead of exclusive. * providers/imap/camel-imap-folder.c (imap_expunge): Optimized. No longer will it need to reload the summary as it now instead removes the appropriate message summaries from the cache. (camel_imap_folder_changed): If recent == 0 then return. If recent < 0 then just emit the folder_changed signal, don't reload summaries. svn path=/trunk/; revision=4409
* Get message count when STATUS is not available. (imap_init):Jeffrey Stedfast2000-07-291-44/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message_count_internal): Get message count when STATUS is not available. (imap_init): folder->has_search_capability is required for IMAP so should always be set to TRUE (is currently being set to FALSE as I've not yet implemented SEARCH support). (camel_imap_folder_changed): Seem to have fixed my optimization hack 2000-07-28 Jon K Hellan <hellan@acm.org> * providers/imap/camel-imap-store.h (CamelImapServerLevel): New enum. (CamelImapStore): Added server_level and has_status_capability members. * providers/imap/camel-imap-store.c (imap_connect): Detect IMAP4REV1, IMAP4 and STATUS in capability response. * providers/imap/camel-imap-folder.c (imap_get_message_count_internal): Use STATUS only if server supports it. TODO: Get message count when STATUS not supported. (imap_get_message, imap_get_summary_internal, imap_get_message_info_internal): Handle IMAP4 as well. (imap_protocol_get_summary_specifier): New function: Make a data item specifier for the header lines we need, appropriate to the server level. svn path=/trunk/; revision=4406
* Fixed my routine to only fetch new headers, my IDs were off by 1 on theJeffrey Stedfast2000-07-281-1/+1
| | | | | | | | | | | | 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Fixed my routine to only fetch new headers, my IDs were off by 1 on the high end, so when it would fetch the last newly arrived message it would fail and end up fetching all of the summaries because of the corruption. svn path=/trunk/; revision=4404
* Added camel-imap-utils.[c,h]Jeffrey Stedfast2000-07-281-55/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/Makefile.am: Added camel-imap-utils.[c,h] * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing server responses for use in both camel-imap-store.c and camel-imap-folder.c * providers/imap/camel-imap-folder.c (imap_get_summary_internal): Free all the pointers in the headers array. (imap_get_subfolder_names_internal): Updated to use imap_parse_list_response (imap_parse_subfolder_list): Removed in favor of imap_parse_list_response * providers/imap/camel-imap-store.c (camel_imap_command_extended): Free all the pointers in the data array. (imap_connect): Updated to use imap_parse_list_response and fixed a leak (folder_is_selectable): Updated. svn path=/trunk/; revision=4400
* Now uses a hash table for looking up message info rather than a linearJeffrey Stedfast2000-07-281-18/+33
| | | | | | | | | 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message_info): Now uses a hash table for looking up message info rather than a linear search :) svn path=/trunk/; revision=4398
* Fixed a few compiler warningsJeffrey Stedfast2000-07-261-2/+2
| | | | | | | | 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings svn path=/trunk/; revision=4345
* Fixed the real problem that Peter was running into.Jeffrey Stedfast2000-07-261-11/+11
| | | | | | | | | 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the real problem that Peter was running into. svn path=/trunk/; revision=4321
* IMAP expunge crash prevention... still not right...Peter Williams2000-07-261-0/+1
| | | | svn path=/trunk/; revision=4316
* Optimized to try and get the new message headers without reloading theJeffrey Stedfast2000-07-251-85/+71
| | | | | | | | | | | | 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Optimized to try and get the new message headers without reloading the entire summary from scratch. (imap_get_summary_internal): Will now sync() before attempting to reload the summary so that flags are set in the reloaded summary as well. svn path=/trunk/; revision=4309
* Updated to give special attention to the root folder.Jeffrey Stedfast2000-07-251-2/+9
| | | | | | | | | | | | | | | 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (get_folder): Updated to give special attention to the root folder. * providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal): Updated to handle the root folder (imap_get_message_count_internal): return 0 if folder can't hold messages (camel_imap_folder_new): Change so that root folder gets special attention and always gets can_hold_messages set to FALSE svn path=/trunk/; revision=4308
* Remove exceptions from a number of methods that work on what ought to beDan Winship2000-07-251-69/+28
| | | | | | | | | | | | | | | * camel-folder.c: Remove exceptions from a number of methods that work on what ought to be static data: get_parent_folder, get_parent_store, get_message_count, get_unread_message_count, get_permanent_flags, get_message_flags, set_message_flags, get_message_user_flag, set_message_user_flag, get_uids, get_summary, get_subfolder_names. Turn camel_folder_delete_message into a macro. (Mostly a pull-up from the camel-async branch.) * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder changes svn path=/trunk/; revision=4303
* Updated to port easily to the new Camel API (imap_init): Don't SELECTJeffrey Stedfast2000-07-251-36/+28
| | | | | | | | | | 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated to port easily to the new Camel API (imap_init): Don't SELECT INBOX, we don't need to do that svn path=/trunk/; revision=4302
* Initialize the summary and subfolder listing. (imap_summary_free): NowJeffrey Stedfast2000-07-251-99/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Initialize the summary and subfolder listing. (imap_summary_free): Now takes a GPtrArray arg rather than a CamelImapFolder as it increases it's usefullness for free()'ing temporary summaries. (imap_get_message_count_internal): A new convenience function for getting the actual message count on a server to be used by imap_get_summary_internal) (imap_get_message_count): Since the Camel API is on the move again, the future version of this function will not be able to make a call to the store, it must only access previously fetched data (thus the creation of the _internal function) (imap_get_subfolder_names_internal): Again, because the future version of imap_get_subfolder_names will not take an exception, we must rename this function which will be called by camel_imap_folder_new() (imap_get_subfolder_names): We now return the previously collected subfolder listing that the _internal function fetched previously (imap_get_summary_internal): Again, same idea as the previous _internal functions... (imap_get_summary): Again... now returns a previously aquired summary * providers/imap/camel-imap-store.c (imap_noop): This will hopefully prevent the imap store from disconnecting. (imap_connect): Modified to add a gtk timeout event that will call imap_noop() every 10 minutes (we may want to change this time value) (imap_disconnect): Modified to remove the NOOP timeout event from the store. (camel_imap_command_extended): Commented out the code that would try and detect if the store was disconnected and then reconnect if it was needed. svn path=/trunk/; revision=4298
* Made it a little more forgiving. Also set current_folder to NULL as thereJeffrey Stedfast2000-07-241-22/+22
| | | | | | | | | | | | | 2000-07-23 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_disconnect): Made it a little more forgiving. Also set current_folder to NULL as there is no selected folder after a disconnect. (stream_is_alive): Detects whether or not a socket is "alive" (camel_imap_command_extended): Use stream_is_alive() to aid in the detection of a disconnected state. svn path=/trunk/; revision=4288
* Clear CamelExceptions when appropriate (eg when folder is marked asJeffrey Stedfast2000-07-231-1/+0
| | | | | | | | | | | | | | 2000-07-22 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (get_folder): Clear CamelExceptions when appropriate (eg when folder is marked as \NoSelect). Still needs some cleanup and perhaps Dan will have a better way of doing this as this seems like a messy way of handling this. * providers/imap/camel-imap-folder.c (imap_get_uids): Took out some debug statements as they are no longer needed. svn path=/trunk/; revision=4275
* Updated to not strip out subfolders that are marked as \NoSelect becauseJeffrey Stedfast2000-07-221-1/+1
| | | | | | | | | | | | | | | | 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_subfolder_names): Updated to not strip out subfolders that are marked as \NoSelect because this will be correctly handled in store->get_folder from now on. * providers/imap/camel-imap-store.c (folder_is_selectable): New convenience function for use in get_folder(). (parse_list_response): Now takes a char **flags argument which is needed by folder_is_selectable(). (imap_connect): Updated to reflect changes to parse_list_response(). svn path=/trunk/; revision=4274
* Oops. Fix UID parser to allow 0 and 9 to be in the range of valid UIDJeffrey Stedfast2000-07-201-2/+2
| | | | | | | | | | 2000-07-20 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to be in the range of valid UID chars. svn path=/trunk/; revision=4233
* General cleanup working towards getting Actions->Expunge workingJeffrey Stedfast2000-07-201-94/+35
| | | | | | | | | | | | | | 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c: General cleanup working towards getting Actions->Expunge working correctly. * providers/imap/camel-imap-store.c (cammel_imap_command_extended): Added code to look for "* %d RECENT" and to emit the folder_changed signal if there are any recent messages. Note: this is a hack and needs to be rewritten badly. svn path=/trunk/; revision=4226
* If the folder's message count is not the same as the number of summaries,Jeffrey Stedfast2000-07-201-9/+20
| | | | | | | | | | 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): If the folder's message count is not the same as the number of summaries, free the old summary and create a new summary. svn path=/trunk/; revision=4223
* Added in imap_[g,s]et_message_user_flag() methods (imap_get_message_info):Jeffrey Stedfast2000-07-191-50/+109
| | | | | | | | | | | | | | | | | | | | | | | 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_class_init): Added in imap_[g,s]et_message_user_flag() methods (imap_get_message_info): Rewrote to use the more efficient way of downloading summary information and also added a UID comparison so that if the UID requested doesn't match the UID received, it returns NULL. FIXME: When the mailer gets NULL when it requested message info, it seems that it displays a row for that message and when you try and select the blank row, it segfaults. * providers/imap/camel-imap-store.c (get_folder): Oops, this should not be checking against "/", it should be checking against dir_sep. * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line): Updated to trim out the leading namespace. (imap_get_subfolder_names): Let the subfolder parser trim the namespace off the folder name. svn path=/trunk/; revision=4215
* Added in imap_[g,s]et_message_user_flag() methodsJeffrey Stedfast2000-07-191-25/+27
| | | | | | | | | | | | | | | | | 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_class_init): Added in imap_[g,s]et_message_user_flag() methods * providers/imap/camel-imap-store.c (get_folder): Oops, this should not be checking against "/", it should be checking against dir_sep. * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line): Updated to trim out the leading namespace. (imap_get_subfolder_names): Let the subfolder parser trim the namespace off the folder name. svn path=/trunk/; revision=4214
* Send a "LOGOUT" command.Jeffrey Stedfast2000-07-181-4/+8
| | | | | | | | | | | | | | | | | | 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_disconnect): Send a "LOGOUT" command. * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and any other servers that send back a UID at the end of each FETCH inside of the main body of the message part). (imap_sync): Un-#if 0 the code that sets the flags on the IMAP server for messages that have changed. Oops, don't mask with DELETED to find out if the message has been answered ;-) (imap_expunge): sync before expunging. svn path=/trunk/; revision=4207
* Hacks to get IMAP code to work with CommunigatePro and MS Exchange (andJeffrey Stedfast2000-07-181-2/+2
| | | | | | | | | | | | | | 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and any other servers that send back a UID at the end of each FETCH inside of the main body of the message part). (imap_sync): Un-#if 0 the code that sets the flags on the IMAP server for messages that have changed. Oops, don't mask with DELETED to find out if the message has been answered ;-) svn path=/trunk/; revision=4202
* oops, s/status/s in imap_sync()Jeffrey Stedfast2000-07-181-2/+2
| | | | svn path=/trunk/; revision=4197
* Hacks to get IMAP code to work with CommunigatePro and MS Exchange (andJeffrey Stedfast2000-07-181-3/+1
| | | | | | | | | | | | | 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and any other servers that send back a UID at the end of each FETCH inside of the main body of the message part). (imap_sync): Un-#if 0 the code that sets the flags on the IMAP server for messages that have changed svn path=/trunk/; revision=4195
* Hacks to get IMAP code to work with CommunigatePro and MS Exchange (andJeffrey Stedfast2000-07-181-6/+6
| | | | | | | | | | | 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and any other servers that send back a UID at the end of each FETCH inside of the main body of the message part). svn path=/trunk/; revision=4194
* minor fixes that came up when building with gcc -ansi -pedanticJeffrey Stedfast2000-07-171-4/+4
| | | | svn path=/trunk/; revision=4184
* All SELECT calls now pass a NULL folder argument toJeffrey Stedfast2000-07-171-4/+4
| | | | | | | | | | | | | 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c: All SELECT calls now pass a NULL folder argument to camel_imap_command_extended() since it's not needed. Also s/camel_imap_command/camel_imap_command_extended as I will probably be doing away with camel_imap_command() or at least only using it for LOGIN and similar commands where the server won't notify us of any recent messages. svn path=/trunk/; revision=4183
* All SELECT calls now pass a NULL folder argument toJeffrey Stedfast2000-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c: All SELECT calls now pass a NULL folder argument to camel_imap_command_extended() since it's not needed. (imap_connect): Moved service_class->connect() to the point right after a connection is established with the server rather than waiting until the end of the function. (camel_imap_command): Updated the documentation comment (camel_imap_command_extended): Before sending a command, first check to make sure we are connected; if we aren't, then reconnect. Don't strncmp() command with "SELECT" as it's redundant. * providers/imap/camel-imap-folder.c: All SELECT calls now pass a NULL folder argument to camel_imap_command_extended() since it's not needed. svn path=/trunk/; revision=4182
* One last fix to get rid of hard-coded "/" directory separatorsJeffrey Stedfast2000-07-151-1/+4
| | | | | | | | | 2000-07-15 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_new): One last fix to get rid of hard-coded "/" directory separators svn path=/trunk/; revision=4175
* Oops, minor fix to make any dir_sep work.Jeffrey Stedfast2000-07-151-2/+2
| | | | svn path=/trunk/; revision=4171
* New convenience function to unquote a string if it's encapsulated by "'sJeffrey Stedfast2000-07-151-15/+28
| | | | | | | | | | | | | 2000-07-14 Jeffrey Stedfast <fejj@helixcode.com> * string-utils.c (string_unquote): New convenience function to unquote a string if it's encapsulated by "'s * providers/imap/camel-imap-folder.c: * providers/imap/camel-imap-store.c: Made the necessary changes to stop using hard coded directory separators. svn path=/trunk/; revision=4170
* If a SELECT fails, set imap_store->current_folder to NULL so a SELECT isJeffrey Stedfast2000-07-141-0/+2
| | | | | | | | | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c: * providers/imap/camel-imap-store.c: If a SELECT fails, set imap_store->current_folder to NULL so a SELECT is forced before any message/folder operations are requested. Also, because some users don't use a namespace, make sure that if the url->path is "/" we don't use it when creating the folder_path. (camel_imap_command[_extended]): Since we allow the passing of a NULL folder which we can use to bypass a forced SELECT, no need to check for the individual commands that don't require a folder to be selected. svn path=/trunk/; revision=4161
* Updated to use CAMEL_IMAP_OK, CAMEL_IMAP_NO, CAMEL_IMAP_BAD, andJeffrey Stedfast2000-07-141-11/+11
| | | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c: * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the ones copied from the POP3 provider. svn path=/trunk/; revision=4155
* Oops. If the number of messages in the folder is 0, don't fetch summariesJeffrey Stedfast2000-07-141-15/+22
| | | | | | | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): Oops. If the number of messages in the folder is 0, don't fetch summaries 1 thru 0, just return an empty summary. (imap_copy_message_to): Fixed to use message UID and also send the source folder as an arg to camel_imap_command rather than NULL. (imap_move_message_to): Same. (imap_init): If SELECT is successful, we need to set the current folder to the one selected, this was causing problems with move/copy svn path=/trunk/; revision=4154
* Oops. If the number of messages in the folder is 0, don't fetch summariesJeffrey Stedfast2000-07-141-0/+6
| | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): Oops. If the number of messages in the folder is 0, don't fetch summaries 1 thru 0, just return an empty summary. svn path=/trunk/; revision=4150
* New and improved approach to fetching an entire folder summary that shouldJeffrey Stedfast2000-07-131-0/+2
| | | | | | | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): New and improved approach to fetching an entire folder summary that should be much much faster than the old way as it gets the entire folder summary in 1 shot rather than requesting message by message. As with the last update, this version also only fetches the minimum number of header fields. (imap_get_summary): Oops, forgot to free the temp GPtrArray *headers svn path=/trunk/; revision=4142
* New and improved approach to fetching an entire folder summary that shouldJeffrey Stedfast2000-07-131-166/+110
| | | | | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): New and improved approach to fetching an entire folder summary that should be much much faster than the old way as it gets the entire folder summary in 1 shot rather than requesting message by message. As with the last update, this version also only fetches the minimum number of header fields. svn path=/trunk/; revision=4141
* Don't fetch the entire RFC822 header, just fetch the fields we want.Jeffrey Stedfast2000-07-131-3/+6
| | | | | | | | | | 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): Don't fetch the entire RFC822 header, just fetch the fields we want. (imap_get_message_info): Same. svn path=/trunk/; revision=4140
* Oops, missed a source file.Jeffrey Stedfast2000-07-131-1/+3
| | | | | | Added #include <e-util/e-util.h> and renamed strstrcase to e_strstrcase in providers/imap/camel-imap-folder.c svn path=/trunk/; revision=4134
* Useful default implementations for free_{uids,subfolder_names,summary}.Dan Winship2000-07-131-13/+3
| | | | | | | | | | | | | * camel-folder.c (camel_folder_free_deep, camel_folder_free_shallow, camel_folder_free_nop): Useful default implementations for free_{uids,subfolder_names,summary}. (free_subfolder_names, free_uids): Make these g_warning-ing default implementations. * providers/*/camel-*-folder.c: Use the new functions where appropriate, remove duplicated code. svn path=/trunk/; revision=4120
* Use mbox_set_message_flags () instead of setting the flags by hand. ThisJeffrey Stedfast2000-07-131-4/+4
| | | | | | | | | | | | | | | | | | | 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com> * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use mbox_set_message_flags () instead of setting the flags by hand. This fixes the problem of the "message_changed" signal not being emitted at the correct time. * providers/imap/camel-imap-folder.c: "folder_changed" signals should pass a third argument (which is ignored). * camel-folder.c: Undo gtk signal emits done in set_flags and expunge. (move_message_to): (copy_message_to): Create info as a const CamelMessageInfo svn path=/trunk/; revision=4118
* Updated to emit the message_changed signal. (imap_delete_message): UpdatedJeffrey Stedfast2000-07-121-3/+13
| | | | | | | | | | | | | | | | 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_set_message_flags): Updated to emit the message_changed signal. (imap_delete_message): Updated to use imap_set_message_flags (). (imap_move_message_to): Updated to use imap_set_message_flags () and to emit the folder_changed signal on the destination folder. (imap_copy_message_to): Updated to emit the folder_changed signal on the destination folder. (imap_append_message): Updated to emit the folder_changed signal on the destination folder. svn path=/trunk/; revision=4105
* Now takes a flags argument to specify the flags to be set on the messageJeffrey Stedfast2000-07-121-6/+16
| | | | | | | | | | | | | | | | | 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder.c (camel_folder_append_message): Now takes a flags argument to specify the flags to be set on the message since we might not necessarily want the flags to be wiped clean. (move_message_to): (copy_message_to): Updated to send a flags argument to append_message (); currently sends the original message's flags. * providers/mbox/camel-mbox-folder.c (mbox_append_message): * providers/imap/camel-imap-folder.c (imap_append_message): Updated. svn path=/trunk/; revision=4099
* This shouldn't return NULL, it should return g_ptr_array_new () so theJeffrey Stedfast2000-07-121-1/+1
| | | | | | | | | | 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_search_by_expression): This shouldn't return NULL, it should return g_ptr_array_new () so the mailer gets what it expects. svn path=/trunk/; revision=4095
* Implemented.Jeffrey Stedfast2000-07-101-0/+29
| | | | | | | | | | | | | | | | 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com> * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): * providers/imap/camel-imap-folder.c (imap_get_unread_message_count): Implemented. * camel-folder.c (camel_folder_get_unread_message_count): New convenience function to allow the mailer to query the number of unread messages in a folder (for displaying message stats in a folder tree?). svn path=/trunk/; revision=4028
* Update to reflect past changes in the Camel API. Use gtk macro castsJeffrey Stedfast2000-07-091-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com> * providers/nntp/camel-nntp-folder.c: * providers/nntp/camel-nntp-utils.c: * providers/nntp/camel-nntp-store.c: Update to reflect past changes in the Camel API. Use gtk macro casts wherever possible and use glib's memory functions instead of standard c's (since they are not compatable) * providers/smtp/camel-smtp-transport.c: * providers/imap/camel-imap-store.c: Wrap debug print statements in a macro * providers/imap/camel-imap-stream.c (stream_read): Make sure that we get up to and including the last \n of the mime part. * providers/imap/camel-imap-folder.c (imap_get_message): Make sure that we get up to and including the last \n of the mime part. Wrap debug print statements in a macro. svn path=/trunk/; revision=3984
* Make this return a GPtrArray rather than a GList.Dan Winship2000-07-081-2/+2
| | | | | | | | | | | | | * camel-folder.c (camel_folder_search_by_expression): Make this return a GPtrArray rather than a GList. * camel-folder-search.c (camel_folder_search_execute_expression): * providers/imap/camel-imap-folder.c (imap_search_by_expression): * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression): * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression): Update to return a GPtrArray rather than a GList. svn path=/trunk/; revision=3958
* Parse for more header information to allow message threading in IMAP.Jeffrey Stedfast2000-07-071-27/+159
| | | | | | | | | | | | | 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for more header information to allow message threading in IMAP. (imap_get_message_info): Same. * camel-folder-summary.c: Renamed summary_format_* to camel_summary_format_* and moved them into public scope. svn path=/trunk/; revision=3925
* Changed over to camel_imap_command_extended as that was the source of theJeffrey Stedfast2000-07-061-10/+8
| | | | | | | | | | 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_append_message): Changed over to camel_imap_command_extended as that was the source of the problems - apparently appending replies with more than just 1 line. svn path=/trunk/; revision=3908
* Fixed the bug that would sometimes leave part of the server responseJeffrey Stedfast2000-07-021-7/+16
| | | | | | | | | | 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the bug that would sometimes leave part of the server response tacked on to the end of the message. svn path=/trunk/; revision=3847
* Renamed _by_uid methods. Since we no longer have get-by-number methods, noJeffrey Stedfast2000-07-011-15/+13
| | | | | | | | | | | | | | | | | | | 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder.c: Renamed _by_uid methods. Since we no longer have get-by-number methods, no need to have the _by_uid extensions. (get_message_by_uid): Renamed to get_message (delete_message_by_uid): Renamed to delete_message (summary_get_by_uid): Renamed to get_message_info * providers/mbox/camel-mbox-folder.c: * providers/pop3/camel-pop3-folder.c: * providers/imap/camel-imap-folder.c: * providers/vee/camel-vee-folder.c: Updated to reflect camel-folder changes. svn path=/trunk/; revision=3843
* New function, to copy a message from one folder to another. The defaultJeffrey Stedfast2000-07-011-14/+37
| | | | | | | | | | | | | | | | | | | | | | 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder.c (camel_folder_copy_message_to): New function, to copy a message from one folder to another. The default implementation just uses append_message, but providers can implement more efficient versions for use when both folders are on the same store. * broken-date-parser.[c,h]: Utilities for parsing broken date strings. * providers/imap/camel-imap-folder.c (imap_move_message_to): (imap_copy_message_to): Implemented. * camel-mime-utils.c (header_decode_date): Wrote some code to try and un-mangle broken date formats and then parse that new string instead. svn path=/trunk/; revision=3841
* Utilities for parsing broken date strings.Jeffrey Stedfast2000-07-011-0/+3
| | | | | | | | | | | 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com> * broken-date-parser.[c,h]: Utilities for parsing broken date strings. * providers/imap/camel-imap-folder.c: fixed some mem leaks svn path=/trunk/; revision=3840
* providers/imap/camel-imap-folder.c: added move_message_to()Jeffrey Stedfast2000-07-011-0/+41
| | | | svn path=/trunk/; revision=3839
* imap_expunge should now give more meaningful errorsJeffrey Stedfast2000-06-301-2/+2
| | | | svn path=/trunk/; revision=3798
* Move the CAPABILITY command here so we don't have to keep checking eachJeffrey Stedfast2000-06-281-27/+5
| | | | | | | | | | | | | | | | | 2000-06-27 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_connect): Move the CAPABILITY command here so we don't have to keep checking each time we open a folder. (camel_imap_command_extended): If we are doing an EXAMINE, don't bother doing a SELECT first. * providers/imap/camel-imap-folder.c (imap_init): Update so folder->has_search_capability depends on the parent IMAP store (since this is really dependant on the IMAP implementation and not the folder) svn path=/trunk/; revision=3767
* providers/imap/camel-imap-[store,folder].c: Improved folder parsingJeffrey Stedfast2000-06-241-5/+8
| | | | svn path=/trunk/; revision=3712
* Oops. Now appends the namespace to the folder before querying for theJeffrey Stedfast2000-06-231-47/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_message_count): Oops. Now appends the namespace to the folder before querying for the number of messages. * providers/imap/camel-imap-store.c (imap_folder_exists): New convenience function for use by imap_create(). (get_folder): If folder is specified as "/", we really want "INBOX". * providers/sendmail/camel-sendmail-provider.c: * providers/vee/camel-vee-provider.c: * providers/smtp/camel-smtp-provider.c: * providers/mbox/camel-mbox-provider.c: * providers/pop3/camel-pop3-provider.c: * providers/imap/camel-imap-provider.c: Updated * camel-session.c: Moved service_cache hash table into the providers. (service_cache_remove): Updated. (camel_session_get_service): Updated. * camel-url.c (camel_url_hash): Took out the hashing of url->passwd. We don't want this anymore. * providers/imap/camel-imap-folder.c (imap_init): Took out references to 'namespace' (camel_imap_folder_init): Same * providers/imap/camel-imap-folder.h: No more namespace. We are instead going to use url->path as the namespace. svn path=/trunk/; revision=3705
* UpdatedJeffrey Stedfast2000-06-231-36/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com> * providers/sendmail/camel-sendmail-provider.c: * providers/vee/camel-vee-provider.c: * providers/smtp/camel-smtp-provider.c: * providers/mbox/camel-mbox-provider.c: * providers/pop3/camel-pop3-provider.c: * providers/imap/camel-imap-provider.c: Updated * camel-session.c: Moved service_cache hash table into the providers. (service_cache_remove): Updated. (camel_session_get_service): Updated. * camel-url.c (camel_url_hash): Took out the hashing of url->passwd. We don't want this anymore. * providers/imap/camel-imap-folder.c (imap_init): Took out references to 'namespace' (camel_imap_folder_init): Same * providers/imap/camel-imap-folder.h: No more namespace. We are instead going to use url->path as the namespace. svn path=/trunk/; revision=3700
* Modified to use the "namespace" (url->path) if it exists.Jeffrey Stedfast2000-06-221-23/+13
| | | | | | | | | | | | | 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_create): Modified to use the "namespace" (url->path) if it exists. * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid): Now just sets the deleted flag on the summary rather than speaking directly to the IMAP server. This is both faster and cleaner. svn path=/trunk/; revision=3688
* IMAP is working! (sorta)Jeffrey Stedfast2000-06-221-6/+117
| | | | | | you can now read your INBOX svn path=/trunk/; revision=3680
* now parses flags gotten from the IMAP server correctlyJeffrey Stedfast2000-06-211-12/+12
| | | | svn path=/trunk/; revision=3654
* Implemented. (imap_sync): Added code to set flags on messages that haveJeffrey Stedfast2000-06-211-3/+62
| | | | | | | | | | | | 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_set_message_flags): Implemented. (imap_sync): Added code to set flags on messages that have had their flags changed (however I #if'd it out until we are more confidant in the IMAP code :) svn path=/trunk/; revision=3652
* Only fetch the summary if the folder summary doesn't already exist. WhenJeffrey Stedfast2000-06-211-20/+31
| | | | | | | | | | | | | | | | | | | | | 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): Only fetch the summary if the folder summary doesn't already exist. When the summary *does* exist, start fetching from 1, not 0. (imap_free_summary): Don't do anything here. (imap_finalize): Free the summary here instead of in imap_free_summary(). * camel-url.c (check_equal): No need to check s1 if s2 is NULL (camel_url_equal): Don't check the passwd component of the url. and in mail/component-factory.c (create_imap_storage): removal of debug statements mail/folder-browser.c (folder_browser_load_folder): improved imap service parser svn path=/trunk/; revision=3649
* Now returns the last line of data that the server sends back as well. ThisJeffrey Stedfast2000-06-211-0/+2
| | | | | | | | | | | | | | | | | | | 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_command_extended): Now returns the last line of data that the server sends back as well. This is needed for commands like SELECT (like Peter pointed out). (camel_imap_command): No longer checks for SELECT (no need) * providers/imap/camel-imap-folder.c: Added namespace stuff which we will need later on... (imap_parse_subfolder_line): Convenience function for use in get_subfolder_names() (imap_get_subfolder_names): Updated. Also changed it to use LIST instead of LSUB (temporary change). svn path=/trunk/; revision=3646
* basically got IMAP into the tree viewJeffrey Stedfast2000-06-201-28/+91
| | | | svn path=/trunk/; revision=3643
* Set summary equal to NULL. (imap_get_summary): Store the summary in theJeffrey Stedfast2000-06-201-11/+34
| | | | | | | | | | | | | | | | | 2000-06-19 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set summary equal to NULL. (imap_get_summary): Store the summary in the ImapFolder (imap_summary_get_by_uid): If we have a summary cache in the ImapFolder, first check to see if that message info is in the cached summary first, if not fetch it directly from the IMAP server and append it to the summary cache. (imap_get_message_flags): Don't free the message info that we get back from summary_get_by_uid as we don't want to be corrupting our cached summary. svn path=/trunk/; revision=3636
* Now gets the message flags as it should. (imap_get_summary): Same asJeffrey Stedfast2000-06-191-16/+122
| | | | | | | | | | | | | | | | 2000-06-18 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): Now gets the message flags as it should. (imap_get_summary): Same as imap_summary_get_by_uid (imap_get_permanent_flags): Return the permanent flags stored on the folder. (imap_get_message_flags): Return message flags associated with given uid. Note: we may want to somehow cache summary info so that we don't have to keep querying the IMAP provider in imap_summary_get_by_uid(). svn path=/trunk/; revision=3626
* We were leaking memory - but not anymore! (imap_get_summary): We now getJeffrey Stedfast2000-06-181-3/+104
| | | | | | | | | | | 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_free_summary): We were leaking memory - but not anymore! (imap_get_summary): We now get the UIDs and the beginnings of the code to get the message flags as well. svn path=/trunk/; revision=3625
* camel/providers/imap/camel-imap-folder.c: CAPABILITY now works like it shouldJeffrey Stedfast2000-06-181-2/+8
| | | | | | | po/POTFILES.in: removed reference to camel/providers/imap/imap.c - this was just a temporary file to use as a reference for IMAP code svn path=/trunk/; revision=3623
* removed imap.c/h from providers/imapJeffrey Stedfast2000-06-181-50/+88
| | | | | | began implementing search functionality svn path=/trunk/; revision=3613
* Added code to expunge if called for (still need to finish coding this).Jeffrey Stedfast2000-06-171-110/+47
| | | | | | | | | | | | | | | | | | 2000-06-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_sync): Added code to expunge if called for (still need to finish coding this). (imap_get_uids): Implemented. (imap_get_summary): Found a way to get the date (imap_summary_get_by_uid): Same. (imap_free_summary): Implemented. * string-utils.c (strstrcase): Fixed a compile warning * providers/imap/camel-imap-summary.c: Removed - we don't need a CamelImapSummary structure. svn path=/trunk/; revision=3606
* Move flag handling from CamelMimeMessage to CamelFolder. ThisDan Winship2000-06-171-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplifies several flag-handling pieces of code in the mailer, and lets you change a message's flags without having to fetch the message body. It also means that fully-constructed CamelMimeMessages are now essentially constant, which will help simplify locking issues later since it means two threads interested in the same message can just work with separate copies of it. * camel-mime-message.h (struct _CamelMimeMessage): Removed flags and user_flags (moved to summary). Removed expunged and message_number which were unused. Removed message_uid and folder which are no longer needed in the new scheme. (struct CamelMimeMessageClass): Removed message_changed signal and get/set_message_number methods. * camel-mime-message.c: Updates for CamelMimeMessage changes. (camel_mime_message_get/set_flags, camel_mime_message_get/set_user_flag): Replaced with methods in CamelFolder. (camel_flag_get, camel_flag_set, camel_flag_list_size, camel_flag_list_free): Moved verbatim to camel-folder-summary.c * camel-folder.c (camel_folder_get/set_message_flags, camel_folder_get/set_message_user_flag): New methods (and corresponding useless default implementations) (camel_folder_class_init): add a message_changed signal * camel-folder-summary.c (camel_flag_get, camel_flag_set, camel_flag_list_size, camel_flag_list_free): Moved here from camel-mime-message.c * providers/mbox/camel-mbox-folder.c (message_changed): Removed. (mbox_get_message_flags, mbox_set_message_flags, mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak summary bits as appropriate. (Functionality moved here from message_changed.) (mbox_get_message_by_uid): Update for CamelMimeMessage changes (less stuff to initialize). * providers/imap/camel-imap-folder.c (message_changed): Remove this. It was just copied from the mbox provider and doesn't deal with the real IMAP flag stuff anyway. (So there's currently no flag support in the IMAP provider.) (imap_get_message_by_uid): Update for CamelMimeMessage changes. * providers/vee/camel-vee-folder.c: (message_changed): Remove old one. Add a new one to listen for message_changed on each folder and re-emit message_changed signals that correspond to messages in the vfolder. (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy flag setting to the underlying real messages. (vee_append_message): Removed for now; there's no way to translate this into the new CamelMimeMessage/CamelFolder scheme, but (a) there's also no code which would ever call it and (b) we're probably going want a better interface than append_message for message drag and drop to work anyway. To be revisited. svn path=/trunk/; revision=3598
* Started to code the imap summary stuffJeffrey Stedfast2000-06-161-7/+83
| | | | svn path=/trunk/; revision=3585
* Kill. Folders are now always open, and handle "closing" sorts ofDan Winship2000-06-161-39/+17
| | | | | | | | | | | | | | | | | | * camel-folder.c: (camel_folder_open, camel_folder_is_open, camel_folder_get_mode): Kill. Folders are now always open, and handle "closing" sorts of operations at sync or finalize time. (camel_folder_sync): renamed from camel_folder_close. Syncs state to the store but doesn't necessarily close/disconnect. * providers/*/camel-*-folder.c: Merge "open" methods into "init" methods. Rename close to sync and update appropriately. * providers/imap/camel-imap-store.c: Remove camel_imap_store_open and camel_imap_store_close, which should not have been copied from the POP provider (where the exist to work around limitations of the POP protocol). svn path=/trunk/; revision=3581
* Updated: a separator is now a char* rather than a single char because IMAPJeffrey Stedfast2000-06-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-14 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder.c (init): Updated: a separator is now a char* rather than a single char because IMAP can have a string for a directory separator. Also, since IMAP does not begin with a directory separator, there is a new argument (path_begins_with_sep) which decides if a directory should begin with a directory separator. * providers/imap/camel-imap-store.c (imap_create): Since, on connect, Camel tries to create INBOX (which already exists on every IMAP provider) we can return TRUE when the folder name is "INBOX". * providers/vee/camel-vee-folder.c (vee_init): Updated. * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated. * providers/mbox/camel-mbox-store.c (get_folder): Updated. * providers/mbox/camel-mbox-folder.c (mbox_init): Updated. * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated. svn path=/trunk/; revision=3559
* IMAP will now allow you to login, and on some IMAP providers it will ↵Jeffrey Stedfast2000-06-141-14/+7
| | | | | | | | | | actually allow you to get mail - however there are some things that might need to be rewritten in Camel to allow all IMAP providers to work right now, it wants to open /INBOX which isn't always the same as INBOX Camel won't seem to allow me to just have it open "INBOX" if I specify '/' as the separator *sigh* svn path=/trunk/; revision=3557
* implemented a temp hack for the imap fetch by uid codeJeffrey Stedfast2000-06-131-12/+31
| | | | | | (works something like the POP code, should be fixed to work like we originally planned) svn path=/trunk/; revision=3540
* Deprecated.Jeffrey Stedfast2000-06-131-4/+20
| | | | | | | | | | | | | | | | | | | 2000-06-12 Jeffrey Stedfast <fejj@helixcode.com> * camel-mime-filter-smtp.c: Deprecated. * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use camel-mime-filter-crlf with my 'dot' extension in place of camel-mime-filter-smtp * camel-mime-part.c (write_to_stream): Updated to reflect changes made to camel-mime-filter-crlf.c * camel-mime-filter-crlf.c (filter): Modified to be able to encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder so that it should no longer get caught in an infinite loop. svn path=/trunk/; revision=3536
* Updated to reflect changes made in camel-imap-store.cJeffrey Stedfast2000-06-101-49/+19
| | | | | | | | | | | | | | | 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect changes made in camel-imap-store.c * providers/imap/camel-imap-store.c (imap_create): No longer checks to make sure a folder doesn't already exists (as this is no longer needed) (camel_imap_command): Now takes a CamelFolder argument so it can detect whether or not it needs to SELECT a folder or not (camel_imap_command_extended): Same. svn path=/trunk/; revision=3494
* Will now always send EHLO first, if that fails it will fall back on HELO.Jeffrey Stedfast2000-06-101-1/+15
| | | | | | | | | | 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always send EHLO first, if that fails it will fall back on HELO. (esmtp_get_authtypes): Should now correctly parse authtypes. svn path=/trunk/; revision=3490
* providers/imap/camel-imap-summary.c now buildsJeffrey Stedfast2000-06-081-3/+3
| | | | svn path=/trunk/; revision=3470
* Added rules to build camel-imap-streamJeffrey Stedfast2000-06-081-78/+11
| | | | | | | | | | | | | | | | | | | | | 2000-06-07 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/Makefile.am: Added rules to build camel-imap-stream * providers/imap/camel-imap-store.c (get_folder): Update. Moved imap_create here. * providers/imap/camel-imap-folder.c (delete_messages): Remove. (imap_create): Removed. (imap_delete): Removed. (imap_exists): Removed. * providers/imap/camel-imap-stream.h: Added typedef's for the stream * providers/imap/camel-imap-stream.c: Modified to build cleanly svn path=/trunk/; revision=3468
* worked on getting providers/imap/* to build cleanly, fixed a number of ↵Jeffrey Stedfast2000-06-071-76/+122
| | | | | | | | stupid errors and things like that am commit'ing code since there are some volunteers that would like to work on imap svn path=/trunk/; revision=3440
* Implemented a few more imap functions in providers/imap/camel-imap-folder.cJeffrey Stedfast2000-05-311-38/+159
| | | | svn path=/trunk/; revision=3286
* Ripped out camel_imap_command_get_additional_data() from camel-imap-store ↵Jeffrey Stedfast2000-05-281-124/+177
| | | | | | and implemented a number of methods in camel-imap-folder svn path=/trunk/; revision=3233
* Added initial code to camel-imap-folder.cJeffrey Stedfast2000-05-261-0/+636
svn path=/trunk/; revision=3211