Commit Graph

28 Commits

Author SHA1 Message Date
90d51074c9 New function to copy a header_references structure.
* camel-mime-utils.c (header_references_dup): New function to copy
	a header_references structure.

	* camel-folder-summary.c (camel_message_info_dup_to): New function
	to (deep) copy the data from one CamelMessageInfo into another.
	(camel_message_info_free): And free the data.

	* providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
	(vee_search_by_expression): belatedly update for
	camel_folder_search change.
	(vee_folder_build): belatedly update for camel_folder_search
	change. Use camel_message_info_dup_to and camel_message_info_free
	(in particular, so that we get message_id and references info so
	vfolders can be threaded).
	(vee_folder_build_folder): Ditto.

svn path=/trunk/; revision=4024
2000-07-09 22:40:49 +00:00
941a7e5a30 Parse for more header information to allow message threading in IMAP.
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
2000-07-06 20:52:41 +00:00
a3c2c90d0a Add "Cc" to summary and bump summary version number.
* camel-folder-summary.c: Add "Cc" to summary and bump summary
	version number.

	* camel-folder-search.c (search_header_contains): make "Cc" a
	searchable header.

svn path=/trunk/; revision=3888
2000-07-05 17:59:48 +00:00
6d76cc84a1 Centralize creation of new UIDs for the summary.
svn path=/trunk/; revision=3885
2000-07-04 03:40:58 +00:00
9bc397a131 Get rid of unused function `camel_folder_summary_set_uid()'.
svn path=/trunk/; revision=3882
2000-07-04 02:37:00 +00:00
174d7c38d1 Move flag handling from CamelMimeMessage to CamelFolder. This
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
2000-06-16 23:09:43 +00:00
4cf5bbfa5a If we get a funny result, just throw it out. Basically a fix for the one
2000-06-02  Not Zed  <NotZed@HelixCode.com>

        * camel-mime-utils.c (header_decode_date): If we get a funny
        result, just throw it out.  Basically a fix for the one true
        broken TradeClient.

2000-06-01  Not Zed  <NotZed@HelixCode.com>

        * camel-folder-summary.c (message_info_free): Free
        references/messsage id.
        (message_info_save): Save them.
        (message_info_load): Load them.
        (message_info_new): And get them from the new message.
        (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.

        * camel-folder-summary.h: Added references and messageid to
        summary.

svn path=/trunk/; revision=3391
2000-06-02 18:09:18 +00:00
14bc1cbfc8 All this basically to support user flags in the summary. They are not yet
All this basically to support user flags in the summary.  They
are not yet saved to the message headers (complicates things a bit).

2000-05-17  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
        changes to user flags on the message into the summary as well.

        * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
        Changed version init to include the parent class version info
        (i.e. add it not overwrite it).

        * camel-folder-summary.c (message_info_new): Initialise user_flags
        to empty.
        (message_info_load): And load user flags.
        (message_info_save): And save user flags.
        (message_info_free): And free them.
        (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.

        * camel-folder-summary.h: Added user-flags to summary.

        * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
        use a hashtable for user flags.
        (camel_mime_message_get_user_flag): And changed here too.
        (camel_flag_get): New interface to get a flag from a flag
        list.  Flag lists are easier to work with than hash tables, and
        save memory too.
        (camel_flag_set): And set.
        (camel_flag_list_free): And free.
        (free_key_only): Discard.
        (finalize): Remove the flag list.

svn path=/trunk/; revision=3107
2000-05-17 19:24:24 +00:00
cb13084bc2 > * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
> 	the summary changed also.
>

> 	(camel_mbox_summary_update): Also save summary when done.
> 	(camel_mbox_summary_expunge): Unindex items when deleting them.
> 	(camel_mbox_summary_expunge): Save the index as well as the
> 	summary.

> 	(camel_folder_summary_touch): New function, indicate the summary
> 	info changed.
> 	(camel_folder_summary_remove): Dirty here.

svn path=/trunk/; revision=2994
2000-05-11 20:46:13 +00:00
b7f49ccf57 Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
2000-05-08  NotZed  <NotZed@HelixCode.com>

	* Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.

	* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
	Return status.

	* camel-stream-filter.c (do_close): We NEED a stream close.

svn path=/trunk/; revision=2906
2000-05-08 05:24:54 +00:00
580d885820 Make camel not leak like a sieve.
* camel-object.c: New subclass of GtkObject which is now the base
	of the Camel object hierarchy. Currently the only difference
	between CamelObject and GtkObject is that CamelObjects don't start
	out floating.

	* *.h: Move a bunch of typedefs to camel-types.h. Standardize on
	using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
	or "camel/foo.h". Remove some unneeded includes.

	* camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
	camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
	camel-mime-parser.c, camel-service.c, camel-session.c,
	camel-stream.c: These are now subclasses of CamelObject.

	* camel-data-wrapper.c (set_output_stream):
	* camel-medium.c (set_content_object):
	* camel-seekable-substream.c
	(init_with_seekable_stream_and_bounds):
	* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
	remove gtk_object_sink calls.

	* camel-stream-buffer.c (init_vbuf):
	* camel-stream-filter.c (camel_stream_filter_new_with_stream):
	ref the original stream.

	* camel-folder-summary.c (camel_folder_summary_finalise): unref
	the filters when finalizing.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser,
	camel_mime_part_construct_content_from_parser):
	* camel-mime-part.c (camel_mime_part_set_content): Unref objects
	that are created only to be handed off to other objects. If
	they're going to be needed later, they will have been additionally
	ref'ed by the object that needs them.

	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
	unref the message stream after creating the data from it.

	* camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
	camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
	since its semantics are dubious (what happens when you close a
	stream other people still have references on?).

	* providers/nntp/camel-nntp-store.c:
	* providers/smtp/camel-smtp-transport.c:
	* providers/pop3/camel-pop3-store.c:
	replace camel_stream_close calls with gtk_object_unref.

	* providers/mbox/camel-mbox-folder.c:
	* providers/nntp/camel-nntp-folder.c:
	* providers/sendmail/camel-sendmail-transport.c:
	replace camel_stream_close with camel_stream_flush +
	gtk_object_unref

svn path=/trunk/; revision=2882
2000-05-07 21:56:32 +00:00
f8bfbef0a7 No, we're not going to have g_strcasecmp for no good reason,
not even if its slipped in with no changelog.

2000-05-04  NotZed  <NotZed@HelixCode.com>

	* providers/mbox/camel-mbox-summary.c: Yes, and anotherone.

	* camel-mime-utils.c: And another one.

	* camel-mime-part.c: And another one.

	* camel-mime-part-utils.c: And another one.

	* camel-folder-search.c: And another one.

	* camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.

2000-05-04  NotZed  <NotZed@HelixCode.com>

	* camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
	... re-usable class to summarise and index any stream or message
	and to manage/load/save the created summaries.

	* camel-folder.c: Include string.h to kill a warning.

2000-05-03  NotZed  <NotZed@HelixCode.com>

	* camel-folder.h: Added pos/bodypos/endpos to the basic message
	content info object.  Size to be removed?  Moved the
	messageconentinfo and messageinfo back to camel-folder-summary.h.

	* camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
	New function to (re)set the index to use on a filter.

	* camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
	of inline docs.
	(camel_mime_parser_drop_step): New function to drop a state from
	the parser.  Needs more testing.

svn path=/trunk/; revision=2789
2000-05-04 05:45:30 +00:00
383f245d39 MERGE NEW_PARSER branch into HEAD, fixed conflicts.
2000-04-20  NotZed  <NotZed@HelixCode.com>

	* MERGE NEW_PARSER branch into HEAD, fixed conflicts.

	* gmime-content-field.c (_print_parameter): Duh, removed again
	(@@#$@ cvs merge).

	* camel-mime-utils.c (header_content_type_is): Constify.
	(header_content_type_unref): Killed a couple warnings.

	* camel-folder.c (_init): Removed more log crap.

	* providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
	summary changes.

	* providers/mbox/camel-mbox-folder.c (_get_message_by_number):
	Fixed for new summary interface.  Added a warning for using this
	broken api.
	(_get_message_by_uid): Fixed for message new with session
	vanishing.

svn path=/trunk/; revision=2531
2000-04-20 23:48:45 +00:00
a74c859d8c change the CamelFolderSummary interfaces to allow partial summary queries
* camel-folder-summary.[ch]: change the CamelFolderSummary
	interfaces to allow partial summary queries (for dealing
	with very large folders). Remove the "extended_fields" from
	CamelFolderInfo and CamelMessageInfo: this is better dealt
	with by subtyping.

	* providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
	subclass of CamelFolderSummary. Update interfaces for that. Remove
	the internal/external summary distinction. Remove the (unused) md5
	checksum in the folder summary. Change the summary file format
	(primarily to make it no longer byte-order dependent) and add a
	version number to it so it will be easier to change in the future.

	* providers/mbox/camel-mbox-folder.[ch]
	* providers/mbox/camel-mbox-search.c
	* providers/mbox/camel-mbox-utils.c: update for summary changes

	* camel-exception-list.def: add
	CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID

svn path=/trunk/; revision=2159
2000-03-25 05:18:55 +00:00
d433fb48d2 display message size
2000-03-21  bertrand  <bertrand@helixcode.com>

	* message-list.c (ml_value_at): display message size

2000-03-21  bertrand  <bertrand@helixcode.com>

	* providers/mbox/camel-mbox-summary.c
	(camel_mbox_summary_append_internal_to_external): copy the size field

	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
	message_info to NULL

	* camel-folder-summary.h: added the size field.

	* providers/mbox/camel-mbox-summary.h:
	added the received_date field.

svn path=/trunk/; revision=2133
2000-03-21 15:28:36 +00:00
171c2a9ec5 name change and new fields.
2000-03-21  bertrand  <bertrand@helixcode.com>

	* camel-folder-summary.h: name change and
	new fields.

	* providers/mbox/camel-mbox-search.c: update to
	conform to name change in the summary fields.

svn path=/trunk/; revision=2131
2000-03-21 14:50:12 +00:00
1e7ab47d26 fix the name of "Helix Code, Inc." in all the copyrights
svn path=/trunk/; revision=2091
2000-03-09 19:52:48 +00:00
e72c45d304 New header with the typedefs for all camel classes. Now the class headers
* camel/camel-types.h: New header with the typedefs for all camel
	classes. Now the class headers can just include this and the
	header for the parent type. This makes it possible for
	CamelService to include a CamelSession without creating an
	#include loop.

	* camel/*:
	* composer/e-msg-composer-attachment-bar.h:
	* mail/folder-browser.c:
	* mail/message-list.c: frob #includes to match the new reality

svn path=/trunk/; revision=1850
2000-02-19 01:40:57 +00:00
d44875ac5f tests for summary and parsing process of mbox files.
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
2000-01-19 04:33:14 +00:00
5e4695e717 summary file read/write routines.
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
2000-01-18 19:29:48 +00:00
095c53bace remove non updated tests from the build process.
2000-01-12  bertrand  <bertrand@helixcode.com>

	* tests/Makefile.am (noinst_PROGRAMS):
	remove non updated tests from the build
	process.

	* camel/Makefile.am :
	remove the rfc2047 related files from
	the build process as for the moment, nothing
	has been decided concerning unicode.

	* Makefile.am (evolution_msg_composer_LDADD):
	use $(EXTRA_GNOME_LIBS_THREADS) to link with gthread

svn path=/trunk/; revision=1564
2000-01-13 04:07:33 +00:00
316a4c47ff Updated my e-mail address to reflect my new employment
svn path=/trunk/; revision=1533
2000-01-03 23:05:55 +00:00
331335d12c Fix copyright informations once again
svn path=/trunk/; revision=1489
1999-12-14 22:40:38 +00:00
9663037f6c More work:
- Fixed some Camel API naming issues.
- Moved the message composer stuff to the `composer' directory.

