diff options
author | Michal Ratajsky <[email protected]> | 2014-05-24 21:01:21 +0200 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-05-24 21:01:21 +0200 |
commit | 4db8dc0cbb3959d6278a9e7650d5103a475ab897 (patch) | |
tree | 4bc508298ce65013a5819cf0cdde7444c23abdb2 /backends/pulse/pulse-device.c | |
parent | caf4d9b8b8b0d26856d2d64f00ab23756867a923 (diff) | |
download | libmatemixer-4db8dc0cbb3959d6278a9e7650d5103a475ab897.tar.bz2 libmatemixer-4db8dc0cbb3959d6278a9e7650d5103a475ab897.tar.xz |
General additions and improvements
Diffstat (limited to 'backends/pulse/pulse-device.c')
-rw-r--r-- | backends/pulse/pulse-device.c | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/backends/pulse/pulse-device.c b/backends/pulse/pulse-device.c index 75c5a32..4421e97 100644 --- a/backends/pulse/pulse-device.c +++ b/backends/pulse/pulse-device.c @@ -57,7 +57,11 @@ G_DEFINE_TYPE_WITH_CODE (MateMixerPulseDevice, mate_mixer_pulse_device, G_TYPE_O static void mate_mixer_device_interface_init (MateMixerDeviceInterface *iface) { - + iface->list_tracks = mate_mixer_pulse_device_list_tracks; + iface->get_ports = mate_mixer_pulse_device_get_ports; + iface->get_profiles = mate_mixer_pulse_device_get_profiles; + iface->get_active_profile = mate_mixer_pulse_device_get_active_profile; + iface->set_active_profile = mate_mixer_pulse_device_set_active_profile; } static void @@ -119,7 +123,9 @@ mate_mixer_pulse_device_set_property (GObject *object, device->priv->icon = g_strdup (g_value_get_string (value)); break; case PROP_ACTIVE_PROFILE: - // TODO + mate_mixer_pulse_device_set_active_profile ( + MATE_MIXER_DEVICE (device), + g_value_get_object (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); @@ -261,33 +267,50 @@ mate_mixer_pulse_device_new (const pa_card_info *info) return device; } +gboolean +mate_mixer_pulse_device_update (MateMixerPulseDevice *device, const pa_card_info *info) +{ + g_return_val_if_fail (MATE_MIXER_IS_PULSE_DEVICE (device), FALSE); + g_return_val_if_fail (info != NULL, FALSE); + + // TODO: update status, active_profile, maybe others? + return TRUE; +} + +const GList * +mate_mixer_pulse_device_list_tracks (MateMixerDevice *device) +{ + // TODO + return NULL; +} + const GList * -mate_mixer_pulse_device_get_ports (MateMixerPulseDevice *device) +mate_mixer_pulse_device_get_ports (MateMixerDevice *device) { g_return_val_if_fail (MATE_MIXER_IS_PULSE_DEVICE (device), NULL); - return device->priv->ports; + return MATE_MIXER_PULSE_DEVICE (device)->priv->ports; } const GList * -mate_mixer_pulse_device_get_profiles (MateMixerPulseDevice *device) +mate_mixer_pulse_device_get_profiles (MateMixerDevice *device) { g_return_val_if_fail (MATE_MIXER_IS_PULSE_DEVICE (device), NULL); - return device->priv->profiles; + return MATE_MIXER_PULSE_DEVICE (device)->priv->profiles; } MateMixerDeviceProfile * -mate_mixer_pulse_device_get_active_profile (MateMixerPulseDevice *device) +mate_mixer_pulse_device_get_active_profile (MateMixerDevice *device) { g_return_val_if_fail (MATE_MIXER_IS_PULSE_DEVICE (device), NULL); - return device->priv->active_profile; + return MATE_MIXER_PULSE_DEVICE (device)->priv->active_profile; } gboolean -mate_mixer_pulse_device_set_active_profile (MateMixerPulseDevice *device, - MateMixerDeviceProfile *profile) +mate_mixer_pulse_device_set_active_profile (MateMixerDevice *device, + MateMixerDeviceProfile *profile) { g_return_val_if_fail (MATE_MIXER_IS_PULSE_DEVICE (device), FALSE); g_return_val_if_fail (MATE_MIXER_IS_DEVICE_PROFILE (profile), FALSE); @@ -296,13 +319,3 @@ mate_mixer_pulse_device_set_active_profile (MateMixerPulseDevice *device, // pa_context_set_card_profile_by_index () return TRUE; } - -gboolean -mate_mixer_pulse_device_update (MateMixerPulseDevice *device, const pa_card_info *info) -{ - g_return_val_if_fail (MATE_MIXER_IS_PULSE_DEVICE (device), FALSE); - g_return_val_if_fail (info != NULL, FALSE); - - // TODO: update status, active_profile, maybe others? - return TRUE; -} |