diff options
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r-- | camel/providers/pop3/camel-pop3-provider.c | 42 | ||||
-rw-r--r-- | camel/providers/pop3/camel-pop3-store.c | 10 | ||||
-rw-r--r-- | camel/providers/pop3/libcamelpop3.urls | 1 |
3 files changed, 16 insertions, 37 deletions
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c index 1cfecde700..6dae1f6edb 100644 --- a/camel/providers/pop3/camel-pop3-provider.c +++ b/camel/providers/pop3/camel-pop3-provider.c @@ -29,6 +29,17 @@ #include "camel-session.h" #include "camel-url.h" +CamelProviderConfEntry pop3_conf_entries[] = { + { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL, + N_("Message storage") }, + { CAMEL_PROVIDER_CONF_CHECKBOX, "keep_on_server", NULL, + N_("Leave messages on server"), "0" }, + { CAMEL_PROVIDER_CONF_CHECKSPIN, "delete_after", "UNIMPLEMENTED", + N_("Delete after %s day(s)"), "0:1:7:365" }, + { CAMEL_PROVIDER_CONF_SECTION_END }, + { CAMEL_PROVIDER_CONF_END } +}; + static CamelProvider pop3_provider = { "pop", N_("POP"), @@ -39,31 +50,15 @@ static CamelProvider pop3_provider = { "mail", - CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE, + CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE | + CAMEL_PROVIDER_SUPPORTS_SSL, CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH, - /* ... */ -}; - -#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) -static CamelProvider spop_provider = { - "spop", - N_("Secure POP"), - - N_("For connecting to POP servers over an SSL connection. The POP " - "protocol can also be used to retrieve mail from certain web " - "mail providers and proprietary email systems."), - - "mail", - - CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE, - - CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH, + pop3_conf_entries, /* ... */ }; -#endif CamelServiceAuthType camel_pop3_password_authtype = { N_("Password"), @@ -112,13 +107,4 @@ camel_provider_module_init (CamelSession *session) pop3_provider.authtypes = g_list_prepend (pop3_provider.authtypes, &camel_pop3_password_authtype); camel_session_register_provider (session, &pop3_provider); - -#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) - spop_provider.object_types[CAMEL_PROVIDER_STORE] = - camel_pop3_store_get_type (); - spop_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); - spop_provider.authtypes = g_list_copy (pop3_provider.authtypes); - - camel_session_register_provider (session, &spop_provider); -#endif } diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index e38141d624..558d8a8b38 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -112,6 +112,8 @@ camel_pop3_store_init (gpointer object, gpointer klass) CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object); remote_store->default_port = 110; + /* FIXME: what should this port be?? */ + remote_store->default_ssl_port = 995; } CamelType @@ -419,14 +421,6 @@ pop3_connect (CamelService *service, CamelException *ex) } #endif - if (!g_strcasecmp (service->url->protocol, "spop")) { - CamelRemoteStore *rstore = CAMEL_REMOTE_STORE (service); - - /* FIXME: what should this port be?? */ - rstore->default_port = 995; - rstore->use_ssl = TRUE; - } - res = CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex); #ifdef HAVE_KRB4 diff --git a/camel/providers/pop3/libcamelpop3.urls b/camel/providers/pop3/libcamelpop3.urls index 789e1d7db1..7fffa4d861 100644 --- a/camel/providers/pop3/libcamelpop3.urls +++ b/camel/providers/pop3/libcamelpop3.urls @@ -1,2 +1 @@ pop -spop |