1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
6 static NameActiveState
timer_active_state(Name
*n
) {
8 static const NameActiveState table
[_TIMER_STATE_MAX
] = {
9 [TIMER_DEAD
] = NAME_INACTIVE
,
10 [TIMER_WAITING
] = NAME_ACTIVE
,
11 [TIMER_RUNNING
] = NAME_ACTIVE
14 return table
[TIMER(n
)->state
];
17 static void timer_free_hook(Name
*n
) {
23 t
->service
->timer
= NULL
;
26 const NameVTable timer_vtable
= {
29 .load
= name_load_fragment_and_dropin
,
36 .active_state
= timer_active_state
,
38 .free_hook
= timer_free_hook