aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-service.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-03-23 05:47:21 +0800
committerDan Winship <danw@src.gnome.org>2000-03-23 05:47:21 +0800
commit425b07fa747e1bd02a5bb86e207de172e65d580c (patch)
tree0eb7a3f97d59982a30e92adbcd14c4be3c1e8b2c /camel/camel-service.c
parent175fcc0ed5505da062bae09d6f3ce77f5b179536 (diff)
downloadgsoc2013-evolution-425b07fa747e1bd02a5bb86e207de172e65d580c.tar.gz
gsoc2013-evolution-425b07fa747e1bd02a5bb86e207de172e65d580c.tar.zst
gsoc2013-evolution-425b07fa747e1bd02a5bb86e207de172e65d580c.zip
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
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r--camel/camel-service.c32
1 files changed, 32 insertions, 0 deletions
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);
+}