Commit Graph

107 Commits

Author SHA1 Message Date
3179eb7162 Fix this to not require NULL-termination of the array.
* camel-folder.c (camel_folder_free_deep): Fix this to not require
	NULL-termination of the array.

svn path=/trunk/; revision=4560
2000-08-07 04:16:26 +00:00
72183d80ec Remove exceptions from a number of methods that work on what ought to be
* camel-folder.c: Remove exceptions from a number of methods that
	work on what ought to be static data: get_parent_folder,
	get_parent_store, get_message_count, get_unread_message_count,
	get_permanent_flags, get_message_flags, set_message_flags,
	get_message_user_flag, set_message_user_flag, get_uids,
	get_summary, get_subfolder_names. Turn camel_folder_delete_message
	into a macro. (Mostly a pull-up from the camel-async branch.)

	* providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
	changes

svn path=/trunk/; revision=4303
2000-07-25 02:42:11 +00:00
8c4533cc2d Remove camel_folder_get_message_uid, which was not used, and not
* camel-folder.[ch]: Remove camel_folder_get_message_uid, which
	was not used, and not implemented by any provider.

	* providers/nntp/camel-nntp-folder.c: Remove get_message_uid
	non-implementation.

svn path=/trunk/; revision=4292
2000-07-24 15:16:09 +00:00
540e1d7671 Useful default implementations for free_{uids,subfolder_names,summary}.
* camel-folder.c (camel_folder_free_deep,
	camel_folder_free_shallow, camel_folder_free_nop): Useful default
	implementations for free_{uids,subfolder_names,summary}.
	(free_subfolder_names, free_uids): Make these g_warning-ing
	default implementations.

	* providers/*/camel-*-folder.c: Use the new functions where
	appropriate, remove duplicated code.

svn path=/trunk/; revision=4120
2000-07-12 20:37:00 +00:00
2872871ac0 Use mbox_set_message_flags () instead of setting the flags by hand. This
2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
	mbox_set_message_flags () instead of setting the flags by hand. This
	fixes the problem of the "message_changed" signal not being emitted
	at the correct time.

	* providers/imap/camel-imap-folder.c: "folder_changed" signals should
	pass a third argument (which is ignored).

	* camel-folder.c: Undo gtk signal emits done in set_flags and
	expunge.
	(move_message_to):
	(copy_message_to): Create info as a const CamelMessageInfo

svn path=/trunk/; revision=4118
2000-07-12 19:28:50 +00:00
d55f9b8a07 Fix bug #378: last displayed message is still shown in an empty folder
svn path=/trunk/; revision=4110
2000-07-12 16:02:02 +00:00
e41d73fabb Fix bug #394: Refiling messages does not update the view
svn path=/trunk/; revision=4109
2000-07-12 15:45:59 +00:00
e0fcbaf71a Now takes a flags argument to specify the flags to be set on the message
2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-folder.c (camel_folder_append_message): Now takes a
	flags argument to specify the flags to be set on the message
	since we might not necessarily want the flags to be wiped clean.
	(move_message_to):
	(copy_message_to): Updated to send a flags argument to
	append_message (); currently sends the original message's flags.

	* providers/mbox/camel-mbox-folder.c (mbox_append_message):
	* providers/imap/camel-imap-folder.c (imap_append_message):
	Updated.

svn path=/trunk/; revision=4099
2000-07-12 00:00:11 +00:00
3e2188235f Implemented.
2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
	* providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
	* providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
	Implemented.

	* camel-folder.c (camel_folder_get_unread_message_count): New
	convenience function to allow the mailer to query the number
	of unread messages in a folder (for displaying message stats
	in a folder tree?).

svn path=/trunk/; revision=4028
2000-07-10 07:30:59 +00:00
011e287e7d Make this return a GPtrArray rather than a GList.
* camel-folder.c (camel_folder_search_by_expression): Make this
	return a GPtrArray rather than a GList.

	* camel-folder-search.c (camel_folder_search_execute_expression):
	* providers/imap/camel-imap-folder.c (imap_search_by_expression):
	* providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
	* providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
	Update to return a GPtrArray rather than a GList.

svn path=/trunk/; revision=3958
2000-07-07 21:13:41 +00:00
03b3618408 New functions to freeze and thaw a folder (to prevent message/folder
* camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
        functions to freeze and thaw a folder (to prevent message/folder
        changed signals in the middle of a long series of operations).
        (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
        (message_changed, folder_changed): Add default implementations
        that stop the emission and record info for later if the folder is
        frozen.

        * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
        from the close->sync change: don't destroy the ibex, summary, and
        search when syncing.

svn path=/trunk/; revision=3863
2000-07-03 01:17:49 +00:00
b950754689 Renamed _by_uid methods. Since we no longer have get-by-number methods, no
2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-folder.c: Renamed _by_uid methods. Since we no longer
	have get-by-number methods, no need to have the _by_uid
	extensions.
	(get_message_by_uid): Renamed to get_message
	(delete_message_by_uid): Renamed to delete_message
	(summary_get_by_uid): Renamed to get_message_info

	* providers/mbox/camel-mbox-folder.c:
	* providers/pop3/camel-pop3-folder.c:
	* providers/imap/camel-imap-folder.c:
	* providers/vee/camel-vee-folder.c: Updated to reflect
	camel-folder changes.

svn path=/trunk/; revision=3843
2000-07-01 04:48:28 +00:00
f278d3041b New function, to copy a message from one folder to another. The default
2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-folder.c (camel_folder_copy_message_to): New function, to
	copy a message from one folder to another. The default
	implementation just uses append_message, but providers can
	implement more efficient versions for use when both folders are on
	the same store.

	* broken-date-parser.[c,h]: Utilities for parsing broken
	date strings.

	* providers/imap/camel-imap-folder.c (imap_move_message_to):
	(imap_copy_message_to): Implemented.

	* camel-mime-utils.c (header_decode_date): Wrote some code to try
	and un-mangle broken date formats and then parse that new string
	instead.

svn path=/trunk/; revision=3841
2000-07-01 01:35:19 +00:00
39361c665a New function, to move a message from one folder to another. The default
* camel-folder.c (camel_folder_move_message_to): New function, to
	move a message from one folder to another. The default
	implementation just uses append_message and delete_message, but
	providers can implement more efficient versions for use when both
	folders are on the same store.

svn path=/trunk/; revision=3832
2000-06-30 20:04:46 +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
4ad1d8f783 document camel_folder_search_by_expression
svn path=/trunk/; revision=3587
2000-06-16 01:27:55 +00:00
cd157eecb9 Kill. Folders are now always open, and handle "closing" sorts of
* camel-folder.c: (camel_folder_open, camel_folder_is_open,
	camel_folder_get_mode): Kill. Folders are now always open, and
	handle "closing" sorts of operations at sync or finalize time.
	(camel_folder_sync): renamed from camel_folder_close. Syncs state
	to the store but doesn't necessarily close/disconnect.

	* providers/*/camel-*-folder.c: Merge "open" methods into "init"
	methods. Rename close to sync and update appropriately.

	* providers/imap/camel-imap-store.c: Remove camel_imap_store_open
	and camel_imap_store_close, which should not have been copied from
	the POP provider (where the exist to work around limitations of
	the POP protocol).

