From 425b07fa747e1bd02a5bb86e207de172e65d580c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 22 Mar 2000 21:47:21 +0000 Subject: 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 --- camel/camel-service.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'camel/camel-service.c') diff --git a/camel/camel-service.c b/camel/camel-service.c index 86e871dd73..19683782c5 100644 --- a/camel/camel-service.c +++ b/camel/camel-service.c @@ -38,6 +38,7 @@ static gboolean _connect_with_url (CamelService *service, Gurl *url, CamelException *ex); static gboolean _disconnect(CamelService *service, CamelException *ex); static gboolean _is_connected (CamelService *service); +static GList * _query_auth_types (CamelService *service); static void _finalize (GtkObject *object); static gboolean _set_url (CamelService *service, Gurl *url, CamelException *ex); @@ -55,6 +56,7 @@ camel_service_class_init (CamelServiceClass *camel_service_class) camel_service_class->connect_with_url = _connect_with_url; camel_service_class->disconnect = _disconnect; camel_service_class->is_connected = _is_connected; + camel_service_class->query_auth_types = _query_auth_types; /* virtual method overload */ gtk_object_class->finalize = _finalize; @@ -363,3 +365,33 @@ camel_service_get_session (CamelService *service) { return service->session; } + + +GList * +_query_auth_types (CamelService *service) +{ + return NULL; +} + +/** + * camel_service_query_auth_types: return a list of supported + * authentication types. + * @service: a CamelService + * + * This is used by the mail source wizard to get the list of + * authentication types supported by the protocol, and information + * about them. + * + * This may be called on a service with or without an associated URL. + * If there is no URL, the routine must return a generic answer. If + * the service does have a URL, the routine MAY connect to the server + * and query what authentication mechanisms it supports. + * + * Return value: a list of CamelServiceAuthType records. The caller + * must free the list when it is done. + **/ +GList * +camel_service_query_auth_types (CamelService *service) +{ + return CSERV_CLASS(service)->query_auth_types(service); +} -- cgit v1.2.3