From: Andrea Zagli Date: Sat, 17 Dec 2011 10:37:05 +0000 (+0100) Subject: Modifiche per evolution-data-server 3.2 (d testare). X-Git-Tag: 0.5.0~17 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=921194118ca63918c5f97c2c81555a57d8e34701;p=solipa%2Flibsolipa Modifiche per evolution-data-server 3.2 (d testare). --- diff --git a/.anjuta/session/anjuta.session b/.anjuta/session/anjuta.session index cfc725e..f515c2b 100644 --- a/.anjuta/session/anjuta.session +++ b/.anjuta/session/anjuta.session @@ -8,7 +8,7 @@ Shortcut=libsolipa//libsolipa//src//libsolipa.la%%%libsolipa//libsolipa//src//li Expand=libsolipa.la%%%libsolipa%%%libsolipa//libsolipa [File Loader] -Files=file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.c#1146%%%file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.h#76 +Files=file:///home/andreaz/files/comune/solipa/libsolipa/src/utils.c#130 [Document Manager] bookmarks=\n\n diff --git a/.anjuta/session/dock-layout.xml b/.anjuta/session/dock-layout.xml index b5b3e4d..b35c6db 100644 --- a/.anjuta/session/dock-layout.xml +++ b/.anjuta/session/dock-layout.xml @@ -1,2 +1,2 @@ - + diff --git a/src/camelsession.c b/src/camelsession.c index 41749d2..5bddf9a 100644 --- a/src/camelsession.c +++ b/src/camelsession.c @@ -40,7 +40,9 @@ solipa_camel_session_new (const gchar *path) CamelSession *session; session = g_object_new (SOLIPA_TYPE_CAMEL_SESSION, NULL); +#ifndef CAMEL3 camel_session_construct (session, path); +#endif return session; } diff --git a/src/mail.c b/src/mail.c index 4a969bb..f208844 100644 --- a/src/mail.c +++ b/src/mail.c @@ -456,6 +456,8 @@ solipa_mail_get_as_string (SolipaMail *mail) error != NULL && error->message != NULL ? error->message : "no details"); return NULL; } + +#ifndef CAMEL3 error = NULL; if (camel_stream_reset (mem, &error) < 0) { @@ -463,6 +465,7 @@ solipa_mail_get_as_string (SolipaMail *mail) error != NULL && error->message != NULL ? error->message : "no details"); return NULL; } +#endif ret = g_strdup (""); while (!camel_stream_eos (mem)) @@ -485,6 +488,10 @@ solipa_mail_get_as_string (SolipaMail *mail) } } +#ifdef CAMEL3 + camel_stream_close (mem, NULL, NULL); +#endif + return ret; } @@ -553,7 +560,19 @@ solipa_mail_send (SolipaMail *mail, const gchar *url) #endif error = NULL; +#ifdef CAMEL3 + CamelURL *camel_url; + camel_url = camel_url_new (url, &error); + if (camel_url == NULL || error != NULL) + { + g_warning ("Not url: %s", + error != NULL && error->message != NULL ? error->message : "no details"); + return; + } + trans = camel_session_get_service_by_url (solipa_get_camel_session (priv->solipa), camel_url, CAMEL_PROVIDER_TRANSPORT); +#else trans = camel_session_get_service (solipa_get_camel_session (priv->solipa), url, CAMEL_PROVIDER_TRANSPORT, &error); +#endif if (trans == NULL || error != NULL) { g_warning ("Not service: %s",