svn path=/trunk/; revision=3581
2000-06-15 22:19:44 +00:00
e4b07cd9d1 Updated: a separator is now a char* rather than a single char because IMAP
2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-folder.c (init): Updated: a separator is now a char* rather than
	a single char because IMAP can have a string for a directory separator.
	Also, since IMAP does not begin with a directory separator, there is a new
	argument (path_begins_with_sep) which decides if a directory should begin
	with a directory separator.

	* providers/imap/camel-imap-store.c (imap_create): Since, on connect,
	Camel tries to create INBOX (which already exists on every IMAP provider)
	we can return TRUE when the folder name is "INBOX".

	* providers/vee/camel-vee-folder.c (vee_init): Updated.

	* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.

	* providers/mbox/camel-mbox-store.c (get_folder): Updated.

	* providers/mbox/camel-mbox-folder.c (mbox_init): Updated.

	* providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.

svn path=/trunk/; revision=3559
2000-06-14 05:10:55 +00:00
4d5427769c Remove exists, create, delete. A CamelFolder now always references an
* camel-folder.c: Remove exists, create, delete. A CamelFolder
	now always references an existing folder. Remove delete_messages
	too since it wasn't being used. Add a "create" flag to
	get_subfolder saying whether or not to create the subfolder if it
	doesn't yet exist.

	* camel-store.c (camel_store_get_folder): Add a "create" flag to
	say whether or not to create the folder if it doesn't yet exist.
	(camel_store_delete_folder): New method, moved from CamelFolder.
	(cache_folder, uncache_folder): Fix up a bit.
	(get_folder_name): Explain what this is for.

	* providers/mbox/camel-mbox-folder.c:
	* providers/mbox/camel-mbox-store.c: Update. Remove support for
	hierarchical folders to simplify this for now, since we're not
	using it, and it's not completely clear how they should work in an
	ELocalStorage world. Needs to be revisited.

	* providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
	* providers/pop3/camel-pop3-store.c (get_folder): Update.

	* providers/vee/camel-vee-folder.c (exists): Remove.
	* providers/vee/camel-vee-store.c (vee_get_folder): Update.

