[evolution-ews] Add camel_session_get_service_compat and camel_sesssion_get_storage_path to camel-compat.
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Add camel_session_get_service_compat and camel_sesssion_get_storage_path to camel-compat.
- Date: Thu, 8 Sep 2011 09:02:15 +0000 (UTC)
commit fea537b29853a794b315c68673cf7fc9d4061157
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Thu Sep 8 14:08:46 2011 +0530
Add camel_session_get_service_compat and camel_sesssion_get_storage_path
to camel-compat.
src/utils/ews-camel-compat.c | 23 +++++++++++++++++++++++
src/utils/ews-camel-compat.h | 3 +++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/src/utils/ews-camel-compat.c b/src/utils/ews-camel-compat.c
index 0a4744a..07f3877 100644
--- a/src/utils/ews-camel-compat.c
+++ b/src/utils/ews-camel-compat.c
@@ -38,6 +38,21 @@ camel_session_get_password_compat (CamelSession *session,
}
+CamelService *
+camel_session_get_service_compat (CamelSession *session, const gchar *url, CamelProviderType type)
+{
+#if ! EDS_CHECK_VERSION(3,1,0)
+ return camel_session_get_service (session, url, type, NULL);
+#else
+ CamelURL *curl = camel_url_new (url, NULL);
+ CamelService *service;
+
+ service = camel_session_get_service_by_url (session, curl, type);
+ camel_url_free (curl);
+ return service;
+#endif
+}
+
#if ! EDS_CHECK_VERSION(3,1,0)
CamelURL *
@@ -54,4 +69,12 @@ camel_service_get_connection_status (CamelService *service)
return service->status;
}
+#else
+
+gchar *
+camel_session_get_storage_path (CamelSession *session, CamelService *service, GError **error)
+{
+ return g_strdup (camel_service_get_user_data_dir (service));
+}
+
#endif
diff --git a/src/utils/ews-camel-compat.h b/src/utils/ews-camel-compat.h
index f9f9d95..0bda345 100644
--- a/src/utils/ews-camel-compat.h
+++ b/src/utils/ews-camel-compat.h
@@ -34,10 +34,13 @@ camel_session_get_password_compat (CamelSession *session,
guint32 flags,
GError **error);
+CamelService * camel_session_get_service_compat (CamelSession *session, const gchar *url, CamelProviderType type);
#if ! EDS_CHECK_VERSION(3,1,0)
CamelURL * camel_service_get_camel_url (CamelService *service);
CamelServiceConnectionStatus camel_service_get_connection_status (CamelService *service);
+#else
+gchar * camel_session_get_storage_path (CamelSession *session, CamelService *service, GError **error);
#endif
#endif /* EWS_CAMEL_COMPAT_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]