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