aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-15 09:59:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-15 09:59:00 +0800
commit2da82ca26261d3772c9c54d28c3195a7735f169f (patch)
treeba9fa339381859790d0dcbd9405792bbbea02c8a /camel/providers
parent005d8c98c33702f8ef47c94e2d7aa22bbceb1ed3 (diff)
downloadgsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.tar
gsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.tar.gz
gsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.tar.bz2
gsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.tar.lz
gsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.tar.xz
gsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.tar.zst
gsoc2013-evolution-2da82ca26261d3772c9c54d28c3195a7735f169f.zip
So it turns out that NSS_Init *isn't* idempotent, so we have to protect
2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): So it turns out that NSS_Init *isn't* idempotent, so we have to protect against initializing it more than once(contrary to what their design specs suggest). * camel-session.c (camel_session_get_service): Use camel_exception_is_set() - Makes no difference but it's more consistant with how we normally do it. * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this. * providers/imap/camel-imap-provider.c: Define the imaps provider. (camel_provider_module_init): Register the imaps provider. * camel-provider.c (camel_provider_init): Only add the protocol to the hash table if it's non empty. Also, g_strdup() the filename into the hash table. * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! So the service's URL isn't set until after this is initialized. This means we can't check for SSL here. (imap_connect): Set the SSL options here instead. svn path=/trunk/; revision=8718
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-provider.c41
1 files changed, 36 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 91f397277a..1fff8dcfd7 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -46,23 +46,54 @@ static CamelProvider imap_provider = {
CAMEL_PROVIDER_IS_STORAGE,
CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST |
- CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH |
- CAMEL_URL_ALLOW_SSL,
+ CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH,
{ 0, 0 },
NULL
};
+#if defined (HAVE_NSS) || defined (HAVE_OPENSSL)
+static CamelProvider imaps_provider = {
+ "imaps",
+ N_("Secure IMAPv4"),
+
+ N_("For reading and storing mail on IMAP servers over an SSL connection."),
+
+ "mail",
+
+ CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
+ CAMEL_PROVIDER_IS_STORAGE,
+
+ CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST |
+ CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH,
+
+ { 0, 0 },
+
+ NULL
+};
+#endif /* HAVE_NSS or HAVE_OPENSSL */
+
void
camel_provider_module_init (CamelSession *session)
{
imap_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_imap_store_get_type();
-
+ camel_imap_store_get_type ();
+#if defined (HAVE_NSS) || defined (HAVE_OPENSSL)
+ imaps_provider.object_types[CAMEL_PROVIDER_STORE] =
+ camel_imap_store_get_type ();
+#endif
+
imap_provider.service_cache = g_hash_table_new (imap_url_hash, imap_url_equal);
-
+
+#if defined (HAVE_NSS) || defined (HAVE_OPENSSL)
+ imaps_provider.service_cache = g_hash_table_new (imap_url_hash, imap_url_equal);
+#endif
+
camel_session_register_provider (session, &imap_provider);
+#if defined (HAVE_NSS) || defined (HAVE_OPENSSL)
+ camel_session_register_provider (session, &imaps_provider);
+#endif
}
static void