Commit Graph

71 Commits

Author SHA1 Message Date
66587d89a3 Keep a name-to-type hash so that we can make sure that the type has not
2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-object.c (camel_type_register): Keep a name-to-type hash
	so that we can make sure that the type has not yet been registered
	(prevents a race condition such as the one in bug #16559).

	* camel-service.c (camel_service_connect): Make sure that the
	connect_op is non-NULL before unregistering/unreffing it.

svn path=/trunk/; revision=15021
2001-12-13 20:38:11 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
0
6e1a9c1903 oops, we want get_unread_message_count, not get_message_count!
2001-10-10    <NotZed@Ximian.com>

        * providers/local/camel-maildir-store.c (scan_dir): oops, we want
        get_unread_message_count, not get_message_count!

2001-10-09    <NotZed@Ximian.com>

        * camel-service.c (camel_service_disconnect): Duplicate connect
        code that unregisters a cancel op if we created one.

svn path=/trunk/; revision=13561
2001-10-10 19:48:27 +00:00
ba39d4fff5 Turn off warnings. (get_name): Same.
2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_finalize): Turn off warnings.
	(get_name): Same.

	* camel-sasl.c (sasl_challenge): Turn off warnings.

	* camel-tcp-stream.c (tcp_connect): Turn off warnings.
	(tcp_getsockopt): Same.
	(tcp_setsockopt): Here too.
	(tcp_get_socket): And here.

	* camel-folder.c (folder_sync): Turn off warnings.
	(expunge): Same.
	(append_message): Here too.
	(get_message): And here.
	(search_by_expression): And again here.
	(folder_changed): Here too.

	* camel-store.c (get_folder): Set an exception and turn off
	debugging g_warnings.
	(create_folder): Same.
	(delete_folder): Here too.
	(rename_folder): And here.
	(get_trash): And here.
	(get_folder_info): Same.
	(free_folder_info): And again here.
	(camel_folder_info_build): Here too.
	(folder_subscribed): Same.
	(subscribe_folder): Here too.
	(unsubscribe_folder): And here.

svn path=/trunk/; revision=13458
2001-10-05 19:38:24 +00:00
16d6bd7083 Unregister the operation before unreffing it.
2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_connect): Unregister the
	operation before unreffing it.

svn path=/trunk/; revision=13412
2001-10-04 18:12:22 +00:00
7
dcc2eea680 Dont re-register the connect_op if we got it by calling
2001-09-27    <NotZed@Ximian.com>

	* camel-service.c (camel_service_connect): Dont re-register the
	connect_op if we got it by calling 'operation_registered', which
	returns an already-registered one.
	(camel_service_disconnect): Likewise here.
	This removes all the re-registered warnings.

svn path=/trunk/; revision=13205
2001-09-27 23:24:01 +00:00
5120d7098b Change "gboolean connected" to "CamelServiceConnectionStatus status",
* camel-service.c: Change "gboolean connected" to
	"CamelServiceConnectionStatus status", which can be disconnected,
	connecting, connected, or disconnecting.
	(camel_service_init, camel_service_finalize): create/destroy the
	connect_op_lock. Refer to service->status rather than
	service->connected.
	(camel_service_connect): When connecting, note the current
	operation (and create a new one if there's none registered) and
	mark the connection "connecting" until we succeed or fail.
	(camel_service_disconnect): Likewise in reverse.
	(camel_service_cancel_connect): New function to cancel a
	connection attempt.
	(cancel_connect): Default implementation: Call
	camel_operation_cancel on the connect_op.

	* camel-disco-store.c (disco_connect): Only call
	CamelRemoteStore's connect func if we're online.
	(disco_cancel_connect): Fall back to offline if a connection gets
	cancelled.
	(disco_get_folder_info): Kludge: call connect explicitly before
	deciding whether to do the online or offline version, so if the
	connect fails, we fall back correctly.

	* camel-session.c (camel_session_get_service_connected):
	s/svc->connected/svc->status/

	* camel-remote-store.c (camel_remote_store_finalise):
	Change service->connected check to service->status check.
	(remote_connect): Don't set service->connected here:
	camel_service_connect() itself does that.

	* camel-operation.c (camel_operation_registered): Deal with the
	possibility that there's no registered op.

svn path=/trunk/; revision=13191
2001-09-27 14:39:39 +00:00
1b7cf38b9c Do a clean disconnect.
2001-09-04  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_finalize): Do a clean disconnect.

