aboutsummaryrefslogtreecommitdiff
path: root/src/active-sink.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-02-03 18:36:34 +0000
committerConor Curran <conor.curran@canonical.com>2011-02-03 18:36:34 +0000
commitff857b05deb7f7385c9d4d8d43be19fca225c6ca (patch)
treef438060d7bc494a15d3be5166fd21669b73e0a2a /src/active-sink.c
parent7070e44eced4d173c0e175948b3da4ca9f9497b9 (diff)
downloadayatana-indicator-sound-ff857b05deb7f7385c9d4d8d43be19fca225c6ca.tar.gz
ayatana-indicator-sound-ff857b05deb7f7385c9d4d8d43be19fca225c6ca.tar.bz2
ayatana-indicator-sound-ff857b05deb7f7385c9d4d8d43be19fca225c6ca.zip
basics established
Diffstat (limited to 'src/active-sink.c')
-rw-r--r--src/active-sink.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/active-sink.c b/src/active-sink.c
index ee211ef..8ba88d8 100644
--- a/src/active-sink.c
+++ b/src/active-sink.c
@@ -25,6 +25,7 @@ typedef struct _ActiveSinkPrivate ActiveSinkPrivate;
struct _ActiveSinkPrivate
{
+ sink_details* details;
};
#define ACTIVE_SINK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ACTIVE_SINK_TYPE, ActiveSinkPrivate))
@@ -52,11 +53,21 @@ active_sink_class_init (ActiveSinkClass *klass)
static void
active_sink_init(ActiveSink *self)
{
+ ActiveSinkPrivate* priv = ACTIVE_SINK_GET_PRIVATE(sink);
+ priv->details = NULL;
}
static void
active_sink_dispose (GObject *object)
{
+ ActiveSink * self = ACTIVE_SINK(object);
+ ActiveSinkPrivate* priv = ACTIVE_SINK_GET_PRIVATE(sink);
+
+ if (priv->details != NULL) {
+ g_free (priv->details->name);
+ g_free (priv->details);
+ }
+
G_OBJECT_CLASS (active_sink_parent_class)->dispose (object);
}
@@ -65,3 +76,19 @@ active_sink_finalize (GObject *object)
{
G_OBJECT_CLASS (active_sink_parent_class)->finalize (object);
}
+
+void
+active_sink_update_details (ActiveSink* sink, sink_details* details)
+{
+ ActiveSinkPrivate* priv = ACTIVE_SINK_GET_PRIVATE(sink);
+ priv->details = details;
+}
+
+void gboolean
+active_sink_is_populated (ActiveSink* sink)
+{
+ ActiveSinkPrivate* priv = ACTIVE_SINK_GET_PRIVATE(sink);
+ return (priv->details != NULL)
+}
+
+ \ No newline at end of file