svn path=/trunk/; revision=1395
1999-11-17 15:35:43 +00:00
8fe1aa5f41 Copyright change
svn path=/trunk/; revision=1348
1999-10-23 15:19:51 +00:00
68ceb01f60 Summary files are here and work !!!
1999-09-08  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/providers/MH/mh-summary.c
	(mh_load_summary):
	(mh_save_summary):
	(mh_create_summary):
	implemented summary (files) for MH folders.

	* camel/providers/MH/camel-mh-folder.c
	(_get_message_by_uid): implemented.
	(camel_mh_folder_class_init):
	(_get_message_uid): implemented

svn path=/trunk/; revision=1219
1999-09-08 18:59:27 +00:00
0fe7101224 started summary implementation. (_open): correct use of open.
1999-09-04  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/providers/MH/camel-mh-folder.c (_create_summary):
	started summary implementation.
	(_open): correct use of open.

	* camel/camel-folder.c (camel_folder_get_summary):
	get folder associated summary object.

svn path=/trunk/; revision=1177
1999-09-04 19:33:31 +00:00
eb1b108970 added summary files build
1999-09-04  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/Makefile.am:
	added summary files build

	* camel/camel-folder-summary.[ch]:
	basic summary framework

svn path=/trunk/; revision=1176
1999-09-04 14:48:01 +00:00