diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-10-21 14:19:54 +0000 |
---|---|---|
committer | Bileto Bot <ci-train-bot@canonical.com> | 2016-10-21 14:19:54 +0000 |
commit | 3def83e1c5c34f63a3d36c4fff7f99a4d903a70f (patch) | |
tree | 337b9695c99dde56b25d6b20a20563adfb82bd41 /src/greeter.h | |
parent | 4f079d2faa6dd24f7ccd0566c4820a835fccce6a (diff) | |
parent | 7002fc4e6a6496fb5c0d3294540c957787689847 (diff) | |
download | ayatana-indicator-display-3def83e1c5c34f63a3d36c4fff7f99a4d903a70f.tar.gz ayatana-indicator-display-3def83e1c5c34f63a3d36c4fff7f99a4d903a70f.tar.bz2 ayatana-indicator-display-3def83e1c5c34f63a3d36c4fff7f99a4d903a70f.zip |
Fix test error in adbd-client-test
Approved by: unity-api-1-bot
Diffstat (limited to 'src/greeter.h')
-rw-r--r-- | src/greeter.h | 10 |
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; |