diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-10-19 12:50:37 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-10-19 12:50:37 (GMT) |
commit | d7c69bcb27a7d06932cd25021144b6cbbe4eb82f (patch) | |
tree | b014aa31a1c9d9ce4afddf505b727cabacf15e44 /src/analysis/db/misc/snapshot.h | |
parent | bcdf953ef6616c404d013f3473fb12a7bf43440b (diff) |
Exchanged the list of all snapshots.
Diffstat (limited to 'src/analysis/db/misc/snapshot.h')
-rw-r--r-- | src/analysis/db/misc/snapshot.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/analysis/db/misc/snapshot.h b/src/analysis/db/misc/snapshot.h index 37fad7f..8f9a598 100644 --- a/src/analysis/db/misc/snapshot.h +++ b/src/analysis/db/misc/snapshot.h @@ -49,6 +49,13 @@ typedef struct _snapshot_id_t } snapshot_id_t; +/* Identifiant d'un parent de racine */ +#define NO_SNAPSHOT_ROOT "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + + +/* Prépare un identifiant pour instantané à une définition. */ +void setup_empty_snapshot_id(snapshot_id_t *); + /* Construit un identifiant pour instantané de base de données. */ bool init_snapshot_id(snapshot_id_t *); @@ -77,6 +84,7 @@ bool pack_snapshot_id(const snapshot_id_t *, packed_buffer *); /* Description d'un instantané */ typedef struct _snapshot_info_t { + snapshot_id_t parent_id; /* Identifiant du propriétaire */ snapshot_id_t id; /* Identifiant attribué */ timestamp_t created; /* Date de création */ @@ -87,6 +95,9 @@ typedef struct _snapshot_info_t } snapshot_info_t; +/* Prépare une description pour instantané à une définition. */ +void setup_empty_snapshot_info(snapshot_info_t *); + /* Construit une description pour instantané de base de données. */ bool init_snapshot_info(snapshot_info_t *); @@ -96,8 +107,9 @@ bool init_snapshot_info_from_text(snapshot_info_t *, const char *, uint64_t, con /* Libère la mémoire occupée par une description d'instantané. */ void exit_snapshot_info(snapshot_info_t *); +#define get_snapshot_info_parent_id(nfo) &(nfo)->parent_id #define get_snapshot_info_id(nfo) &(nfo)->id -#define get_snapshot_info_creation(nfo) (nfo)->created +#define get_snapshot_info_created(nfo) (nfo)->created #define get_snapshot_info_name(nfo) (nfo)->name #define get_snapshot_info_desc(nfo) (nfo)->desc |