From 2a174936f49118ce60e76b0debe4600fdbb4bc33 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 10 Jan 2003 01:55:27 +0000 Subject: build up the list of supported auth_methods. 2003-01-09 Chris Toshok * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): build up the list of supported auth_methods. (pas_backend_ldap_process_get_supported_auth_methods): respond with the list of auth methods we've built up. (pas_backend_ldap_dispose): unref the auth_method list. (pas_backend_ldap_class_init): hook up pas_backend_ldap_process_get_supported_auth_methods. * backend/pas/pas-backend.c (pas_backend_get_supported_auth_methods): new function. (process_client_requests): add clause for GetSupportedAuthMethods. * backend/pas/pas-backend.h: add prototype for pas_backend_get_supported_auth_methods, and add it to the class vtable. * backend/pas/pas-book.h: add GetSupportedAuthMethods enum member and PASGetSupportedAuthMethodsRequest. and add prototype for pas_book_respond_get_supported_auth_methods. * backend/pas/pas-book.c (pas_book_queue_get_supported_auth_methods): new function. (impl_GNOME_Evolution_Addressbook_Book_getSupportedAuthMethods): new function. (pas_book_respond_get_supported_auth_methods): new function. (pas_book_free_request): add clause for GetSupportedAuthMethods. (pas_book_class_init): hook up getSupportedAuthMethods. * backend/ebook/e-book-listener.c (e_book_listener_queue_get_supported_fields_response): fields -> list. (e_book_listener_queue_get_supported_auth_methods_response): new function. (impl_BookListener_response_get_supported_auth_methods): new function. (e_book_listener_class_init): hook up epv->notifySupportedAuthMethods. * backend/ebook/e-book-listener.h: add GetSupportedAuthMethodsResponse enum member, and change the field name from "fields" to list (and use it for both GetSupportedFields and GetSupportedAuthMethods) * backend/ebook/e-book.c (e_book_get_supported_auth_methods): new function. (e_book_do_response_get_supported_auth_methods): new function. * backend/ebook/e-book.h: add prototype for e_book_get_supported_auth_methods. * backend/idl/addressbook.idl: add getSupportedAuthMethods IDL call. svn path=/trunk/; revision=19386 --- addressbook/backend/idl/addressbook.idl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'addressbook/backend/idl') diff --git a/addressbook/backend/idl/addressbook.idl b/addressbook/backend/idl/addressbook.idl index 18a60f074f..84996fe75e 100644 --- a/addressbook/backend/idl/addressbook.idl +++ b/addressbook/backend/idl/addressbook.idl @@ -103,6 +103,30 @@ module Addressbook { void getSupportedFields (); + /* + * This function returns a list of strings + * representing the auth methods (e.g. SASL mechs) + * that a backend/server supports. + * + * Some examples are: + * + * "ldap/simple-email|By email Address" + * "sasl/CRAM-MD5|CRAM-MD5(SASL)" + * + * The format should be: + * + * /| + * + * "i18nized string" is shown in the UI, and should be + * a user friendly representation of the auth method. + * + * in the case of SASL auth mechs, the text trailing + * the '/' should be the proper name of the mechanism, + * as it will be passed unchanged to the backend auth + * function (eg. ldap_sasl_bind) + */ + void getSupportedAuthMethods (); + string getStaticCapabilities (); string getName (); @@ -120,6 +144,7 @@ module Addressbook { AuthenticationFailed, AuthenticationRequired, UnsupportedField, + UnsupportedAuthenticationMethod, TLSNotAvailable, NoSuchBook, @@ -148,6 +173,8 @@ module Addressbook { void notifySupportedFields (in CallStatus status, in stringlist fields); + void notifySupportedAuthMethods (in CallStatus status, in stringlist fields); + /** * notifyConnectionStatus: * -- cgit