[Frugalware-git] fun: fun-dbus: Added another argument to fun_dbus_perform_service()

Priyank priyank at frugalware.org
Tue Nov 20 14:22:06 CET 2007


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fun.git;a=commitdiff;h=183788b85965e3a3a1c7dd54c13c2cf33eb951fb

commit 183788b85965e3a3a1c7dd54c13c2cf33eb951fb
Author: Priyank <priyank at frugalware.org>
Date:   Mon Nov 19 00:59:04 2007 +0530

fun-dbus: Added another argument to fun_dbus_perform_service()
* fun_dbus_perform_service() now accepts another argument for IN parameter.
* fun-dbus.h: Added constants GET_PACKAGE_VERSION and GET_PACKAGE_DESCRIPTION

diff --git a/src/fun-dbus.c b/src/fun-dbus.c
index e467793..d1670f9 100644
--- a/src/fun-dbus.c
+++ b/src/fun-dbus.c
@@ -40,7 +40,7 @@ fun_dbus_init (void)
}

gboolean
-fun_dbus_perform_service (guint service, gchar **package_list)
+fun_dbus_perform_service (guint service, gchar *ip_arg, gchar **op_arg)
{
DBusMessage	*message = NULL;
DBusMessage	*reply = NULL;
@@ -64,7 +64,7 @@ fun_dbus_perform_service (guint service, gchar **package_list)
return FALSE;
}
if (!dbus_message_get_args (reply, &error,
-						DBUS_TYPE_STRING, package_list,
+						DBUS_TYPE_STRING, op_arg,
DBUS_TYPE_INVALID))
{
fprintf (stderr, "ERROR: %s\n", error.message);
diff --git a/src/fun-dbus.h b/src/fun-dbus.h
index 724be78..182cbb9 100644
--- a/src/fun-dbus.h
+++ b/src/fun-dbus.h
@@ -6,11 +6,13 @@
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>

-#define PERFORM_UPDATE	1
-#define TEST_SERVICE	2
+#define PERFORM_UPDATE			1
+#define TEST_SERVICE			2
+#define GET_PACKAGE_VERSION		3
+#define GET_PACKAGE_DESCRIPTION	4

gboolean fun_dbus_init (void);

-gboolean fun_dbus_perform_service (guint, gchar **);
+gboolean fun_dbus_perform_service (guint, gchar *, gchar **);

#endif
diff --git a/src/fun-ui.c b/src/fun-ui.c
index d37805a..8dd4ed6 100644
--- a/src/fun-ui.c
+++ b/src/fun-ui.c
@@ -462,7 +462,7 @@ fun_ui_init (void)
fun_main_window_init ();
fun_config_dialog_init ();

-	if (fun_dbus_perform_service (TEST_SERVICE, NULL) == FALSE)
+	if (fun_dbus_perform_service (TEST_SERVICE, NULL, NULL) == FALSE)
{
g_print (_("Failed to connect to the fun daemon\n"));
fun_tooltip_set_text2 (tooltip, _("Not connected to fun daemon"), FALSE);
@@ -485,7 +485,7 @@ fun_timeout_conn (void)
{
if (connected == TRUE)
return FALSE;
-	if (fun_dbus_perform_service (TEST_SERVICE, NULL) == FALSE)
+	if (fun_dbus_perform_service (TEST_SERVICE, NULL, NULL) == FALSE)
{
connected = FALSE;
}
@@ -514,7 +514,7 @@ fun_timeout_func (void)
* disable the "check" button so that the user doesn't interrupt the
* checking process */
gtk_widget_set_sensitive (fun_check_btn, FALSE);
-	if (fun_dbus_perform_service (PERFORM_UPDATE, &plist)==TRUE)
+	if (fun_dbus_perform_service (PERFORM_UPDATE, NULL, &plist)==TRUE)
{
//g_print ("\nlist is\n %s", plist);
fun_tooltip_set_text1 (tooltip, _("Updates are available"), TRUE);


More information about the Frugalware-git mailing list