diff options
author | Michal Ratajsky <michal.ratajsky@gmail.com> | 2014-11-08 23:04:31 +0100 |
---|---|---|
committer | Michal Ratajsky <michal.ratajsky@gmail.com> | 2014-11-08 23:04:31 +0100 |
commit | 44651c5d2334da5dd295eca9c2e530b99348bdd6 (patch) | |
tree | ff27dab4ba61563bf04442d7d2c5f0547e2dbaea /examples | |
parent | 068d95e1c28b0e20e692c5ecb24f044542e82ae9 (diff) | |
download | libmatemixer-44651c5d2334da5dd295eca9c2e530b99348bdd6.tar.bz2 libmatemixer-44651c5d2334da5dd295eca9c2e530b99348bdd6.tar.xz |
Split MateMixerSwitchRole into MateMixerDeviceSwitchRole and MateMixerStreamSwitchRole
Diffstat (limited to 'examples')
-rw-r--r-- | examples/monitor.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/examples/monitor.c b/examples/monitor.c index 0e0d24e..3e99053 100644 --- a/examples/monitor.c +++ b/examples/monitor.c @@ -95,16 +95,26 @@ get_media_role_string (MateMixerStreamControlMediaRole role) } } -/* Convert MateMixerSwitchRole constant to a string */ +/* Convert MateMixerDeviceSwitchRole constant to a string */ static const gchar * -get_switch_role_string (MateMixerSwitchRole role) +get_device_switch_role_string (MateMixerDeviceSwitchRole role) { switch (role) { - case MATE_MIXER_SWITCH_ROLE_DEVICE_PROFILE: + case MATE_MIXER_DEVICE_SWITCH_ROLE_PROFILE: return "Device Profile"; - case MATE_MIXER_SWITCH_ROLE_PORT: + default: + return "Unknown"; + } +} + +/* Convert MateMixerStreamSwitchRole constant to a string */ +static const gchar * +get_stream_switch_role_string (MateMixerStreamSwitchRole role) +{ + switch (role) { + case MATE_MIXER_STREAM_SWITCH_ROLE_PORT: return "Port"; - case MATE_MIXER_SWITCH_ROLE_BOOST: + case MATE_MIXER_STREAM_SWITCH_ROLE_BOOST: return "Boost"; default: return "Unknown"; @@ -170,7 +180,7 @@ print_devices (void) "\t\tRole : %s\n", mate_mixer_switch_get_name (swtch), mate_mixer_switch_get_label (swtch), - get_switch_role_string (mate_mixer_switch_get_role (swtch))); + get_device_switch_role_string (mate_mixer_device_switch_get_role (MATE_MIXER_DEVICE_SWITCH (swtch)))); g_print ("\tOptions:\n"); @@ -256,7 +266,7 @@ print_streams (void) "\t\tRole : %s\n", mate_mixer_switch_get_name (swtch), mate_mixer_switch_get_label (swtch), - get_switch_role_string (mate_mixer_switch_get_role (swtch))); + get_stream_switch_role_string (mate_mixer_stream_switch_get_role (MATE_MIXER_STREAM_SWITCH (swtch)))); g_print ("\tOptions:\n"); |