aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-provider.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-27 13:22:44 +0800
committerDan Winship <danw@src.gnome.org>2001-03-27 13:22:44 +0800
commit4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa (patch)
treec9779ab81d453b73b821985670116a353186f440 /camel/providers/imap/camel-imap-provider.c
parent26b82892c72f977aa4602ddef20cca2cc4743e05 (diff)
downloadgsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.tar
gsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.tar.gz
gsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.tar.bz2
gsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.tar.lz
gsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.tar.xz
gsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.tar.zst
gsoc2013-evolution-4c42c93dc6a2a1ed4c0b758ffff790fe74e7dffa.zip
Add an "extra_conf" field to CamelProvider with structures and defines and
* camel-provider.h: Add an "extra_conf" field to CamelProvider with structures and defines and stuff, for providers to specify additional configuration options that they want. Also add a "supports ssl" flag to the provider flags. * camel-remote-store.c: add a "default_ssl_port" field. (remote_construct): If the URL has the "use_ssl" parameter, set the store's use_ssl flag. (remote_connect): If using SSL and no port specified, use the default_ssl_port rather than the default_port. * providers/smtp/camel-smtp-provider.c (smtp_provider): add CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config gui code knows that the ALLOW_USER and ALLOW_AUTH go together.) (ssmtp_provider): gone * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a flag if "use_ssl" param is set. (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather than checking if this is smtp or ssmtp. * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a bunch of IMAP-specific configuration options, like "check for new mail in all folders" (default TRUE), "show only subscribed folders" (default TRUE), "ignore server-supplied namespace", and "apply filters to INBOX" (not yet implemented). (imap_provider): We support SSL and we no longer allow a path in the URL. (namespace is handled via extra_conf) (simap_provider): Gone * providers/imap/camel-imap-store.c (camel_imap_store_init): Set default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here (construct): remove simap stuff, deal with "use_lsub", "namespace", "check_all", and "filter" parameters. Set base_url to not include params. (imap_store_setup_online): Don't ask for the namespace if it was set explicitly. Don't get subscribed folders if !use_lsub. (imap_concat): Fix a bug. (get_folder_info): Support for not checking all folders. * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep on server" (currently still implemented by the mailer code, not here), "delete after N days" (not yet implemented). (pop3_provider): we support SSL (spop_provider): gone * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set default_ssl_port (pop3_connect): Remove spop code svn path=/trunk/; revision=8968
Diffstat (limited to 'camel/providers/imap/camel-imap-provider.c')
-rw-r--r--camel/providers/imap/camel-imap-provider.c52
1 files changed, 23 insertions, 29 deletions
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 593231a56e..768c97901d 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -35,6 +35,26 @@ static guint imap_url_hash (gconstpointer key);
static gint check_equal (char *s1, char *s2);
static gint imap_url_equal (gconstpointer a, gconstpointer b);
+CamelProviderConfEntry imap_conf_entries[] = {
+ { CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
+ N_("Checking for new mail") },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "check_all", NULL,
+ N_("Check for new messages in all folders"), "1" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
+ { CAMEL_PROVIDER_CONF_SECTION_START, "folders", NULL,
+ N_("Folders") },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "use_lsub", NULL,
+ N_("Show only subscribed folders"), "1" },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "override_namespace", NULL,
+ N_("Override server-supplied folder namespace"), "0" },
+ { CAMEL_PROVIDER_CONF_ENTRY, "namespace", "override_namespace",
+ N_("Namespace") },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
+ { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", "UNIMPLEMENTED",
+ N_("Apply filters to new messages in INBOX on this server"), "0" },
+ { CAMEL_PROVIDER_CONF_END }
+};
+
static CamelProvider imap_provider = {
"imap",
N_("IMAPv4"),
@@ -44,32 +64,14 @@ static CamelProvider imap_provider = {
"mail",
CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
- CAMEL_PROVIDER_IS_STORAGE,
+ CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_SUPPORTS_SSL,
- CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST |
- CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH,
+ CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH,
- /* ... */
-};
-
-#if defined (HAVE_NSS) || defined (HAVE_OPENSSL)
-static CamelProvider simap_provider = {
- "simap",
- 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,
+ imap_conf_entries,
/* ... */
};
-#endif /* HAVE_NSS or HAVE_OPENSSL */
CamelServiceAuthType camel_imap_password_authtype = {
N_("Password"),
@@ -93,14 +95,6 @@ camel_provider_module_init (CamelSession *session)
&camel_imap_password_authtype);
camel_session_register_provider (session, &imap_provider);
-
-#if defined (HAVE_NSS) || defined (HAVE_OPENSSL)
- simap_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_imap_store_get_type ();
- simap_provider.service_cache = g_hash_table_new (imap_url_hash, imap_url_equal);
- simap_provider.authtypes = g_list_copy (imap_provider.authtypes);
- camel_session_register_provider (session, &simap_provider);
-#endif
}
static void