aboutsummaryrefslogtreecommitdiffstats
path: root/camel/tests/folder/test2.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagGNOME_LIBS_1_4_1_4nobody2001-05-231-113/+0
| | | | | | 'GNOME_LIBS_1_4_1_4'. svn path=/tags/GNOME_LIBS_1_4_1_4/; revision=9929
* Subclass CamelSession since we can no longer specify the passwd callbackJeffrey Stedfast2001-05-151-7/+60
| | | | | | | | | | | | | | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * tests/folder/test9.c: * tests/folder/test8.c: * tests/folder/test7.c: * tests/folder/test6.c: * tests/folder/test5.c: * tests/folder/test4.c: * tests/folder/test3.c: * tests/folder/test2.c: * tests/folder/test1.c: * tests/smime/pgp-mime.c: * tests/smime/pgp.c: Subclass CamelSession since we can no longer specify the passwd callback any other way and update code accordingly. svn path=/trunk/; revision=9796
* added some imap tests, tho they dont get far yet and dontMichael Zucci2000-12-041-191/+3
| | | | | | recover automatically. svn path=/trunk/; revision=6772
* Remove assertion that content is there, when it no longer can be.Not Zed2000-11-301-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a missed unref.Not Zed2000-11-291-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Set the info size's properly, oops!Not Zed2000-11-281-0/+241
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