aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-02-19 15:27:49 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-02-19 15:27:49 +0800
commit05e0ef6fea2f2feec010109142c8305c69e64c57 (patch)
treef01a116128a1e73d5971bf1ba1bfc711e292aaf4 /camel/providers
parent8b86c88624f926a7122ab4dd39ebd26d0e839ab2 (diff)
downloadgsoc2013-evolution-05e0ef6fea2f2feec010109142c8305c69e64c57.tar.gz
gsoc2013-evolution-05e0ef6fea2f2feec010109142c8305c69e64c57.tar.zst
gsoc2013-evolution-05e0ef6fea2f2feec010109142c8305c69e64c57.zip
Fixes for api changes.
2004-02-19 Not Zed <NotZed@Ximian.com> * providers/*/camel-*-provider.c (camel_provider_module_init): Fixes for api changes. * camel-provider.c (camel_provider_load): no longer take session argument. the providers are global resources. (camel_provider_init): dont return anything anymore. (error?) call from camel_init now. Use a recursive lock too. * camel-session.c (camel_session_register_provider) (camel_session_list_providers, camel_session_get_provider): Moved to camel-provider, camel_provider_register/list/get. (vee_provider): moved to camel-provider.c svn path=/trunk/; revision=24794
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/groupwise/camel-groupwise-provider.c22
-rw-r--r--camel/providers/imap/camel-imap-provider.c10
-rw-r--r--camel/providers/imapp/camel-imapp-provider.c8
-rw-r--r--camel/providers/local/camel-local-provider.c12
-rw-r--r--camel/providers/nntp/camel-nntp-provider.c7
-rw-r--r--camel/providers/pop3/camel-pop3-provider.c4
-rw-r--r--camel/providers/sendmail/camel-sendmail-provider.c7
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c7
8 files changed, 31 insertions, 46 deletions
diff --git a/camel/providers/groupwise/camel-groupwise-provider.c b/camel/providers/groupwise/camel-groupwise-provider.c
index c9fc7946fa..50e3346710 100644
--- a/camel/providers/groupwise/camel-groupwise-provider.c
+++ b/camel/providers/groupwise/camel-groupwise-provider.c
@@ -107,38 +107,28 @@ CamelServiceAuthType camel_groupwise_password_authtype = {
};
void
-camel_provider_module_init (CamelSession *session)
+camel_provider_module_init(void)
{
-
-
CamelProvider *imap_provider;
CamelProvider *smtp_provider;
- CamelSession *temp_session;
- temp_session = CAMEL_SESSION ( camel_object_new ( CAMEL_SESSION_TYPE));
- imap_provider = camel_session_get_provider (temp_session, "imap://", NULL);
- smtp_provider = camel_session_get_provider (temp_session, "smtp://", NULL);
+ imap_provider = camel_provider_get("imap://", NULL);
+ smtp_provider = camel_provider_get("smtp://", NULL);
groupwise_provider.url_hash = groupwise_url_hash;
groupwise_provider.url_equal = groupwise_url_equal;
- groupwise_provider.authtypes = g_list_prepend (groupwise_provider.authtypes, &camel_groupwise_password_authtype);
+ groupwise_provider.authtypes = g_list_prepend (groupwise_provider.authtypes, &camel_groupwise_password_authtype);
if (imap_provider != NULL && smtp_provider != NULL) {
-
groupwise_provider.object_types[CAMEL_PROVIDER_STORE] = imap_provider->object_types [CAMEL_PROVIDER_STORE];
groupwise_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = smtp_provider->object_types [CAMEL_PROVIDER_TRANSPORT];
- camel_session_register_provider (session, &groupwise_provider);
+ camel_provider_register(&groupwise_provider);
}
-
- if (!config_listener) {
-
+ if (!config_listener) {
config_listener = camel_gw_listener_new ();
g_atexit ( free_groupwise_listener );
}
-
- camel_object_unref (temp_session);
-
}
void free_groupwise_listener ( void )
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index abda8f89a0..fb7c69766c 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -96,17 +96,15 @@ CamelServiceAuthType camel_imap_password_authtype = {
};
void
-camel_provider_module_init (CamelSession *session)
+camel_provider_module_init(void)
{
- imap_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_imap_store_get_type ();
+ imap_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imap_store_get_type ();
imap_provider.url_hash = imap_url_hash;
imap_provider.url_equal = imap_url_equal;
imap_provider.authtypes = camel_sasl_authtype_list (FALSE);
- imap_provider.authtypes = g_list_prepend (imap_provider.authtypes,
- &camel_imap_password_authtype);
+ imap_provider.authtypes = g_list_prepend (imap_provider.authtypes, &camel_imap_password_authtype);
- camel_session_register_provider (session, &imap_provider);
+ camel_provider_register(&imap_provider);
}
static void
diff --git a/camel/providers/imapp/camel-imapp-provider.c b/camel/providers/imapp/camel-imapp-provider.c
index 6b0cdd2d43..bdf33ec1da 100644
--- a/camel/providers/imapp/camel-imapp-provider.c
+++ b/camel/providers/imapp/camel-imapp-provider.c
@@ -72,7 +72,7 @@ CamelServiceAuthType camel_imapp_password_authtype = {
};
void
-camel_imapp_module_init(CamelSession *session)
+camel_imapp_module_init(void)
{
extern void camel_exception_setup(void);
@@ -87,11 +87,11 @@ camel_imapp_module_init(CamelSession *session)
/* TEMPORARY */
camel_exception_setup();
- camel_session_register_provider(session, &imapp_provider);
+ camel_provider_register(&imapp_provider);
}
void
-camel_provider_module_init(CamelSession *session)
+camel_provider_module_init(void)
{
- camel_imapp_module_init(session);
+ camel_imapp_module_init();
}
diff --git a/camel/providers/local/camel-local-provider.c b/camel/providers/local/camel-local-provider.c
index fc33f34f58..27fae76695 100644
--- a/camel/providers/local/camel-local-provider.c
+++ b/camel/providers/local/camel-local-provider.c
@@ -189,7 +189,7 @@ local_url_equal(const void *v, const void *v2)
&& u1->port == u2->port;
}
-void camel_provider_module_init(CamelSession * session)
+void camel_provider_module_init(void)
{
char *path;
static int init = 0;
@@ -202,7 +202,7 @@ void camel_provider_module_init(CamelSession * session)
mh_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mh_store_get_type ();
mh_provider.url_hash = local_url_hash;
mh_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &mh_provider);
+ camel_provider_register(&mh_provider);
if (!(path = getenv ("MAIL")))
path = g_strdup_printf (SYSTEM_MAIL_DIR "/%s", g_get_user_name ());
@@ -210,18 +210,18 @@ void camel_provider_module_init(CamelSession * session)
mbox_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mbox_store_get_type ();
mbox_provider.url_hash = local_url_hash;
mbox_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &mbox_provider);
+ camel_provider_register(&mbox_provider);
spool_conf_entries[0].value = path; /* default path - same as mbox */
spool_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type ();
spool_provider.url_hash = local_url_hash;
spool_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &spool_provider);
+ camel_provider_register(&spool_provider);
- path = getenv ("MAILDIR");
+ path = getenv("MAILDIR");
maildir_conf_entries[0].value = path ? path : ""; /* default path */
maildir_provider.object_types[CAMEL_PROVIDER_STORE] = camel_maildir_store_get_type ();
maildir_provider.url_hash = local_url_hash;
maildir_provider.url_equal = local_url_equal;
- camel_session_register_provider(session, &maildir_provider);
+ camel_provider_register(&maildir_provider);
}
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
index 886c09983e..f2b4c1a24d 100644
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ b/camel/providers/nntp/camel-nntp-provider.c
@@ -78,16 +78,15 @@ CamelServiceAuthType camel_nntp_password_authtype = {
};
void
-camel_provider_module_init (CamelSession *session)
+camel_provider_module_init(void)
{
- news_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_nntp_store_get_type();
+ news_provider.object_types[CAMEL_PROVIDER_STORE] = camel_nntp_store_get_type();
news_provider.url_hash = nntp_url_hash;
news_provider.url_equal = nntp_url_equal;
news_provider.authtypes = g_list_append (NULL, &camel_nntp_password_authtype);
- camel_session_register_provider (session, &news_provider);
+ camel_provider_register(&news_provider);
}
static void
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c
index 1354470e69..7c3db155a7 100644
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ b/camel/providers/pop3/camel-pop3-provider.c
@@ -89,7 +89,7 @@ CamelServiceAuthType camel_pop3_apop_authtype = {
};
void
-camel_provider_module_init (CamelSession *session)
+camel_provider_module_init(void)
{
CamelServiceAuthType *auth;
@@ -104,5 +104,5 @@ camel_provider_module_init (CamelSession *session)
pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, &camel_pop3_apop_authtype);
pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, &camel_pop3_password_authtype);
- camel_session_register_provider(session, &pop3_provider);
+ camel_provider_register(&pop3_provider);
}
diff --git a/camel/providers/sendmail/camel-sendmail-provider.c b/camel/providers/sendmail/camel-sendmail-provider.c
index 9615dff1b4..36cbf88a77 100644
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ b/camel/providers/sendmail/camel-sendmail-provider.c
@@ -48,15 +48,14 @@ static CamelProvider sendmail_provider = {
};
void
-camel_provider_module_init (CamelSession *session)
+camel_provider_module_init(void)
{
- sendmail_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
- camel_sendmail_transport_get_type();
+ sendmail_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_sendmail_transport_get_type();
sendmail_provider.url_hash = camel_url_hash;
sendmail_provider.url_equal = camel_url_equal;
- camel_session_register_provider (session, &sendmail_provider);
+ camel_provider_register(&sendmail_provider);
}
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index 07991eb695..8658fb4e62 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -49,16 +49,15 @@ static CamelProvider smtp_provider = {
};
void
-camel_provider_module_init (CamelSession *session)
+camel_provider_module_init(void)
{
- smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
- camel_smtp_transport_get_type ();
+ smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_smtp_transport_get_type ();
smtp_provider.authtypes = g_list_append (camel_sasl_authtype_list (TRUE), camel_sasl_authtype ("LOGIN"));
smtp_provider.authtypes = g_list_append (smtp_provider.authtypes, camel_sasl_authtype ("POPB4SMTP"));
smtp_provider.url_hash = camel_url_hash;
smtp_provider.url_equal = camel_url_equal;
- camel_session_register_provider (session, &smtp_provider);
+ camel_provider_register(&smtp_provider);
}