aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-session.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-10 08:15:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-10 08:15:49 +0800
commitabe164fb3990d0aa36975c8012fabec57f5b4348 (patch)
treeb6a0c7a80aa022c4ae069e8e6b5adf8f027c2b63 /camel/camel-session.c
parentb860bc0e2d14adedefc7318eeacafbf1d552e8ff (diff)
downloadgsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar
gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.gz
gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.bz2
gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.lz
gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.xz
gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.zst
gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.zip
Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt
2001-03-09 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (camel_session_query_authenticator): Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to the user. This will be needed by the SSL/TLS code to come. Also changed the return value to a gpointer rather than a char* to allow the returning of TRUE/FALSE values. * camel.c: Wrap stuff with HAVE_NSS svn path=/trunk/; revision=8623
Diffstat (limited to 'camel/camel-session.c')
-rw-r--r--camel/camel-session.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/camel/camel-session.c b/camel/camel-session.c
index f8e27c382b..6fed6bfb9f 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -151,7 +151,7 @@ camel_session_new (const char *storage_path,
CamelSession *session = CAMEL_SESSION (camel_object_new (CAMEL_SESSION_TYPE));
session->storage_path = g_strdup (storage_path);
- session->authenticator = authenticator;
+ session->authenticator = authenticator;
session->registrar = registrar;
session->remover = remover;
@@ -427,7 +427,7 @@ camel_session_get_storage_path (CamelSession *session, CamelService *service,
/**
* camel_session_query_authenticator: query the session authenticator
* @session: session object
- * @mode: %CAMEL_AUTHENTICATOR_ASK or %CAMEL_AUTHENTICATOR_TELL
+ * @mode: %CAMEL_AUTHENTICATOR_ASK, %CAMEL_AUTHENTICATOR_TELL or CAMEL_AUTHENTICATOR_ACCEPT
* @data: prompt to query user with, or data to cache
* @secret: whether or not the data is secret (eg, a password)
* @service: the service this query is being made by
@@ -453,9 +453,14 @@ camel_session_get_storage_path (CamelSession *session, CamelService *service,
* caching anything about that datum (eg, because the data is a
* password that turned out to be incorrect).
*
+ * If @mode is %CAMEL_AUTHENTICATOR_ACCEPT, then @data is a YES/NO
+ * question to ask the user (if the application doesn't already have
+ * the answer cached). Return GINT_TO_POINTER(TRUE) on accept, or
+ * GINT_TO_POINTER(FALSE) to decline.
+ *
* Return value: the authentication information or %NULL.
**/
-char *
+gpointer
camel_session_query_authenticator (CamelSession *session,
CamelAuthCallbackMode mode,
char *prompt, gboolean secret,
@@ -466,30 +471,6 @@ camel_session_query_authenticator (CamelSession *session,
service, item, ex);
}
-#ifdef U_CANT_TOUCH_THIS
-/**
- * camel_session_query_cert_authenticator:
- * @session: session object
- * @prompt: prompt to query user with
- *
- * This function is used by SSL to discuss certificate authentication
- * information with the application and/or user. Allows the user to
- * override the SSL certificate authenticator, which, at this point,
- * must have failed to authenticate the server.
- *
- * UI should be a Yes/No prompt probably defaulting to No.
- *
- * Return value: TRUE if the user decides that the SSL connection
- * should continue with the untrusted server or FALSE otherwise.
- **/
-gboolean
-camel_session_query_cert_authenticator (CamelSession *session,
- char *prompt)
-{
- return session->cert_authenticator (prompt);
-}
-#endif /* U_CANT_TOUCH_THIS */
-
/**
* camel_session_register_timeout: Register a timeout to be called