diff options
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 *); |