evolution r36097 - branches/mail-dbus-remoting/mail
- From: abharath svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36097 - branches/mail-dbus-remoting/mail
- Date: Wed, 27 Aug 2008 05:14:09 +0000 (UTC)
Author: abharath
Date: Wed Aug 27 05:14:09 2008
New Revision: 36097
URL: http://svn.gnome.org/viewvc/evolution?rev=36097&view=rev
Log:
Fixes some store crashes and added CamelException for all Session calls
Modified:
branches/mail-dbus-remoting/mail/camel-session-remote.c
branches/mail-dbus-remoting/mail/camel-session-remote.h
branches/mail-dbus-remoting/mail/camel-store-remote-impl.c
branches/mail-dbus-remoting/mail/camel-store-remote.c
branches/mail-dbus-remoting/mail/camel-store-remote.h
branches/mail-dbus-remoting/mail/mail-ops.c
Modified: branches/mail-dbus-remoting/mail/camel-session-remote.c
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-session-remote.c (original)
+++ branches/mail-dbus-remoting/mail/camel-session-remote.c Wed Aug 27 05:14:09 2008
@@ -59,11 +59,12 @@
const char *domain,
const char *prompt,
const char *item,
- guint32 flags)
+ guint32 flags,
+ CamelException *ex)
{
gboolean ret;
DBusError error;
- char *passwd, *ex;
+ char *passwd, *err;
dbus_error_init (&error);
/* Invoke the appropriate dbind call to MailSessionRemoteImpl */
@@ -73,7 +74,7 @@
CAMEL_SESSION_INTERFACE,
"camel_session_get_password",
&error,
- "sssssu=>ss", session->object_id, service->object_id, domain, prompt, item, flags, &passwd, &ex);
+ "sssssu=>ss", session->object_id, service->object_id, domain, prompt, item, flags, &passwd, &err);
if (!ret) {
g_warning ("Error: Camel session fetching password: %s\n", error.message);
@@ -86,11 +87,11 @@
}
char *
-camel_session_remote_get_storage_path (CamelSessionRemote *session, CamelObjectRemote *service)
+camel_session_remote_get_storage_path (CamelSessionRemote *session, CamelObjectRemote *service, CamelException *ex)
{
gboolean ret;
DBusError error;
- char *storage_path, *ex;
+ char *storage_path, *err;
dbus_error_init (&error);
/* Invoke the appropriate dbind call to MailSessionRemoteImpl */
@@ -100,7 +101,7 @@
CAMEL_SESSION_INTERFACE,
"camel_session_get_storage_path",
&error,
- "ss=>ss", session->object_id, service->object_id, &storage_path, &ex);
+ "ss=>ss", session->object_id, service->object_id, &storage_path, &err);
if (!ret) {
g_warning ("Error: Camel session fetching storage path: %s\n", error.message);
@@ -116,11 +117,12 @@
camel_session_remote_forget_password (CamelSessionRemote *session,
CamelObjectRemote *service,
const char *domain,
- const char *item)
+ const char *item,
+ CamelException *ex)
{
gboolean ret;
DBusError error;
- char *ex;
+ char *err;
dbus_error_init (&error);
/* Invoke the appropriate dbind call to MailSessionRemoteImpl */
@@ -130,7 +132,7 @@
CAMEL_SESSION_INTERFACE,
"camel_session_forget_password",
&error,
- "ssss=>s", session->object_id, service->object_id, domain, item, &ex);
+ "ssss=>s", session->object_id, service->object_id, domain, item, &err);
if (!ret) {
g_warning ("Error: Camel session forget password: %s\n", error.message);
@@ -148,7 +150,7 @@
{
gboolean ret;
DBusError error;
- char *service;
+ char *service, *err;
CamelObjectRemote *rstore;
dbus_error_init (&error);
@@ -159,7 +161,7 @@
CAMEL_SESSION_INTERFACE,
"camel_session_get_service",
&error,
- "si=>ss", url_string, type, &service, &ex);
+ "si=>ss", url_string, type, &service, &err);
if (!ret) {
g_warning ("Error: Camel session get service: %s\n", error.message);
Modified: branches/mail-dbus-remoting/mail/camel-session-remote.h
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-session-remote.h (original)
+++ branches/mail-dbus-remoting/mail/camel-session-remote.h Wed Aug 27 05:14:09 2008
@@ -30,15 +30,18 @@
const char *domain,
const char *prompt,
const char *item,
- guint32 flags);
+ guint32 flags,
+ CamelException *ex);
char *camel_session_remote_get_storage_path (CamelSessionRemote *session,
- CamelObjectRemote *service);
+ CamelObjectRemote *service,
+ CamelException *ex);
void camel_session_remote_forget_password (CamelSessionRemote *session,
CamelObjectRemote *service,
const char *domain,
- const char *item);
+ const char *item,
+ CamelException *ex);
CamelObjectRemote *camel_session_remote_get_service (CamelSessionRemote *session,
Modified: branches/mail-dbus-remoting/mail/camel-store-remote-impl.c
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-store-remote-impl.c (original)
+++ branches/mail-dbus-remoting/mail/camel-store-remote-impl.c Wed Aug 27 05:14:09 2008
@@ -417,6 +417,20 @@
store = g_hash_table_lookup(store_hash, store_hash_key);
store->mode = mode;
+ } else if (!g_strcmp0(method, "camel_store_get_url")) {
+ char *url, *store_hash_key;
+ CamelStore *store;
+
+ dbus_message_get_args(message,
+ NULL,
+ DBUS_TYPE_STRING,
+ &store_hash_key,
+ DBUS_TYPE_INVALID);
+
+ store = g_hash_table_lookup(store_hash, store_hash_key);
+ url = camel_service_get_url((CamelService *)store);
+ dbus_message_append_args(reply, DBUS_TYPE_STRING,
+ &url, DBUS_TYPE_INVALID);
} else
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
Modified: branches/mail-dbus-remoting/mail/camel-store-remote.c
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-store-remote.c (original)
+++ branches/mail-dbus-remoting/mail/camel-store-remote.c Wed Aug 27 05:14:09 2008
@@ -378,3 +378,21 @@
return;
}
+
+char *camel_store_get_url_remote(CamelStoreRemote *store)
+{
+ gboolean ret;
+ DBusError error;
+ char *url;
+
+ dbus_error_init(&error);
+
+ ret = dbind_context_method_call(evolution_dbus_peek_context(),
+ CAMEL_DBUS_NAME,
+ CAMEL_STORE_OBJECT_PATH,
+ CAMEL_STORE_INTERFACE,
+ "camel_store_get_url",
+ &error, "s=>s", store->object_id, &url);
+
+ return url;
+}
Modified: branches/mail-dbus-remoting/mail/camel-store-remote.h
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-store-remote.h (original)
+++ branches/mail-dbus-remoting/mail/camel-store-remote.h Wed Aug 27 05:14:09 2008
@@ -49,4 +49,6 @@
guint32 camel_store_get_flags_remote(CamelStoreRemote * store);
void camel_store_set_mode_remote(CamelStoreRemote * store, guint32 mode);
void camel_store_set_flags_remote(CamelStoreRemote * store, guint32 mode);
+
+char *camel_store_get_url_remote(CamelStoreRemote *store);
#endif
Modified: branches/mail-dbus-remoting/mail/mail-ops.c
==============================================================================
--- branches/mail-dbus-remoting/mail/mail-ops.c (original)
+++ branches/mail-dbus-remoting/mail/mail-ops.c Wed Aug 27 05:14:09 2008
@@ -1557,7 +1557,7 @@
{
char *uri, *res;
- uri = camel_url_to_string(((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL);
+ uri = camel_store_get_url_remote(m->store);
res = g_strdup_printf(m->expunge
?_("Expunging and storing account '%s'")
:_("Storing account '%s'"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]