svn path=/trunk/; revision=3453
2000-06-07 00:06:29 +00:00
d6571004c0 Implemented a few more imap functions in providers/imap/camel-imap-folder.c
svn path=/trunk/; revision=3286
2000-05-30 17:41:31 +00:00
2ce4eb74b6 > searchpart = strchr(namepart, '?');
2000-05-19  NotZed  <NotZed@HelixCode.com>

        * camel-simple-data-wrapper.c (construct_from_stream): If we
        already have been constructed, unref our content.
        (write_to_stream): Check we've been constructued, and change for
        stream api changes.

        * camel-mime-parser.c: Removed exception stuff.

        * md5-utils.c (md5_get_digest_from_stream): repaired.

        * camel-mime-message.c: Remove exception from write_to_stream, and
        fix, and fix formatting.

        * providers/sendmail/camel-sendmail-transport.c (_send_internal):
        Fix for stream changes.

        * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
        for stream changes.

        * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
        stream api changes.
        (mbox_append_message): Use stream_close() now its back.
        (mbox_append_message): unref the from filter.

        * camel-stream-mem.c: And here.

        * camel-stream-fs.[ch]: Here too.

        * camel-stream-filter.c: Likewise.  This is getting tedious.

        * camel-stream-buffer.c (stream_write): Fix a few little problems.
        (stream_close): Reimplmeent.
        (camel_stream_buffer_read_line): Slightly more efficient version,
        that also only allocates the right amount of memory for strings.

        * camel-seekable-substream.c: Likewise.

        * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
        changes for stream (re)fixes.  set_bounds returns an error.

        * camel-stream.[ch]: Remove exceptions.  Make flush and reset return
        an error code, repair all the screwed up formatting, and put back
        close.

        * camel-mime-part-utils.c
        (camel_mime_part_construct_content_from_parser): And here.

        * camel-mime-part.c (camel_mime_part_set_content): And this too.
        (write_to_stream): Fixed for stream changes.

        * camel.h: Fixed.

        * providers/vee/camel-vee-folder.c (vee_search_by_expression):
        Implement.  Performs an intersection of the two searches.
        (camel_vee_folder_finalise): Unref search folders.
        (vee_append_message): Implement append.

svn path=/trunk/; revision=3142
2000-05-19 19:58:41 +00:00
a909e956da remove message_number_capability and require uid capatibility.
* camel-folder.c: remove message_number_capability and require uid
	capatibility.
	(camel_folder_list_subfolders, camel_folder_get_uid_list,
	camel_folder_get_subfolder_info, camel_folder_get_message_info):
	removed
	(camel_folder_get_subfolder_names,
	camel_folder_free_subfolder_names): new subfolder interfaces.
	(camel_folder_get_uids, camel_folder_free_uids): new uid
	interfaces
	(camel_folder_get_summary, camel_folder_free_summary): new summary
	interfaces

	* providers/mbox/camel-mbox-folder.c,
	* providers/nntp/camel-nntp-folder.c:
	* providers/vee/camel-vee-folder.c: Update for changes

	* providers/pop3/camel-pop3-folder.c: Implement get_uids, update
	for other changes.

svn path=/trunk/; revision=3126
2000-05-19 00:47:36 +00:00
9eda0faddf Remove unused async open/close and copy_message_to functions. Rename
* camel-folder.c: Remove unused async open/close and
	copy_message_to functions.
	Rename functions without initial _. Fix glib preconditions and
	gtk-doc comments.

