Commit Graph

59 Commits

Author SHA1 Message Date
234e613bc3 New code to keep an on-disk cache of what UIDs have been seen in a folder.
* camel-uid-cache.c: New code to keep an on-disk cache of what
	UIDs have been seen in a folder.

	* camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
	can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
	(you can work with mail directly without needing to copy it local).

	* providers/*/camel-*-provider.c: Add flags as needed: imap and
	mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
	just SOURCE.

	* camel-mime-message.c (process_header): Add another subject
	g_strstrip that fejj's earlier commit missed.

svn path=/trunk/; revision=4616
2000-08-09 00:07:56 +00:00
34de93822b Indexes into the flags array are message_number minus 1, not just
* providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
	(pop3_sync): Indexes into the flags array are message_number minus
	1, not just message_number.

svn path=/trunk/; revision=4533
2000-08-04 18:40:38 +00:00
6165277ab5 add a debugging macro for doing protocol tracing.
* providers/pop3/camel-pop3-store.c: add a debugging macro for
        doing protocol tracing.

svn path=/trunk/; revision=4526
2000-08-04 04:36:19 +00:00
268f0e60b2 Fix Makefile.am booboo.
svn path=/trunk/; revision=4394
2000-07-27 17:01:05 +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
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
bd3e2e1b65 Fix a bug in error-setting code. (pop3_connect): Don't re-prompt for
* providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
	bug in error-setting code.
	(pop3_connect): Don't re-prompt for password in the KPOP case.
	(pop3_get_response): New function, split out from
	camel_pop3_command.
	(connect_to_server): Use pop3_get_response to parse the greeting
	message, and error out appropriately if it's -ERR.

svn path=/trunk/; revision=3869
2000-07-03 14:36:40 +00:00
98753e92d2 New method, to return an end-user-friendly name corresponding to a
* camel-service.c (camel_service_get_name): New method, to return
	an end-user-friendly name corresponding to a service. (eg, "POP
	service for danw on trna.helixcode.com").

	* providers/imap/camel-imap-store.c,
	providers/mbox/camel-mbox-store.c,
	providers/nntp/camel-nntp-store.c,
	providers/pop3/camel-pop3-store.c,
	providers/sendmail/camel-sendmail-transport.c,
	providers/smtp/camel-smtp-transport.c: Implement.

svn path=/trunk/; revision=3851
2000-07-01 23:07:18 +00:00
00d1c1c333 fix the CAPA-parsing code to not get into an infinite loop.
* providers/pop3/camel-pop3-store.c (connect_to_server): fix the
	CAPA-parsing code to not get into an infinite loop.

svn path=/trunk/; revision=3849
2000-07-01 22:10:22 +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
f8a8fc9e73 Changed to keep prompting user for a valid password until it either
2000-06-28  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-store.c (imap_connect): Changed to
	keep prompting user for a valid password until it either
	authenticates or until Canceled by the user.
	(camel_imap_command_extended): Improved speed (replaced the
	g_strjoinv call with a faster implementation)

	* providers/pop3/camel-pop3-store.c
	(camel_pop3_command_get_additional_data): Fixed.
	(pop3_connect): Changed to keep prompting the user for a
	password until it either works or until Canceled by the user.

svn path=/trunk/; revision=3783
2000-06-29 03:07:39 +00:00
a7f40b2f5f Updated
2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/sendmail/camel-sendmail-provider.c:
	* providers/vee/camel-vee-provider.c:
	* providers/smtp/camel-smtp-provider.c:
	* providers/mbox/camel-mbox-provider.c:
	* providers/pop3/camel-pop3-provider.c:
	* providers/imap/camel-imap-provider.c: Updated

	* camel-session.c: Moved service_cache hash table into the
	providers.
	(service_cache_remove): Updated.
	(camel_session_get_service): Updated.

	* camel-url.c (camel_url_hash): Took out the hashing of
	url->passwd. We don't want this anymore.

	* providers/imap/camel-imap-folder.c (imap_init): Took out
	references to 'namespace'
	(camel_imap_folder_init): Same

	* providers/imap/camel-imap-folder.h: No more namespace. We are
	instead going to use url->path as the namespace.

svn path=/trunk/; revision=3700
2000-06-22 21:51:40 +00:00
36f9a55056 Fix dumb bug.
* providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
	bug.

svn path=/trunk/; revision=3682
2000-06-21 22:28:30 +00:00
4f20138bfc flush the filter stream before unreffing it, so it will
* camel-mime-part.c (write_to_stream): flush the filter stream
	before unreffing it, so it will camel_mime_filter_complete.

	* camel-stream-filter.c (camel_stream_filter_class_init): Fix a
	braino so camel_stream_flush works here.

	* camel-stream-mem.c (stream_seek): Fix a bug that resulted in
	large attachments being silently dropped.

	* providers/pop3/camel-pop3-store.c
	(camel_pop3_command_get_additional_data): Don't use g_strjoinv
	here, since it is O(n^2) on the length of the output string, and
	we can do O(n).

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): add a CRLF decoder
	after the QP/B64 decoder if it's text.

svn path=/trunk/; revision=3658
2000-06-21 02:09:48 +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
49b37933f9 Check server for various interesting extensions.
* providers/pop3/camel-pop3-store.c (connect_to_server): Check
	server for various interesting extensions.

	* providers/pop3/camel-pop3-folder.c (get_uids): If the server
	supports UIDL, use real UIDs rather than fake ones.
	(etc): Map uids back to numbers appropriately

svn path=/trunk/; revision=3578
2000-06-15 19:38:00 +00:00
477a592e59 Took out the filter code ( we already filter in
* providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
	filter code ( we already filter in camel_pop3_command_get_additional_data)

svn path=/trunk/; revision=3560
2000-06-14 05:10:56 +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
ee7f4d32f9 pop provider now uses the crlf filter
svn path=/trunk/; revision=3538
2000-06-12 23:20:16 +00:00
94eda6b11d don't pass a second (incorrect) -rpath in addition to the (correct) one
* providers/*/Makefile.am: don't pass a second (incorrect) -rpath
	in addition to the (correct) one automatically provided by
	automake.

