aboutsummaryrefslogtreecommitdiff
path: root/src/greeter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/greeter.h')
-rw-r--r--src/greeter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/greeter.h b/src/greeter.h
index cde1429..f3012f6 100644
--- a/src/greeter.h
+++ b/src/greeter.h
@@ -31,6 +31,10 @@ public:
virtual ~Greeter();
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;
};