svn path=/trunk/; revision=3116
2000-05-18 02:24:30 +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
44575d972d > * gmime-utils.[ch]: What the hell, remove it. This will break the
> 	nntp provider (but its broken anyway).  The mime parser can be
>	used instead though.
> 	Removed from all code including it (but none were using it).
>
> 	* gmime-utils.c (_store_header_pair_from_string): Removed bizarre
> 	string_dichotomy version of this.  This code is somewhat redundant
> 	now, and is headed for death anyway.
>
> 	* gstring-util.c (g_string_dichotomy): Same with this one.
> 	(g_string_clone): Removed a memory leak, g_string_new() allocates
> 	its own memory.
> 	(g_string_append_g_string): Allow to append an empty gstring onto
> 	another gstring, dont abort()!
>
> 	* string-utils.c (string_dichotomy): Removed this incredibly weird
> 	function.
>
> 	* camel-folder.c (_create): Replaced the rather obtuse use of
> 	"string_dichotomy" function with a simple strrchr().  Still not
> 	sure it'll work.
>
> 	* camel-folder-summary.c: cvs removed a long-removed file.

svn path=/trunk/; revision=2753
2000-05-02 20:37:06 +00:00
e321500049 Deleted messages properly get removed from the index.
A new folder signal for gui/etc's to track changes.

	(camel_mbox_summary_expunge): Oops, my wrong, use the string uid
	to unindex on.
	(mbox_expunge): Emit a folder_changed signal on expunge (uh, even
	if it didn't ...)
	(camel_folder_class_init): Added a folder_changed signal.

svn path=/trunk/; revision=2745
2000-05-02 03:32:23 +00:00
2cc9dabf78 > (camel_folder_expunge): Changed to only allow expunge on an open
> 	folder.  It doesn't make sense for mbox, otherwise (?)

svn path=/trunk/; revision=2743
2000-05-02 02:59:01 +00:00
896c775a52 Removed search_id.
* providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
	search_id.

	* providers/mbox/camel-mbox-search.c
	(camel_mbox_folder_search_cancel): Remove.d
	(camel_mbox_folder_search_complete): Removed.
	(camel_mbox_folder_search_by_expression): Changed back to sync
	api.
	(struct _searchcontext): Removed cancelled flag.
	(find_context): Removed.

	* providers/mbox/camel-mbox-search.h
	(camel_mbox_folder_search_by_expression): Moved back to sync api.

	(camel_folder_search_complete): Removed.
	(camel_folder_search_cancel): Removed.
	(CamelFolderClass): New function summary_get_by_uid() to get a single
	summary.
	(*search*): Moved back to synchronous search api ... *sigh*

svn path=/trunk/; revision=2723
2000-05-01 21:50:46 +00:00
fed684880e More message cleanup. Flags now work, are saved, and the delete
flag causes an expunge to expunge the deleted messages.

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

        * providers/mbox/camel-mbox-summary.c
        (camel_mbox_summary_set_flags_by_uid): New function to update the
        flags in the summary.
        (camel_mbox_summary_expunge): Expunge messages from a folder.
        (offset_content): Re-align offsets of summary when messages
        added/removed to an existing summary.
        (camel_mbox_summary_remove_uid): Remove a message summary entry by
        uid.
        (index_folder): Restore flags from X-Evolution header, if they are set.

        * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
        Connect to the message_changed signal.
        (_init): Set permanent flags to something reasonable.  No user
        flags yet ...
        (message_changed): If the flags of the message change, update the
        flags in the summary.
        (mbox_expunge): Implement the expunge.
        (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s

        * camel-folder.c (_finalize): Uh, dont free permanent_flags
        anymore (this wouldn't failed anyway, it was a GList !!!)

        * camel-folder.h (struct _CamelFolder): Change permanent_flags to
        a bitfield.
        (list_permanent_flags): Renamed to get_permanent_flags, and
        returns a bitfield.
        (camel_folder_expunge): Changed expunge to a void type.  The
        messages would no longer be useful after they have been removed
        ...

        * camel-mime-message.c (set_flag): Removed.
        (camel_mime_message_set_flag): Removed.
        (get_flag): Removed.
        (camel_mime_message_get_flag): Removed.
        (add_flag_to_list): Removed.
        (get_flag_list): Removed.
        (camel_mime_message_get_flag_list): Removed.
        (camel_mime_message_get_flags): New interface to get system flags.
        (camel_mime_message_set_flags):  " to set ".
        (camel_mime_message_get_user_flag): To get a user flag.
        (camel_mime_message_set_user_flag): To set a user flag.
        (finalize): Hmm, the old one free'd the key and data, not good
        when the data is a boolean ...

svn path=/trunk/; revision=2716
2000-05-01 19:47:12 +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
fe97fa2fbb kill camel-log
svn path=/trunk/; revision=2487
2000-04-18 19:05:15 +00:00
f3f2afef4c Reorganize the folder-fetching methods and implement a folder cache so
2000-04-06  Dan Winship  <danw@helixcode.com>

	* camel-store.[ch]: Reorganize the folder-fetching methods and
	implement a folder cache so that multiple requests for the same
	folder will yield the same CamelFolder object (as long as it
	remains active). Includes some code to remove no-longer-active
	folders from the cache, but it doesn't get used since nothing is
	ever unref'ed in Camel right now...

	* providers/mbox/camel-mbox-store.c:
	* providers/pop3/camel-pop3-store.c: update for CamelStore
	changes.

	* camel-folder.[ch]: Remove the (unused) CamelException argument
	from camel_folder_get_name and camel_folder_get_full_name.
	(camel_folder_set_name): make this go away since changing a
	folder's name after it has been created could result in it
	conflicting with a separately-issued folder.

svn path=/trunk/; revision=2314
2000-04-06 20:10:05 +00:00
c7ae879700 fix warnings
svn path=/trunk/; revision=2217
2000-03-28 21:12:12 +00:00
15287c0ce6 add delete_message_by_{number,uid}.
* camel-folder.[ch]: add delete_message_by_{number,uid}.

	* providers/pop3/camel-pop3-folder.[ch]: implement
	delete_message_by_uid. Add a close method to do expunging
	of deleted messages if requested.

	* providers/pop3/camel-pop3-store.[ch]: support for
	CamelPop3Folder::close. (You have to close the connection
	in order to expunge the folder, thus the store may be
	connected in the CamelService::is_connected sense when it
	is not actually connected to the server.) Also some bugfixes.

svn path=/trunk/; revision=2203
2000-03-28 01:57:59 +00:00
6a76635141 Added async search api.
2000-03-22  NotZed  <NotZed@HelixCode.com>

        * camel-folder.[ch]: Added async search api.

        * providers/mbox/camel-mbox-search.c
        (camel_mbox_folder_search_by_expression): Changed to use an
        asynchronous interface.
        (camel_mbox_folder_search_cancel): Cancel function for async
        interface.

svn path=/trunk/; revision=2155
2000-03-23 19:57:31 +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
bbbee6ba11 No, its not a fatal error to search on a non-searchable folder, you just
2000-02-28  NotZed  <NotZed@HelixCode.com>

        * camel-folder.c (camel_folder_search_by_expression): No, its not
        a fatal error to search on a non-searchable folder, you just dont
        get any matches.
        (_open): Dont open an opened folder (i dont see why this is really
        a bug, but what the hell ...)

        * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
        (_open): Call parent class to perform open.  Remove folder-open
        check to parent instead.

svn path=/trunk/; revision=1984
2000-02-28 20:10:54 +00:00
ac659fe698 remove some camel_store_get_separators that I missed before
svn path=/trunk/; revision=1925
2000-02-24 23:40:39 +00:00
4ec5c4b998 Move "separator" from camel-store to camel-folder, since it can vary from
location to location in an IMAP store. Rename CamelFolder::init_with_store
to init and add parent_folder, name, and separator arguments.

svn path=/trunk/; revision=1919
2000-02-24 16:43:09 +00:00
55e6218d59 use CamelExceptions for run-time errors, not incorrect code. Don't bother
* camel-folder.c: use CamelExceptions for run-time errors, not
	incorrect code. Don't bother validating that an object exists from
	inside one of its methods, since you couldn't have gotten there if
	it didn't. Fix some code style bugs.

svn path=/trunk/; revision=1918
2000-02-24 16:25:23 +00:00
f65a2d78c6 fix to show a sample correct implementation.
2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>

	* message-list.c (message_list_set_folder):
	fix to show a sample correct implementation.

	* camel-folder.c (camel_folder_get_subfolder):
	(camel_folder_create):
	(camel_folder_delete):
	(camel_folder_delete_messages):
	(camel_folder_list_subfolders):
	(camel_folder_expunge):
	(camel_folder_get_message_by_number):
	(camel_folder_get_message_count):
	(camel_folder_append_message):
	(camel_folder_copy_message_to):
	(camel_folder_get_summary):
	(camel_folder_get_message_uid):
	(camel_folder_get_message_by_uid):
	(camel_folder_get_uid_list):
	Check folder state (open/close) and raise an
	exception if it is not ok.

	* providers/mbox/camel-mbox-folder.c (_create):
	create the file and the path with two different
	names.

	* camel-folder.c (_create): handle the case
	when the folder name starts with '/'

	* camel-exception.c (camel_exception_new): use
	(void) instead of () in decl.

	* camel-exception.h: cosmetic fixes.

	* camel-exception.c (camel_exception_init): new routine.
	Fix a bug in mail/message-list.c


	* camel-folder.h: cosmetic changes.

	* camel-stream-b64.c (reset__static): added a
	reset method. Thanks message-browser to find
	so much bugs :)

	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
	Unicode libs.

Fixes and exception handling in camel-folder.
Fixes in mail/evolution-mail to make it not
segfault and to demonstrate a correct implementation.

svn path=/trunk/; revision=1902
2000-02-22 11:16:36 +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
39400a38c7 use camel_stream_reset instead of seek. The formatter should be able to
2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-formatter.c (handle_text_plain):
	(handle_text_html): use camel_stream_reset instead
	of seek. The formatter should be able to work
	with all streams, not only seekable streams.
	In the case where some provider implementation
	would not be able to provide a reset method
	to their stream, implementors would have
	to find a workaround.

	* camel/camel-session.c (camel_session_new): use
	(void) instean of () in function decl.

	* camel/camel-folder.c: ifdef async operation
	related code.

	* camel/camel-seekable-stream.c (_seek): added a warning.
	(_reset): default implementation of reset for seekable
	stream.

	* camel/camel-mime-message.h: set_received_date declaration fix.
	cosmetic changes.

	* camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
	use (void) instead of ().

	* camel/camel-stream.c (camel_stream_reset):
	new method for CamelStream.

svn path=/trunk/; revision=1835
2000-02-17 22:16:33 +00:00
aeaa2ed700 New file, implements the search api for mbox folders.
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
2000-02-14 05:39:02 +00:00
15e6a36cef implemented. A lot of fixes too. Works now.
2000-01-22  bertrand  <bertrand@helixcode.com>

	* camel/providers/mbox/camel-mbox-folder.c (_append_message):
	implemented. A lot of fixes too. Works now.

svn path=/trunk/; revision=1608
2000-01-22 19:52:46 +00:00
84423c930e test the mbox provider.
2000-01-21  bertrand  <bertrand@helixcode.com>

	* tests/test10.c:
	test the mbox provider.

	* camel/camel-folder.c (_set_name):
	if camel_folder_get_mode returns an
	exception, return it instead of
	overriding it with a new one.
	(camel_folder_is_open): make the is_open
	method public.
	(_set_name): use the is_open instead of
	get_mode.
	(_set_name): set the fullname even in the case
	where the folder has no parent.
	(_set_name): use %c, not %d to add the
	separator char into the full path.

svn path=/trunk/; revision=1606
2000-01-22 02:58:12 +00:00
e8a2fed920 add exception handling everywhere in the store related functions
2000-01-21  bertrand  <bertrand@helixcode.com>

	* camel/camel-store.c: add exception handling everywhere in
	the store related functions arguments.
	* camel/providers/mbox/camel-mbox-folder.c: idem
	* camel/providers/mbox/camel-mbox-folder.h: idem
	* camel/providers/mbox/camel-mbox-store.h: idem

	* camel/providers/mbox/Makefile.am (libcamelmbox_la_SOURCES):
	added camel-mbox-provider.c to the mbox provider
	sources.

svn path=/trunk/; revision=1605
2000-01-22 01:35:11 +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
fe17c00980 part of the mbox provider.
1999-12-22  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/providers/mbox/camel-mbox-store.h:
	* camel/providers/mbox/camel-mbox-store.c:
	* camel/providers/mbox/camel-mbox-folder.h:
	* camel/providers/mbox/camel-mbox-folder.c:
	part of the mbox provider.

svn path=/trunk/; revision=1510
1999-12-21 23:17:03 +00:00