X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=target.h;h=5397d50d7c1069486cdef29e5c088025fb52b09a;hb=afb757b1a8a416b3c692728330a266b3915eef41;hp=27331782868070438ca790ef57cb9043beb187ff;hpb=fa06836725dd6ec9f8f1c4b76608f7147008ecd9;p=elogind.git diff --git a/target.h b/target.h index 273317828..5397d50d7 100644 --- a/target.h +++ b/target.h @@ -3,6 +3,25 @@ #ifndef footargethfoo #define footargethfoo +/*** + This file is part of systemd. + + Copyright 2010 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with systemd; If not, see . +***/ + typedef struct Target Target; #include "unit.h" @@ -10,15 +29,21 @@ typedef struct Target Target; typedef enum TargetState { TARGET_DEAD, TARGET_ACTIVE, - _TARGET_STATE_MAX + _TARGET_STATE_MAX, + _TARGET_STATE_INVALID = -1 } TargetState; struct Target { Meta meta; - TargetState state; + TargetState state, deserialized_state; }; extern const UnitVTable target_vtable; +int target_get_runlevel(Target *t); + +const char* target_state_to_string(TargetState i); +TargetState target_state_from_string(const char *s); + #endif