aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-01-29 09:29:30 +0000
committerConor Curran <conor.curran@canonical.com>2010-01-29 09:29:30 +0000
commitf3baf71567c1b8840dafcdcbb73a793dd6064c0f (patch)
treeb455da1efaf5d34912441bdd15c489a102174131
parent93ae69dcd77bc81c3146c2321eb12226cd7704df (diff)
downloadayatana-indicator-sound-f3baf71567c1b8840dafcdcbb73a793dd6064c0f.tar.gz
ayatana-indicator-sound-f3baf71567c1b8840dafcdcbb73a793dd6064c0f.tar.bz2
ayatana-indicator-sound-f3baf71567c1b8840dafcdcbb73a793dd6064c0f.zip
volume setting dbus method now registering
-rw-r--r--src/sound-service-dbus.c11
-rw-r--r--src/sound-service-dbus.h6
-rw-r--r--src/sound-service.xml8
3 files changed, 13 insertions, 12 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 88ddd22..06117eb 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -25,7 +25,6 @@
#include <dbus/dbus-glib.h>
#include "dbus-shared-names.h"
#include "sound-service-dbus.h"
-//#include "sound-service-client.h"
#include "sound-service-server.h"
#include "common-defs.h"
#include "sound-service-marshal.h"
@@ -54,7 +53,6 @@ static void sound_service_dbus_class_init (SoundServiceDbusClass *klass);
static void sound_service_dbus_init (SoundServiceDbus *self);
static void sound_service_dbus_dispose (GObject *object);
static void sound_service_dbus_finalize (GObject *object);
-gboolean sound_service_dbus_set_sink_volume(SoundServiceDbus* service, const guint volume_percent, GError** gerror);
/* GObject Boilerplate */
G_DEFINE_TYPE (SoundServiceDbus, sound_service_dbus, G_TYPE_OBJECT);
@@ -82,8 +80,9 @@ sound_service_dbus_class_init (SoundServiceDbusClass *klass)
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_BOOLEAN);
}
-//void sound_service_dbus_sink_volume_changed (SoundServiceDbus* obj, gint volume);
-
+/**
+DBUS Method Callbacks
+**/
gboolean sound_service_dbus_set_sink_volume(SoundServiceDbus* service, const guint volume_percent, GError** gerror)
{
g_debug("in the set sink volume method in the sound service dbus! Holy Fuck with volume_percent of %i", volume_percent);
@@ -109,9 +108,7 @@ void sound_service_dbus_sink_input_while_muted(SoundServiceDbus* obj, gint sink_
value);
}
-
-
-
+
static void
sound_service_dbus_init (SoundServiceDbus *self)
{
diff --git a/src/sound-service-dbus.h b/src/sound-service-dbus.h
index c8a36a7..2210eac 100644
--- a/src/sound-service-dbus.h
+++ b/src/sound-service-dbus.h
@@ -53,7 +53,7 @@ struct _SoundServiceDbus {
struct _SoundServiceDbusClass {
GObjectClass parent_class;
- /* Signals -> outward messages*/
+ /* Signals -> outward messages to the DBUS and beyond*/
void (* sink_input_while_muted) (SoundServiceDbus *self, gint sink_index, gboolean is_muted, gpointer sound_data);
};
@@ -62,6 +62,10 @@ GType sound_service_dbus_get_type (void) G_GNUC_CONST;
// Utility methods to get the messages across into the sound-service-dbus
void sound_service_dbus_sink_input_while_muted (SoundServiceDbus* obj, gint sink_index, gboolean value);
+// DBUS METHODS
+gboolean sound_service_dbus_set_sink_volume(SoundServiceDbus* service, const guint volume_percent, GError** gerror);
+
+
G_END_DECLS
diff --git a/src/sound-service.xml b/src/sound-service.xml
index 08c6ab5..03827d3 100644
--- a/src/sound-service.xml
+++ b/src/sound-service.xml
@@ -1,10 +1,10 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/ayatana/indicator/sound">
<interface name="org.ayatana.indicator.sound">
-<!-- <method name = "SetSinkVolume">-->
-<!-- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="sound_service_dbus_set_sink_volume"/>-->
-<!-- <arg type='u' name='volume_percent' direction="in"/>-->
-<!-- </method>-->
+ <method name = "SetSinkVolume">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="sound_service_dbus_set_sink_volume"/>
+ <arg type='u' name='volume_percent' direction="in"/>
+ </method>
<!-- Will need to hook up another signal which monitors for volume change
Our respective UI element should listen to this and therefore will be updated with accurate setting-->
<!-- Triggered when a sink is muted but the input has been sent to that sink -->