diff options
author | Dan Winship <danw@src.gnome.org> | 2000-02-22 03:56:49 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-02-22 03:56:49 +0800 |
commit | 8ea1212d992c564a3a7849a41be9000ce50d0f6b (patch) | |
tree | ebc891496db9d1ad04a43153bd79f2b068902c07 /tests | |
parent | 0eff8e4321d63ef1dce20cceae8314b3628767a4 (diff) | |
download | gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar.gz gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar.bz2 gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar.lz gsoc2013-evolution-8ea1212d992c564a3a7849a41be9000ce50d0f6b.tar.xz 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.c | 11 | ||||
-rw-r--r-- | tests/test11.c | 11 |
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" |