~xavi-garcia-mena/indicator-sound/icon-volume-zero

« back to all changes in this revision

Viewing changes to src/volume-control.vala

  • Committer: CI Train Bot
  • Author(s): Ted Gould
  • Date: 2015-02-19 16:27:42 UTC
  • mfrom: (476.1.11 volume-reason)
  • Revision ID: ci-train-bot@canonical.com-20150219162742-a2htz3ymmqad9htu
Track the reason a volume was set to filter volume changes more accurately Fixes: #1416520
Approved by: Jussi Pakkanen, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
public abstract class VolumeControl : Object
22
22
{
 
23
        public enum VolumeReasons {
 
24
                PULSE_CHANGE,
 
25
                ACCOUNTS_SERVICE_SET,
 
26
                DEVICE_OUTPUT_CHANGE,
 
27
                USER_KEYPRESS,
 
28
                VOLUME_STREAM_CHANGE
 
29
        }
 
30
 
 
31
        public class Volume : Object {
 
32
                public double volume;
 
33
                public VolumeReasons reason;
 
34
        }
 
35
 
23
36
        public virtual string stream { get { return ""; } }
24
37
        public virtual bool ready { get { return false; } set { } }
25
38
        public virtual bool active_mic { get { return false; } set { } }
26
39
        public virtual bool high_volume { get { return false; } }
27
40
        public virtual bool mute { get { return false; } }
28
41
        public virtual bool is_playing { get { return false; } }
29
 
        public virtual double volume { get { return 0.0; } set { } }
 
42
        private Volume _volume;
 
43
        public virtual Volume volume { get { return _volume; } set { } }
30
44
        public virtual double mic_volume { get { return 0.0; } set { } }
31
45
 
32
46
        public abstract void set_mute (bool mute);