chiark / gitweb /
service: consider a process exiting with SIGTERM a clean exit
[elogind.git] / snapshot.h
index cde5a1385734af54ce60a318530d42d0dafd0419..959a5090ecf318d0242191cf954b61788d55a660 100644 (file)
@@ -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