svn path=/trunk/; revision=3535
2000-06-12 20:59:32 +00:00
2aefadf282 Add another argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
* camel-session.c (camel_session_query_authenticator): Add another
	argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
	CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
	bad info.

	* providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
	password if it doesn't work.

svn path=/trunk/; revision=3496
2000-06-09 22:00:53 +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
7a5b5c31e4 Fun with purify.
* providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
	success as well as failure.
	(camel_pop3_command_get_additional_data): free buf after reading
	the last line (".").

	* providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
	body data after creating the memstream from it (which will copy
	the data).

	* providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
	and index paths.

	* camel-data-wrapper.c (finalize): unref the stream, if it exists.

svn path=/trunk/; revision=3381
2000-06-02 06:34:58 +00:00
3cc160e17b diff -r1.206 ChangeLog
2a3,9
> 	* camel-store.c (camel_store_init): Move it to here.  If this
> 	level is going to maintain it, it should set it up.  Lets see what
> 	caching folders breaks :(
>
> 	* providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
> 	init folder cache here.
>
7a15,16
> 	(camel_mbox_summary_expunge): Remove some debug, and dont offset
> 	frompos?

svn path=/trunk/; revision=3274
2000-05-30 01:05:18 +00:00
28a05ec767 Add a domain field to CamelProvider, to say what kind of data it provides.
* camel-provider.h: Add a domain field to CamelProvider, to say
	what kind of data it provides.

	* providers/imap/camel-imap-provider.c:
	* providers/mbox/camel-mbox-provider.c:
	* providers/pop3/camel-pop3-provider.c:
	* providers/sendmail/camel-sendmail-provider.c:
	* providers/smtp/camel-smtp-provider.c: Set domain to "mail".

	* providers/nntp/camel-nntp-provider.c: Set domain to "news".

	* providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
	it doesn't end up being listed as a potential mail source in the
	mail config wizard.)

svn path=/trunk/; revision=3254
2000-05-28 21:29:28 +00:00
4e5eac84a0 (connect_to_server): Remove port number from error message since
it's not terribly useful and we were getting it from the wrong
	place anyway.

