aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-01-05 13:12:58 -0600
committerCharles Kerr <charles.kerr@canonical.com>2016-01-05 13:12:58 -0600
commitcbca1818ef142938022511abded7e39d671866ac (patch)
treeb655eb961c3265d3ffb987cf3e9740f6fbc2da73 /src/volume-control.vala
parentc0c4180561fba3e1ebe3f22381a4b5609e22f17b (diff)
parent58e4e5dd08444a193a52ae103f6bd432772dacc7 (diff)
downloadayatana-indicator-sound-cbca1818ef142938022511abded7e39d671866ac.tar.gz
ayatana-indicator-sound-cbca1818ef142938022511abded7e39d671866ac.tar.bz2
ayatana-indicator-sound-cbca1818ef142938022511abded7e39d671866ac.zip
adding lp:~xavi-garcia-mena/indicator-sound/restore-osd-notifications
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 6efac35..8e615ea 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -28,6 +28,17 @@ public abstract class VolumeControl : Object
VOLUME_STREAM_CHANGE
}
+ public enum ActiveOutput {
+ SPEAKERS,
+ HEADPHONES,
+ BLUETOOTH_HEADPHONES,
+ BLUETOOTH_SPEAKER,
+ USB_SPEAKER,
+ USB_HEADPHONES,
+ HDMI_SPEAKER,
+ HDMI_HEADPHONES
+ }
+
public class Volume : Object {
public double volume;
public VolumeReasons reason;
@@ -39,6 +50,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 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 { } }
@@ -56,4 +68,6 @@ public abstract class VolumeControl : Object
v.reason = reason;
this.volume = v;
}
+
+ public signal void active_output_changed (VolumeControl.ActiveOutput active_output);
}