X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftimer.h;h=f5c5c64f2509ceb63d4878395ce6bfdb5ce823ae;hb=2bd3c38a44c5c3acbf5afdb9c0bcbaf4a72dac3f;hp=d5cbc115619d60df7bcde478501a7ccb64cbcf0a;hpb=ac155bb885f9ea8aac3979a6b2686f0c8a9cc6e3;p=elogind.git diff --git a/src/timer.h b/src/timer.h index d5cbc1156..f5c5c64f2 100644 --- a/src/timer.h +++ b/src/timer.h @@ -56,6 +56,13 @@ typedef struct TimerValue { bool disabled; } TimerValue; +typedef enum TimerResult { + TIMER_SUCCESS, + TIMER_FAILURE_RESOURCES, + _TIMER_RESULT_MAX, + _TIMER_RESULT_INVALID = -1 +} TimerResult; + struct Timer { Unit meta; @@ -67,7 +74,7 @@ struct Timer { Watch timer_watch; - bool failure; + TimerResult result; }; void timer_unit_notify(Unit *u, UnitActiveState new_state); @@ -80,4 +87,7 @@ TimerState timer_state_from_string(const char *s); const char *timer_base_to_string(TimerBase i); TimerBase timer_base_from_string(const char *s); +const char* timer_result_to_string(TimerResult i); +TimerResult timer_result_from_string(const char *s); + #endif