[gnome-pilot/dbus] Test with dbus method call



commit 21942f2897388980ed8b14c55369fc248ef181ec
Author: Halton Huo <halton huo sun com>
Date:   Tue Mar 16 16:00:08 2010 +0800

    Test with dbus method call
    
    org.gnome.GnomePilot.Daemon.GetUsers

 gpilotd/gnome-pilot-client.gob |    4 ++--
 gpilotd/gpilot-daemon.c        |    6 ++++++
 gpilotd/gpilot-daemon.xml      |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gpilotd/gnome-pilot-client.gob b/gpilotd/gnome-pilot-client.gob
index 927f2ad..c32c037 100644
--- a/gpilotd/gnome-pilot-client.gob
+++ b/gpilotd/gnome-pilot-client.gob
@@ -825,7 +825,7 @@ error:		if (file_copied == FALSE) {
 		arr = NULL;
 
 		res = dbus_g_proxy_call (self->proxy,
-					"GetPilots",
+					"GetUsers",
 					&error,
 					G_TYPE_INVALID,
 					dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING),
@@ -833,7 +833,7 @@ error:		if (file_copied == FALSE) {
 					G_TYPE_INVALID);
 
 		if (!res) {
-			g_warning ("Unable to GetPilots %s", error->message);
+			g_warning ("Unable to GetUsers%s", error->message);
 			g_error_free (error);
 			return GPILOTD_ERR_FAILED;
 		}
diff --git a/gpilotd/gpilot-daemon.c b/gpilotd/gpilot-daemon.c
index 1446081..701b39a 100644
--- a/gpilotd/gpilot-daemon.c
+++ b/gpilotd/gpilot-daemon.c
@@ -1947,6 +1947,12 @@ gpilot_daemon_get_system_info (GpilotDaemon   *daemon,
         return ret;
 }
 
+/* Example:
+dbus-send --session --dest=org.gnome.GnomePilot \
+--type=method_call --print-reply --reply-timeout=2000 \
+/org/gnome/GnomePilot/Daemon \
+org.gnome.GnomePilot.Daemon.GetUsers
+*/
 gboolean
 gpilot_daemon_get_users (GpilotDaemon   *daemon,
                          GPtrArray     **users,
diff --git a/gpilotd/gpilot-daemon.xml b/gpilotd/gpilot-daemon.xml
index 14bbc4b..b871fe7 100644
--- a/gpilotd/gpilot-daemon.xml
+++ b/gpilotd/gpilot-daemon.xml
@@ -184,7 +184,7 @@
     </method>
 
     <method name="GetUsers">
-      <arg name="users" direction="out" type="as">
+      <arg name="users" direction="out" type="ao">
         <doc:doc>
           <doc:summary>An array of user names.</doc:summary>
         </doc:doc>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]