evolution r36071 - branches/mail-dbus-remoting/mail
- From: abharath svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36071 - branches/mail-dbus-remoting/mail
- Date: Tue, 26 Aug 2008 06:23:22 +0000 (UTC)
Author: abharath
Date: Tue Aug 26 06:23:22 2008
New Revision: 36071
URL: http://svn.gnome.org/viewvc/evolution?rev=36071&view=rev
Log:
Update some more functions and use gbooleans as INT32
Modified:
branches/mail-dbus-remoting/mail/camel-session-remote-impl.c
branches/mail-dbus-remoting/mail/camel-session-remote.c
branches/mail-dbus-remoting/mail/camel-session-remote.h
Modified: branches/mail-dbus-remoting/mail/camel-session-remote-impl.c
==============================================================================
--- branches/mail-dbus-remoting/mail/camel-session-remote-impl.c (original)
+++ branches/mail-dbus-remoting/mail/camel-session-remote-impl.c Tue Aug 26 06:23:22 2008
@@ -196,12 +196,12 @@
DBUS_TYPE_STRING, &session_str,
DBUS_TYPE_INT32, &alert,
DBUS_TYPE_STRING, &prompt,
- DBUS_TYPE_BOOLEAN, &cancel,
+ DBUS_TYPE_INT32, &cancel,
DBUS_TYPE_INVALID);
response = camel_session_alert_user (session, alert, prompt, cancel);
- dbus_message_append_args (return_val, DBUS_TYPE_BOOLEAN, response, DBUS_TYPE_INVALID);
+ dbus_message_append_args (return_val, DBUS_TYPE_INT32, response, DBUS_TYPE_INVALID);
g_free (err);
} else if (strcmp (method, "camel_session_build_password_prompt") == 0) {
gboolean ret;
@@ -227,7 +227,7 @@
is_online = camel_session_is_online (session);
- dbus_message_append_args (return_val, DBUS_TYPE_BOOLEAN, is_online, DBUS_TYPE_INVALID);
+ dbus_message_append_args (return_val, DBUS_TYPE_INT32, is_online, DBUS_TYPE_INVALID);
g_free (err);
} else if (strcmp (method, "camel_session_set_online") == 0) {
gboolean ret, set;
@@ -235,13 +235,38 @@
ret = dbus_message_get_args(message, NULL,
DBUS_TYPE_STRING, &session_str,
- DBUS_TYPE_BOOLEAN, &set,
+ DBUS_TYPE_INT32, &set,
DBUS_TYPE_INVALID);
camel_session_set_online (session, set);
dbus_message_append_args (return_val, DBUS_TYPE_INVALID);
g_free (err);
+ } else if (strcmp (method, "camel_session_check_junk") == 0) {
+ gboolean ret, check_junk;
+ char *session_str, *err = NULL;
+
+ ret = dbus_message_get_args(message, NULL,
+ DBUS_TYPE_STRING, &session_str,
+ DBUS_TYPE_INVALID);
+
+ check_junk = camel_session_check_junk (session);
+
+ dbus_message_append_args (return_val, DBUS_TYPE_INT32, check_junk, DBUS_TYPE_INVALID);
+ g_free (err);
+ } else if (strcmp (method, "camel_session_set_check_junk") == 0) {
+ gboolean ret, set_check;
+ char *session_str, *err = NULL;
+
+ ret = dbus_message_get_args(message, NULL,
+ DBUS_TYPE_STRING, &session_str,
+ DBUS_TYPE_INT32, &set_check,
+ DBUS_TYPE_INVALID);
+
+ camel_session_set_online (session, set_check);
+
+ dbus_message_append_args (return_val, DBUS_TYPE_INVALID);
+ g_free (err);
}
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 Tue Aug 26 06:23:22 2008
@@ -190,7 +190,7 @@
CAMEL_SESSION_INTERFACE,
"camel_session_alert_user",
&error,
- "sis(int)b=>(int)b", session->object_id, type, prompt, cancel, &success);
+ "sisi=>i", session->object_id, type, prompt, cancel, &success);
if (!ret) {
g_warning ("Error: Camel session alerting user: %s\n", error.message);
@@ -245,7 +245,7 @@
CAMEL_SESSION_INTERFACE,
"camel_session_is_online",
&error,
- "s=>(int)b", session->object_id, &is_online);
+ "s=>i", session->object_id, &is_online);
if (!ret) {
g_warning ("Error: Camel session check for online: %s\n", error.message);
@@ -285,4 +285,55 @@
return;
}
+gboolean
+camel_session_remote_check_junk (CamelSessionRemote *session)
+{
+ gboolean ret, check_junk;
+ DBusError error;
+
+ dbus_error_init (&error);
+ /* Invoke the appropriate dbind call to MailSessionRemoteImpl */
+ ret = dbind_context_method_call (evolution_dbus_peek_context(),
+ CAMEL_DBUS_NAME,
+ CAMEL_SESSION_OBJECT_PATH,
+ CAMEL_SESSION_INTERFACE,
+ "camel_session_check_junk",
+ &error,
+ "s=>i", session->object_id, &check_junk);
+ if (!ret) {
+ g_warning ("Error: Camel session check for junk: %s\n", error.message);
+ return 0;
+ }
+
+ d(printf("Camel session check for junk remotely\n"));
+
+ return check_junk;
+}
+
+void
+camel_session_remote_set_check_junk (CamelSessionRemote *session,
+ gboolean check_junk)
+{
+ gboolean ret;
+ DBusError error;
+
+ dbus_error_init (&error);
+ /* Invoke the appropriate dbind call to MailSessionRemoteImpl */
+ ret = dbind_context_method_call (evolution_dbus_peek_context(),
+ CAMEL_DBUS_NAME,
+ CAMEL_SESSION_OBJECT_PATH,
+ CAMEL_SESSION_INTERFACE,
+ "camel_session_set_check_junk",
+ &error,
+ "ss", session->object_id, check_junk);
+
+ if (!ret) {
+ g_warning ("Error: Camel session set check junk: %s\n", error.message);
+ return;
+ }
+
+ d(printf("Camel session set check junk remotely\n"));
+
+ return;
+}
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 Tue Aug 26 06:23:22 2008
@@ -46,3 +46,9 @@
void camel_session_remote_set_online (CamelSessionRemote *session,
gboolean online);
+gboolean camel_session_remote_check_junk (CamelSessionRemote *session);
+
+
+void camel_session_remote_set_check_junk (CamelSessionRemote *session,
+ gboolean check_junk);
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]