diff options
author | Michal Ratajsky <[email protected]> | 2014-11-08 23:19:34 +0100 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-11-08 23:19:34 +0100 |
commit | fae2085e39de4e49b692e334c6482442f6c83007 (patch) | |
tree | 081dc44150eef7eb2b1f78e0b84ba0fccd803a06 /libmatemixer/matemixer-device.c | |
parent | 44651c5d2334da5dd295eca9c2e530b99348bdd6 (diff) | |
download | libmatemixer-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-device.c')
-rw-r--r-- | libmatemixer/matemixer-device.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libmatemixer/matemixer-device.c b/libmatemixer/matemixer-device.c index f9d368b..cda9657 100644 --- a/libmatemixer/matemixer-device.c +++ b/libmatemixer/matemixer-device.c @@ -20,6 +20,7 @@ #include <glib-object.h> #include "matemixer-device.h" +#include "matemixer-device-switch.h" #include "matemixer-stream.h" #include "matemixer-switch.h" @@ -76,10 +77,10 @@ static void mate_mixer_device_finalize (GObject *object); G_DEFINE_ABSTRACT_TYPE (MateMixerDevice, mate_mixer_device, G_TYPE_OBJECT) -static MateMixerStream *mate_mixer_device_real_get_stream (MateMixerDevice *device, - const gchar *name); -static MateMixerSwitch *mate_mixer_device_real_get_switch (MateMixerDevice *device, - const gchar *name); +static MateMixerStream * mate_mixer_device_real_get_stream (MateMixerDevice *device, + const gchar *name); +static MateMixerDeviceSwitch *mate_mixer_device_real_get_switch (MateMixerDevice *device, + const gchar *name); static void mate_mixer_device_class_init (MateMixerDeviceClass *klass) @@ -398,9 +399,9 @@ mate_mixer_device_get_stream (MateMixerDevice *device, const gchar *name) * To get a stream switch, rather than a device switch, use * mate_mixer_stream_get_switch(). * - * Returns: a #MateMixerSwitch or %NULL if there is no such device switch. + * Returns: a #MateMixerDeviceSwitch or %NULL if there is no such device switch. */ -MateMixerSwitch * +MateMixerDeviceSwitch * mate_mixer_device_get_switch (MateMixerDevice *device, const gchar *name) { return MATE_MIXER_DEVICE_GET_CLASS (device)->get_switch (device, name); @@ -487,7 +488,7 @@ mate_mixer_device_real_get_stream (MateMixerDevice *device, const gchar *name) return NULL; } -static MateMixerSwitch * +static MateMixerDeviceSwitch * mate_mixer_device_real_get_switch (MateMixerDevice *device, const gchar *name) { const GList *list; @@ -500,7 +501,7 @@ mate_mixer_device_real_get_switch (MateMixerDevice *device, 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_DEVICE_SWITCH (swtch); list = list->next; } |