aboutsummaryrefslogtreecommitdiff
path: root/src/sound-service-dbus.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-06-21 18:26:10 +0200
committerConor Curran <conor.curran@canonical.com>2011-06-21 18:26:10 +0200
commita6dee99edd1a3870c4dc4557f605578c52a4f0dc (patch)
tree6945b0519d0579577c0d8cd5316c626215449c77 /src/sound-service-dbus.c
parent5e112656817e193c26ee462f4beffb83c08858f4 (diff)
downloadayatana-indicator-sound-a6dee99edd1a3870c4dc4557f605578c52a4f0dc.tar.gz
ayatana-indicator-sound-a6dee99edd1a3870c4dc4557f605578c52a4f0dc.tar.bz2
ayatana-indicator-sound-a6dee99edd1a3870c4dc4557f605578c52a4f0dc.zip
custom marshaller in place to handle the string string signature on our item specific dbus methods
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r--src/sound-service-dbus.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 5d7c4cd..d546ceb 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -32,6 +32,7 @@
#include "device.h"
#include "gen-sound-service.xml.h"
#include "dbus-shared-names.h"
+#include "sound-service-marshal.h"
// DBUS methods
static void bus_method_call (GDBusConnection * connection,
@@ -123,7 +124,7 @@ sound_service_dbus_class_init (SoundServiceDbusClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
+ _sound_service_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 2, G_TYPE_STRING,
G_TYPE_STRING);
signals[PLAYER_SPECIFIC_ITEM] = g_signal_new("player-specific-item-requested",
@@ -131,7 +132,7 @@ sound_service_dbus_class_init (SoundServiceDbusClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
+ _sound_service_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 2, G_TYPE_STRING,
G_TYPE_STRING);
}
@@ -321,23 +322,31 @@ bus_method_call (GDBusConnection * connection,
retval = g_variant_new ("(b)", result);
}
else if (g_strcmp0(method, "EnableTrackSpecificItems") == 0) {
- gchar** player_object_path_and_id;
- g_variant_get (params, "(ss)", &player_object_path_and_id);
- /*g_debug ("EnableTrackSpecificItems - name %s", player_object_path);
+ gchar* player_object_path;
+ gchar* player_id;
+ g_variant_get (params, "(os)", &player_object_path, &player_id);
+ //g_debug ("object path = %s and id = %s", player_object_path, player_id);
g_signal_emit (service,
signals[TRACK_SPECIFIC_ITEM],
0,
- player_object_path);*/
+ player_object_path,
+ player_id);
+ g_free (player_object_path);
+ g_free (player_id);
}
else if (g_strcmp0(method, "EnablePlayerSpecificItems") == 0) {
- /*gchar* player_object_path;
- g_variant_get (params, "(s)", &player_object_path);
- g_debug ("EnableTrackSpecificItems - name %s", player_object_path);
+ gchar* player_object_path;
+ gchar* player_id;
+ g_variant_get (params, "(os)", &player_object_path, &player_id);
+ //g_debug ("object path = %s and id = %s", player_object_path, player_id);
g_signal_emit (service,
- signals[TRACK_SPECIFIC_ITEM],
+ signals[PLAYER_SPECIFIC_ITEM],
0,
- player_object_path);*/
+ player_object_path,
+ player_id);
+ g_free (player_object_path);
+ g_free (player_id);
}
else {
g_warning("Calling method '%s' on the sound service but it's unknown", method);