svn path=/trunk/; revision=3252
2000-05-28 20:03:05 +00:00
c3b178dc06 Split apart password and APOP auth, since some servers seem to do both,
* providers/pop3/camel-pop3-store.c: Split apart password and APOP
	auth, since some servers seem to do both, but don't really.
	(connect_to_server): Renamed from try_connect. Now actually does
	the connection up to the point of checking the greeting for APOP
	support.
	(query_auth_types): Return APOP, if appropriate. Call
	pop3_disconnect after connect_to_server since we don't really want
	to be connected.
	(pop3_connect): Use connect_to_server rather than duplicating
	code. Fix a one-byte buffer overrun in the APOP code.
	(pop3_disconnect): Make this able to clean up after a partial
	connect.

svn path=/trunk/; revision=3250
2000-05-28 18:05:23 +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
65ec43cb55 Use CamelException to signal failure. (camel_stream_write_strings):
* camel-stream.c (camel_stream_read, camel_stream_write,
	camel_stream_flush, camel_stream_reset, camel_stream_printf,
	camel_stream_write_to_stream): Use CamelException to signal
	failure.
	(camel_stream_write_strings): Remove. camel_stream_printf is more
	useful in most of the places that used this.
	(camel_stream_write_string): Change from macro to function to
	prevent problems with double-evaluation.

	* camel-seekable-stream.c (camel_seekable_stream_seek,
	camel_seekable_stream_set_bounds): Use CamelException.
	(reset): Update.

	* camel-seekable-substream.c, camel-stream-buffer.c,
	camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
	Update.

	* camel-stream-fs.c: Remove the virtual init functions and move
	the code into the creator functions. Add CamelExceptions to
	creation functions that could fail.

	* camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
	CamelException.
	* camel-mime-message.c, camel-mime-part.c, camel-multipart.c
	(write_to_stream): Update.

	* camel-mime-parser.c: add an exception to the mime parser private
	data and pass that to stream functions as needed.

	* gmime-content-field.c, md5-utils.c: Update (badly) for stream
	changes.

	* camel-exception.h (camel_exception_is_set): convenience macro.

	* providers/Makefile.am: disable SMTP for now

	* providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
	CamelException to the functions that now need it. Check the
	exception after calling camel_stream_flush, and fail if it fails.
	(mbox_get_message_by_uid): More updates.

	* providers/pop/camel-pop3-folder.c,
	providers/pop/camel-pop3-store.c,
	providers/sendmail/camel-sendmail/transport.c: Update.

svn path=/trunk/; revision=2924
2000-05-08 22:27:59 +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
7c90b45149 A machine which serves neither POP nor KPOP is not a POP server.
* providers/pop3/camel-pop3-store.c (query_auth_types): A machine
	which serves neither POP nor KPOP is not a POP server.

	* providers/smtp/camel-smtp-provider.c: Note in the description
	that this provider is not yet tested.

svn path=/trunk/; revision=2843
2000-05-06 22:59:12 +00:00
4856f92e7b Make this compile again in the !KRB4 case
svn path=/trunk/; revision=2800
2000-05-04 18:28:08 +00:00
67656eb615 Don't fall back to plaintext passwords if APOP fails, since it should also
* providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
	back to plaintext passwords if APOP fails, since it should also
	fail.

svn path=/trunk/; revision=2798
2000-05-04 16:02:49 +00:00
ba6b73fe56 New function to replace camel_provider_scan. Returns a list of either (a)
* camel-session.c (camel_session_list_providers): New function to
        replace camel_provider_scan. Returns a list of either (a) all
        currently-loaded providers, or (b) all available providers.

        * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
        it contains only a protocol).

        * camel-service.c (camel_service_query_auth_types): Make this take
        a CamelException (since it may have to try to connect to the
        server, and it might not able to.)

        * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
        support. This is mostly so I have two kinds of authmech to play
        with instead of just one. (But it does actually work.)

        * providers/smtp/camel-smtp-transport.c (query_auth_types): update
        for prototype change, but disable the functionality, since it
        doesn't really support any auth types yet.
        (camel_smtp_transport_get_type): add an object init function to
        set the service url_flags.

svn path=/trunk/; revision=2797
2000-05-04 15:23:43 +00:00
3ccfb61399 s/strcasecmp/g_strcasecamp/ everywhere except intl/, per michael's
request.

