Commit Graph

28 Commits

Author SHA1 Message Date
a9decdd879 Fix up the provider flags to specify things more completely so we don't
* camel-provider.h: Fix up the provider flags to specify things
	more completely so we don't have to hardcode provider names in the
	mailer.

	* providers/local/camel-local-provider.c: MH, mbox, and Maildir
	are LOCAL. MH and mbox are no longer STORAGE by the new
	definition.

	* camel-session.c (vee_provider): The vfolder store is a STORAGE.

svn path=/trunk/; revision=13276
2001-10-01 19:43:14 +00:00
61e47e195e Init the nntp url hash and url_equal functions.
2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/nntp/camel-nntp-provider.c
	(camel_provider_module_init): Init the nntp url hash and url_equal
	functions.

	* providers/sendmail/camel-sendmail-provider.c
	(camel_provider_module_init): Init the sendmail url hash and
	url_equal functions.

	* providers/smtp/camel-smtp-provider.c
	(camel_provider_module_init): Init the smtp url hash and url_equal
	functions.

	* providers/pop3/camel-pop3-provider.c
	(camel_provider_module_init): Init the pop3 url hash and url_equal
	functions.

	* providers/imap/camel-imap-provider.c
	(camel_provider_module_init): Init the imap url hash and url_equal
	functions.

	* providers/local/camel-local-provider.c
	(camel_provider_module_init): Init the local url hash and
	url_equal functions.

	* camel-session.c (camel_session_class_init): Init the vfolder url
	hash and url_equal functions.

	* camel-provider.h: Added url_hash and url_equal function pointers
	to the structure.

	* camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
	CamelFolder is not a CamelFolderClass.

svn path=/trunk/; revision=13237
2001-09-28 22:38:08 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
4c42c93dc6 Add an "extra_conf" field to CamelProvider with structures and defines and
* camel-provider.h: Add an "extra_conf" field to CamelProvider
	with structures and defines and stuff, for providers to specify
	additional configuration options that they want. Also add a
	"supports ssl" flag to the provider flags.

	* camel-remote-store.c: add a "default_ssl_port" field.
	(remote_construct): If the URL has the "use_ssl" parameter, set
	the store's use_ssl flag.
	(remote_connect): If using SSL and no port specified, use the
	default_ssl_port rather than the default_port.

	* providers/smtp/camel-smtp-provider.c (smtp_provider): add
	CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
	gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
	(ssmtp_provider): gone

	* providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
	flag if "use_ssl" param is set.
	(smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
	than checking if this is smtp or ssmtp.

	* providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
	bunch of IMAP-specific configuration options, like "check for new
	mail in all folders" (default TRUE), "show only subscribed
	folders" (default TRUE), "ignore server-supplied namespace", and
	"apply filters to INBOX" (not yet implemented).
	(imap_provider): We support SSL and we no longer allow a path in
	the URL. (namespace is handled via extra_conf)
	(simap_provider): Gone

	* providers/imap/camel-imap-store.c (camel_imap_store_init): Set
	default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
	(construct): remove simap stuff, deal with "use_lsub",
	"namespace", "check_all", and "filter" parameters. Set base_url
	to not include params.
	(imap_store_setup_online): Don't ask for the namespace if it was
	set explicitly. Don't get subscribed folders if !use_lsub.
	(imap_concat): Fix a bug.
	(get_folder_info): Support for not checking all folders.

	* providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
	on server" (currently still implemented by the mailer code, not
	here), "delete after N days" (not yet implemented).
	(pop3_provider): we support SSL
	(spop_provider): gone

	* providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
	default_ssl_port
	(pop3_connect): Remove spop code

