aboutsummaryrefslogtreecommitdiff
path: root/src/sound-service-dbus.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-02-08 14:42:30 +0000
committerConor Curran <conor.curran@canonical.com>2010-02-08 14:42:30 +0000
commitf9ef87f71c488f6791e32b1cf7205fb65db81ce8 (patch)
treea3891347530ef81463595a2332ede9fc5161c1b0 /src/sound-service-dbus.c
parent470e751be8af2da3bbc69a1115d2ce19590cac5a (diff)
downloadayatana-indicator-sound-f9ef87f71c488f6791e32b1cf7205fb65db81ce8.tar.gz
ayatana-indicator-sound-f9ef87f71c488f6791e32b1cf7205fb65db81ce8.tar.bz2
ayatana-indicator-sound-f9ef87f71c488f6791e32b1cf7205fb65db81ce8.zip
automatic volume updates in progress
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r--src/sound-service-dbus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 5e22dae..9a325fe 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -43,6 +43,7 @@ struct _SoundServiceDbusPrivate
/* Signals */
enum {
SINK_INPUT_WHILE_MUTED,
+ SINK_VOLUME_UPDATE,
LAST_SIGNAL
};
@@ -81,6 +82,14 @@ sound_service_dbus_class_init (SoundServiceDbusClass *klass)
NULL, NULL,
_sound_service_marshal_VOID__INT_BOOLEAN,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_BOOLEAN);
+
+ signals[SINK_VOLUME_UPDATE] = g_signal_new("sink-volume-update",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
}
/**
@@ -116,6 +125,15 @@ void sound_service_dbus_sink_input_while_muted(SoundServiceDbus* obj, gint sink_
value);
}
+void sound_service_dbus_update_sink_volume(SoundServiceDbus* obj, gint sink_volume)
+{
+ g_debug("Emitting signal: UPDATE_SINK_VOLUME, with sink_volme %i", sink_volume);
+ g_signal_emit(obj,
+ signals[SINK_VOLUME_UPDATE],
+ 0,
+ sink_volume);
+}
+
void set_pa_sinks_hash(SoundServiceDbus *self, GHashTable *sinks)
{
SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (self);