diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-10-13 23:24:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-10-13 23:24:57 (GMT) |
commit | f439711a77e0719e7f1dcf4b5c5511157986c918 (patch) | |
tree | cac0cf37be2676fcf2dc958f9d9fd2fadea20653 /src/analysis/db/misc/snapshot.h | |
parent | 986125d4c2d8b049017b6d0770f16b9058076165 (diff) |
Retrieved the current snapshot identifier from servers.
Diffstat (limited to 'src/analysis/db/misc/snapshot.h')
-rw-r--r-- | src/analysis/db/misc/snapshot.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/analysis/db/misc/snapshot.h b/src/analysis/db/misc/snapshot.h index 4aaa6f9..e3a003c 100644 --- a/src/analysis/db/misc/snapshot.h +++ b/src/analysis/db/misc/snapshot.h @@ -29,6 +29,8 @@ #include <stdint.h> +#include "rlestr.h" +#include "timestamp.h" #include "../../../common/packed.h" @@ -42,7 +44,7 @@ /* Représentation d'un instantané */ typedef struct _snapshot_id_t { - char name[SNAP_ID_HEX_SZ]; + char name[SNAP_ID_HEX_SZ]; /* Caractères hexadécimaux */ } snapshot_id_t; @@ -72,10 +74,36 @@ bool pack_snapshot_id(const snapshot_id_t *, packed_buffer *); /* --------------------------- PROPRIETES DES INSTANTANES --------------------------- */ +/* Description d'un instantané */ +typedef struct _snapshot_info_t +{ + snapshot_id_t id; /* Identifiant attribué */ + + timestamp_t created; /* Date de création */ + + char *name; /* Nom de l'instantané */ + char *desc; /* Description associée */ + +} snapshot_info_t; + + +/* Construit une description pour instantané de base de données. */ +bool init_snapshot_info(snapshot_info_t *); + +/* Construit une description pour instantané de base de données. */ +bool init_snapshot_info_from_text(snapshot_info_t *, const char *, uint64_t, const char *, const char *); +/* Libère la mémoire occupée par une description d'instantané. */ +void exit_snapshot_info(snapshot_info_t *); +/* Effectue une copie de description d'instantané. */ +void copy_snapshot_info(snapshot_info_t *, const snapshot_info_t *); +/* Importe la description d'un identifiant d'instantané. */ +bool unpack_snapshot_info(snapshot_info_t *, packed_buffer *); +/* Exporte la description d'un identifiant d'instantané. */ +bool pack_snapshot_info(const snapshot_info_t *, packed_buffer *); |