aboutsummaryrefslogtreecommitdiff
path: root/src/greeter.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-09-22 16:30:07 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-09-22 16:30:07 -0500
commitb7c135151300dee6d6cb433cd9df989d4f04935f (patch)
tree89e6097c31e509ddf5948280e2ec35fe4e670fb3 /src/greeter.h
parentfe6fe0ae1e87d46c6060045cc3b25865df4533bd (diff)
parent403fd0a388e565daf195729d9211ff03c23c93a0 (diff)
downloadayatana-indicator-display-b7c135151300dee6d6cb433cd9df989d4f04935f.tar.gz
ayatana-indicator-display-b7c135151300dee6d6cb433cd9df989d4f04935f.tar.bz2
ayatana-indicator-display-b7c135151300dee6d6cb433cd9df989d4f04935f.zip
sync with lp:~charlesk/indicator-display/lp-1572545-prompt-in-lockscreen
Diffstat (limited to 'src/greeter.h')
-rw-r--r--src/greeter.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/greeter.h b/src/greeter.h
index e084d25..f3012f6 100644
--- a/src/greeter.h
+++ b/src/greeter.h
@@ -29,7 +29,13 @@ class Greeter
public:
Greeter();
virtual ~Greeter();
- virtual core::Property<bool>& is_active() =0;
+
+ enum class State { UNAVAILABLE, INACTIVE, ACTIVE };
+static inline const char* state_str(const State& state) {
+ static constexpr char const * state_str[] = { "Unavailable", "Inactive", "Active" };
+ return state_str[int(state)];
+}
+ virtual core::Property<State>& state() =0;
};
@@ -38,7 +44,7 @@ class UnityGreeter: public Greeter
public:
UnityGreeter();
virtual ~UnityGreeter();
- core::Property<bool>& is_active() override;
+ core::Property<State>& state() override;
protected:
class Impl;