svn path=/trunk/; revision=8968
2001-03-27 05:22:44 +00:00
5d562c3d3d add a "GList *authtypes", so you can get the list of authtypes used by a
* camel-provider.h: (CamelProvider) add a "GList *authtypes", so
	you can get the list of authtypes used by a provider without
	needing to have an actual CamelService object handy. (Will be
	needed by the new config druid.)
	(CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
	the URL part stuff, since the way it works is too complicated and
	everyone always does it wrong.

	* camel-service.c (camel_service_query_auth_types): Remove the
	@connected arg again: if you don't want to connect, you can just
	get the list of authtypes off the provider.
	(camel_service_free_auth_types): Remove this. All existing
	implementations do authtypes the same way, so just say the caller
	should "g_list_free" the list. (Oh, look, removing this function
	doesn't actually cause the mailer to not build. How 'bout that.)
	(construct, get_path): Use the new URL part macros.

	* camel-remote-store.c (remote_query_auth_types): Update
	(remote_free_auth_types): Nuke
	(camel_remote_store_authtype_list): New function for use by
	subclasses.

	* providers/imap/camel-imap-provider.c:
	* providers/pop3/camel-pop3-provider.c:
	* providers/smtp/camel-smtp-provider.c: Update CamelProvider
	structures.
	(camel_provider_module_init): Put all the SSL parts together so
	there's only 1 #ifdef. Set up the provider authtypes field using
	the SASL, CamelRemoteStore, and standard authtypes, as
	appropriate. Copy that from the normal provider to the SSL
	provider.

	* providers/local/camel-local-provider.c:
	* providers/sendmail/camel-sendmail-provider.c:
	* camel-session.c: Update CamelProvider structures.

	* providers/imap/camel-imap-store.c (query_auth_types):
	* providers/pop3/camel-pop3-store.c (query_auth_types): Update

	* providers/smtp/camel-smtp-store.c (query_auth_types): Update.
	Remove the no_authtype, because that's what "ALLOW_AUTH" rather
	than "NEED_AUTH" means.
	(free_auth_types): Nuke.

svn path=/trunk/; revision=8872
2001-03-21 22:20:29 +00:00
2da82ca262 So it turns out that NSS_Init *isn't* idempotent, so we have to protect
2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel.c (camel_init): So it turns out that NSS_Init *isn't*
	idempotent, so we have to protect against initializing it more
	than once(contrary to what their design specs suggest).

	* camel-session.c (camel_session_get_service): Use
	camel_exception_is_set() - Makes no difference but it's more
	consistant with how we normally do it.

	* camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.

	* providers/imap/camel-imap-provider.c: Define the imaps provider.
	(camel_provider_module_init): Register the imaps provider.

	* camel-provider.c (camel_provider_init): Only add the protocol to
	the hash table if it's non empty. Also, g_strdup() the filename
	into the hash table.

	* providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
	So the service's URL isn't set until after this is
	initialized. This means we can't check for SSL here.
	(imap_connect): Set the SSL options here instead.

svn path=/trunk/; revision=8718
2001-03-15 01:59:00 +00:00
174adfa471 Numerous fixes to get it to build correctly with NSS enabled.
2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c: Numerous fixes to get it to build
	correctly with NSS enabled.

	* camel-remote-store.c (remote_connect): Pass in the session and
	expected host args, oops.

	* camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.

	* providers/imap/camel-imap-store.c (camel_imap_store_init): Check
	to see if we are supposed to use SSL and set the options
	accordingly.
	(imap_connect): Return FALSE here instead of NULL.

	* providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.

	* providers/imap/libcamelimap.urls: Add "imaps" which is the
	protocol for Secure IMAP.

svn path=/trunk/; revision=8711
2001-03-14 21:59:40 +00:00
34f5839fa9 mbox, mh, and maildir camel-url's need absolute paths.
2001-02-12  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-local-provider.c: mbox, mh, and maildir
	camel-url's need absolute paths.

	* camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.

svn path=/trunk/; revision=8193
2001-02-13 00:02:47 +00:00
5a4fa8505d Add an "url_flags" field to CamelProvider. Move the CAMEL_SERVICE_URL_*
* camel-provider.h: Add an "url_flags" field to CamelProvider.
	Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
	part of the name.

	* camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
	service->url_flags field.

	* camel-service.c (check_url, get_path): Get URL flags from
	service->provider, update for changed flag names.

	* providers/*/camel-*-provider.c: Add URL flags to provider
	structures.

	* providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
	Remove service->url_flags initialization.

svn path=/trunk/; revision=6370
2000-11-03 18:22:34 +00:00
853d2b99ff Remove default_ports.
* camel-provider.h: Remove default_ports.

	* camel-remote-store.c (remote_connect): Get default_port from
	CamelRemoteStore rather than CamelProvider.

	* providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
	CamelRemoteStore::default_port

	* providers/*/camel-*-provider.c: Remove default_ports.

svn path=/trunk/; revision=5669
2000-10-02 20:14:57 +00:00
dbce630738 Add support for specifying on which port to connect to a server; fix a potential infinite loop in unicode.
svn path=/trunk/; revision=5041
2000-08-25 21:09:53 +00:00
8cb514d6dd Merge with camel-async.
svn path=/trunk/; revision=4687
2000-08-10 17:30:50 +00:00
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
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
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
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
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
6f7c1a1944 [This was accidentally not committed with its ChangeLog entry somehow...]
* camel-provider.h: Clarify what provider.protocol, provider.name,
	and provider.description should be.

svn path=/trunk/; revision=2434
2000-04-14 20:37:04 +00:00
0f5f6d7919 New function to scan the provider dir and return a list of all providers.
* camel-provider.c (camel_provider_scan): New function to
	scan the provider dir and return a list of all providers.

svn path=/trunk/; revision=2145
2000-03-22 17:21: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
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
8fe1aa5f41 Copyright change
svn path=/trunk/; revision=1348
1999-10-23 15:19:51 +00:00
d938232d3c Address update
svn path=/trunk/; revision=1147
1999-08-29 22:13:34 +00:00
f888058fc6 new function: returns a store for an URL.
1999-08-12  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-session.c (camel_session_get_store):
	new function: returns a store for an URL.
	(camel_session_get_store_for_protocol):
	new functionc: returns a store for a given
	store protocol (as IMAP/POP/MH ...)
	* camel/string-utils.c (g_strcase_equal):
	(g_strcase_hash): case insensitive hash table
	funcs.

	* camel/camel-session.c (camel_session_init): hash table
	keys are case insensitive.

	* camel/camel-provider.c (camel_provider_get_for_protocol):
	new function, returns the last registered
	provider for a protocol.

svn path=/trunk/; revision=1106
1999-08-12 10:24:01 +00:00
a478ee7e9d new file. MH provider registration stuff.
1999-08-12  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/providers/MH/camel-mh-provider.c:
	new file. MH provider registration stuff.

	* camel/camel-provider.c (camel_provider_register_as_module):
	load a provider from a shared object (plugin).
	(camel_provider_register): register a provider
	"by hand". Used for statically defined providers.

	* tests/test7.c: new test.
	tests providers loading framework.

Providers modules loading Works !!! :))))

svn path=/trunk/; revision=1105
1999-08-11 22:34:09 +00:00
f9595bb213 new method to set the default provider for a protocol.
1999-04-25  bertrand <Bertrand.Guiheneuf@inria.fr>

	* camel/camel-session.c (camel_session_set_provider):
	new method to set the default provider for a protocol.
	(camel_session_get_store_from_provider):
	new method to instantiate a folder from a provider.

	* camel/camel-provider.h: s/GString/gchar/g
	+ typo fix.

svn path=/trunk/; revision=878
1999-04-25 11:21:33 +00:00
eb2c9a6024 basic provider structure. Have to write the code for dynamic loading.
1999-04-25  bertrand <Bertrand.Guiheneuf@inria.fr>

	* camel/camel-provider.[ch]:
	basic provider structure. Have to write the
	code for dynamic loading.

svn path=/trunk/; revision=876
1999-04-25 09:45:13 +00:00