svn path=/trunk/; revision=12593
2001-09-04 19:51:45 +00:00
81657a54af fixed a compile error
svn path=/trunk/; revision=12219
2001-08-19 17:32:40 +00:00
833bb47399 Added some operation progress reporting. Actual data transfer is 'tricky'
2001-07-23  Not Zed  <NotZed@Ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
	send_to): Added some operation progress reporting.  Actual data
	transfer is 'tricky' because of the layers used.
	(smtp_auth): Instead of checking exception_is_set, use
	challenge==NULL to test if sasl_challenge_base64 failed.

	* providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
	peters changes below and put in a better fix.  These functions
	already return -1 on error, just use that, and not worry about
	building our own exception redundantly.

	* camel-service.c (camel_get_host_byname): Turn the progress into
	a transient event.

svn path=/trunk/; revision=11301
2001-07-23 02:35:21 +00:00
9dfc5f64b5 D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/
* camel-service.c (camel_service_get_url): D'oh.
        s/FALSE/CAMEL_URL_HIDE_PASSWORD/

svn path=/trunk/; revision=10505
2001-06-26 17:50:48 +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
f9189bfda9 Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.
* camel-service.c (get_host): Use e_gethostbyname_r.
	(camel_service_gethost): Remove unused var.

svn path=/trunk/; revision=9583
2001-04-26 16:48:35 +00:00
f132c28d7f Check if gethostbyname_r take five params
2001-04-11  JP Rosevear  <jpr@ximian.com>

	* configure.in: Check if gethostbyname_r take five params

	* acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS

2001-04-11  JP Rosevear  <jpr@ximian.com>

	* providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
	files are included in the top level camel headers and the gtk
	include dir is now versioned and such

	* providers/local/Makefile.am: ditto

	* providers/pop3/Makefile.am: ditto

	* providers/smtp/Makefile.am: ditto

	* providers/sendmail/Makefile.am: ditto

	* camel-service.c: use five arg version of gethostbyname_r if
	appropriate
	(camel_get_host_byname): check if msg->herr is non-zero instead of
	checking if msg->hp is null since we may not always have msg->hp

svn path=/trunk/; revision=9239
2001-04-11 16:10:30 +00:00
55c3dea839 Dont overwrite an exception if we got one already. Added camel_operation
2001-03-30  Not Zed  <NotZed@Ximian.com>

        * camel-service.c (camel_get_host_byname): Dont overwrite an
        exception if we got one already.  Added camel_operation status to
        it, and comment out some debug.

svn path=/trunk/; revision=9034
2001-03-30 01:08:28 +00:00
554de99b22 Not quite finished but checking in for some local frobbing.
2001-03-29  Not Zed  <NotZed@Ximian.com>

        * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
        name info when done ... blah blah.

        * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
        after we're done with it.

        * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
        info after we're done with it.

        * camel-remote-store.c (remote_connect): Free the host name info
        from get_host after we're finished with it.

        * camel-service.c (camel_get_host_byname): New function to
        lookup a name, and still be cancellable.
        (camel_free_host): And a function to free the structure
        returned.
        (camel_service_gethost): Call get_host_byname for this.

