summaryrefslogtreecommitdiff
path: root/src/analysis/storage
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2021-06-01 22:32:50 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2021-06-01 22:32:50 (GMT)
commit9eab0a0903303d3c93872e7e4b6b1cb774b69b03 (patch)
treeae8594cae830118ca3a92ee60242490e58c14a9e /src/analysis/storage
parent1865cce4d51b9c7a6fb718f4e2c034a57365ad1b (diff)
Improve the code quality by renaming the type for packed buffers.
Diffstat (limited to 'src/analysis/storage')
-rw-r--r--src/analysis/storage/serialize-int.h4
-rw-r--r--src/analysis/storage/serialize.c4
-rw-r--r--src/analysis/storage/serialize.h4
-rw-r--r--src/analysis/storage/storage.c8
-rw-r--r--src/analysis/storage/storage.h4
-rw-r--r--src/analysis/storage/tpmem.c8
-rw-r--r--src/analysis/storage/tpmem.h4
7 files changed, 18 insertions, 18 deletions
diff --git a/src/analysis/storage/serialize-int.h b/src/analysis/storage/serialize-int.h
index b4eb815..de8d3e3 100644
--- a/src/analysis/storage/serialize-int.h
+++ b/src/analysis/storage/serialize-int.h
@@ -33,10 +33,10 @@
/* Charge un objet depuis une mémoire tampon. */
-typedef bool (* load_serializable_object_cb) (GSerializableObject *, GObjectStorage *, packed_buffer *);
+typedef bool (* load_serializable_object_cb) (GSerializableObject *, GObjectStorage *, packed_buffer_t *);
/* Sauvegarde un objet dans une mémoire tampon. */
-typedef bool (* store_serializable_object_cb) (const GSerializableObject *, GObjectStorage *, packed_buffer *);
+typedef bool (* store_serializable_object_cb) (const GSerializableObject *, GObjectStorage *, packed_buffer_t *);
/* Intermédiaire pour la mise en cache d'objet (interface) */
diff --git a/src/analysis/storage/serialize.c b/src/analysis/storage/serialize.c
index bee8fe4..312cfce 100644
--- a/src/analysis/storage/serialize.c
+++ b/src/analysis/storage/serialize.c
@@ -69,7 +69,7 @@ static void g_serializable_object_default_init(GSerializableObjectInterface *ifa
* *
******************************************************************************/
-bool g_serializable_object_load(GSerializableObject *object, GObjectStorage *storage, packed_buffer *pbuf)
+bool g_serializable_object_load(GSerializableObject *object, GObjectStorage *storage, packed_buffer_t *pbuf)
{
bool result; /* Bilan à retourner */
GSerializableObjectIface *iface; /* Interface utilisée */
@@ -97,7 +97,7 @@ bool g_serializable_object_load(GSerializableObject *object, GObjectStorage *sto
* *
******************************************************************************/
-bool g_serializable_object_store(const GSerializableObject *object, GObjectStorage *storage, packed_buffer *pbuf)
+bool g_serializable_object_store(const GSerializableObject *object, GObjectStorage *storage, packed_buffer_t *pbuf)
{
bool result; /* Bilan à retourner */
GSerializableObjectIface *iface; /* Interface utilisée */
diff --git a/src/analysis/storage/serialize.h b/src/analysis/storage/serialize.h
index e218c84..93a4496 100644
--- a/src/analysis/storage/serialize.h
+++ b/src/analysis/storage/serialize.h
@@ -54,10 +54,10 @@ GType g_serializable_object_get_type(void) G_GNUC_CONST;
typedef struct _GObjectStorage GObjectStorage;
/* Charge un objet depuis une mémoire tampon. */
-bool g_serializable_object_load(GSerializableObject *, GObjectStorage *, packed_buffer *);
+bool g_serializable_object_load(GSerializableObject *, GObjectStorage *, packed_buffer_t *);
/* Sauvegarde un objet dans une mémoire tampon. */
-bool g_serializable_object_store(const GSerializableObject *, GObjectStorage *, packed_buffer *);
+bool g_serializable_object_store(const GSerializableObject *, GObjectStorage *, packed_buffer_t *);
diff --git a/src/analysis/storage/storage.c b/src/analysis/storage/storage.c
index bd40353..395d26d 100644
--- a/src/analysis/storage/storage.c
+++ b/src/analysis/storage/storage.c
@@ -324,7 +324,7 @@ GSerializableObject *g_object_storage_load_object(GObjectStorage *storage, const
GSerializableObject *result; /* Instance à retourner */
bool status; /* Bilan d'une opération */
storage_backend_t *backend; /* Informations à consulter */
- packed_buffer pbuf; /* Tampon des données à lire */
+ packed_buffer_t pbuf; /* Tampon des données à lire */
off64_t new; /* Nouvelle position de lecture*/
result = NULL;
@@ -390,7 +390,7 @@ GSerializableObject *g_object_storage_load_object(GObjectStorage *storage, const
* *
******************************************************************************/
-GSerializableObject *g_object_storage_unpack_object(GObjectStorage *storage, const char *name, packed_buffer *pbuf)
+GSerializableObject *g_object_storage_unpack_object(GObjectStorage *storage, const char *name, packed_buffer_t *pbuf)
{
GSerializableObject *result; /* Instance à retourner */
uint64_t pos; /* Localisation des données */
@@ -426,7 +426,7 @@ GSerializableObject *g_object_storage_unpack_object(GObjectStorage *storage, con
bool g_object_storage_store_object(GObjectStorage *storage, const char *name, const GSerializableObject *object, off64_t *pos)
{
bool result; /* Bilan à retourner */
- packed_buffer pbuf; /* Tampon des données à écrire */
+ packed_buffer_t pbuf; /* Tampon des données à écrire */
storage_backend_t *backend; /* Informations à consulter */
off64_t tmp; /* Conservation éphémère */
@@ -487,7 +487,7 @@ bool g_object_storage_store_object(GObjectStorage *storage, const char *name, co
* *
******************************************************************************/
-bool g_object_storage_pack_object(GObjectStorage *storage, const char *name, const GSerializableObject *object, packed_buffer *pbuf)
+bool g_object_storage_pack_object(GObjectStorage *storage, const char *name, const GSerializableObject *object, packed_buffer_t *pbuf)
{
bool result; /* Bilan à retourner */
off64_t pos; /* Localisation des données */
diff --git a/src/analysis/storage/storage.h b/src/analysis/storage/storage.h
index c568267..fd5d91f 100644
--- a/src/analysis/storage/storage.h
+++ b/src/analysis/storage/storage.h
@@ -63,13 +63,13 @@ bool g_object_storage_add_backend(GObjectStorage *, const char *, const char *);
GSerializableObject *g_object_storage_load_object(GObjectStorage *, const char *, off64_t);
/* Charge un objet interne à partir de données rassemblées. */
-GSerializableObject *g_object_storage_unpack_object(GObjectStorage *, const char *, packed_buffer *);
+GSerializableObject *g_object_storage_unpack_object(GObjectStorage *, const char *, packed_buffer_t *);
/* Sauvegarde un object sous forme de données rassemblées. */
bool g_object_storage_store_object(GObjectStorage *, const char *, const GSerializableObject *, off64_t *);
/* Sauvegarde un object interne sous forme de données. */
-bool g_object_storage_pack_object(GObjectStorage *, const char *, const GSerializableObject *, packed_buffer *);
+bool g_object_storage_pack_object(GObjectStorage *, const char *, const GSerializableObject *, packed_buffer_t *);
diff --git a/src/analysis/storage/tpmem.c b/src/analysis/storage/tpmem.c
index 64f54d2..58585cd 100644
--- a/src/analysis/storage/tpmem.c
+++ b/src/analysis/storage/tpmem.c
@@ -232,7 +232,7 @@ GTypeMemory *g_type_memory_new(void)
bool g_type_memory_read_types(GTypeMemory *tpmem, int fd)
{
bool result; /* Bilan à enregistrer */
- packed_buffer pbuf; /* Tampon des données à écrire */
+ packed_buffer_t pbuf; /* Tampon des données à écrire */
uint64_t i; /* Boucle de parcours */
unsigned char len; /* Taille d'un nom de type */
char *name; /* Désignation d'un type */
@@ -306,7 +306,7 @@ bool g_type_memory_read_types(GTypeMemory *tpmem, int fd)
* *
******************************************************************************/
-GObject *g_type_memory_create_object(GTypeMemory *tpmem, packed_buffer *pbuf)
+GObject *g_type_memory_create_object(GTypeMemory *tpmem, packed_buffer_t *pbuf)
{
GObject *result; /* Nouvelle instance à renvoyer*/
uint64_t index; /* Indice du point d'insertion */
@@ -346,7 +346,7 @@ GObject *g_type_memory_create_object(GTypeMemory *tpmem, packed_buffer *pbuf)
* *
******************************************************************************/
-bool g_type_memory_store_object_gtype(GTypeMemory *tpmem, GObject *obj, packed_buffer *pbuf)
+bool g_type_memory_store_object_gtype(GTypeMemory *tpmem, GObject *obj, packed_buffer_t *pbuf)
{
bool result; /* Bilan à retourner */
GType gtype; /* Type à enregistrer */
@@ -412,7 +412,7 @@ bool g_type_memory_store_object_gtype(GTypeMemory *tpmem, GObject *obj, packed_b
bool g_type_memory_write_types(GTypeMemory *tpmem, int fd)
{
bool result; /* Bilan à enregistrer */
- packed_buffer pbuf; /* Tampon des données à écrire */
+ packed_buffer_t pbuf; /* Tampon des données à écrire */
uint64_t i; /* Boucle de parcours */
const gchar *name; /* Désignation d'un type */
size_t len; /* Taille de ce nom */
diff --git a/src/analysis/storage/tpmem.h b/src/analysis/storage/tpmem.h
index 4c82a1f..ff14265 100644
--- a/src/analysis/storage/tpmem.h
+++ b/src/analysis/storage/tpmem.h
@@ -57,10 +57,10 @@ GTypeMemory *g_type_memory_new(void);
bool g_type_memory_read_types(GTypeMemory *, int);
/* Crée une nouvelle instance d'objet à partir de son type. */
-GObject *g_type_memory_create_object(GTypeMemory *, packed_buffer *);
+GObject *g_type_memory_create_object(GTypeMemory *, packed_buffer_t *);
/* Sauvegarde le type d'un objet instancié. */
-bool g_type_memory_store_object_gtype(GTypeMemory *, GObject *, packed_buffer *);
+bool g_type_memory_store_object_gtype(GTypeMemory *, GObject *, packed_buffer_t *);
/* Enregistre tous les types mémorisés dans un flux. */
bool g_type_memory_write_types(GTypeMemory *, int);