X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=unit.h;h=052cee01eab93b37473704152a95f8b6150cd360;hp=ae6e4458adc9d49c245e5877ee9d658ff0de2ec9;hb=10a94420172b33a7472a16b2e829689dbc570cad;hpb=c27488016e0e90569260bc513fa95acbad512ff5 diff --git a/unit.h b/unit.h index ae6e4458a..052cee01e 100644 --- a/unit.h +++ b/unit.h @@ -236,6 +236,12 @@ struct UnitVTable { * a simpler one that the engine can understand */ UnitActiveState (*active_state)(Unit *u); + /* Returns the substate specific to this unit type as + * string. This is purely information so that we can give the + * user a more finegrained explanation in which actual state a + * unit is in. */ + const char* (*sub_state_to_string)(Unit *u); + void (*fd_event)(Unit *u, int fd, uint32_t events, Watch *w); void (*sigchld_event)(Unit *u, pid_t pid, int code, int status); void (*timer_event)(Unit *u, uint64_t n_elapsed, Watch *w); @@ -320,6 +326,8 @@ bool unit_has_name(Unit *u, const char *name); UnitActiveState unit_active_state(Unit *u); +const char* unit_sub_state_to_string(Unit *u); + void unit_dump(Unit *u, FILE *f, const char *prefix); bool unit_can_reload(Unit *u);