svn path=/trunk/; revision=9033
2001-03-30 00:31:20 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
bd52985962 change "gboolean show_passwd" to "guint32 flags".
* camel-url.c (camel_url_to_string): change "gboolean show_passwd"
	to "guint32 flags".

	* tests/misc/url.c (main): Update calls to camel_url_to_string

	* providers/imap/camel-imap-store.c (construct): Call
	camel_url_to_string with flags to hide password, authtype, and
	params to create the base_url.
	(etc): Update for the fact that the base_url no longer has the "/"
	at the end.

	* camel-service.c (construct): Update calls to camel_url_to_string
	(pass CAMEL_URL_HIDE_PASSWORD)

svn path=/trunk/; revision=9014
2001-03-29 17:34:00 +00:00
505f6c235b Add the port (if user defined) to the path to fix bug #1996.
2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (get_path): Add the port (if user defined) to
	the path to fix bug #1996.

	Danw: I'm iffy on the "fix" so I'd like you to comment.

svn path=/trunk/; revision=8986
2001-03-28 02:19:05 +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
65eb577ecd Rewrite a bunch. Replace the existing folder cache stuff with much simpler
* camel-store.c: Rewrite a bunch. Replace the existing folder
	cache stuff with much simpler code that still handles all the
	existing cases. Now the folder hash table is always created by the
	base class, using hash and compare functions provided by the class
	implementation. (If they are set to NULL, CamelStore won't cache
	folders.) lookup_folder, cache_folder, and uncache_folder are no
	longer class methods, and get_name is gone completely.

	(camel_store_get_inbox): Renamed from
	camel_store_get_default_folder, since that wasn't being used, and
	this is what we actually need.
	(camel_store_get_root_folder): Removed, since it's not needed for
	anything given get_folder_info.

	* camel-remote-store.c:
	* providers/local/camel-local-store.c:
	* providers/local/camel-mbox-store.c:
	* providers/local/camel-mh-store.c:
	* providers/local/camel-maildir-store.c:
	* providers/nntp/camel-nntp-store.c:
	* providers/pop3/camel-pop3-store.c:
	* providers/vee/camel-vee-store.c: Minor updates for CamelStore
	changes

	* providers/imap/camel-imap-store.c (camel_imap_store_class_init):
	Update for CamelStore changes.
	(hash_folder_name, compare_folder_name): treat INBOX
	case-insensitively, otherwise use g_str_hash and g_str_equal.

	* camel-service.c (camel_service_construct): Remove
	camel_service_new and create camel_service_construct (as a class
	method) in its place.

	* camel-session.c (camel_session_get_service): Use
	camel_object_new and camel_service_construct to replace
	camel_service_new.

	* providers/local/camel-local-store.c (construct): Append a '/' to
	the URL path if it doesn't end with one

svn path=/trunk/; revision=8145
2001-02-09 16:43:22 +00:00
ddfc033633 Updated.
2001-02-05  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.

	* providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
	Updated.

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

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

	* camel-service.c (camel_service_query_auth_types): Now takes a
	boolean value to specify whether or not to connect when
	constructing a supported authtype list.

svn path=/trunk/; revision=7979
2001-02-05 19:55:54 +00:00
0d54c48352 Kill off a long-hated Camel kludge: "empty" URLs and
query_auth_types_generic.

	* camel-url.c: Remove "empty" from CamelURL.
	(camel_url_new): No longer set it.
	(camel_url_to_string): Treat "" as equivalent to NULL for
	authmech. (Unrelated change, but it simplifies some stuff with the
	new config dialog.)

	* camel-service.c (camel_service_new): Remove url->empty check: if
	the URL isn't valid, we don't create the service.
	(camel_service_query_auth_types): No longer need to switch between
	generic and connected variants.

	* providers/smtp/camel-smtp-transport.c (query_auth_types):
	* providers/pop3/camel-pop3-store.c (query_auth_types):
	* providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
	* providers/imap/camel-imap-store.c (query_auth_types):
	* camel-remote-store.c (remote_query_auth_types): Remove generic
	version, rename connected version.

