summaryrefslogtreecommitdiff
path: root/libmatemixer/matemixer-stream.c
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-11-08 23:19:34 +0100
committerMichal Ratajsky <[email protected]>2014-11-08 23:19:34 +0100
commitfae2085e39de4e49b692e334c6482442f6c83007 (patch)
tree081dc44150eef7eb2b1f78e0b84ba0fccd803a06 /libmatemixer/matemixer-stream.c
parent44651c5d2334da5dd295eca9c2e530b99348bdd6 (diff)
downloadlibmatemixer-fae2085e39de4e49b692e334c6482442f6c83007.tar.bz2
libmatemixer-fae2085e39de4e49b692e334c6482442f6c83007.tar.xz
Return MateMixerDeviceSwitch and MateMixerStreamSwitch from functions when feasible and include docs of the new classes
Diffstat (limited to 'libmatemixer/matemixer-stream.c')
-rw-r--r--libmatemixer/matemixer-stream.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libmatemixer/matemixer-stream.c b/libmatemixer/matemixer-stream.c
index 3d8b96e..b5db39a 100644
--- a/libmatemixer/matemixer-stream.c
+++ b/libmatemixer/matemixer-stream.c
@@ -25,6 +25,7 @@
#include "matemixer-stream.h"
#include "matemixer-stream-control.h"
#include "matemixer-stream-private.h"
+#include "matemixer-stream-switch.h"
#include "matemixer-switch.h"
/**
@@ -82,7 +83,7 @@ G_DEFINE_ABSTRACT_TYPE (MateMixerStream, mate_mixer_stream, G_TYPE_OBJECT)
static MateMixerStreamControl *mate_mixer_stream_real_get_control (MateMixerStream *stream,
const gchar *name);
-static MateMixerSwitch * mate_mixer_stream_real_get_switch (MateMixerStream *stream,
+static MateMixerStreamSwitch * mate_mixer_stream_real_get_switch (MateMixerStream *stream,
const gchar *name);
static void
@@ -371,8 +372,12 @@ mate_mixer_stream_get_control (MateMixerStream *stream, const gchar *name)
* mate_mixer_stream_get_switch:
* @stream: a #MateMixerStream
* @name: the name of a stream switch
+ *
+ * Gets the switch with the given name.
+ *
+ * Returns: a #MateMixerStreamSwitch or %NULL if there is no such switch.
*/
-MateMixerSwitch *
+MateMixerStreamSwitch *
mate_mixer_stream_get_switch (MateMixerStream *stream, const gchar *name)
{
g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), NULL);
@@ -451,7 +456,7 @@ mate_mixer_stream_real_get_control (MateMixerStream *stream, const gchar *name)
return NULL;
}
-static MateMixerSwitch *
+static MateMixerStreamSwitch *
mate_mixer_stream_real_get_switch (MateMixerStream *stream, const gchar *name)
{
const GList *list;
@@ -464,7 +469,7 @@ mate_mixer_stream_real_get_switch (MateMixerStream *stream, const gchar *name)
MateMixerSwitch *swtch = MATE_MIXER_SWITCH (list->data);
if (strcmp (name, mate_mixer_switch_get_name (swtch)) == 0)
- return swtch;
+ return MATE_MIXER_STREAM_SWITCH (swtch);
list = list->next;
}