aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap4/camel-imap4-summary.c
Commit message (Collapse)AuthorAgeFilesLines
* Kill dead filesJP Rosevear2005-01-111-1319/+0
| | | | svn path=/trunk/; revision=28342
* have our own so we don't need to link with glib.Not Zed2004-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-lock-helper.c (g_strerror): have our own so we don't need to link with glib. * providers/*/Makefile.am: Do not install ANY provider header files. No providers are subclassable. No providers are directly linkable. * camel.pc.in: create package config file. * tests/lib/folders.c (test_folder_message_ops): updated counts for delete also marking unread. * tests/lib/camel-test.c (camel_test_provider_init): new api for initialising test system 'in-build'. * camel-provider.c: remove the assertions, init if we need to,k use pthread_once stuff to serialise it. * tests/folder/test3.c (main): remove gtk stuff (???). * tests/*: Fix all the makefiles. Made make-check work 'in-build'. * tests/lib/folders.c (test_folder_counts): update for api changes. (test_message_info): similar. * providers/Makefile.am: removed groupwise from the build, this can't go in here anymore, not in its current state. * camel-net-utils.c (camel_gethostbyaddr_r) (camel_gethostbyname_r): the old e_gethost* calls from e-host-utils.c. 2004-11-15 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-utils.c (imap_path_to_physical): copied from e-path.c. (imap_path_find_folders): copied from e-path.c. * camel.h: remove the provider stuff from the header. * camel-provider.c: globalise provider_init variable, and asserton it in all functions that rely on it. * camel-service.c: removed getaddrinfo/etc. * camel-net-utils.[ch]: separate out camel_getaddrinfo etc. * Makefile.am: split camel into 2 libraries, libcamel and libcamel-store. * camel-multipart-signed.c (camel_multipart_signed_sign) (camel_multipart_signed_verify, prepare_sign): remove old deprecated api. * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt) (camel_multipart_encrypted_decrypt): remove old deprecated api. svn path=/trunk/; revision=28046
* Folder now gets set on the CamelFolderSummary object rather than theJeffrey Stedfast2004-11-131-16/+12
| | | | | | | | | | | | | | | | | | 2004-11-12 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_new): Folder now gets set on the CamelFolderSummary object rather than the CamelIMAP4Summary. (imap4_fetch_all_update): Base summary class now has a folder member, use that instead. (imap4_fetch_all_add): Same. (imap4_summary_fetch_all): Same. (imap4_summary_fetch_flags): Same. (camel_imap4_summary_set_uidvalidity): Same. (camel_imap4_summary_expunge): Same. (camel_imap4_summary_flush_updates): Same. svn path=/trunk/; revision=27908
* ** Merge in notzed-messageinfo-branch, fix some minor conflicts.Not Zed2004-11-121-32/+39
| | | | | | | | 2004-11-12 Not Zed <NotZed@Ximian.com> ** Merge in notzed-messageinfo-branch, fix some minor conflicts. svn path=/trunk/; revision=27898
* #define d()Jeffrey Stedfast2004-11-121-0/+2
| | | | svn path=/trunk/; revision=27892
* removed some debug printf'sJeffrey Stedfast2004-11-111-5/+5
| | | | svn path=/trunk/; revision=27889
* Use the expanded ALL macro as on closer inspection of the RFC, we're notJeffrey Stedfast2004-11-111-10/+4
| | | | | | | | | | | 2004-11-10 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (imap4_summary_fetch_all): Use the expanded ALL macro as on closer inspection of the RFC, we're not allowed to use macros in conjunction with other FETCH items (such as UID in our case). svn path=/trunk/; revision=27888
* Do proper cleanup in case of error and also handle literals.Jeffrey Stedfast2004-11-031-6/+31
| | | | | | | | | 2004-11-02 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (envelope_decode_address): Do proper cleanup in case of error and also handle literals. svn path=/trunk/; revision=27798
* Remove expunged messages from the cache.Jeffrey Stedfast2004-11-021-1/+6
| | | | | | | | | | | | | | | | | | | 2004-11-01 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_expunge): Remove expunged messages from the cache. (camel_imap4_summary_set_uidvalidity): Clear the cache if the UIDVALIDITY has changed. * providers/imap4/camel-imap4-folder.c (imap4_get_message): If the message exists in the cache, use that rather than fetching it from the server and cache messages fetched from the server for later use. (camel_imap4_folder_finalize): Unref the cache if non-NULL. (camel_imap4_folder_new): Create the CamelDataCache. svn path=/trunk/; revision=27784
* Handle literal strings. (envelope_decode_date): Same. Fixes bug #68894.Jeffrey Stedfast2004-10-291-0/+25
| | | | | | | | | | 2004-10-28 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c (envelope_decode_nstring): Handle literal strings. (envelope_decode_date): Same. Fixes bug #68894. svn path=/trunk/; revision=27759
* Removed an already-fixed FIXME comment. (imap4_summary_fetch_flags): Same.Jeffrey Stedfast2004-10-201-8/+0
| | | | | | | | | | 2004-10-19 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c (imap4_summary_fetch_all): Removed an already-fixed FIXME comment. (imap4_summary_fetch_flags): Same. svn path=/trunk/; revision=27630
* kill cast as lvalue warning.Not Zed2004-10-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-10-13 Not Zed <NotZed@Ximian.com> * providers/imap4/camel-imap4-folder.c (camel_imap4_folder_new) (imap4_sync_changes, imap4_sync): * providers/imap4/camel-imap4-summary.c (untagged_fetch_all): kill cast as lvalue warning. * camel-string-utils.h: add prototype for camel_toupper. * providers/imap4/camel-imap4-utils.c: * providers/imap4/camel-imap4-summary.c: * providers/imap4/camel-imap4-folder.c: * providers/imap4/camel-imap4-engine.c: * providers/imap4/camel-imap4-command.c: * providers/imap4/camel-imap4-store.c: include camel-i18n.h. 2004-10-12 Not Zed <NotZed@Ximian.com> ** See bug ??? * providers/nntp/camel-nntp-store.c (connect_to_server): if we have a username, try to authenticate before doing anything else. ** See bug #67895. * providers/nntp/camel-nntp-summary.c (add_range_xover) (add_range_head): use raw_command_auth since we might need auth here. * providers/nntp/camel-nntp-store.c (camel_nntp_raw_command_auth): new almost-raw command that also does auth. (xover_setup, connect_to_server, camel_nntp_command): use raw_command_auth since we might need auth here. 2004-10-12 Not Zed <NotZed@Ximian.com> ** See bug #67898 and probably others. * providers/imapp/camel-imapp-store.c (connect_to_server): * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): * providers/imap4/camel-imap4-store.c (connect_to_server_wrapper): * providers/imap/camel-imap-store.c (connect_to_server_wrapper): * providers/nntp/camel-nntp-store.c (connect_to_server_wrapper): * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Fallback to hard-coded port number if the name lookup fails and no port was supplied. svn path=/trunk/; revision=27562
* Use g_ptr_array_sized_new() rather than using set_size() after creating aJeffrey Stedfast2004-08-141-8/+8
| | | | | | | | | | | 2004-08-13 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (imap4_summary_fetch_all): Use g_ptr_array_sized_new() rather than using set_size() after creating a GPtrArray so that array->len starts out at 0. (imap4_summary_fetch_flags): Same. svn path=/trunk/; revision=26923
* use g_string_append_len when appending a subset of a string rather than ↵Jeffrey Stedfast2004-08-131-7/+7
| | | | | | g_string_append, duh. svn path=/trunk/; revision=26890
* Call camel_operation_progress(). (imap4_summary_fetch_all): Setup info weJeffrey Stedfast2004-08-071-0/+21
| | | | | | | | | | | | 2004-08-06 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (untagged_fetch_all): Call camel_operation_progress(). (imap4_summary_fetch_all): Setup info we need for progress reporting. (imap4_summary_fetch_flags): Same. svn path=/trunk/; revision=26846
* Added a 'first' member to the imap_fetch_all_t struct so we can use thatJeffrey Stedfast2004-06-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-06-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c: Added a 'first' member to the imap_fetch_all_t struct so we can use that as a base offset in our GPtrArray, allowing us to limit resource consumption which could otherwise get quite large. Also added a ChangeInfo member that was needed for changes to untagged_fetch_all(). (imap4_fetch_all_add): Use fetch->first as a base offset and change int i to guint32 i. Also updated to sue the fetch->changes. (imap4_fetch_all_update): Same. (untagged_fetch_all): Same - this is where it is really valuable, since we can avoid adding elements to the GPtrArray that we won't even use. Also needed to change code a big in case index < fetch->first (which could happen if a server notified us of a FLAGS change for a message we didn't request info about). (imap4_fetch_all_free): Free the ChangeInfo. (imap4_summary_fetch_all): Init fetch->changes and fetch->first. (imap4_summary_fetch_flags): Same. (camel_imap4_summary_flush_updates): Only request envelope info if first <= summary->exists. Avoids needless queries. (info_uid_sort): #if 0'd (camel_imap4_summary_flush_updates): No need to sort the summary - this should never have been needed. I can't remember why I did this... svn path=/trunk/; revision=26371
* Added a 'first' member to the imap_fetch_all_t struct so we can use thatJeffrey Stedfast2004-06-171-37/+101
| | | | | | | | | | | | | | | | | | | | | | | 2004-06-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c: Added a 'first' member to the imap_fetch_all_t struct so we can use that as a base offset in our GPtrArray, allowing us to limit resource consumption which could otherwise get quite large. Also added a ChangeInfo member that was needed for changes to untagged_fetch_all(). (imap4_fetch_all_add): Use fetch->first as a base offset and change int i to guint32 i. Also updated to sue the fetch->changes. (imap4_fetch_all_update): Same. (untagged_fetch_all): Same - this is where it is really valuable, since we can avoid adding elements to the GPtrArray that we won't even use. Also needed to change code a big in case index < fetch->first (which could happen if a server notified us of a FLAGS change for a message we didn't request info about). (imap4_fetch_all_free): Free the ChangeInfo. (imap4_summary_fetch_all): Init fetch->changes and fetch->first. (imap4_summary_fetch_flags): Same. svn path=/trunk/; revision=26370
* Flush summary updates for the currently selected folder.Jeffrey Stedfast2004-06-121-1/+1
| | | | | | | | | 2004-06-12 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-store.c (imap4_noop): Flush summary updates for the currently selected folder. svn path=/trunk/; revision=26323
* Don't bother with exists_changed. We don't need it afterall.Jeffrey Stedfast2004-06-121-8/+4
| | | | | | | | | | | | | | | 2004-06-12 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_set_exists): Don't bother with exists_changed. We don't need it afterall. (camel_imap4_summary_flush_updates): Instead of updating flags if update_flags or exists_changed is set, only bother if update_flags is set or if exists is smaller than the summary count (since updating flags is also sueful for determining which messages have been removed). svn path=/trunk/; revision=26322
* Handle getting FLAGS even though we didn't request it (server can send usJeffrey Stedfast2004-06-111-21/+48
| | | | | | | | | | | | | | | | | | | 2004-06-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-folder.c (untagged_fetch): Handle getting FLAGS even though we didn't request it (server can send us FLAGS info if another client changed them recently, for example). Also fixed to handle the fact that not every bit of info has to be in a single untagged FETCH response - it may come in several untagged responses. * providers/imap4/camel-imap4-summary.c (envelope_decode_address): Decode the email address name token. (envelope_decode_nstring): rfc2047 decode strings if requested. (decode_envelope): Request that the subject string be rfc2047 decoded. svn path=/trunk/; revision=26310
* (camel_imap4_summary_flush_updates): Added some logic toJeffrey Stedfast2004-06-111-0/+7
| | | | | | | distinguish between EXISTS value changing because it changed and because messages got expunged. svn path=/trunk/; revision=26302
* Don't bother scanning summary info if EXISTS was 0.Jeffrey Stedfast2004-06-111-3/+29
| | | | | | | | | | | | | | | | | | | | | | 2004-06-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_flush_updates): Don't bother scanning summary info if EXISTS was 0. (camel_imap4_summary_set_uidvalidity): Emit the folder_changed event after clearing the summary. (camel_imap4_summary_expunge): Emit the folder_changed event after removing the message from the summary. (camel_imap4_summary_set_exists): Only set exists_changed if the new and old exists values are different. (imap4_fetch_all_add): Emit a folder_changed signal if any new info's were added. (imap4_fetch_all_update): Emit a folder_changed event if any uids were removed or otherwise updated. (camel_imap4_summary_expunge): Use seqid-1 to determine the actual summary index. svn path=/trunk/; revision=26301
* Don't bother scanning summary info if EXISTS was 0.Jeffrey Stedfast2004-06-111-8/+24
| | | | | | | | | | | | | | | | | | | 2004-06-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_flush_updates): Don't bother scanning summary info if EXISTS was 0. (camel_imap4_summary_set_uidvalidity): Emit the folder_changed event after clearing the summary. (camel_imap4_summary_expunge): Emit the folder_changed event after removing the message from the summary. * providers/imap4/camel-imap4-folder.c (imap4_sync): Flush updates after an EXPUNGE and don't unset expunge if we didn't delete anything (the logic was wrong anyway). (imap4_refresh_info): Implemented. svn path=/trunk/; revision=26300
* Load the entire summary, not just the summary header. This way when theJeffrey Stedfast2004-06-081-1/+3
| | | | | | | | | | | | | | 2004-06-07 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-folder.c (camel_imap4_folder_new): Load the entire summary, not just the summary header. This way when the user opens the folder, we don't do a complete re-sync with the server unnecessarily. * providers/imap4/camel-imap4-summary.c (untagged_fetch_all): New info's always have a uid of "", so don't checkagainst NULL. svn path=/trunk/; revision=26239
* Defined.Jeffrey Stedfast2004-04-071-1/+1
| | | | | | | | | | | | | | | | 2004-04-06 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.h (CAMEL_FOLDER_SUMMARY_TYPE): Defined. * camel-object.h (CAMEL_OBJECT_TYPE): Fixed. * providers/imap4/camel-imap4-folder.c (camel_imap4_folder_utf7_name): Implemented. * providers/imap4/camel-imap4-store.c (imap4_build_folder_info): Use camel_folder_info_build() to build the folder-info tree. svn path=/trunk/; revision=25345
* Implemented.Jeffrey Stedfast2004-03-301-0/+1107
2004-03-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-folder.c (camel_imap4_folder_new): Implemented. * providers/imap4/camel-imap4-engine.c (engine_parse_namespace): If the namespace begins with "INBOX", canonicalise the INBOX portion (ie, make it all caps). * providers/imap4/camel-imap4-store.c (imap4_noop): Implemented. svn path=/trunk/; revision=25237