aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-01 09:55:22 +0200
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-01 09:55:22 +0200
commit33a73fad65c52fc324ad3d35a6d1305a1489958d (patch)
treed1c9058705592e5ff7b56c9e9aae6ea57b502ff7 /src/volume-control.vala
parenta7fd579fd1bc6eb02433ccd72e9f54dca2615675 (diff)
downloadayatana-indicator-sound-33a73fad65c52fc324ad3d35a6d1305a1489958d.tar.gz
ayatana-indicator-sound-33a73fad65c52fc324ad3d35a6d1305a1489958d.tar.bz2
ayatana-indicator-sound-33a73fad65c52fc324ad3d35a6d1305a1489958d.zip
Changed to show a notification when the active output changes
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 4ef2c3e..738bdcd 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -28,6 +28,12 @@ public abstract class VolumeControl : Object
VOLUME_STREAM_CHANGE
}
+ public enum ActiveOutput {
+ SPEAKERS,
+ HEADPHONES,
+ BLUETOOTH_HEADPHONES
+ }
+
public class Volume : Object {
public double volume;
public VolumeReasons reason;
@@ -39,7 +45,7 @@ public abstract class VolumeControl : Object
public virtual bool high_volume { get { return false; } protected set { } }
public virtual bool mute { get { return false; } }
public virtual bool is_playing { get { return false; } }
- public virtual bool active_bluetooth_headphone { get { return false; } }
+ public virtual VolumeControl.ActiveOutput active_output { get { return VolumeControl.ActiveOutput.SPEAKERS; } }
private Volume _volume;
public virtual Volume volume { get { return _volume; } set { } }
public virtual double mic_volume { get { return 0.0; } set { } }
@@ -58,5 +64,5 @@ public abstract class VolumeControl : Object
this.volume = v;
}
- public signal void bluetooth_headset_status_changed (bool bluetooth_headset_active);
+ public signal void active_output_changed (VolumeControl.ActiveOutput active_output);
}