aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-02-22 03:56:49 +0800
committerDan Winship <danw@src.gnome.org>2000-02-22 03:56:49 +0800
commit8ea1212d992c564a3a7849a41be9000ce50d0f6b (patch)
treeebc891496db9d1ad04a43153bd79f2b068902c07 /tests
parent0eff8e4321d63ef1dce20cceae8314b3628767a4 (diff)
downloadgsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar.gz
gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar.zst
gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.zip
Add "authenticator" to CamelSession and update things to use it.
svn path=/trunk/; revision=1890
Diffstat (limited to 'tests')
-rw-r--r--tests/test10.c11
-rw-r--r--tests/test11.c11
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/test10.c b/tests/test10.c
index d8a8090138..1d1d2904b9 100644
--- a/tests/test10.c
+++ b/tests/test10.c
@@ -60,6 +60,15 @@ create_sample_mime_message ()
return message;
}
+static char *
+auth_callback(char *prompt, gboolean secret,
+ CamelService *service, char *item,
+ CamelException *ex)
+{
+ printf ("auth_callback called: %s\n", prompt);
+ return NULL;
+}
+
@@ -80,7 +89,7 @@ main (int argc, char**argv)
ex = camel_exception_new ();
camel_provider_register_as_module ("../camel/providers/mbox/.libs/libcamelmbox.so");
- session = camel_session_new ();
+ session = camel_session_new (auth_callback);
store = camel_session_get_store (session, store_url, ex);
if (camel_exception_get_id (ex)) {
printf ("Exception caught in camel_session_get_store\n"
diff --git a/tests/test11.c b/tests/test11.c
index de605365a6..36ec9c6159 100644
--- a/tests/test11.c
+++ b/tests/test11.c
@@ -22,6 +22,15 @@
#include <fcntl.h>
#include <glib.h>
+static char *
+auth_callback(char *prompt, gboolean secret,
+ CamelService *service, char *item,
+ CamelException *ex)
+{
+ printf ("auth_callback called: %s\n", prompt);
+ return NULL;
+}
+
int
main (int argc, char**argv)
{
@@ -40,7 +49,7 @@ main (int argc, char**argv)
ex = camel_exception_new ();
camel_provider_register_as_module ("../camel/providers/mbox/.libs/libcamelmbox.so.0");
- session = camel_session_new ();
+ session = camel_session_new (auth_callback);
store = camel_session_get_store (session, store_url, ex);
if (camel_exception_get_id (ex)) {
printf ("Exception caught in camel_session_get_store\n"
h'>* Fix typo.ehaupt2013-12-121-1/+1 * Add LEGAL_TEXT as requested by eadler.ehaupt2013-12-111-0/+2 * Support staging.ehaupt2013-10-262-11/+14 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * Convert to new perl frameworkbapt2013-09-171-2/+2 * Remove MAKE_JOBS_SAFE which is now default.ehaupt2013-07-241-1/+0 * - Convert USE_GMAKE to USES=gmakeehaupt2013-07-091-2/+1 * Convert to use shebangfix USES flag.ehaupt2013-05-071-1/+2 * Chase security/libgcrypt updateehaupt2013-05-041-2/+2 * - Use DOC instead of NOPORTDOCSehaupt2013-01-151-2/+2 * Restore 'Created by' header information. This has been removed during theehaupt2012-11-041-0/+1 * Point shebang in a perl script to ${PERL} in order to solve a build problem ifehaupt2012-09-161-0/+1 * - Use OPTIONSngehaupt2012-09-101-15/+13 * - Use sysutils/vpnc-scripts instead of builtin versionzi2012-05-272-3/+2 * In the rc.d scripts, change assignments to rcvar to use thedougb2012-01-141-1/+1 * Fix a typo in a comment.ehaupt2011-11-111-1/+1 * Fix handling of /etc/resolv.conf during connect/disconnect. Now that FreeBSD 9.xehaupt2011-11-112-4/+15 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-24