aboutsummaryrefslogtreecommitdiff
path: root/src/sound-service-dbus.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-03-03 15:05:08 +0000
committerConor Curran <conor.curran@canonical.com>2010-03-03 15:05:08 +0000
commit259f58ec21be89f22f478243f4c8acf9a44231f9 (patch)
tree5bd8e50cdbe31544a4277cb74b4c764d0f86eee4 /src/sound-service-dbus.c
parent4bde209ef0f8ad381d70b2ade7eb3cf834eed074 (diff)
downloadayatana-indicator-sound-259f58ec21be89f22f478243f4c8acf9a44231f9.tar.gz
ayatana-indicator-sound-259f58ec21be89f22f478243f4c8acf9a44231f9.tar.bz2
ayatana-indicator-sound-259f58ec21be89f22f478243f4c8acf9a44231f9.zip
tests compiling
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r--src/sound-service-dbus.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 99a9d34..952a2d3 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -29,8 +29,7 @@
#include "sound-service-marshal.h"
#include "pulse-manager.h"
-// DBUS methods -
-// TODO - other should be static and moved from the header to here
+// DBUS methods
static gboolean sound_service_dbus_get_sink_volume(SoundServiceDbus* service, gdouble* volume_percent_input, GError** gerror);
static gboolean sound_service_dbus_get_sink_mute(SoundServiceDbus* service, gboolean* mute_input, GError** gerror);
static void sound_service_dbus_set_sink_volume(SoundServiceDbus* service, const guint volume_percent, GError** gerror);
@@ -41,7 +40,6 @@ typedef struct _SoundServiceDbusPrivate SoundServiceDbusPrivate;
struct _SoundServiceDbusPrivate
{
- DBusGConnection *system_bus;
DBusGConnection *connection;
gdouble volume_percent;
gboolean mute;
@@ -116,13 +114,10 @@ sound_service_dbus_init (SoundServiceDbus *self)
GError *error = NULL;
SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);
- priv->system_bus = NULL;
priv->connection = NULL;
priv->volume_percent = 0;
- /* Get the system bus */
- priv->system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
- /* Put the object on DBus */
+ /* Fetch the session bus */
priv->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if (error != NULL) {
@@ -130,6 +125,7 @@ sound_service_dbus_init (SoundServiceDbus *self)
g_error_free(error);
return;
}
+ /* register the service on it */
dbus_g_connection_register_g_object(priv->connection,
"/org/ayatana/indicator/sound/service",
G_OBJECT(self));