svn path=/trunk/; revision=7327
2001-01-09 19:27:27 +00:00
6de256c2a2 Lock the command channel while searching. (imap_body_contains): If
2000-12-24  Not Zed  <NotZed@HelixCode.com>

        * providers/imap/camel-imap-search.c (imap_body_contains): Lock
        the command channel while searching.
        (imap_body_contains): If performing a whole uid search, then add
        references to our own summary items, dont look it up in the
        folder.  This way they can't vanish unexpectedly.

        * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
        private field.

        * providers/imap/camel-imap-private.h: Added lock for imap
        searches.

        * Merge from camel-mt-branch.

        * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
        fix, use the folder->summary.
        (imap_get_message_flags, imap_set_message_flags,
        imap_get_message_user_flag, imap_set_message_user_flag): Removed
        again.
        (camel_imap_folder_init): Setup private data/lock.
        (imap_finalize): Free private data/search lock.
        (imap_search_free): Lock the search_lock.
        (imap_search_by_expression): Lock the search lock when using the
        search object.  Also copy/ref hte summary, rather than getting it
        directly.
        (imap_refresh_info): Free any info lookups.  Use folder->summary
        not imap_folder->summary.  And lock around commands.

svn path=/trunk/; revision=7150
2000-12-24 00:46:20 +00:00
dfee15e65a Don't g_return_if_fail if the service is already disconnected. Just
* camel-service.c (camel_service_disconnect): Don't
	g_return_if_fail if the service is already disconnected. Just
	return.

	* providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
	Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
	(pop3_connect): If we don't succeed, disconnect.

svn path=/trunk/; revision=6756
2000-12-01 17:32:42 +00:00
be043c8ce6 Fix the default implementation for CamelService::get_name() so that it
returns a malloced string instead of a static one.  (A static one
breaks the semantics of the method.)

svn path=/trunk/; revision=6483
2000-11-07 18:37:30 +00:00
f2f3ee373b fix bug in previous
svn path=/trunk/; revision=6373
2000-11-03 19:19:53 +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
517db3b21f Add a new argument, clean, that says whether or not to try to disconnect
* camel-service.c (service_disconnect): Add a new argument, clean,
	that says whether or not to try to disconnect cleanly.

	* camel-remote-store.c (remote_send_string, remote_send_stream,
	remote_recv_line): disconnect uncleanly on failure to prevent
	infinite loops when providers would normally send commands from
	disconnect(). Remove some unneeded CamelException goo.

	* providers/smtp/camel-smtp-transport.c (smtp_disconnect):
	* providers/pop3/camel-pop3-store.c (pop3_disconnect):
	* providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
	* providers/imap/camel-imap-store.c (imap_disconnect): Don't send
	QUIT/LOGOUT if !clean.

