aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-04-18 01:13:55 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:55 +0800
commitf31b492945408f038ae16a099900631ae9714912 (patch)
tree031f02a545f2f540048ee1fe7a8180fb10d9dd0a /mail/mail-ops.c
parenta6dbbf97cac0e702d9de86b4defabcbe22e12cf3 (diff)
downloadgsoc2013-evolution-f31b492945408f038ae16a099900631ae9714912.tar.gz
gsoc2013-evolution-f31b492945408f038ae16a099900631ae9714912.tar.zst
gsoc2013-evolution-f31b492945408f038ae16a099900631ae9714912.zip
Adapt to sealed up CamelService.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 79fce90458..3c3d65a389 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -203,10 +203,12 @@ mail_filter_folder (EMailSession *session,
static gchar *
uid_cachename_hack (CamelStore *store)
{
- CamelURL *url = CAMEL_SERVICE (store)->url;
+ CamelURL *url;
gchar *encoded_url, *filename;
const gchar *data_dir;
+ url = camel_service_get_camel_url (CAMEL_SERVICE (store));
+
encoded_url = g_strdup_printf ("%s%s%s@%s", url->user,
url->authmech ? ";auth=" : "",
url->authmech ? url->authmech : "",
@@ -474,6 +476,7 @@ mail_send_message (struct _send_queue_msg *m,
CamelAddress *from, *recipients;
CamelMessageInfo *info = NULL;
CamelTransport *xport = NULL;
+ CamelProvider *provider;
gchar *transport_url = NULL;
gchar *sent_folder_uri = NULL;
const gchar *resent_from, *tmp;
@@ -609,8 +612,13 @@ mail_send_message (struct _send_queue_msg *m,
}
}
- if (xport == NULL
- || !( ((CamelService *)xport)->provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) {
+ if (xport != NULL)
+ provider = camel_service_get_provider (CAMEL_SERVICE (xport));
+ else
+ provider = NULL;
+
+ if (provider == NULL
+ || !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) {
GError *local_error = NULL;
if (sent_folder_uri) {
@@ -1671,9 +1679,12 @@ struct _sync_store_msg {
static gchar *
sync_store_desc (struct _sync_store_msg *m)
{
+ CamelURL *url;
gchar *uri, *res;
- uri = camel_url_to_string (((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL);
+ url = camel_service_get_camel_url (CAMEL_SERVICE (m->store));
+ uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+
res = g_strdup_printf (m->expunge
?_("Expunging and storing account '%s'")
:_("Storing account '%s'"),
@@ -1776,6 +1787,8 @@ folder_is_from_source_url (CamelFolder *folder, const gchar *source_url)
{
CamelStore *store;
CamelService *service;
+ CamelProvider *provider;
+ CamelURL *service_url;
CamelURL *url;
gboolean res = FALSE;
@@ -1787,13 +1800,16 @@ folder_is_from_source_url (CamelFolder *folder, const gchar *source_url)
service = CAMEL_SERVICE (store);
g_return_val_if_fail (service != NULL, FALSE);
- g_return_val_if_fail (service->provider != NULL, FALSE);
- g_return_val_if_fail (service->provider->url_equal != NULL, FALSE);
+
+ provider = camel_service_get_provider (service);
+ g_return_val_if_fail (provider != NULL, FALSE);
+ g_return_val_if_fail (provider->url_equal != NULL, FALSE);
url = camel_url_new (source_url, NULL);
g_return_val_if_fail (url != NULL, FALSE);
- res = service->provider->url_equal (service->url, url);
+ service_url = camel_service_get_camel_url (service);
+ res = provider->url_equal (service_url, url);
camel_url_free (url);