aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-summary.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed some debug 'warnings', as they should now be displayed at theNot Zed2001-01-231-10/+7
| | | | | | | | | | | | | | | | | | | | | 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
* Add some g_warnings() to help debug later if I ever get the segfaults IJeffrey Stedfast2001-01-181-1/+5
| | | | | | | | | | | | | | | 2001-01-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-summary.c (message_info_load): Add some g_warnings() to help debug later if I ever get the segfaults I was getting earlier. Can't seem to reproduce them after my previous "fix". * camel-folder-summary.c (camel_folder_summary_load): Undid my change here, NotZed said it was wrong and that if it gets a NULL mi then it should abort and not continue. svn path=/trunk/; revision=7609
* Delayed loading of IMAP message parts.Dan Winship2001-01-171-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add "guint32 server_flags" to CamelImapMessageInfo to keep track of theDan Winship2000-12-201-1/+38
| | | | | | | | | | | | | | | | | | * 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
* Handle the case where the summary failed to load - clear the summary andJeffrey Stedfast2000-12-011-2/+6
| | | | | | | | | | | 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
* Simple subclass of CamelFolderSummary that also keeps a UIDVALIDITY valueDan Winship2000-10-131-0/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-summary.c: Simple subclass of CamelFolderSummary that also keeps a UIDVALIDITY value (and doesn't, for the moment, build content info). * providers/imap/camel-imap-folder.c: (various): Use a CamelImapSummary to store/fetch summary info. (camel_imap_folder_new): Take a path to a file to use for the summary. Set the folder's permanent_flags correctly according to the server response. Read in the summary (checking the UIDVALIDITY) and update it if it's out of date. (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all match, update the flags as needed and be done with it. Otherwise, delete messages that have been expunged from the server and fetch full summary info for any new messages. (imap_sync): Save the summary to disk. (imap_update_summary): Renamed from imap_get_summary_internal. Can now be told to get summary for only a subset of messages. Use camel-mime-utils functions rather than rolling our own header parsing. (imap_get_message_info_internal): Merged into imap_update_summary. (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED if we're not actually changing the value of any of the flags. (camel_imap_folder_changed): Deal with EXISTS rather than RECENT. * providers/imap/camel-imap-store.c (imap_connect): Call camel_session_get_storage_path and save the value. (get_folder): Create a local directory to store summary information and pass a summary file name to camel_imap_folder_new. Don't call camel_folder_refresh_info from here any more since camel_imap_folder_new does it again. * providers/imap/camel-imap-command.c (camel_imap_command): Add a special case to this to make it possible to get the repsonses from a SELECT and still have store->current_folder be updated correctly. (imap_read_response): parse EXISTS rather than RECENT * camel-session.c (camel_session_get_storage_path): Use e_mkdir_hier. * camel-folder-summary.c (camel_folder_summary_remove_index): New function. * camel-mime-utils.c (header_raw_append_parse): fix this. (camel-mime-parser.c doesn't use this code because of the MEMPOOL optimization, so nothing was ever actually calling it before.) svn path=/trunk/; revision=5891
* Added code to expunge if called for (still need to finish coding this).Jeffrey Stedfast2000-06-171-771/+0
| | | | | | | | | | | | | | | | | | 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
* providers/imap/camel-imap-summary.c now buildsJeffrey Stedfast2000-06-081-14/+14
| | | | svn path=/trunk/; revision=3470
* moved camel-imap-stream.* to providers/imapJeffrey Stedfast2000-06-071-0/+771
added providers/imap/camel-imap-summary.c svn path=/trunk/; revision=3456