diff options
author | Dan Winship <danw@src.gnome.org> | 2000-05-04 23:23:43 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-05-04 23:23:43 +0800 |
commit | ba6b73fe56390dc752b43443701073fff7289709 (patch) | |
tree | dbcb834a29a525587107981b0883f486b9141f8d /camel/providers/smtp | |
parent | 929f89ce1c6fd86370839283e467127c2a1be3f6 (diff) | |
download | gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.tar gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.tar.gz gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.tar.bz2 gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.tar.lz gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.tar.xz gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.tar.zst gsoc2013-evolution-ba6b73fe56390dc752b43443701073fff7289709.zip |
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
Diffstat (limited to 'camel/providers/smtp')
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index cc57e29b1d..992948560e 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -57,7 +57,7 @@ static gboolean _send_to (CamelTransport *transport, CamelMedium *message, GList static gboolean smtp_connect (CamelService *service, CamelException *ex); static gboolean smtp_disconnect (CamelService *service, CamelException *ex); static GList *esmtp_get_authtypes(gchar *buffer); -static GList *query_auth_types (CamelService *service); +static GList *query_auth_types (CamelService *service, CamelException *ex); static void free_auth_types (CamelService *service, GList *authtypes); static gchar *smtp_get_email_addr_from_text (gchar *text); static gboolean smtp_helo (CamelSmtpTransport *transport, CamelException *ex); @@ -89,6 +89,14 @@ camel_smtp_transport_class_init (CamelSmtpTransportClass *camel_smtp_transport_c camel_transport_class->send_to = _send_to; } +static void +camel_smtp_transport_init (gpointer object, gpointer klass) +{ + CamelService *service = CAMEL_SERVICE (object); + + service->url_flags = CAMEL_SERVICE_URL_NEED_HOST; +} + GtkType camel_smtp_transport_get_type (void) { @@ -101,7 +109,7 @@ camel_smtp_transport_get_type (void) sizeof (CamelSmtpTransport), sizeof (CamelSmtpTransportClass), (GtkClassInitFunc) camel_smtp_transport_class_init, - (GtkObjectInitFunc) NULL, + (GtkObjectInitFunc) camel_smtp_transport_init, /* reserved_1 */ NULL, /* reserved_2 */ NULL, (GtkClassInitFunc) NULL, @@ -209,23 +217,35 @@ static GList return ret; } -static CamelServiceAuthType password_authtype = { - "Password/CRAM-MD5", +static CamelServiceAuthType no_authtype = { + "No authentication required", - "This option will connect to the ESMTP server using the CRAM-MD5 " - "authentication if possible.", + "This option will connect to the SMTP server without using any " + "kind of authentication. This should be fine for connecting to " + "most SMTP servers." "", + FALSE +}; + +static CamelServiceAuthType cram_md5_authtype = { + "CRAM-MD5", + + "This option will connect to the SMTP server using CRAM-MD5 " + "authentication.", + + "CRAM-MD5", TRUE }; static GList -*query_auth_types (CamelService *service) +*query_auth_types (CamelService *service, CamelException *ex) { - GList *ret; + /* FIXME: Re-enable this when auth types are actually + * implemented. + */ - ret = g_list_append (NULL, &password_authtype); - return ret; + return NULL; } static void |