diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-08-01 18:33:44 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-08-01 18:33:44 -0500 |
commit | 5bc8ff5460d1b596649de5de71790aec952430b4 (patch) | |
tree | d2eb47a50316fb06766b33dbd1eaf3f193477a36 /src/bluetooth.vala | |
parent | cf894302767d5ec483b5f8002bb796a284895bbf (diff) | |
download | ayatana-indicator-bluetooth-5bc8ff5460d1b596649de5de71790aec952430b4.tar.gz ayatana-indicator-bluetooth-5bc8ff5460d1b596649de5de71790aec952430b4.tar.bz2 ayatana-indicator-bluetooth-5bc8ff5460d1b596649de5de71790aec952430b4.zip |
improve documentation on Killswitch, Bluetooth, and Bluez
Diffstat (limited to 'src/bluetooth.vala')
-rw-r--r-- | src/bluetooth.vala | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/bluetooth.vala b/src/bluetooth.vala index ad5ee09..b6d0e55 100644 --- a/src/bluetooth.vala +++ b/src/bluetooth.vala @@ -17,37 +17,35 @@ * Charles Kerr <charles.kerr@canonical.com> */ +/** + * Base class for the bluetooth backend. + */ public class Bluetooth: Object { - /*** - **** Properties - ***/ - + /* whether or not our system can be seen by other bluetooth devices */ public bool discoverable { get; protected set; default = false; } public virtual void try_set_discoverable (bool b) {} + /* whether or not there are any bluetooth adapters powered up on the system */ public bool powered { get; protected set; default = false; } + /* whether or not bluetooth's been disabled, + either by a software setting or physical hardware switch */ public bool blocked { get; protected set; default = true; } public virtual void try_set_blocked (bool b) { - kill_switch.try_set_blocked (b); + killswitch.try_set_blocked (b); } /*** **** Killswitch Implementation ***/ - protected KillSwitch kill_switch; + private KillSwitch killswitch; - public Bluetooth (KillSwitch kill_switch) + public Bluetooth (KillSwitch killswitch) { - this.kill_switch = kill_switch; - - message ("changing blocked to %d", (int)!this.kill_switch.blocked); - blocked = this.kill_switch.blocked; - kill_switch.notify["blocked"].connect (() => { - message ("bluetooth changing blocked to %d", (int)kill_switch.blocked); - this.blocked = kill_switch.blocked; - }); + this.killswitch = killswitch; + blocked = killswitch.blocked; + killswitch.notify["blocked"].connect (() => blocked = killswitch.blocked ); } } |