aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox/camel-mbox-parser.c
Commit message (Collapse)AuthorAgeFilesLines
* Compare mbox_file_size and mbox_modtime to the results of stat()ing theDan Winship2000-04-021-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/mbox/camel-mbox-folder.c (_check_get_or_maybe_generate_summary_file): Compare mbox_file_size and mbox_modtime to the results of stat()ing the mbox file, not the summary file. Duh. (_close): Update the summary's mbox_file_size and mbox_modtime before writing it to disk. * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save, camel_mbox_summary_load): Wow. I must have been tired when I wrote this code. First, the comparison bug above. Second, it was using ntohs and htons instead of ntohl and htonl. Third, I was reading the status flag byte in two different places and thus getting out of sync. Fourth, it was writing out field_length bytes of each header field after having converted field_length to network byte order, resulting in lots of random crap being appended, and the summary files being huge. (Fortunately, since the size/modtime comparison was biffed, the garbage summary read from disk was always immediately discarded.) * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix an off-by-one error that caused the last-used UID to be reused if the summary file was regenerated. (That one wasn't my fault. :-) svn path=/trunk/; revision=2279
* Unref the output_stream when done, close doesn't do it. (_append_message):NotZed2000-03-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-03-27 NotZed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-folder.c (_append_message): Unref the output_stream when done, close doesn't do it. (_append_message): Clear all uid's from the appending messages, so they are reassigned proper unique id's. * gmime-utils.c (get_header_array_from_stream): Actually free the header, it is copied elsewhere. 2000-03-26 NotZed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added folder parameter to function. Fixed callers. (index_message): Index a message as it is assigned a unique id. * camel-mime-part.c (my_set_content_id): Make sure we malloc and copy the content_id, otherwise *poof* 2000-03-25 NotZed <NotZed@HelixCode.com> * camel-medium.c (_finalize): Another leak, unref the content if finished with it. * camel-recipient.c (camel_recipient_table_free): Plug another memory leak - actually free the recipient table. * camel-mime-message.c (_finalize): Plugged a memory leak with the flags table. * gmime-utils.c (_store_header_pair_from_string): A simpler, more debuggable and functionally identical header extraction function. 2000-03-24 NotZed <NotZed@HelixCode.com> * gmime-content-field.c (gmime_content_field_set_parameter): Remove the hash table entry before freeing its key and data. svn path=/trunk/; revision=2199
* Tons of fixes to fix thingsBertrand Guiheneuf2000-03-051-1/+1
| | | | svn path=/trunk/; revision=2057
* fix minor typosDan Winship2000-02-161-1/+1
| | | | svn path=/trunk/; revision=1795
* New file, implements the search api for mbox folders.NotZed2000-02-141-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-13 NotZed <notzed@zedzone.helixcode.com> * providers/mbox/camel-mbox-search.c: New file, implements the search api for mbox folders. * providers/mbox/Makefile.am: Link with ibex. * camel-folder.c (camel_folder_has_search_capability): Api additions. (camel_folder_search_by_expression): Ditto. 2000-02-12 NotZed <notzed@zedzone.helixcode.com> * providers/mbox/camel-mbox-folder.c (_set_name): Setup index filename as well. (_init_with_store): Init index filename. Hmm, none of these names ever seem to get free'd (FIXME?) * providers/mbox/camel-mbox-folder.h: Add index file name. 2000-02-12 NotZed <notzed@helixcode.com> * camel-folder.h: Add folder search functions. ** Created ChangeLog just for camel ** - refer to ../ChangeLog for changes prior to this date. svn path=/trunk/; revision=1772
* use the real summary file path instead of a stupid hardcoded one. Fixesbertrand2000-01-231-2/+0
| | | | | | | | | | | | | | | | | 2000-01-22 bertrand <bertrand@helixcode.com> * camel/providers/mbox/camel-mbox-folder.c (_check_get_or_maybe_generate_summary_file): use the real summary file path instead of a stupid hardcoded one. Fixes yet another bug. * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): don't forget to copy the date too. Fix a very annoying bug. * camel/providers/mbox/camel-mbox-folder.c (_append_message): implemented. A lot of fixes too. Works now. (_get_uid_list): implemented. svn path=/trunk/; revision=1609
* added camel-mbox-provider.c to the mbox provider sources.bertrand2000-01-221-29/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-21 bertrand <bertrand@helixcode.com> * camel/providers/mbox/Makefile.am (libcamelmbox_la_SOURCES): added camel-mbox-provider.c to the mbox provider sources. * camel/providers/mbox/camel-mbox-provider.c: provider registration code. * camel/providers/mbox/camel-mbox-folder.c (_get_message_count): implemented (_append_message): implemented * camel/providers/mbox/camel-mbox-parser.c (initialize_buffer): use \0 to mark the end of the buffer. (read_next_buffer_chunk): ditto. (read_header): test the presence of a \0 instead of reading the eof field (read_message_begining): idem. (camel_mbox_parse_file): idem. Remove the eof field from the parser structure. (read_next_buffer_chunk): removed some nasty bugs again. svn path=/trunk/; revision=1604
* implemented.bertrand2000-01-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-19 bertrand <bertrand@helixcode.com> * camel/providers/mbox/camel-mbox-folder.c (_get_message_count): implemented. * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): (camel_mbox_load_summary): save/load the next uid. * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): Compute the next available uid. * camel/providers/mbox/camel-mbox-folder.c (_create): (_check_get_or_maybe_generate_summary_file): Set and use the next_uid field properly. * camel/providers/mbox/camel-mbox-summary.h: added an extra field to store the next available uid. * camel/providers/mbox/camel-mbox-folder.c (_check_get_or_maybe_generate_summary_file): routine called when the folder is opened. Reads or creates the summary file. (_create): initialize the internal summary structure. (_close): save the summary file on closing. (_init_with_store): initialize mbox specific folder members. svn path=/trunk/; revision=1597
* tests for summary and parsing process of mbox files.bertrand2000-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 2000-01-18 bertrand <bertrand@helixcode.com> * tests/test9.c: tests for summary and parsing process of mbox files. * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): do not use case insensitive comp to detect message separators. Kill some nasty bugs in netscape file parsing, * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): don't use g_array_append but write directly inside the array data instead. Better performance and bug fix. * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_load_summary): fix the name and bugs. * camel/camel-folder-summary.h: update the class method definition to match the public defs. svn path=/trunk/; revision=1592
* summary file read/write routines.bertrand2000-01-191-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-18 bertrand <bertrand@helixcode.com> * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): (mbox_load_summary): summary file read/write routines. * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): routine to construct the summary after the mbox file has been parsed and the x-evolution fields inserted. * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): dont use the x_evolution field but rather the uid to determine the presence of "X-Evolution" in the mail. * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): parse the status and uid values if the x-evolution has been found. * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_xev_parse_header_content): return the parsed status field correctly. * camel/providers/mbox/camel-mbox-utils.h: fixed bad prototype. * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): parse and store the "To:" header. * camel/providers/mbox/camel-mbox-parser.h: added a "to" field * camel/camel-folder-summary.c: create the arrays here. * camel/camel-folder-summary.h: the list of summary information is no longer a GList but rather a GArray. Parsing/summary/sync-check is here. Needs testing and integration with the rest of the folder code. svn path=/trunk/; revision=1589
* test for the mbox utils. (copy_file_chunk): fixed a nasty bug.bertrand2000-01-171-1/+1
| | | | | | | | | | | | | | | | | | | 2000-01-17 bertrand <bertrand@helixcode.com> * tests/test9.c (main): test for the mbox utils. (copy_file_chunk): fixed a nasty bug. (camel_mbox_write_xev): create the copy file descriptor with the proper arguments. Exceptions implememnted. (camel_mbox_write_xev): changed the way bytes are counted. No more uses the message size cause it did not take into account the message separators characters. (camel_mbox_write_xev): hopefully fixed the last bugs. works ok now. Summary information / X-Evolution header generation should all work ok now. svn path=/trunk/; revision=1579
* A bunch of new funcs to handle x-evolution private header field.bertrand2000-01-171-8/+27
| | | | | | | | | | | | | | | | | | | 2000-01-17 bertrand <bertrand@helixcode.com> * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): (copy_file_chunk): (camel_mbox_xev_write_header_content): (camel_mbox_xev_parse_header_content): (string_to_flag): (flag_to_string): (string_to_uid): (uid_to_string): A bunch of new funcs to handle x-evolution private header field. Various others modifications and fixes. svn path=/trunk/; revision=1576
* eof is true when no more chars are available, not when we've read thebertrand2000-01-141-19/+104
| | | | | | | | | | | | | | | | | | | | | | | 2000-01-13 bertrand <bertrand@helixcode.com> * camel/providers/mbox/camel-mbox-parser.c (read_next_buffer_chunk): eof is true when no more chars are available, not when we've read the entire file. (initialize_buffer): ditto. (read_message_begining): documented. (read_header): ditto. (new_message_detected): ditto. (advance_n_chars): ditto. (goto_next_char): ditto. (read_next_buffer_chunk): ditto. (initialize_buffer): ditto. (parser_free): ditto. (new_parser): ditto. More parser decoding and clean-ups. Documented all the static routines properly. svn path=/trunk/; revision=1567
* Added the prototype of camel_mbox_parse_file.bertrand2000-01-131-1/+1
| | | | | | | | | | | | | | 2000-01-12 bertrand <bertrand@helixcode.com> * camel/providers/mbox/camel-mbox-parser.h (camel_mbox_parse_file): Added the prototype of camel_mbox_parse_file. * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): updated in-line documentation. Evolution is now in a compilable state. svn path=/trunk/; revision=1565
* corrected a bunch of bugsbertrand2000-01-131-43/+282
| | | | | | | | | | | | | | | | | | | | 2000-01-12 bertrand <bertrand@helixcode.com> * corrected a bunch of bugs * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): parser the subject and date. * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): added the ability to follow the parsing progression. * camel/providers/mbox/camel-mbox-parser.h: parse the x-evolution field. svn path=/trunk/; revision=1563
* Backup of the first clean and working mbox file parser. It both find thebertrand2000-01-121-38/+411
| | | | | | | | | | | 2000-01-11 bertrand <bertrand@helixcode.com> Backup of the first clean and working mbox file parser. It both find the message and pre-parse the message, that is, retrieve some key headers, and the first lines of the body. svn path=/trunk/; revision=1556
* sync before BostonBertrand Guiheneuf2000-01-051-0/+96
svn path=/trunk/; revision=1534