1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 typedef struct Timer Timer;
28 typedef enum TimerState {
35 _TIMER_STATE_INVALID = -1
38 typedef enum TimerBase {
45 _TIMER_BASE_INVALID = -1
48 typedef struct TimerValue {
52 LIST_FIELDS(struct TimerValue, value);
58 typedef enum TimerResult {
60 TIMER_FAILURE_RESOURCES,
62 _TIMER_RESULT_INVALID = -1
68 LIST_HEAD(TimerValue, values);
71 TimerState state, deserialized_state;
79 void timer_unit_notify(Unit *u, UnitActiveState new_state);
81 extern const UnitVTable timer_vtable;
83 const char *timer_state_to_string(TimerState i);
84 TimerState timer_state_from_string(const char *s);
86 const char *timer_base_to_string(TimerBase i);
87 TimerBase timer_base_from_string(const char *s);
89 const char* timer_result_to_string(TimerResult i);
90 TimerResult timer_result_from_string(const char *s);