svn path=/trunk/; revision=6303
2000-10-31 23:44:46 +00:00
360675f54b lots of i18n fixes
svn path=/trunk/; revision=6143
2000-10-24 05:23:27 +00:00
5da3981c90 when using the construct (flags & CAMEL_SERVICE_URL_NEED_*) make sure to
2000-10-16  Chris Toshok  <toshok@helixcode.com>

	* camel-service.c (get_path): when using the construct (flags &
	CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
	CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
	(check_url): same.

svn path=/trunk/; revision=5951
2000-10-16 23:09:35 +00:00
1fb4f1bfee Make this take a path to a directory that Camel can use for its own
* camel-session.c (camel_session_new): Make this take a path to a
	directory that Camel can use for its own nefarious purposes.
	(camel_session_get_storage_path): New function to return a path
	that a service can use for its own nefarious sub-purposes.

	* camel-service.c (camel_service_get_path): New method (and
	useful default implementation) to get a (relative) pathname
	corresponding to the service.

svn path=/trunk/; revision=5239
2000-09-07 19:59:53 +00:00
2bdcfe5c47 Make CamelServices connect only when told to (old behavior). Make CamelRemoteStore do its stuff in service::connect, not ::post_connect.
svn path=/trunk/; revision=5116
2000-08-30 17:09:42 +00:00
da570c6660 CamelRemoteStore: a new generic store for stores that connect to servers. Prepare for the ability to cancel operations (much better exception handling). Clean up IMAP like nobody's business
svn path=/trunk/; revision=5103
2000-08-29 21:28:46 +00:00
130bb0e571 Automatically connect services when given a valid URL (should hopefully disconnect, too); remove the old movemail folder correctly.
svn path=/trunk/; revision=4965
2000-08-22 20:09:11 +00:00
8cb514d6dd Merge with camel-async.
svn path=/trunk/; revision=4687
2000-08-10 17:30:50 +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
a0b7ca18e2 Remove camel_service_connect_with_url. (URLs must be specified when the
* camel-service.c: Remove camel_service_connect_with_url. (URLs
	must be specified when the service is requested from the session,
	so that there can only ever be one service for any URL.)

svn path=/trunk/; revision=3584
2000-06-15 23:05:18 +00:00
631dda8ae0 Init filter_from to NULL, for exception case. (mbox_get_message_by_uid):
2000-05-30  Not Zed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
        filter_from to NULL, for exception case.
        (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.

        * camel-url.c (camel_url_hash): Hash funciton for using camel
        url's as hash keys.
        (camel_url_equal): equal function for same.

        * camel-session.c (camel_session_finalise): Free cached services.
        (camel_session_init): Init service cache.
        (service_cache_remove): destroy callback to remove a service from
        the cache.

        * camel-store.c (get_folder_internal): Remove the extra ref of the
        folder.  That seems the right behaviour ...?
        (camel_store_get_type): Doh, actually call store init, so the
        cache works.
        (cache_folder): strdup the folder name!  no wonder it never found
        it again.

svn path=/trunk/; revision=3298
2000-05-30 22:35:40 +00:00
9f804702d5 Fix up some glib precondition stuff. Try to set the URL in
* camel-service.c (camel_service_new): Fix up some glib
	precondition stuff. Try to set the URL in camel_service_new before
	checking whether or not it's "empty" so that you can successfully
	set "sendmail:" as a URL.

svn path=/trunk/; revision=3266
2000-05-29 19:32:29 +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
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
fe97fa2fbb kill camel-log
svn path=/trunk/; revision=2487
2000-04-18 19:05:15 +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
2076526774 convenience functions to canonicalize the host and port values of a
* camel-service.c (camel_service_gethost,
	camel_service_getport): convenience functions to canonicalize
	the host and port values of a service's URL.
	* providers/pop3/camel-pop3-store.c: use them

svn path=/trunk/; revision=2216
2000-03-28 20:51:58 +00:00
07f3a40ef0 new routine to free the data allocated by camel_service_query_auth_types.
* camel-service.c (camel_service_free_auth_types): new routine to
	free the data allocated by camel_service_query_auth_types.

	* providers/pop3/camel-pop3-store.c (free_auth_types): implement

svn path=/trunk/; revision=2190
2000-03-27 16:59:46 +00:00
425b07fa74 New function to query a service for the authentication protocols it
* camel-service.c (camel_service_query_auth_types): New function
	to query a service for the authentication protocols it supports.
	* providers/pop3/camel-pop3-store.c (query_auth_types): implement

svn path=/trunk/; revision=2147
2000-03-22 21:47:21 +00:00
f669ff481f add a field refering to a service associated to the efolder. In the case
2000-03-12  bertrand  <bertrand@helixcode.com>

	* shell/e-folder.h: add a field refering to a
	service associated to the efolder. In the case of
	distant folders, it is generally a server.

	* shell/e-service.c: New class. Models a service.
	A service is an object with an URI and a root folder.
	It genreally reporesents a distant folder.
	A service is generally a ressource shared amongst
	several folders.
	* shell/e-service.h:


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

	* camel-service.h: cosmetic changes.

svn path=/trunk/; revision=2100
2000-03-12 05:09:43 +00:00