From 5718b5033021e2b98957fa1470cf5859e9aeefb0 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Mon, 5 Jun 2017 08:57:56 +0200 Subject: [PATCH] device, mconnectctl: export and show connection status Signed-off-by: Maciek Borzecki --- src/mconnect/device-proxy.vala | 5 +++++ src/mconnectctl/main.vala | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mconnect/device-proxy.vala b/src/mconnect/device-proxy.vala index 7215305..2865d51 100644 --- a/src/mconnect/device-proxy.vala +++ b/src/mconnect/device-proxy.vala @@ -56,6 +56,11 @@ class DeviceDBusProxy : Object { private set {} default = false; } + public bool is_active { + get { return device.is_active; } + private set {} + default = false; + } [DBus (visible = false)] public Device device {get; private set; default = null; } diff --git a/src/mconnectctl/main.vala b/src/mconnectctl/main.vala index 17b93a1..777279a 100644 --- a/src/mconnectctl/main.vala +++ b/src/mconnectctl/main.vala @@ -39,6 +39,7 @@ namespace Mconnect { public abstract string address { owned get;} public abstract bool is_paired { owned get;} public abstract bool allowed { owned get;} + public abstract bool is_active { owned get;} } public class Client { @@ -194,13 +195,15 @@ namespace Mconnect { " Address: %s\n" + " Type: %s\n" + " Allowed: %s\n" + - " Paired: %s\n", + " Paired: %s\n" + + " Connected: %s\n", dp.name, dp.id, dp.address, dp.device_type, dp.allowed.to_string(), - dp.is_paired.to_string()); + dp.is_paired.to_string(), + dp.is_active.to_string()); return 0; }); }