Browse Source

device, mconnectctl: export and show connection status

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
bboozzoo/dbus-support-interfaces
Maciek Borzecki 8 years ago
parent
commit
5718b50330
2 changed files with 10 additions and 2 deletions
  1. +5
    -0
      src/mconnect/device-proxy.vala
  2. +5
    -2
      src/mconnectctl/main.vala

+ 5
- 0
src/mconnect/device-proxy.vala View File

@ -56,6 +56,11 @@ class DeviceDBusProxy : Object {
private set {} private set {}
default = false; default = false;
} }
public bool is_active {
get { return device.is_active; }
private set {}
default = false;
}
[DBus (visible = false)] [DBus (visible = false)]
public Device device {get; private set; default = null; } public Device device {get; private set; default = null; }


+ 5
- 2
src/mconnectctl/main.vala View File

@ -39,6 +39,7 @@ namespace Mconnect {
public abstract string address { owned get;} public abstract string address { owned get;}
public abstract bool is_paired { owned get;} public abstract bool is_paired { owned get;}
public abstract bool allowed { owned get;} public abstract bool allowed { owned get;}
public abstract bool is_active { owned get;}
} }
public class Client { public class Client {
@ -194,13 +195,15 @@ namespace Mconnect {
" Address: %s\n" + " Address: %s\n" +
" Type: %s\n" + " Type: %s\n" +
" Allowed: %s\n" + " Allowed: %s\n" +
" Paired: %s\n",
" Paired: %s\n" +
" Connected: %s\n",
dp.name, dp.name,
dp.id, dp.id,
dp.address, dp.address,
dp.device_type, dp.device_type,
dp.allowed.to_string(), dp.allowed.to_string(),
dp.is_paired.to_string());
dp.is_paired.to_string(),
dp.is_active.to_string());
return 0; return 0;
}); });
} }


Loading…
Cancel
Save