X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=snapshot.h;h=959a5090ecf318d0242191cf954b61788d55a660;hp=cde5a1385734af54ce60a318530d42d0dafd0419;hb=41160f3dbf0cb61e23a02338da1f289a2ff00066;hpb=a7334b0952ab66c17ee787e36e6d2c5ceb387de6 diff --git a/snapshot.h b/snapshot.h index cde5a1385..959a5090e 100644 --- a/snapshot.h +++ b/snapshot.h @@ -28,16 +28,25 @@ typedef struct Snapshot Snapshot; typedef enum SnapshotState { SNAPSHOT_DEAD, - SNAPSHOT_ACTIVE + SNAPSHOT_ACTIVE, + _SNAPSHOT_STATE_MAX, + _SNAPSHOT_STATE_INVALID = -1 } SnapshotState; struct Snapshot { Meta meta; - SnapshotState state; - bool cleanup:1; + SnapshotState state, deserialized_state; + + bool cleanup; }; extern const UnitVTable snapshot_vtable; +int snapshot_create(Manager *m, const char *name, bool cleanup, Snapshot **s); +void snapshot_remove(Snapshot *s); + +const char* snapshot_state_to_string(SnapshotState i); +SnapshotState snapshot_state_from_string(const char *s); + #endif