svn path=/trunk/; revision=2776
2000-05-03 14:43:10 +00:00
855b85657d Set G_LOG_DOMAIN in following files.
addressbook/demo/Makefile.am
 addressbook/printing/Makefile.am
 camel/Makefile.am
 camel/providers/MH/Makefile.am
 camel/providers/maildir/Makefile.am
 camel/providers/mbox/Makefile.am
 camel/providers/nntp/Makefile.am
 camel/providers/pop3/Makefile.am
 camel/providers/sendmail/Makefile.am
 camel/providers/smtp/Makefile.am
 composer/Makefile.am
 e-util/Makefile.am
 filter/Makefile.am
 libibex/Makefile.am
 mail/Makefile.am
 shell/Makefile.am
 tests/Makefile.am
 tests/ui-tests/Makefile.am
 widgets/e-table/Makefile.am
 widgets/e-text/Makefile.am
 widgets/meeting-time-sel/Makefile.am
 widgets/shortcut-bar/Makefile.am

svn path=/trunk/; revision=2756
2000-05-02 21:34:01 +00:00
0524f7c06a Tweak the definition of CamelProvider. Among other things, a provider may
* camel-provider.h: Tweak the definition of CamelProvider. Among
	other things, a provider may now be both a store and a transport.

	* camel-provider.c: Remove a lot of code we had no intention of
	using. This now only contains two functions: camel_provider_init
	to read the installed .urls files, and camel_provider_load to
	load and register a new provider.

	* camel-session.c: Remove more unused code and simplify some of
	the remaining code. The list of available provider modules is now
	stored in the session, and it handles calling camel_provider_load
	to load them as needed. Provider registration is now done by
	calling back from the module init routine, which allows a single
	module to register providers for multiple URL types.

	* providers/*: Update provider structures and init routines for
	the new stuff. Add a .urls file to each provider specifying what
	urls it handles, and install that with the library.

	* providers/nntp/camel-nntp-provider.c: Add hints towards
	supporting both news: and nntp: URLs, and using nntp as both a
	store and a transport.

svn path=/trunk/; revision=2691
2000-04-30 15:36:16 +00:00
9483369aa0 Made Evolution OAF-compatible.
svn path=/trunk/; revision=2673
2000-04-28 04:23:19 +00:00
c93a2e37f5 Big cleanup of camel-stream-*, got rid of 3 classes, improved the interfaces,
and fixed at least one problem (end of stream never happening in certain
cases).  Things that can fail now have a way of saying they failed too.

So much for taking ANZAC day off to get drunk!

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

	* camel-seekable-substream.c (stream_seek): Changed to have
	absolute seek semantics, not relative to the bounds.

	* camel-seekable-stream.c (reset): When we reset, seek to the
	start of the bound, if there is one.
	(stream_tell): Make tell virtual.

	* camel-stream-filter.c (do_available): Removed.

	* camel-stream-buffer.c: Remove leading _'s from static functions.
	(stream_read): Renamed from read().  Fancy that conflicting!  (my
	boo!)  Others too.

	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
	Changed to stream_mem interface.

	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
	for streamfs interface changes, and implement a failure case.
	(_append_message): Changed for fs stream interface change.

	* camel-multipart.c (print_part): Iterate rahter than callback.  I
	hate glists's interface (hence, move this to write_to_stream).
	(write_to_stream): Return an error (yuck, this is a royal PITA to
	do with the stream write interface).

	* camel-mime-message.c: Removed leading _ from static names.

	* camel-mime-part.h: construct_from_parser() now returns an error
	code.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Changed to use a
	camel-data-wrapper instead of a camel-simple-data-wrapper (no
	change needed elsewhere?).
	(simple_data_wrapper_construct_from_parser): Fixes for stream-mem
	interface changes.

	* camel-simple-data-wrapper.[ch],
	camel-simple-data-wrapper-stream.[ch],
	camel-stream-data-wrapper.[ch], removed.  Fixed including of these
	files.

	* camel-mime-part.c (camel_mime_part_set_text): Remove the use of
	the camel-simple-data-wrapper-stream, just use a mem stream.
	(write_to_stream): Renamed from my_*
	(construct_from_stream): Return an error on error.

	* camel-stream-mem.c (camel_stream_mem_new*): Remove mode
	parameter.

	* camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
	wasn't used at all.

	* camel-data-wrapper.h: Add camel_data_wrapper_new() to create
	these.
	(write_to_stream, construct_from_stream): Return an error
	indicator for success.  Fixed all methods to match (ICK).

	* Makefile.am (libcamel_la_SOURCES): Remove
	camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
	camel-stream-data-wrapper.c.  Obsoleted by code re-use!

	* camel-data-wrapper.c (construct_from_stream): Change the default
	implementation to just set the output stream == construction
	stream.  Well, this lets me get rid of both simple-data-wrapper
	and stream-data-wrapper (unused anyway), and
	simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
	also a concrete class.
	(write_to_stream): Use camel_stream_write_to_stream() to
	calculate/return values (and save code).
	Include <errno.h> for obvious reasons.

	* camel-stream.c (eos): Provide a default implementation of .eos().
	(camel_stream_write_to_stream): Make it return an error code on
	error.
	(camel_stream_printf): Changed to return the number of bytes
	written/error.
	(camel_stream_available): Removed.

	* camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
	use unix modes and so forth (wasn't used for anything but new file
	creation and didn't work well either).

	* camel-stream-fs.c: Removed leading _'s for names.  And removed
	some virtual method 'documentation'.
	(destroy): Dont try and close a closed/error fd.  Only report
	error if close returns -1.  Moved all the code to finalise(), and
	killed this function.
	(init_with_fd): Properly setup the seek offset, if it is a
	valid and seekable file descriptor.
	(init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
	seekable stream.
	(init_with_name): Return error codes.
	(init_with_name_and_bounds): Ditto.
	(camel_stream_fs_new_with_name): REturn NULL object if it failed.
	(camel_stream_fs_new_with_name_and_bounds): Return NULL object on
	failure.  Changed with_name* api's to take unix open style args
	and flags.
	(read): The bounded stream bounds checking seemed off, simplified
	code a bit.
	(write): Implement bounds checking for writing, the comment was
	wrong, it could make sense to bound writing.  Cleaned up a little.
	(available): Gone.
	(eos): Removed.  Use CamelStream's implementation now.
	(close): Reset the fd to -1, provide a warning for bad usage.
	(seek): Cleaned up.  Changed the behaviour a little, the returned
	offset is the absolute position in the file, even in bounded
	streams.
	(seek): Seek from end mirrors lseek() behaviour (reverse seeking).

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

	* camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
	indicator to other parent classes.

	* camel-stream.c (camel_stream_printf): New utility
	function.  Obvious use.

	* camel-stream-mem.c: Removed leading _'s from static func's.
	(camel_stream_mem_new_with_byte_array): Fixed for api changes, set
	the owner for the byte array to us.
	: Removed A bunch of gtk doc stuff for static (implementation) functions.
	(available): Removed.
	(write): Fixed the write implementation so that seek() works on a
	seekable memory stream, as expected.  Seeking past the end of the
	buffer has unix semantics (filling with 0).
	(available): Removed.
	(write): Implement seekable stream bounded stream.
	(read): Implement seekable stream bounded stream.
	(close): Dont free the stream_mem if we're not the owner.
	(seek): Allow to seek beyond the end of memory area,
	implement bounds checking.
	(seek): Set errno on bad policy.

	* camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
	(new_with_buffer): Changed len to be a size_t.
	(set_buffer, set_byte_array): New interface functions.
	(struct _CamelStreamMem): Removed position, it is stored in the
	superclass.

	* camel-stream.h: Removed some of the seemingly random
	whitespace.  Removed the available method (its not
	impelemented/useful enough).

	* camel-seekable-substream.c
	(init_with_seekable_stream_and_bounds): Remove the data_available
	stuff, it hasn't been properly implemented/finished, and may never
	work (unfortunately *sigh).
	(reemit_parent_signal): Removed part of the above change.
	(set_bounds): Removed (moved to seekable-stream).
	: Fixed up some of the generally unreadable indenting (sorry,
	wrapping at 80 characters with
	camels_really_long_function_names()
	just_doesnt_work_very_well_does_it().
	(available): Removed.
	(stream_seek): Fixup for object changes.  Make sure we return -1
	if the parent stream can't seek.

	* camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
	function to bound any seekable stream.
	: Removed _'s.
	(camel_seekable_stream_class_init): Implement an init function, to
	setup the stream bounds to unbound.

	* camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
	method set_bounds for seekable streams.
	(CAMEL_STREAM_UNBOUND): New define for no bound.

	* camel-seekable-substream.h (struct _CamelSeekableSubstream):
	Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
	renamed, and changed to off_t's).
	(new_with_seekable_stream_and_bounds): Use off_t as the bounds.
	(CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
	Removed.

	* camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
	to accept an off_t as the offset.
	(struct _CamelSeekableStream): Renamed cur_pos to position and
	changed it to an off_t type.
	(enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
	from lseek().
	(get_current_position): Renamed to tell().

	* camel-stream-buffer.h: Commented out set_vbuf - never implemented.

svn path=/trunk/; revision=2624
2000-04-26 10:35:25 +00:00
8c9b0cc3f0 No longer call data_wrapper_repository_init.
2000-04-24  NotZed  <NotZed@HelixCode.com>

	* camel.c (camel_init): No longer call
	data_wrapper_repository_init.

	* camel-medium.c (write_to_stream): Moved (back) to
	camel-mime-part.
	(add_header):
	(set_header):
	(remove_header):
	(get_header): Make all these abstract, and spit warnings if
	called.  I guess it could manage the list, but well, it doesn't.

	* camel-medium.h (struct _CamelMedium): Dont store headers here,
	the implementor is the only one who knows their format.
	(CamelMediumClass): Changed header values to be void *'s.  They
	need not be strings?

	* camel-simple-data-wrapper.c (construct_from_stream): And we're
	back.  Set the output stream.
	(construct_from_parser): Moved to camel-mime-part-utils.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Create the
	contents of multipart and simple messages.

	* camel-multipart.c (construct_from_parser): Moved to
	camel-mime-part-utils.
	(separate_part): Removed.

	* camel-mime-part.c (construct_from_stream): Back again!  This now
	switches over to using a mime parser for any mime parts, only.
	(my_write_to_stream): Write our headers and so forth here.
	(add_header): Add header directly, parent class is abstract.
	(remove_header): Ditto.
	(set_header): Ditto.

	* camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
	Remade abstract.
	(camel_data_wrapper_construct_from_parser): Moved to
	camel_mime_part.

	* camel-data-wrapper.h: Put back construct_from_stream.

	* camel-mime-part.h: Put construct_from_parser in here, the
	data-wrapper shouldn't know about mime.  Ok, so now to undo half
	of the last hours changes ... duh.

2a51,93
	* providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
	construct_from_stream instead of set_input_stream().

	* camel-simple-data-wrapper-stream.c
	(camel_simple_data_wrapper_stream_construct): REmoved the destroy
	callback code.
	(wrapper_destroy_cb): Removed.

	* camel-simple-data-wrapper.h: Add prototype for _construct()
	method.

	* camel.c: Include unicode.h to kill a warning.

	* camel-data-wrapper.h (CameldataWrapperClass): Removed
	construct_from_stream virtual method.
	Removed get/set input stream.

	* data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
	The justification as is follows: It is mixing storage
	protocol/format with message architecture.  It really just doesn't
	serve any purpose, as each medium implementor will have to have its
	own type->handler mapping, and the only current implementor,
	mimepart has a very simple structure and no need for this.

	* camel-medium.c (write_to_stream): Moved here from most of the
	stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
	what the headers are, and the content is, let it write it out.

	* camel-mime-part-utils.c (camel_mime_part_construct_content):
	Copied from camel-mime-part.c, removed handling of message
	followon state (moved to camel-mime-message).
	(camel_mime_part_construct_content_from_parser): Renamed from
	construct_content.
	(camel_mime_part_construct_headers_from_stream):
	(camel_mime_part_construct_content_from_stream):
	(camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
	the new construct from parser stuff.

	* camel-mime-message.c (construct_from_parser): Do
	construct_from_parser for mime-message.
	(_write_to_stream): Set the mime-version header for medium to
	write out, rather than writing it out ourselves.

4a96,102
	(construct_from_stream): Removed.
	(camel_data_wrapper_construct_from_stream): Changed to a helper
	function, creates a mime_parser, and constructs from that.
	(set_input_stream): Removed.
	(camel_data_wrapper_set_input_stream): Removed.
	(get_input_stream): Removed.
	(camel_data_wrapper_get_input_stream): Removed.
11a110,111
	(_get_message_by_uid): Use construct_from_stream() instead of
	creating our own parser.
16a117,131
	(camel_mime_part_construct_content): Removed to
	camel-mime-part-utils.c
	(my_get_output_stream): Removed.  The streeam is in the
	data-wrapper.
	(my_get_content_object): Removed.  The content object is stored in
	the medium.  If none is there, the object wasn't created properly.
	(my_write_content_to_stream): Removed.  The content object is the
	one that knows how to write itself out!!!!!!!!
	(my_write_to_stream): Remove the base header writing stuff - has
	been moved to camel-medium, where it belongs.  This can just be
	used to check for mandatory headers.
	(my_construct_from_stream): Removed.
	(my_set_input_stream): What the hell, i'll remove this too.
	Nobody seems to understand how it differs from create from stream,
	and they both seem to serve the same purpose ...
19a135,136
	(construct_from_stream): Removed!  Job taken over by
	construct_from_parser.
24a142
	(set_input_stream): REmoved.  Replaced by construct_from_parser.

svn path=/trunk/; revision=2577
2000-04-24 06:05:41 +00:00
fe97fa2fbb kill camel-log
svn path=/trunk/; revision=2487
2000-04-18 19:05:15 +00:00
96b306af32 Remove the "session" field from CamelMimeMessage. Nothing uses it, about
* camel-mime-message.[ch]: Remove the "session" field from
	CamelMimeMessage. Nothing uses it, about half of the existing
	calls to camel_mime_message_new_with_session pass NULL, and
	there's no obvious reason for it to be there.

	* others: Use camel_mime_message_new instead of
	camel_mime_message_new_with_session

svn path=/trunk/; revision=2479
2000-04-17 20:23:30 +00:00
50a2e734db fix various bugs in APOP code (still untested) and some of the error
* providers/pop3/camel-pop3-store.c (pop3_connect): fix various
	bugs in APOP code (still untested) and some of the error cases.

svn path=/trunk/; revision=2376
2000-04-10 19:27:29 +00:00
4d2972e69f Clarify what provider.protocol, provider.name, and provider.description
* camel-provider.h: Clarify what provider.protocol, provider.name,
	and provider.description should be.

	* providers/mbox/camel-mbox-provider.c:
	* providers/pop3/camel-pop3-provider.c:
	* providers/sendmail/camel-sendmail-provider.c:
	* providers/smtp/camel-smtp-provider.c: update protocols, names,
	and descriptions

svn path=/trunk/; revision=2365
2000-04-10 18:01:45 +00:00
1fc95ea1f5 (pop3_connect): Remember the password after asking for it the
first time.

svn path=/trunk/; revision=2331
2000-04-07 20:41:01 +00:00
5f93b83040 Clarify error messages. (finalize): fix a bug in camel_exception usage
* providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
	messages.
	(finalize): fix a bug in camel_exception usage

svn path=/trunk/; revision=2329
2000-04-07 19:26:50 +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
2e4a546307 the URL RFC says the port must be numeric, so we don't want to do
* g_url_new really wanted to take a CamelException. So, rename
	Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
	taking an exception), and url-util.[ch] to camel-url.[ch]. Also
	force url->port to be numeric and remove camel_service_getport. (I
	was confused before: the URL RFC says the port must be numeric, so
	we don't want to do getportbyname.)

svn path=/trunk/; revision=2300
2000-04-06 03:52:39 +00:00
1f73bf3ba0 Add a htons in the default_number case, and document the fact that the
* camel-service.c (camel_service_getport): Add a htons in the
	default_number case, and document the fact that the function
	returns the port in network byte order.

	* providers/pop3/camel-pop3-store.c (pop3_connect): Revert
	Miguel's change. The port number bug was actually somewhere
	else, and the IP address copying code was fine already.

svn path=/trunk/; revision=2256
2000-03-30 16:40:33 +00:00