From 641761e51672fa33f27acdcdb40b46b506ab07dc Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Thu, 28 Sep 2023 01:08:50 +0200
Subject: Replace interface by inheritance for binary content objects.

---
 plugins/dalvik/context.c                           |   4 +-
 plugins/dalvik/context.h                           |   2 +-
 plugins/kaitai/parsers/attribute.c                 |   2 +-
 plugins/pychrysalide/analysis/content.c            |  80 ++++--
 .../pychrysalide/analysis/contents/encapsulated.c  |  50 ++--
 plugins/pychrysalide/analysis/contents/file.c      |  50 ++--
 plugins/pychrysalide/analysis/contents/memory.c    |  50 ++--
 .../pychrysalide/analysis/contents/restricted.c    |  53 ++--
 src/analysis/content-int.h                         |  29 +-
 src/analysis/content.c                             | 296 ++++++++++++++++-----
 src/analysis/content.h                             |  20 +-
 src/analysis/contents/Makefile.am                  |   3 +
 src/analysis/contents/encapsulated-int.h           |  62 +++++
 src/analysis/contents/encapsulated.c               | 195 ++++++--------
 src/analysis/contents/file-int.h                   |  58 ++++
 src/analysis/contents/file.c                       | 154 +++++++----
 src/analysis/contents/memory-int.h                 |  11 +-
 src/analysis/contents/memory.c                     | 169 +++++-------
 src/analysis/contents/restricted-int.h             |  59 ++++
 src/analysis/contents/restricted.c                 | 177 ++++--------
 src/analysis/contents/restricted.h                 |   3 -
 src/analysis/type.c                                |   6 +-
 22 files changed, 943 insertions(+), 590 deletions(-)
 create mode 100644 src/analysis/contents/encapsulated-int.h
 create mode 100644 src/analysis/contents/file-int.h
 create mode 100644 src/analysis/contents/restricted-int.h

diff --git a/plugins/dalvik/context.c b/plugins/dalvik/context.c
index b08678c..9cf878b 100644
--- a/plugins/dalvik/context.c
+++ b/plugins/dalvik/context.c
@@ -373,7 +373,7 @@ bool g_dalvik_context_register_array_data_padding(GDalvikContext *ctx, const vmp
 *                                                                             *
 ******************************************************************************/
 
-GArchInstruction *g_dalvik_context_get_raw_data(GDalvikContext *ctx, const GBinContent *content, vmpa2t *pos)
+GArchInstruction *g_dalvik_context_get_raw_data(GDalvikContext *ctx, GBinContent *content, vmpa2t *pos)
 {
     GArchInstruction *result;               /* Instruction à retourner     */
     raw_data_area *found;                   /* Zone de couverture trouvée  */
@@ -390,7 +390,7 @@ GArchInstruction *g_dalvik_context_get_raw_data(GDalvikContext *ctx, const GBinC
 
     if (found)
     {
-        restricted = g_restricted_content_new_ro(content, &found->range);
+        restricted = g_restricted_content_new(content, &found->range);
 
         length = get_mrange_length(&found->range);
         count = length / found->item_len;
diff --git a/plugins/dalvik/context.h b/plugins/dalvik/context.h
index bfa2757..f09cfa6 100644
--- a/plugins/dalvik/context.h
+++ b/plugins/dalvik/context.h
@@ -67,7 +67,7 @@ bool g_dalvik_context_register_array_data(GDalvikContext *, const vmpa2t *, uint
 bool g_dalvik_context_register_array_data_padding(GDalvikContext *, const vmpa2t *);
 
 /* Place une donnée en tant qu'instruction si besoin est. */
-GArchInstruction *g_dalvik_context_get_raw_data(GDalvikContext *, const GBinContent *, vmpa2t *);
+GArchInstruction *g_dalvik_context_get_raw_data(GDalvikContext *, GBinContent *, vmpa2t *);
 
 
 
diff --git a/plugins/kaitai/parsers/attribute.c b/plugins/kaitai/parsers/attribute.c
index c61fe99..3eb406a 100644
--- a/plugins/kaitai/parsers/attribute.c
+++ b/plugins/kaitai/parsers/attribute.c
@@ -1538,7 +1538,7 @@ static bool _g_kaitai_attribute_parse_content(GKaitaiAttribute *attrib, kaitai_s
             goto exit;
 
         init_mrange(&work_range, pos, diff);
-        work_area = g_restricted_content_new_ro(content, &work_range);
+        work_area = g_restricted_content_new(content, &work_range);
 
         has_empty_size = (diff == 0);
 
diff --git a/plugins/pychrysalide/analysis/content.c b/plugins/pychrysalide/analysis/content.c
index f94e3f7..a4f2b99 100644
--- a/plugins/pychrysalide/analysis/content.c
+++ b/plugins/pychrysalide/analysis/content.c
@@ -40,6 +40,7 @@
 
 #include "cattribs.h"
 #include "constants.h"
+#include "storage/serialize.h"
 #include "../access.h"
 #include "../helpers.h"
 #include "../arch/vmpa.h"
@@ -49,8 +50,13 @@
 /* ------------------------ GLUE POUR CREATION DEPUIS PYTHON ------------------------ */
 
 
-/* Procède à l'initialisation de l'interface de génération. */
-static void py_binary_content_interface_init(GBinContentIface *, gpointer *);
+/* Initialise la classe générique des contenus de binaire. */
+static void py_binary_content_init_gclass(GBinContentClass *, gpointer);
+
+CREATE_DYN_ABSTRACT_CONSTRUCTOR(binary_content, G_TYPE_BIN_CONTENT, py_binary_content_init_gclass);
+
+/* Initialise une instance sur la base du dérivé de GObject. */
+static int py_binary_content_init(PyObject *, PyObject *, PyObject *);
 
 /* Fournit le nom associé au contenu binaire. */
 static char *py_binary_content_describe_wrapper(const GBinContent *, bool);
@@ -126,10 +132,10 @@ static PyObject *py_binary_content_get_data(PyObject *, void *);
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : iface  = interface GLib à initialiser.                       *
-*                unused = adresse non utilisée ici.                           *
+*  Paramètres  : class  = classe à initialiser.                               *
+*                unused = données non utilisées ici.                          *
 *                                                                             *
-*  Description : Procède à l'initialisation de l'interface de génération.     *
+*  Description : Initialise la classe générique des contenus de binaire.      *
 *                                                                             *
 *  Retour      : -                                                            *
 *                                                                             *
@@ -137,9 +143,38 @@ static PyObject *py_binary_content_get_data(PyObject *, void *);
 *                                                                             *
 ******************************************************************************/
 
-static void py_binary_content_interface_init(GBinContentIface *iface, gpointer *unused)
+static void py_binary_content_init_gclass(GBinContentClass *class, gpointer unused)
 {
-#define BINARY_CONTENT_DOC                                                  \
+    class->describe = py_binary_content_describe_wrapper;
+
+    class->read_raw = py_binary_content_read_raw_wrapper;
+    class->read_u8 = py_binary_content_read_u8_wrapper;
+    class->read_u16 = py_binary_content_read_u16_wrapper;
+    class->read_u32 = py_binary_content_read_u32_wrapper;
+    class->read_u64 = py_binary_content_read_u64_wrapper;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : self = objet à initialiser (théoriquement).                  *
+*                args = arguments fournis à l'appel.                          *
+*                kwds = arguments de type key=val fournis.                    *
+*                                                                             *
+*  Description : Initialise une instance sur la base du dérivé de GObject.    *
+*                                                                             *
+*  Retour      : 0.                                                           *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static int py_binary_content_init(PyObject *self, PyObject *args, PyObject *kwds)
+{
+    int ret;                                /* Bilan de lecture des args.  */
+
+#define BINARY_CONTENT_DOC                                              \
     "The BinContent is an interface which handles access to a given binary" \
     " content.\n"                                                           \
     "\n"                                                                    \
@@ -161,13 +196,12 @@ static void py_binary_content_interface_init(GBinContentIface *iface, gpointer *
     "* pychrysalide.analysis.BinContent._read_u32();\n"                     \
     "* pychrysalide.analysis.BinContent._read_u64();\n"
 
-    iface->describe = py_binary_content_describe_wrapper;
+    /* Initialisation d'un objet GLib */
+
+    ret = forward_pygobjet_init(self);
+    if (ret == -1) return -1;
 
-    iface->read_raw = py_binary_content_read_raw_wrapper;
-    iface->read_u8 = py_binary_content_read_u8_wrapper;
-    iface->read_u16 = py_binary_content_read_u16_wrapper;
-    iface->read_u32 = py_binary_content_read_u32_wrapper;
-    iface->read_u64 = py_binary_content_read_u64_wrapper;
+    return 0;
 
 }
 
@@ -1406,14 +1440,17 @@ PyTypeObject *get_python_binary_content_type(void)
         PyVarObject_HEAD_INIT(NULL, 0)
 
         .tp_name        = "pychrysalide.analysis.BinContent",
-        .tp_basicsize   = sizeof(PyObject),
+        .tp_basicsize   = sizeof(PyGObject),
 
         .tp_flags       = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
         .tp_doc         = BINARY_CONTENT_DOC,
 
         .tp_methods     = py_binary_content_methods,
-        .tp_getset      = py_binary_content_getseters
+        .tp_getset      = py_binary_content_getseters,
+
+        .tp_init        = py_binary_content_init,
+        .tp_new         = py_binary_content_new,
 
     };
 
@@ -1440,23 +1477,18 @@ bool ensure_python_binary_content_is_registered(void)
     PyObject *module;                       /* Module à recompléter        */
     PyObject *dict;                         /* Dictionnaire du module      */
 
-    static GInterfaceInfo info = {          /* Paramètres d'inscription    */
-
-        .interface_init = (GInterfaceInitFunc)py_binary_content_interface_init,
-        .interface_finalize = NULL,
-        .interface_data = NULL,
-
-    };
-
     type = get_python_binary_content_type();
 
     if (!PyType_HasFeature(type, Py_TPFLAGS_READY))
     {
+        if (!ensure_python_serializable_object_is_registered())
+            return false;
+
         module = get_access_to_python_module("pychrysalide.analysis");
 
         dict = PyModule_GetDict(module);
 
-        if (!register_interface_for_pygobject(dict, G_TYPE_BIN_CONTENT, type, &info))
+        if (!register_class_for_pygobject(dict, G_TYPE_BIN_CONTENT, type))
             return false;
 
         if (!define_analysis_content_constants(type))
diff --git a/plugins/pychrysalide/analysis/contents/encapsulated.c b/plugins/pychrysalide/analysis/contents/encapsulated.c
index a818bab..e9583e6 100644
--- a/plugins/pychrysalide/analysis/contents/encapsulated.c
+++ b/plugins/pychrysalide/analysis/contents/encapsulated.c
@@ -28,18 +28,20 @@
 #include <pygobject.h>
 
 
-#include <analysis/contents/encapsulated.h>
+#include <i18n.h>
+#include <analysis/contents/encapsulated-int.h>
 
 
 #include "../content.h"
-#include "../storage/serialize.h"
 #include "../../access.h"
 #include "../../helpers.h"
 
 
 
-/* Crée un nouvel objet Python de type 'BinContent'. */
-static PyObject *py_encaps_content_new(PyTypeObject *, PyObject *, PyObject *);
+CREATE_DYN_CONSTRUCTOR(encaps_content, G_TYPE_ENCAPS_CONTENT);
+
+/* Initialise une instance sur la base du dérivé de GObject. */
+static int py_encaps_content_init(PyObject *, PyObject *, PyObject *);
 
 /* Indique la base d'un contenu binaire encapsulé. */
 static PyObject *py_encaps_content_get_base(PyObject *, void *);
@@ -54,26 +56,25 @@ static PyObject *py_encaps_content_get_endpoint(PyObject *, void *);
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : type = type de l'objet à instancier.                         *
+*  Paramètres  : self = objet à initialiser (théoriquement).                  *
 *                args = arguments fournis à l'appel.                          *
 *                kwds = arguments de type key=val fournis.                    *
 *                                                                             *
-*  Description : Crée un nouvel objet Python de type 'BinContent'.            *
+*  Description : Initialise une instance sur la base du dérivé de GObject.    *
 *                                                                             *
-*  Retour      : Instance Python mise en place.                               *
+*  Retour      : 0.                                                           *
 *                                                                             *
 *  Remarques   : -                                                            *
 *                                                                             *
 ******************************************************************************/
 
-static PyObject *py_encaps_content_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+static int py_encaps_content_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-    PyObject *result;                       /* Instance à retourner        */
     GBinContent *base;                      /* Base de l'extraction        */
     const char *path;                       /* Chemin vers le contenu final*/
     GBinContent *endpoint;                  /* Contenu accessible au final */
     int ret;                                /* Bilan de lecture des args.  */
-    GBinContent *content;                   /* Version GLib du contenu     */
+    GEncapsContent *content;                /* Version GLib du contenu     */
 
 #define ENCAPS_CONTENT_DOC                                                  \
     "EncapsulatedContent gathers items relative to a binary encapsulated"   \
@@ -94,20 +95,30 @@ static PyObject *py_encaps_content_new(PyTypeObject *type, PyObject *args, PyObj
     " pychrysalide.analysis.BinContent instances and the access path must"  \
     " be provided as a string."
 
+    /* Récupération des paramètres */
+
     ret = PyArg_ParseTuple(args, "O&sO&",
                            convert_to_binary_content, &base,
                            &path,
                            convert_to_binary_content, &endpoint);
-    if (!ret) return NULL;
+    if (!ret) return -1;
 
-    content = g_encaps_content_new(base, path, endpoint);
+    /* Initialisation d'un objet GLib */
 
-    result = pygobject_new(G_OBJECT(content));
+    ret = forward_pygobjet_init(self);
+    if (ret == -1) return -1;
 
-    if (content != NULL)
-        g_object_unref(content);
+    /* Eléments de base */
 
-    return result;
+    content = G_ENCAPS_CONTENT(pygobject_get(self));
+
+    if (!g_encaps_content_create(content, base, path, endpoint))
+    {
+        PyErr_SetString(PyExc_ValueError, _("Unable to create encapsulated content."));
+        return -1;
+    }
+
+    return 0;
 
 }
 
@@ -276,7 +287,9 @@ PyTypeObject *get_python_encaps_content_type(void)
 
         .tp_methods     = py_encaps_content_methods,
         .tp_getset      = py_encaps_content_getseters,
-        .tp_new         = py_encaps_content_new
+
+        .tp_init        = py_encaps_content_init,
+        .tp_new         = py_encaps_content_new,
 
     };
 
@@ -311,9 +324,6 @@ bool ensure_python_encaps_content_is_registered(void)
 
         dict = PyModule_GetDict(module);
 
-        if (!ensure_python_serializable_object_is_registered())
-            return false;
-
         if (!ensure_python_binary_content_is_registered())
             return false;
 
diff --git a/plugins/pychrysalide/analysis/contents/file.c b/plugins/pychrysalide/analysis/contents/file.c
index 9552b6c..5bef069 100644
--- a/plugins/pychrysalide/analysis/contents/file.c
+++ b/plugins/pychrysalide/analysis/contents/file.c
@@ -28,18 +28,20 @@
 #include <pygobject.h>
 
 
-#include <analysis/contents/file.h>
+#include <i18n.h>
+#include <analysis/contents/file-int.h>
 
 
 #include "memory.h"
-#include "../storage/serialize.h"
 #include "../../access.h"
 #include "../../helpers.h"
 
 
 
-/* Crée un nouvel objet Python de type 'BinContent'. */
-static PyObject *py_file_content_new(PyTypeObject *, PyObject *, PyObject *);
+CREATE_DYN_CONSTRUCTOR(file_content, G_TYPE_FILE_CONTENT);
+
+/* Initialise une instance sur la base du dérivé de GObject. */
+static int py_file_content_init(PyObject *, PyObject *, PyObject *);
 
 /* Fournit le nom de fichier associé au contenu binaire. */
 static PyObject *py_file_content_get_filename(PyObject *, void *);
@@ -48,24 +50,23 @@ static PyObject *py_file_content_get_filename(PyObject *, void *);
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : type = type de l'objet à instancier.                         *
+*  Paramètres  : self = objet à initialiser (théoriquement).                  *
 *                args = arguments fournis à l'appel.                          *
 *                kwds = arguments de type key=val fournis.                    *
 *                                                                             *
-*  Description : Crée un nouvel objet Python de type 'BinContent'.            *
+*  Description : Initialise une instance sur la base du dérivé de GObject.    *
 *                                                                             *
-*  Retour      : Instance Python mise en place.                               *
+*  Retour      : 0.                                                           *
 *                                                                             *
 *  Remarques   : -                                                            *
 *                                                                             *
 ******************************************************************************/
 
-static PyObject *py_file_content_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+static int py_file_content_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-    PyObject *result;                       /* Instance à retourner        */
     const char *filename;                   /* Nom du fichier à charger    */
     int ret;                                /* Bilan de lecture des args.  */
-    GBinContent *content;                   /* Version GLib du contenu     */
+    GFileContent *content;                  /* Version GLib du contenu     */
 
 #define FILE_CONTENT_DOC                                                    \
     "FileContent handles binary content loaded from a file.\n"              \
@@ -76,17 +77,27 @@ static PyObject *py_file_content_new(PyTypeObject *type, PyObject *args, PyObjec
     "\n"                                                                    \
     "Where filename is a path to an existing file."
 
+    /* Récupération des paramètres */
+
     ret = PyArg_ParseTuple(args, "s", &filename);
-    if (!ret) return NULL;
+    if (!ret) return -1;
 
-    content = g_file_content_new(filename);
+    /* Initialisation d'un objet GLib */
 
-    result = pygobject_new(G_OBJECT(content));
+    ret = forward_pygobjet_init(self);
+    if (ret == -1) return -1;
 
-    if (content != NULL)
-        g_object_unref(content);
+    /* Eléments de base */
 
-    return result;
+    content = G_FILE_CONTENT(pygobject_get(self));
+
+    if (!g_file_content_create(content, filename))
+    {
+        PyErr_SetString(PyExc_ValueError, _("Unable to create file content."));
+        return -1;
+    }
+
+    return 0;
 
 }
 
@@ -163,7 +174,9 @@ PyTypeObject *get_python_file_content_type(void)
 
         .tp_methods     = py_file_content_methods,
         .tp_getset      = py_file_content_getseters,
-        .tp_new         = py_file_content_new
+
+        .tp_init        = py_file_content_init,
+        .tp_new         = py_file_content_new,
 
     };
 
@@ -201,9 +214,6 @@ bool ensure_python_file_content_is_registered(void)
         if (!ensure_python_memory_content_is_registered())
             return false;
 
-        if (!ensure_python_serializable_object_is_registered())
-            return false;
-
         if (!register_class_for_pygobject(dict, G_TYPE_FILE_CONTENT, type))
             return false;
 
diff --git a/plugins/pychrysalide/analysis/contents/memory.c b/plugins/pychrysalide/analysis/contents/memory.c
index b5448f0..7464779 100644
--- a/plugins/pychrysalide/analysis/contents/memory.c
+++ b/plugins/pychrysalide/analysis/contents/memory.c
@@ -28,42 +28,43 @@
 #include <pygobject.h>
 
 
-#include <analysis/contents/memory.h>
+#include <i18n.h>
+#include <analysis/contents/memory-int.h>
 
 
 #include "../content.h"
-#include "../storage/serialize.h"
 #include "../../access.h"
 #include "../../helpers.h"
 
 
 
-/* Crée un nouvel objet Python de type 'BinContent'. */
-static PyObject *py_memory_content_new(PyTypeObject *, PyObject *, PyObject *);
+CREATE_DYN_CONSTRUCTOR(memory_content, G_TYPE_MEMORY_CONTENT);
+
+/* Initialise une instance sur la base du dérivé de GObject. */
+static int py_memory_content_init(PyObject *, PyObject *, PyObject *);
 
 
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : type = type de l'objet à instancier.                         *
+*  Paramètres  : self = objet à initialiser (théoriquement).                  *
 *                args = arguments fournis à l'appel.                          *
 *                kwds = arguments de type key=val fournis.                    *
 *                                                                             *
-*  Description : Crée un nouvel objet Python de type 'BinContent'.            *
+*  Description : Initialise une instance sur la base du dérivé de GObject.    *
 *                                                                             *
-*  Retour      : Instance Python mise en place.                               *
+*  Retour      : 0.                                                           *
 *                                                                             *
 *  Remarques   : -                                                            *
 *                                                                             *
 ******************************************************************************/
 
-static PyObject *py_memory_content_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+static int py_memory_content_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-    PyObject *result;                       /* Instance à retourner        */
     const char *data;                       /* Tampon interne de Python    */
     Py_ssize_t length;                      /* Taille utilisé de ce tampon */
     int ret;                                /* Bilan de lecture des args.  */
-    GBinContent *content;                   /* Version GLib du contenu     */
+    GMemoryContent *content;                /* Version GLib du contenu     */
 
 #define MEMORY_CONTENT_DOC                                                  \
     "MemoryContent builds a binary content from memory data only."          \
@@ -76,22 +77,32 @@ static PyObject *py_memory_content_new(PyTypeObject *type, PyObject *args, PyObj
     "Where data is provided as string or read-only bytes-like object."      \
     " The string may contain embedded null bytes."
 
+    /* Récupération des paramètres */
+
     /**
      * La taille doit être de type 'int' et non 'Py_ssize_t', sinon les 32 bits
      * de poids fort ne sont pas initialisés !
      */
 
     ret = PyArg_ParseTuple(args, "s#", &data, &length);
-    if (!ret) return NULL;
+    if (!ret) return -1;
+
+    /* Initialisation d'un objet GLib */
 
-    content = g_memory_content_new((const bin_t *)data, length);
+    ret = forward_pygobjet_init(self);
+    if (ret == -1) return -1;
 
-    result = pygobject_new(G_OBJECT(content));
+    /* Eléments de base */
 
-    if (content != NULL)
-        g_object_unref(content);
+    content = G_MEMORY_CONTENT(pygobject_get(self));
 
-    return result;
+    if (!g_memory_content_create(content, (const bin_t *)data, length))
+    {
+        PyErr_SetString(PyExc_ValueError, _("Unable to create memory content."));
+        return -1;
+    }
+
+    return 0;
 
 }
 
@@ -131,7 +142,9 @@ PyTypeObject *get_python_memory_content_type(void)
 
         .tp_methods     = py_memory_content_methods,
         .tp_getset      = py_memory_content_getseters,
-        .tp_new         = py_memory_content_new
+
+        .tp_init        = py_memory_content_init,
+        .tp_new         = py_memory_content_new,
 
     };
 
@@ -166,9 +179,6 @@ bool ensure_python_memory_content_is_registered(void)
 
         dict = PyModule_GetDict(module);
 
-        if (!ensure_python_serializable_object_is_registered())
-            return false;
-
         if (!ensure_python_binary_content_is_registered())
             return false;
 
diff --git a/plugins/pychrysalide/analysis/contents/restricted.c b/plugins/pychrysalide/analysis/contents/restricted.c
index 2609bb4..4521578 100644
--- a/plugins/pychrysalide/analysis/contents/restricted.c
+++ b/plugins/pychrysalide/analysis/contents/restricted.c
@@ -31,19 +31,21 @@
 #include <i18n.h>
 
 
-#include <analysis/contents/restricted.h>
+#include <i18n.h>
+#include <analysis/contents/restricted-int.h>
 
 
 #include "../content.h"
-#include "../storage/serialize.h"
 #include "../../access.h"
 #include "../../helpers.h"
 #include "../../arch/vmpa.h"
 
 
 
-/* Crée un nouvel objet Python de type 'BinContent'. */
-static PyObject *py_restricted_content_new(PyTypeObject *, PyObject *, PyObject *);
+CREATE_DYN_CONSTRUCTOR(restricted_content, G_TYPE_RESTRICTED_CONTENT);
+
+/* Initialise une instance sur la base du dérivé de GObject. */
+static int py_restricted_content_init(PyObject *, PyObject *, PyObject *);
 
 /* Indique l'espace de restriction appliqué à un contenu. */
 static PyObject *py_restricted_content_get_range(PyObject *, void *);
@@ -52,25 +54,24 @@ static PyObject *py_restricted_content_get_range(PyObject *, void *);
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : type = type de l'objet à instancier.                         *
+*  Paramètres  : self = objet à initialiser (théoriquement).                  *
 *                args = arguments fournis à l'appel.                          *
 *                kwds = arguments de type key=val fournis.                    *
 *                                                                             *
-*  Description : Crée un nouvel objet Python de type 'BinContent'.            *
+*  Description : Initialise une instance sur la base du dérivé de GObject.    *
 *                                                                             *
-*  Retour      : Instance Python mise en place.                               *
+*  Retour      : 0.                                                           *
 *                                                                             *
 *  Remarques   : -                                                            *
 *                                                                             *
 ******************************************************************************/
 
-static PyObject *py_restricted_content_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+static int py_restricted_content_init(PyObject *self, PyObject *args, PyObject *kwds)
 {
-    PyObject *result;                       /* Instance à retourner        */
-    GBinContent *content;                   /* Instance GLib correspondante*/
+    GBinContent *internal;                  /* Instance GLib correspondante*/
     mrange_t range;                         /* Restriction à appliquer     */
     int ret;                                /* Bilan de lecture des args.  */
-    GBinContent *restricted;                /* Création GLib à transmettre */
+    GRestrictedContent *content;            /* Version GLib du contenu     */
 
 #define RESTRICTED_CONTENT_DOC                                                  \
     "RestrictedContent restricts access to a given area for a binary content."  \
@@ -82,14 +83,27 @@ static PyObject *py_restricted_content_new(PyTypeObject *type, PyObject *args, P
     "Where content is a pychrysalide.analysis.BinContent instance and range"    \
     " a Python object which can be converted into pychrysalide.arch.mrange."
 
-    ret = PyArg_ParseTuple(args, "O&O&", convert_to_binary_content, &content, convert_any_to_mrange, &range);
-    if (!ret) return NULL;
+    /* Récupération des paramètres */
 
-    restricted = g_restricted_content_new(content, &range);
+    ret = PyArg_ParseTuple(args, "O&O&", convert_to_binary_content, &internal, convert_any_to_mrange, &range);
+    if (!ret) return -1;
 
-    result = pygobject_new(G_OBJECT(restricted));
+    /* Initialisation d'un objet GLib */
 
-    return result;
+    ret = forward_pygobjet_init(self);
+    if (ret == -1) return -1;
+
+    /* Eléments de base */
+
+    content = G_RESTRICTED_CONTENT(pygobject_get(self));
+
+    if (!g_restricted_content_create(content, internal, &range))
+    {
+        PyErr_SetString(PyExc_ValueError, _("Unable to create restricted content."));
+        return -1;
+    }
+
+    return 0;
 
 }
 
@@ -166,7 +180,9 @@ PyTypeObject *get_python_restricted_content_type(void)
 
         .tp_methods     = py_restricted_content_methods,
         .tp_getset      = py_restricted_content_getseters,
-        .tp_new         = py_restricted_content_new
+
+        .tp_init        = py_restricted_content_init,
+        .tp_new         = py_restricted_content_new,
 
     };
 
@@ -201,9 +217,6 @@ bool ensure_python_restricted_content_is_registered(void)
 
         dict = PyModule_GetDict(module);
 
-        if (!ensure_python_serializable_object_is_registered())
-            return false;
-
         if (!ensure_python_binary_content_is_registered())
             return false;
 
diff --git a/src/analysis/content-int.h b/src/analysis/content-int.h
index 4ef64f9..3475b3f 100644
--- a/src/analysis/content-int.h
+++ b/src/analysis/content-int.h
@@ -2,7 +2,7 @@
 /* Chrysalide - Outil d'analyse de fichiers binaires
  * content-int.h - définitions internes propres aux contenus binaires
  *
- * Copyright (C) 2015-2019 Cyrille Bagard
+ * Copyright (C) 2015-2023 Cyrille Bagard
  *
  *  This file is part of Chrysalide.
  *
@@ -26,6 +26,7 @@
 
 
 #include "content.h"
+#include "storage/serialize-int.h"
 
 
 
@@ -83,11 +84,24 @@ typedef bool (* read_uleb128_fc) (const GBinContent *, vmpa2t *, uleb128_t *);
 /* Lit un nombre signé encodé au format LEB128. */
 typedef bool (* read_leb128_fc) (const GBinContent *, vmpa2t *, leb128_t *);
 
+/* Charge un objet depuis une mémoire tampon. */
+typedef bool (* load_content_cb) (GBinContent *, GObjectStorage *, packed_buffer_t *);
 
-/* Accès à un contenu binaire quelconque (interface) */
-struct _GBinContentIface
+/* Sauvegarde un objet dans une mémoire tampon. */
+typedef bool (* store_content_cb) (const GBinContent *, GObjectStorage *, packed_buffer_t *);
+
+
+/* Accès à un contenu binaire quelconque (instance) */
+struct _GBinContent
 {
-    GTypeInterface base_iface;              /* A laisser en premier        */
+    GObject parent;                         /* A laisser en premier        */
+
+};
+
+/* Accès à un contenu binaire quelconque (classe) */
+struct _GBinContentClass
+{
+    GObjectClass parent;                    /* A laisser en premier        */
 
     set_content_attributes set_attribs;     /* Enregistrement d'attributs  */
     get_content_attributes get_attribs;     /* Fourniture d'attributs      */
@@ -116,11 +130,10 @@ struct _GBinContentIface
     read_uleb128_fc read_uleb128;           /* Lecture d'un LEB non signé  */
     read_leb128_fc read_leb128;             /* Lecture d'un LEB signé      */
 
-};
-
+    load_content_cb load;                   /* Chargement                  */
+    store_content_cb store;                 /* Enregistrement              */
 
-/* Redéfinition */
-typedef GBinContentIface GBinContentInterface;
+};
 
 
 
diff --git a/src/analysis/content.c b/src/analysis/content.c
index 6d8075c..0560d73 100644
--- a/src/analysis/content.c
+++ b/src/analysis/content.c
@@ -35,20 +35,94 @@
 
 
 
-/* Procède à l'initialisation de l'interface de rassemblement. */
-static void g_binary_content_default_init(GBinContentInterface *);
+/* -------------------------- ENSEMBLE DE DONNEES BINAIRES -------------------------- */
 
 
+/* Initialise la classe des contenus binaires à parcourir. */
+static void g_binary_content_class_init(GBinContentClass *);
 
-/* Détermine le type d'une interface pour la lecture de binaire. */
-G_DEFINE_INTERFACE(GBinContent, g_binary_content, G_TYPE_OBJECT);
+/* Initialise l'instance de contenu binaire à parcourir. */
+static void g_binary_content_init(GBinContent *);
+
+/* Procède à l'initialisation de l'interface de sérialisation. */
+static void g_binary_content_serializable_interface_init(GSerializableObjectIface *);
+
+/* Supprime toutes les références externes. */
+static void g_binary_content_dispose(GBinContent *);
+
+/* Procède à la libération totale de la mémoire. */
+static void g_binary_content_finalize(GBinContent *);
+
+
+
+/* -------------------- CONSERVATION ET RECHARGEMENT DES DONNEES -------------------- */
+
+
+/* Charge un contenu depuis une mémoire tampon. */
+static bool g_binary_content_load(GBinContent *, GObjectStorage *, packed_buffer_t *);
+
+/* Sauvegarde un contenu dans une mémoire tampon. */
+static bool g_binary_content_store(const GBinContent *, GObjectStorage *, packed_buffer_t *);
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/*                            ENSEMBLE DE DONNEES BINAIRES                            */
+/* ---------------------------------------------------------------------------------- */
+
+
+/* Détermine le type d'un contenu binaire à parcourir. */
+G_DEFINE_TYPE_WITH_CODE(GBinContent, g_binary_content, G_TYPE_OBJECT,
+                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_binary_content_serializable_interface_init));
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : klass = classe à initialiser.                                *
+*                                                                             *
+*  Description : Initialise la classe des contenus binaires à parcourir.      *
+*                                                                             *
+*  Retour      : -                                                            *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static void g_binary_content_class_init(GBinContentClass *klass)
+{
+    GObjectClass *object;                   /* Autre version de la classe  */
+
+    object = G_OBJECT_CLASS(klass);
+
+    object->dispose = (GObjectFinalizeFunc/* ! */)g_binary_content_dispose;
+    object->finalize = (GObjectFinalizeFunc)g_binary_content_finalize;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content = instance à initialiser.                            *
+*                                                                             *
+*  Description : Initialise l'instance de contenu binaire à parcourir.        *
+*                                                                             *
+*  Retour      : -                                                            *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static void g_binary_content_init(GBinContent *content)
+{
+
+}
 
 
 /******************************************************************************
 *                                                                             *
 *  Paramètres  : iface = interface GLib à initialiser.                        *
 *                                                                             *
-*  Description : Procède à l'initialisation de l'interface de rassemblement.  *
+*  Description : Procède à l'initialisation de l'interface de sérialisation.  *
 *                                                                             *
 *  Retour      : -                                                            *
 *                                                                             *
@@ -56,8 +130,48 @@ G_DEFINE_INTERFACE(GBinContent, g_binary_content, G_TYPE_OBJECT);
 *                                                                             *
 ******************************************************************************/
 
-static void g_binary_content_default_init(GBinContentInterface *iface)
+static void g_binary_content_serializable_interface_init(GSerializableObjectIface *iface)
 {
+    iface->load = (load_serializable_object_cb)g_binary_content_load;
+    iface->store = (store_serializable_object_cb)g_binary_content_store;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content = instance d'objet GLib à traiter.                   *
+*                                                                             *
+*  Description : Supprime toutes les références externes.                     *
+*                                                                             *
+*  Retour      : -                                                            *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static void g_binary_content_dispose(GBinContent *content)
+{
+    G_OBJECT_CLASS(g_binary_content_parent_class)->dispose(G_OBJECT(content));
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content = instance d'objet GLib à traiter.                   *
+*                                                                             *
+*  Description : Procède à la libération totale de la mémoire.                *
+*                                                                             *
+*  Retour      : -                                                            *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static void g_binary_content_finalize(GBinContent *content)
+{
+    G_OBJECT_CLASS(g_binary_content_parent_class)->finalize(G_OBJECT(content));
 
 }
 
@@ -77,11 +191,11 @@ static void g_binary_content_default_init(GBinContentInterface *iface)
 
 void g_binary_content_set_attributes(GBinContent *content, GContentAttributes *attribs)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    iface->set_attribs(content, attribs);
+    class->set_attribs(content, attribs);
 
 }
 
@@ -101,11 +215,11 @@ void g_binary_content_set_attributes(GBinContent *content, GContentAttributes *a
 GContentAttributes *g_binary_content_get_attributes(const GBinContent *content)
 {
     GContentAttributes *result;             /* Instance à retourner        */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->get_attribs(content);
+    result = class->get_attribs(content);
 
     return result;
 
@@ -127,11 +241,11 @@ GContentAttributes *g_binary_content_get_attributes(const GBinContent *content)
 GBinContent *g_binary_content_get_root(GBinContent *content)
 {
     GBinContent *result;                    /* Contenu en place à renvoyer */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->get_root(content);
+    result = class->get_root(content);
 
     return result;
 
@@ -154,11 +268,11 @@ GBinContent *g_binary_content_get_root(GBinContent *content)
 char *g_binary_content_describe(const GBinContent *content, bool full)
 {
     char *result;                           /* Description à retourner     */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->describe(content, full);
+    result = class->describe(content, full);
 
     return result;
 
@@ -181,7 +295,7 @@ const gchar *g_binary_content_get_checksum(GBinContent *content)
 {
     const gchar *result;                    /* Empreinte à retourner       */
     GChecksum *checksum;                    /* Calcul de l'empreinte       */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
     checksum = g_object_get_data(G_OBJECT(content), "checksum");
 
@@ -192,9 +306,9 @@ const gchar *g_binary_content_get_checksum(GBinContent *content)
 
         g_checksum_reset(checksum);
 
-        iface = G_BIN_CONTENT_GET_IFACE(content);
+        class = G_BIN_CONTENT_GET_CLASS(content);
 
-        iface->compute_checksum(content, checksum);
+        class->compute_checksum(content, checksum);
 
         g_object_set_data_full(G_OBJECT(content), "checksum", checksum, (GDestroyNotify)g_checksum_free);
 
@@ -221,11 +335,11 @@ const gchar *g_binary_content_get_checksum(GBinContent *content)
 
 phys_t g_binary_content_compute_size(const GBinContent *content)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    return iface->compute_size(content);
+    return class->compute_size(content);
 
 }
 
@@ -245,11 +359,11 @@ phys_t g_binary_content_compute_size(const GBinContent *content)
 
 void g_binary_content_compute_start_pos(const GBinContent *content, vmpa2t *pos)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    return iface->compute_start_pos(content, pos);
+    return class->compute_start_pos(content, pos);
 
 }
 
@@ -269,11 +383,11 @@ void g_binary_content_compute_start_pos(const GBinContent *content, vmpa2t *pos)
 
 void g_binary_content_compute_end_pos(const GBinContent *content, vmpa2t *pos)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    return iface->compute_end_pos(content, pos);
+    return class->compute_end_pos(content, pos);
 
 }
 
@@ -294,11 +408,11 @@ void g_binary_content_compute_end_pos(const GBinContent *content, vmpa2t *pos)
 
 bool g_binary_content_seek(const GBinContent *content, vmpa2t *addr, phys_t length)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    return iface->seek(content, addr, length);
+    return class->seek(content, addr, length);
 
 }
 
@@ -319,11 +433,11 @@ bool g_binary_content_seek(const GBinContent *content, vmpa2t *addr, phys_t leng
 
 const bin_t *g_binary_content_get_raw_access(const GBinContent *content, vmpa2t *addr, phys_t length)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    return iface->get_raw_access(content, addr, length);
+    return class->get_raw_access(content, addr, length);
 
 }
 
@@ -346,11 +460,11 @@ const bin_t *g_binary_content_get_raw_access(const GBinContent *content, vmpa2t
 bool g_binary_content_read_raw(const GBinContent *content, vmpa2t *addr, phys_t length, bin_t *out)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_raw(content, addr, length, out);
+    result = class->read_raw(content, addr, length, out);
 
     return result;
 
@@ -375,11 +489,11 @@ bool g_binary_content_read_raw(const GBinContent *content, vmpa2t *addr, phys_t
 bool g_binary_content_read_u4(const GBinContent *content, vmpa2t *addr, bool *low, uint8_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_u4(content, addr, low, val);
+    result = class->read_u4(content, addr, low, val);
 
     return result;
 
@@ -404,11 +518,11 @@ bool g_binary_content_read_u4(const GBinContent *content, vmpa2t *addr, bool *lo
 bool g_binary_content_read_u8(const GBinContent *content, vmpa2t *addr, uint8_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_u8(content, addr, val);
+    result = class->read_u8(content, addr, val);
 
     return result;
 
@@ -433,11 +547,11 @@ bool g_binary_content_read_u8(const GBinContent *content, vmpa2t *addr, uint8_t
 bool g_binary_content_read_u16(const GBinContent *content, vmpa2t *addr, SourceEndian endian, uint16_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_u16(content, addr, endian, val);
+    result = class->read_u16(content, addr, endian, val);
 
     return result;
 
@@ -462,11 +576,11 @@ bool g_binary_content_read_u16(const GBinContent *content, vmpa2t *addr, SourceE
 bool g_binary_content_read_u32(const GBinContent *content, vmpa2t *addr, SourceEndian endian, uint32_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_u32(content, addr, endian, val);
+    result = class->read_u32(content, addr, endian, val);
 
     return result;
 
@@ -491,11 +605,11 @@ bool g_binary_content_read_u32(const GBinContent *content, vmpa2t *addr, SourceE
 bool g_binary_content_read_u64(const GBinContent *content, vmpa2t *addr, SourceEndian endian, uint64_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_u64(content, addr, endian, val);
+    result = class->read_u64(content, addr, endian, val);
 
     return result;
 
@@ -519,11 +633,11 @@ bool g_binary_content_read_u64(const GBinContent *content, vmpa2t *addr, SourceE
 bool g_binary_content_read_uleb128(const GBinContent *content, vmpa2t *addr, uleb128_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_uleb128(content, addr, val);
+    result = class->read_uleb128(content, addr, val);
 
     return result;
 
@@ -547,11 +661,73 @@ bool g_binary_content_read_uleb128(const GBinContent *content, vmpa2t *addr, ule
 bool g_binary_content_read_leb128(const GBinContent *content, vmpa2t *addr, leb128_t *val)
 {
     bool result;                            /* Bilan à remonter            */
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
+
+    class = G_BIN_CONTENT_GET_CLASS(content);
+
+    result = class->read_leb128(content, addr, val);
+
+    return result;
+
+}
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/*                      CONSERVATION ET RECHARGEMENT DES DONNEES                      */
+/* ---------------------------------------------------------------------------------- */
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content = élément GLib à constuire.                          *
+*                storage = conservateur de données à manipuler ou NULL.       *
+*                pbuf    = zone tampon à lire.                                *
+*                                                                             *
+*  Description : Charge un contenu depuis une mémoire tampon.                 *
+*                                                                             *
+*  Retour      : Bilan de l'opération.                                        *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static bool g_binary_content_load(GBinContent *content, GObjectStorage *storage, packed_buffer_t *pbuf)
+{
+    bool result;                            /* Bilan à retourner           */
+    GBinContentClass *class;                /* Classe de l'instance        */
+
+    class = G_BIN_CONTENT_GET_CLASS(content);
+
+    result = class->load(content, storage, pbuf);
+
+    return result;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content = élément GLib à consulter.                          *
+*                storage = conservateur de données à manipuler ou NULL.       *
+*                pbuf    = zone tampon à remplir.                             *
+*                                                                             *
+*  Description : Sauvegarde un contenu dans une mémoire tampon.               *
+*                                                                             *
+*  Retour      : Bilan de l'opération.                                        *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static bool g_binary_content_store(const GBinContent *content, GObjectStorage *storage, packed_buffer_t *pbuf)
+{
+    bool result;                            /* Bilan à retourner           */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    result = iface->read_leb128(content, addr, val);
+    result = class->store(content, storage, pbuf);
 
     return result;
 
diff --git a/src/analysis/content.h b/src/analysis/content.h
index afb721e..5279890 100644
--- a/src/analysis/content.h
+++ b/src/analysis/content.h
@@ -36,22 +36,22 @@
 
 
 
-#define G_TYPE_BIN_CONTENT             (g_binary_content_get_type())
-#define G_BIN_CONTENT(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_BIN_CONTENT, GBinContent))
-#define G_BIN_CONTENT_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST((vtable), G_TYPE_BIN_CONTENT, GBinContentIface))
-#define G_IS_BIN_CONTENT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_BIN_CONTENT))
-#define G_IS_BIN_CONTENT_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), G_TYPE_BIN_CONTENT))
-#define G_BIN_CONTENT_GET_IFACE(inst)  (G_TYPE_INSTANCE_GET_INTERFACE((inst), G_TYPE_BIN_CONTENT, GBinContentIface))
+#define G_TYPE_BIN_CONTENT            g_binary_content_get_type()
+#define G_BIN_CONTENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_BIN_CONTENT, GBinContent))
+#define G_IS_BIN_CONTENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_BIN_CONTENT))
+#define G_BIN_CONTENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_BIN_CONTENT, GBinContentClass))
+#define G_IS_BIN_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_BIN_CONTENT))
+#define G_BIN_CONTENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_BIN_CONTENT, GBinContentClass))
 
 
-/* Accès à un contenu binaire quelconque (coquille vide) */
+/* Accès à un contenu binaire quelconque (instance) */
 typedef struct _GBinContent GBinContent;
 
-/* Accès à un contenu binaire quelconque (interface) */
-typedef struct _GBinContentIface GBinContentIface;
+/* Accès à un contenu binaire quelconque (classe) */
+typedef struct _GBinContentClass GBinContentClass;
 
 
-/* Détermine le type d'une interface pour la lecture de binaire. */
+/* Détermine le type d'un contenu binaire à parcourir. */
 GType g_binary_content_get_type(void) G_GNUC_CONST;
 
 /* Associe un ensemble d'attributs au contenu binaire. */
diff --git a/src/analysis/contents/Makefile.am b/src/analysis/contents/Makefile.am
index 1263f42..e1cf04f 100644
--- a/src/analysis/contents/Makefile.am
+++ b/src/analysis/contents/Makefile.am
@@ -2,10 +2,13 @@
 noinst_LTLIBRARIES  = libanalysiscontents.la
 
 libanalysiscontents_la_SOURCES =		\
+	encapsulated-int.h					\
 	encapsulated.h encapsulated.c		\
+	file-int.h							\
 	file.h file.c						\
 	memory-int.h						\
 	memory.h memory.c					\
+	restricted-int.h					\
 	restricted.h restricted.c
 
 libanalysiscontents_la_CFLAGS = $(TOOLKIT_CFLAGS)
diff --git a/src/analysis/contents/encapsulated-int.h b/src/analysis/contents/encapsulated-int.h
new file mode 100644
index 0000000..5ccd318
--- /dev/null
+++ b/src/analysis/contents/encapsulated-int.h
@@ -0,0 +1,62 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * encapsulated-int.h - prototypes internes pour le chargement de données binaires à partir d'un contenu restreint
+ *
+ * Copyright (C) 2023 Cyrille Bagard
+ *
+ *  This file is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Chrysalide.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ANALYSIS_CONTENTS_ENCAPSULATED_INT_H
+#define _ANALYSIS_CONTENTS_ENCAPSULATED_INT_H
+
+
+#include "encapsulated.h"
+
+
+#include "../content-int.h"
+
+
+
+/* Contenu de données binaires issues d'un contenu restreint (instance) */
+struct _GEncapsContent
+{
+    GBinContent parent;                     /* A laisser en premier        */
+
+    GBinContent *base;                      /* Base offrant une extraction */
+    char *path;                             /* Chemin vers le contenu ciblé*/
+    GBinContent *endpoint;                  /* Contenu ciblé               */
+
+    char *full_desc;                        /* Description de l'ensemble   */
+    char *desc;                             /* Description de l'ensemble   */
+
+};
+
+/* Contenu de données binaires issues d'un contenu restreint (classe) */
+struct _GEncapsContentClass
+{
+    GBinContentClass parent;                /* A laisser en premier        */
+
+};
+
+
+/* Met en place un contenu de données brutes encapsulées. */
+bool g_encaps_content_create(GEncapsContent *, GBinContent *, const char *, GBinContent *);
+
+
+
+#endif  /* _ANALYSIS_CONTENTS_ENCAPSULATED_INT_H */
diff --git a/src/analysis/contents/encapsulated.c b/src/analysis/contents/encapsulated.c
index dadc0a5..e0e6ed1 100644
--- a/src/analysis/contents/encapsulated.c
+++ b/src/analysis/contents/encapsulated.c
@@ -28,7 +28,7 @@
 #include <string.h>
 
 
-#include "../content-int.h"
+#include "encapsulated-int.h"
 #include "../db/misc/rlestr.h"
 #include "../storage/serialize-int.h"
 #include "../../common/extstr.h"
@@ -38,40 +38,12 @@
 /* -------------------------- ENSEMBLE DE DONNEES BINAIRES -------------------------- */
 
 
-/* Contenu de issu d'un contenu plus global (instance) */
-struct _GEncapsContent
-{
-    GObject parent;                         /* A laisser en premier        */
-
-    GBinContent *base;                      /* Base offrant une extraction */
-    char *path;                             /* Chemin vers le contenu ciblé*/
-    GBinContent *endpoint;                  /* Contenu ciblé               */
-
-    char *full_desc;                        /* Description de l'ensemble   */
-    char *desc;                             /* Description de l'ensemble   */
-
-};
-
-/* Contenu de issu d'un contenu plus global (classe) */
-struct _GEncapsContentClass
-{
-    GObjectClass parent;                    /* A laisser en premier        */
-
-};
-
-
 /* Initialise la classe des contenus de données encapsulés. */
 static void g_encaps_content_class_init(GEncapsContentClass *);
 
 /* Initialise une instance de contenu de données encapsulé. */
 static void g_encaps_content_init(GEncapsContent *);
 
-/* Procède à l'initialisation de l'interface de sérialisation. */
-static void g_encaps_content_serializable_init(GSerializableObjectInterface *);
-
-/* Procède à l'initialisation de l'interface de lecture. */
-static void g_encaps_content_interface_init(GBinContentInterface *);
-
 /* Supprime toutes les références externes. */
 static void g_encaps_content_dispose(GEncapsContent *);
 
@@ -80,7 +52,7 @@ static void g_encaps_content_finalize(GEncapsContent *);
 
 
 
-/* ---------------------- INTERACTIONS AVEC UN CONTENU BINAIRE ---------------------- */
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
 
 
 /* Associe un ensemble d'attributs au contenu binaire. */
@@ -137,11 +109,6 @@ static bool g_encaps_content_read_uleb128(const GEncapsContent *, vmpa2t *, uleb
 /* Lit un nombre signé encodé au format LEB128. */
 static bool g_encaps_content_read_leb128(const GEncapsContent *, vmpa2t *, leb128_t *);
 
-
-
-/* -------------------- CONSERVATION ET RECHARGEMENT DES DONNEES -------------------- */
-
-
 /* Charge un contenu depuis une mémoire tampon. */
 static bool g_encaps_content_load(GEncapsContent *, GObjectStorage *, packed_buffer_t *);
 
@@ -156,9 +123,7 @@ static bool g_encaps_content_store(const GEncapsContent *, GObjectStorage *, pac
 
 
 /* Indique le type défini par la GLib pour les contenus encapsulés. */
-G_DEFINE_TYPE_WITH_CODE(GEncapsContent, g_encaps_content, G_TYPE_OBJECT,
-                        G_IMPLEMENT_INTERFACE(G_TYPE_BIN_CONTENT, g_encaps_content_interface_init)
-                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_encaps_content_serializable_init));
+G_DEFINE_TYPE(GEncapsContent, g_encaps_content, G_TYPE_BIN_CONTENT);
 
 
 /******************************************************************************
@@ -176,88 +141,53 @@ G_DEFINE_TYPE_WITH_CODE(GEncapsContent, g_encaps_content, G_TYPE_OBJECT,
 static void g_encaps_content_class_init(GEncapsContentClass *klass)
 {
     GObjectClass *object;                   /* Autre version de la classe  */
+    GBinContentClass *content;              /* Version parente de la classe*/
 
     object = G_OBJECT_CLASS(klass);
 
     object->dispose = (GObjectFinalizeFunc/* ! */)g_encaps_content_dispose;
     object->finalize = (GObjectFinalizeFunc)g_encaps_content_finalize;
 
-}
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : content = instance à initialiser.                            *
-*                                                                             *
-*  Description : Initialise une instance de contenu de données encapsulé.     *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static void g_encaps_content_init(GEncapsContent *content)
-{
-    content->base = NULL;
-    content->path = NULL;
-    content->endpoint = NULL;
-
-    content->full_desc = NULL;
-    content->desc = NULL;
+    content = G_BIN_CONTENT_CLASS(klass);
 
-}
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
-*                                                                             *
-*  Description : Procède à l'initialisation de l'interface de lecture.        *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
+    content->set_attribs = (set_content_attributes)g_encaps_content_set_attributes;
+    content->get_attribs = (get_content_attributes)g_encaps_content_get_attributes;
 
-static void g_encaps_content_interface_init(GBinContentInterface *iface)
-{
-    iface->set_attribs = (set_content_attributes)g_encaps_content_set_attributes;
-    iface->get_attribs = (get_content_attributes)g_encaps_content_get_attributes;
+    content->get_root = (get_content_root_fc)g_encaps_content_get_root;
 
-    iface->get_root = (get_content_root_fc)g_encaps_content_get_root;
+    content->describe = (describe_content_fc)g_encaps_content_describe;
 
-    iface->describe = (describe_content_fc)g_encaps_content_describe;
+    content->compute_checksum = (compute_checksum_fc)g_encaps_content_compute_checksum;
 
-    iface->compute_checksum = (compute_checksum_fc)g_encaps_content_compute_checksum;
+    content->compute_size = (compute_size_fc)g_encaps_content_compute_size;
+    content->compute_start_pos = (compute_start_pos_fc)g_encaps_content_compute_start_pos;
+    content->compute_end_pos = (compute_end_pos_fc)g_encaps_content_compute_end_pos;
 
-    iface->compute_size = (compute_size_fc)g_encaps_content_compute_size;
-    iface->compute_start_pos = (compute_start_pos_fc)g_encaps_content_compute_start_pos;
-    iface->compute_end_pos = (compute_end_pos_fc)g_encaps_content_compute_end_pos;
+    content->seek = (seek_fc)g_encaps_content_seek;
 
-    iface->seek = (seek_fc)g_encaps_content_seek;
+    content->get_raw_access = (get_raw_access_fc)g_encaps_content_get_raw_access;
 
-    iface->get_raw_access = (get_raw_access_fc)g_encaps_content_get_raw_access;
+    content->read_raw = (read_raw_fc)g_encaps_content_read_raw;
+    content->read_u4 = (read_u4_fc)g_encaps_content_read_u4;
+    content->read_u8 = (read_u8_fc)g_encaps_content_read_u8;
+    content->read_u16 = (read_u16_fc)g_encaps_content_read_u16;
+    content->read_u32 = (read_u32_fc)g_encaps_content_read_u32;
+    content->read_u64 = (read_u64_fc)g_encaps_content_read_u64;
 
-    iface->read_raw = (read_raw_fc)g_encaps_content_read_raw;
-    iface->read_u4 = (read_u4_fc)g_encaps_content_read_u4;
-    iface->read_u8 = (read_u8_fc)g_encaps_content_read_u8;
-    iface->read_u16 = (read_u16_fc)g_encaps_content_read_u16;
-    iface->read_u32 = (read_u32_fc)g_encaps_content_read_u32;
-    iface->read_u64 = (read_u64_fc)g_encaps_content_read_u64;
+    content->read_uleb128 = (read_uleb128_fc)g_encaps_content_read_uleb128;
+    content->read_leb128 = (read_leb128_fc)g_encaps_content_read_leb128;
 
-    iface->read_uleb128 = (read_uleb128_fc)g_encaps_content_read_uleb128;
-    iface->read_leb128 = (read_leb128_fc)g_encaps_content_read_leb128;
+    content->load = (load_content_cb)g_encaps_content_load;
+    content->store = (store_content_cb)g_encaps_content_store;
 
 }
 
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
+*  Paramètres  : content = instance à initialiser.                            *
 *                                                                             *
-*  Description : Procède à l'initialisation de l'interface de sérialisation.  *
+*  Description : Initialise une instance de contenu de données encapsulé.     *
 *                                                                             *
 *  Retour      : -                                                            *
 *                                                                             *
@@ -265,10 +195,14 @@ static void g_encaps_content_interface_init(GBinContentInterface *iface)
 *                                                                             *
 ******************************************************************************/
 
-static void g_encaps_content_serializable_init(GSerializableObjectInterface *iface)
+static void g_encaps_content_init(GEncapsContent *content)
 {
-    iface->load = (load_serializable_object_cb)g_encaps_content_load;
-    iface->store = (store_serializable_object_cb)g_encaps_content_store;
+    content->base = NULL;
+    content->path = NULL;
+    content->endpoint = NULL;
+
+    content->full_desc = NULL;
+    content->desc = NULL;
 
 }
 
@@ -337,30 +271,59 @@ static void g_encaps_content_finalize(GEncapsContent *content)
 
 GBinContent *g_encaps_content_new(GBinContent *base, const char *path, GBinContent *endpoint)
 {
-    GEncapsContent *result;                 /* Structure à retourner      */
+    GBinContent *result;                    /* Structure à retourner       */
 
     result = g_object_new(G_TYPE_ENCAPS_CONTENT, NULL);
 
+    if (!g_encaps_content_create(G_ENCAPS_CONTENT(result), base, path, endpoint))
+        g_clear_object(&result);
+
+    return result;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content  = instance à initialiser pleinement.                *
+*                base     = contenu binaire d'où réaliser une extraction.     *
+*                path     = chemin vers le contenu finalement ciblé.          *
+*                endpoint = contenu final rendu accessible.                   *
+*                                                                             *
+*  Description : Met en place un contenu de données brutes encapsulées.       *
+*                                                                             *
+*  Retour      : Bilan de l'opération.                                        *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+bool g_encaps_content_create(GEncapsContent *content, GBinContent *base, const char *path, GBinContent *endpoint)
+{
+    bool result;                            /* Bilan à retourner           */
+
     g_object_ref(base);
     g_object_ref(endpoint);
 
-    result->base = base;
-    result->path = strdup(path);
-    result->endpoint = endpoint;
+    content->base = base;
+    content->path = strdup(path);
+    content->endpoint = endpoint;
 
     /* Description complète */
 
-    result->full_desc = g_binary_content_describe(result->base, true);
+    content->full_desc = g_binary_content_describe(content->base, true);
 
-    result->full_desc = stradd(result->full_desc, G_DIR_SEPARATOR_S);
+    content->full_desc = stradd(content->full_desc, G_DIR_SEPARATOR_S);
 
-    result->full_desc = stradd(result->full_desc, path);
+    content->full_desc = stradd(content->full_desc, path);
 
     /* Description partielle */
 
-    result->desc = strdup(path);
+    content->desc = strdup(path);
+
+    result = true;
 
-    return G_BIN_CONTENT(result);
+    return result;
 
 }
 
@@ -442,7 +405,7 @@ GBinContent *g_encaps_content_get_endpoint(const GEncapsContent *content)
 
 
 /* ---------------------------------------------------------------------------------- */
-/*                        INTERACTIONS AVEC UN CONTENU BINAIRE                        */
+/*                       IMPLEMENTATION DES FONCTIONS DE CLASSE                       */
 /* ---------------------------------------------------------------------------------- */
 
 
@@ -554,11 +517,11 @@ static char *g_encaps_content_describe(const GEncapsContent *content, bool full)
 
 static void g_encaps_content_compute_checksum(GEncapsContent *content, GChecksum *checksum)
 {
-    GBinContentIface *iface;                /* Interface utilisée          */
+    GBinContentClass *class;                /* Classe de l'instance        */
 
-    iface = G_BIN_CONTENT_GET_IFACE(content->endpoint);
+    class = G_BIN_CONTENT_GET_CLASS(content);
 
-    iface->compute_checksum(content->endpoint, checksum);
+    class->compute_checksum(content->endpoint, checksum);
 
 }
 
@@ -882,12 +845,6 @@ static bool g_encaps_content_read_leb128(const GEncapsContent *content, vmpa2t *
 }
 
 
-
-/* ---------------------------------------------------------------------------------- */
-/*                      CONSERVATION ET RECHARGEMENT DES DONNEES                      */
-/* ---------------------------------------------------------------------------------- */
-
-
 /******************************************************************************
 *                                                                             *
 *  Paramètres  : content = élément GLib à constuire.                          *
diff --git a/src/analysis/contents/file-int.h b/src/analysis/contents/file-int.h
new file mode 100644
index 0000000..dc61bdc
--- /dev/null
+++ b/src/analysis/contents/file-int.h
@@ -0,0 +1,58 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * file-int.h - prototypes internes pour le chargement de données binaires à partir d'un fichier
+ *
+ * Copyright (C) 2023 Cyrille Bagard
+ *
+ *  This file is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Chrysalide.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ANALYSIS_CONTENTS_FILE_INT_H
+#define _ANALYSIS_CONTENTS_FILE_INT_H
+
+
+#include "file.h"
+
+
+#include "memory-int.h"
+
+
+
+/* Contenu de données binaires issues d'un fichier (instance) */
+struct _GFileContent
+{
+    GMemoryContent parent;                  /* A laisser en premier        */
+
+    char *filename;                         /* Fichier chargé en mémoire   */
+    int fd;                                 /* Flux ouvert en lectureu     */
+
+};
+
+/* Contenu de données binaires issues d'un fichier (classe) */
+struct _GFileContentClass
+{
+    GMemoryContentClass parent;             /* A laisser en premier        */
+
+};
+
+
+/* Met en place un contenu d'un fichier donné. */
+bool g_file_content_create(GFileContent *, const char *);
+
+
+
+#endif  /* _ANALYSIS_CONTENTS_FILE_INT_H */
diff --git a/src/analysis/contents/file.c b/src/analysis/contents/file.c
index 7497667..545d869 100644
--- a/src/analysis/contents/file.c
+++ b/src/analysis/contents/file.c
@@ -25,6 +25,7 @@
 
 
 #include <fcntl.h>
+#include <libgen.h>
 #include <malloc.h>
 #include <string.h>
 #include <unistd.h>
@@ -32,8 +33,7 @@
 #include <sys/stat.h>
 
 
-#include "memory-int.h"
-#include "../content-int.h"
+#include "file-int.h"
 #include "../db/misc/rlestr.h"
 #include "../storage/serialize-int.h"
 #include "../../core/logs.h"
@@ -43,33 +43,12 @@
 /* -------------------------- ENSEMBLE DE DONNEES BINAIRES -------------------------- */
 
 
-/* Contenu de données binaires issues d'un fichier (instance) */
-struct _GFileContent
-{
-    GMemoryContent parent;                  /* A laisser en premier        */
-
-    char *filename;                         /* Fichier chargé en mémoire   */
-    int fd;                                 /* Flux ouvert en lectureu     */
-
-};
-
-/* Contenu de données binaires issues d'un fichier (classe) */
-struct _GFileContentClass
-{
-    GMemoryContentClass parent;             /* A laisser en premier        */
-
-};
-
-
 /* Initialise la classe des contenus de données binaires. */
 static void g_file_content_class_init(GFileContentClass *);
 
 /* Initialise une instance de contenu de données binaires. */
 static void g_file_content_init(GFileContent *);
 
-/* Procède à l'initialisation de l'interface de sérialisation. */
-static void g_file_content_serializable_init(GSerializableObjectInterface *);
-
 /* Supprime toutes les références externes. */
 static void g_file_content_dispose(GFileContent *);
 
@@ -77,9 +56,13 @@ static void g_file_content_dispose(GFileContent *);
 static void g_file_content_finalize(GFileContent *);
 
 
-/* -------------------- CONSERVATION ET RECHARGEMENT DES DONNEES -------------------- */
+
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
 
 
+/* Fournit le nom associé au contenu binaire. */
+static char *g_file_content_describe(const GFileContent *, bool);
+
 /* Charge un contenu depuis une mémoire tampon. */
 static bool g_file_content_load(GFileContent *, GObjectStorage *, packed_buffer_t *);
 
@@ -94,8 +77,7 @@ static bool g_file_content_store(const GFileContent *, GObjectStorage *, packed_
 
 
 /* Indique le type défini par la GLib pour les contenus de données. */
-G_DEFINE_TYPE_WITH_CODE(GFileContent, g_file_content, G_TYPE_MEMORY_CONTENT,
-                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_file_content_serializable_init));
+G_DEFINE_TYPE(GFileContent, g_file_content, G_TYPE_MEMORY_CONTENT);
 
 
 /******************************************************************************
@@ -113,12 +95,20 @@ G_DEFINE_TYPE_WITH_CODE(GFileContent, g_file_content, G_TYPE_MEMORY_CONTENT,
 static void g_file_content_class_init(GFileContentClass *klass)
 {
     GObjectClass *object;                   /* Autre version de la classe  */
+    GBinContentClass *content;              /* Version parente de la classe*/
 
     object = G_OBJECT_CLASS(klass);
 
     object->dispose = (GObjectFinalizeFunc/* ! */)g_file_content_dispose;
     object->finalize = (GObjectFinalizeFunc)g_file_content_finalize;
 
+    content = G_BIN_CONTENT_CLASS(klass);
+
+    content->describe = (describe_content_fc)g_file_content_describe;
+
+    content->load = (load_content_cb)g_file_content_load;
+    content->store = (store_content_cb)g_file_content_store;
+
 }
 
 
@@ -144,26 +134,6 @@ static void g_file_content_init(GFileContent *content)
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
-*                                                                             *
-*  Description : Procède à l'initialisation de l'interface de sérialisation.  *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static void g_file_content_serializable_init(GSerializableObjectInterface *iface)
-{
-    iface->load = (load_serializable_object_cb)g_file_content_load;
-    iface->store = (store_serializable_object_cb)g_file_content_store;
-
-}
-
-
-/******************************************************************************
-*                                                                             *
 *  Paramètres  : content = instance d'objet GLib à traiter.                   *
 *                                                                             *
 *  Description : Supprime toutes les références externes.                     *
@@ -213,6 +183,8 @@ static void g_file_content_finalize(GFileContent *content)
 }
 
 
+
+
 /******************************************************************************
 *                                                                             *
 *  Paramètres  : filename = chemin d'accès au fichier à charger.              *
@@ -227,13 +199,42 @@ static void g_file_content_finalize(GFileContent *content)
 
 GBinContent *g_file_content_new(const char *filename)
 {
-    GFileContent *result;                   /* Structure à retourner       */
+    GBinContent *result;                    /* Structure à retourner       */
+
+    result = g_object_new(G_TYPE_FILE_CONTENT, NULL);
+
+    if (!g_file_content_create(G_FILE_CONTENT(result), filename))
+        g_clear_object(&result);
+
+    return result;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content  = instance à initialiser pleinement.                *
+*                filename = chemin d'accès au fichier à charger.              *
+*                                                                             *
+*  Description : Met en place un contenu d'un fichier donné.                  *
+*                                                                             *
+*  Retour      : Bilan de l'opération.                                        *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+bool g_file_content_create(GFileContent *content, const char *filename)
+{
+    bool result;                            /* Bilan à retourner           */
     int fd;                                 /* Descripteur du fichier      */
     struct stat info;                       /* Informations sur le fichier */
     int ret;                                /* Bilan d'un appel            */
-    void *content;                          /* Contenu brut du fichier     */
+    void *data;                             /* Contenu brut du fichier     */
     GMemoryContent *base;                   /* Structure parente           */
 
+    result = false;
+
     /* Récupération des données */
 
     fd = open(filename, O_RDONLY);
@@ -251,8 +252,8 @@ GBinContent *g_file_content_new(const char *filename)
         goto file_error;
     }
 
-    content = mmap(NULL, info.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
-    if (content == MAP_FAILED)
+    data = mmap(NULL, info.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+    if (data == MAP_FAILED)
     {
         close(fd);
         LOG_ERROR_N("mmap");
@@ -261,20 +262,18 @@ GBinContent *g_file_content_new(const char *filename)
 
     /* Constitution du contenu officiel */
 
-    result = g_object_new(G_TYPE_FILE_CONTENT, NULL);
-
-    result->filename = strdup(filename);
+    content->filename = strdup(filename);
 
-    base = G_MEMORY_CONTENT(result);
+    base = G_MEMORY_CONTENT(content);
 
-    base->data = content;
+    base->data = data;
     base->length = info.st_size;
 
-    return G_BIN_CONTENT(result);
+    result = true;
 
  file_error:
 
-    return NULL;
+    return result;
 
 }
 
@@ -304,12 +303,51 @@ const char *g_file_content_get_filename(const GFileContent *content)
 
 
 /* ---------------------------------------------------------------------------------- */
-/*                      CONSERVATION ET RECHARGEMENT DES DONNEES                      */
+/*                       IMPLEMENTATION DES FONCTIONS DE CLASSE                       */
 /* ---------------------------------------------------------------------------------- */
 
 
 /******************************************************************************
 *                                                                             *
+*  Paramètres  : content = contenu binaire à consulter.                       *
+*                full    = précise s'il s'agit d'une version longue ou non.   *
+*                                                                             *
+*  Description : Fournit le nom associé au contenu binaire.                   *
+*                                                                             *
+*  Retour      : Nom de fichier avec chemin absolu au besoin.                 *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+static char *g_file_content_describe(const GFileContent *content, bool full)
+{
+    char *result;                           /* Description à retourner     */
+    char *tmp;                              /* Copie modifiable            */
+    char *base;                             /* Description à recopier      */
+
+    if (full)
+        result = strdup(content->filename);
+
+    else
+    {
+        tmp = strdup(content->filename);
+
+        base = basename(tmp);
+
+        result = strdup(base);
+
+        free(tmp);
+
+    }
+
+    return result;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
 *  Paramètres  : content = élément GLib à constuire.                          *
 *                storage = conservateur de données à manipuler ou NULL.       *
 *                pbuf    = zone tampon à lire.                                *
diff --git a/src/analysis/contents/memory-int.h b/src/analysis/contents/memory-int.h
index 749e984..d3012c7 100644
--- a/src/analysis/contents/memory-int.h
+++ b/src/analysis/contents/memory-int.h
@@ -28,11 +28,14 @@
 #include "memory.h"
 
 
+#include "../content-int.h"
+
+
 
 /* Contenu de données binaires résidant en mémoire (instance) */
 struct _GMemoryContent
 {
-    GObject parent;                         /* A laisser en premier        */
+    GBinContent parent;                     /* A laisser en premier        */
 
     GContentAttributes *attribs;            /* Attributs liés au contenu   */
 
@@ -48,10 +51,14 @@ struct _GMemoryContent
 /* Contenu de données binaires résidant en mémoire (classe) */
 struct _GMemoryContentClass
 {
-    GObjectClass parent;                    /* A laisser en premier        */
+    GBinContentClass parent;                /* A laisser en premier        */
 
 };
 
 
+/* Met en place un contenu de données brutes depuis la mémoire. */
+bool g_memory_content_create(GMemoryContent *, const bin_t *, phys_t);
+
+
 
 #endif  /* _ANALYSIS_CONTENTS_MEMORY_INT_H */
diff --git a/src/analysis/contents/memory.c b/src/analysis/contents/memory.c
index f80a01a..f8ff863 100644
--- a/src/analysis/contents/memory.c
+++ b/src/analysis/contents/memory.c
@@ -51,12 +51,6 @@ static void g_memory_content_class_init(GMemoryContentClass *);
 /* Initialise une instance de contenu de données en mémoire. */
 static void g_memory_content_init(GMemoryContent *);
 
-/* Procède à l'initialisation de l'interface de lecture. */
-static void g_memory_content_interface_init(GBinContentInterface *);
-
-/* Procède à l'initialisation de l'interface de sérialisation. */
-static void g_memory_content_serializable_init(GSerializableObjectInterface *);
-
 /* Supprime toutes les références externes. */
 static void g_memory_content_dispose(GMemoryContent *);
 
@@ -65,7 +59,7 @@ static void g_memory_content_finalize(GMemoryContent *);
 
 
 
-/* ---------------------- INTERACTIONS AVEC UN CONTENU BINAIRE ---------------------- */
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
 
 
 /* Associe un ensemble d'attributs au contenu binaire. */
@@ -122,11 +116,6 @@ static bool g_memory_content_read_uleb128(const GMemoryContent *, vmpa2t *, uleb
 /* Lit un nombre signé encodé au format LEB128. */
 static bool g_memory_content_read_leb128(const GMemoryContent *, vmpa2t *, leb128_t *);
 
-
-
-/* -------------------- CONSERVATION ET RECHARGEMENT DES DONNEES -------------------- */
-
-
 /* Charge un contenu depuis une mémoire tampon. */
 static bool g_memory_content_load(GMemoryContent *, GObjectStorage *, packed_buffer_t *);
 
@@ -141,9 +130,7 @@ static bool g_memory_content_store(const GMemoryContent *, GObjectStorage *, pac
 
 
 /* Indique le type défini par la GLib pour les contenus de données en mémoire. */
-G_DEFINE_TYPE_WITH_CODE(GMemoryContent, g_memory_content, G_TYPE_OBJECT,
-                        G_IMPLEMENT_INTERFACE(G_TYPE_BIN_CONTENT, g_memory_content_interface_init)
-                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_memory_content_serializable_init));
+G_DEFINE_TYPE(GMemoryContent, g_memory_content, G_TYPE_BIN_CONTENT);
 
 
 /******************************************************************************
@@ -161,12 +148,45 @@ G_DEFINE_TYPE_WITH_CODE(GMemoryContent, g_memory_content, G_TYPE_OBJECT,
 static void g_memory_content_class_init(GMemoryContentClass *klass)
 {
     GObjectClass *object;                   /* Autre version de la classe  */
+    GBinContentClass *content;              /* Version parente de la classe*/
 
     object = G_OBJECT_CLASS(klass);
 
     object->dispose = (GObjectFinalizeFunc/* ! */)g_memory_content_dispose;
     object->finalize = (GObjectFinalizeFunc)g_memory_content_finalize;
 
+    content = G_BIN_CONTENT_CLASS(klass);
+
+    content->set_attribs = (set_content_attributes)g_memory_content_set_attributes;
+    content->get_attribs = (get_content_attributes)g_memory_content_get_attributes;
+
+    content->get_root = (get_content_root_fc)g_memory_content_get_root;
+
+    content->describe = (describe_content_fc)g_memory_content_describe;
+
+    content->compute_checksum = (compute_checksum_fc)g_memory_content_compute_checksum;
+
+    content->compute_size = (compute_size_fc)g_memory_content_compute_size;
+    content->compute_start_pos = (compute_start_pos_fc)g_memory_content_compute_start_pos;
+    content->compute_end_pos = (compute_end_pos_fc)g_memory_content_compute_end_pos;
+
+    content->seek = (seek_fc)g_memory_content_seek;
+
+    content->get_raw_access = (get_raw_access_fc)g_memory_content_get_raw_access;
+
+    content->read_raw = (read_raw_fc)g_memory_content_read_raw;
+    content->read_u4 = (read_u4_fc)g_memory_content_read_u4;
+    content->read_u8 = (read_u8_fc)g_memory_content_read_u8;
+    content->read_u16 = (read_u16_fc)g_memory_content_read_u16;
+    content->read_u32 = (read_u32_fc)g_memory_content_read_u32;
+    content->read_u64 = (read_u64_fc)g_memory_content_read_u64;
+
+    content->read_uleb128 = (read_uleb128_fc)g_memory_content_read_uleb128;
+    content->read_leb128 = (read_leb128_fc)g_memory_content_read_leb128;
+
+    content->load = (load_content_cb)g_memory_content_load;
+    content->store = (store_content_cb)g_memory_content_store;
+
 }
 
 
@@ -206,70 +226,6 @@ static void g_memory_content_init(GMemoryContent *content)
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
-*                                                                             *
-*  Description : Procède à l'initialisation de l'interface de lecture.        *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static void g_memory_content_interface_init(GBinContentInterface *iface)
-{
-    iface->set_attribs = (set_content_attributes)g_memory_content_set_attributes;
-    iface->get_attribs = (get_content_attributes)g_memory_content_get_attributes;
-
-    iface->get_root = (get_content_root_fc)g_memory_content_get_root;
-
-    iface->describe = (describe_content_fc)g_memory_content_describe;
-
-    iface->compute_checksum = (compute_checksum_fc)g_memory_content_compute_checksum;
-
-    iface->compute_size = (compute_size_fc)g_memory_content_compute_size;
-    iface->compute_start_pos = (compute_start_pos_fc)g_memory_content_compute_start_pos;
-    iface->compute_end_pos = (compute_end_pos_fc)g_memory_content_compute_end_pos;
-
-    iface->seek = (seek_fc)g_memory_content_seek;
-
-    iface->get_raw_access = (get_raw_access_fc)g_memory_content_get_raw_access;
-
-    iface->read_raw = (read_raw_fc)g_memory_content_read_raw;
-    iface->read_u4 = (read_u4_fc)g_memory_content_read_u4;
-    iface->read_u8 = (read_u8_fc)g_memory_content_read_u8;
-    iface->read_u16 = (read_u16_fc)g_memory_content_read_u16;
-    iface->read_u32 = (read_u32_fc)g_memory_content_read_u32;
-    iface->read_u64 = (read_u64_fc)g_memory_content_read_u64;
-
-    iface->read_uleb128 = (read_uleb128_fc)g_memory_content_read_uleb128;
-    iface->read_leb128 = (read_leb128_fc)g_memory_content_read_leb128;
-
-}
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
-*                                                                             *
-*  Description : Procède à l'initialisation de l'interface de sérialisation.  *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static void g_memory_content_serializable_init(GSerializableObjectInterface *iface)
-{
-    iface->load = (load_serializable_object_cb)g_memory_content_load;
-    iface->store = (store_serializable_object_cb)g_memory_content_store;
-
-}
-
-
-/******************************************************************************
-*                                                                             *
 *  Paramètres  : content = instance d'objet GLib à traiter.                   *
 *                                                                             *
 *  Description : Supprime toutes les références externes.                     *
@@ -335,32 +291,62 @@ static void g_memory_content_finalize(GMemoryContent *content)
 
 GBinContent *g_memory_content_new(const bin_t *data, phys_t size)
 {
-    GMemoryContent *result;                 /* Structure à retourner       */
+    GBinContent *result;                    /* Structure à retourner       */
+
+    result = g_object_new(G_TYPE_MEMORY_CONTENT, NULL);
+
+    if (!g_memory_content_create(G_MEMORY_CONTENT(result), data, size))
+        g_clear_object(&result);
+
+    return result;
+
+}
+
+
+/******************************************************************************
+*                                                                             *
+*  Paramètres  : content = instance à initialiser pleinement.                 *
+*                data    = données du contenu volatile.                       *
+*                size    = quantité de ces données.                           *
+*                                                                             *
+*  Description : Met en place un contenu de données brutes depuis la mémoire. *
+*                                                                             *
+*  Retour      : Bilan de l'opération.                                        *
+*                                                                             *
+*  Remarques   : -                                                            *
+*                                                                             *
+******************************************************************************/
+
+bool g_memory_content_create(GMemoryContent *content, const bin_t *data, phys_t size)
+{
+    bool result;                            /* Bilan à retourner           */
     bin_t *allocated;                       /* Zone de réception           */
 
     allocated = malloc(size);
     if (allocated == NULL)
     {
         LOG_ERROR_N("malloc");
-        return NULL;
+        goto exit;
     }
 
     memcpy(allocated, data, size);
 
-    result = g_object_new(G_TYPE_MEMORY_CONTENT, NULL);
+    content->data = allocated;
+    content->length = size;
+    content->allocated = true;
 
-    result->data = allocated;
-    result->length = size;
-    result->allocated = true;
+    result = true;
 
-    return G_BIN_CONTENT(result);
+ exit:
+
+    return result;
 
 }
 
 
 
 /* ---------------------------------------------------------------------------------- */
-/*                        INTERACTIONS AVEC UN CONTENU BINAIRE                        */
+/*                       IMPLEMENTATION DES FONCTIONS DE CLASSE                       */
 /* ---------------------------------------------------------------------------------- */
 
 
@@ -710,15 +696,12 @@ static bool g_memory_content_read_u8(const GMemoryContent *content, vmpa2t *addr
 {
     bool result;                            /* Bilan de lecture à renvoyer */
     phys_t pos;                             /* Tête de lecture courante    */
-    phys_t length;                          /* Taille de la surface dispo. */
 
     pos = get_phy_addr(addr);
 
     if (pos == VMPA_NO_PHYSICAL)
         return false;
 
-    length = length;
-
     result = read_u8(val, content->data, &pos, content->length);
 
     if (result)
@@ -902,12 +885,6 @@ static bool g_memory_content_read_leb128(const GMemoryContent *content, vmpa2t *
 }
 
 
-
-/* ---------------------------------------------------------------------------------- */
-/*                      CONSERVATION ET RECHARGEMENT DES DONNEES                      */
-/* ---------------------------------------------------------------------------------- */
-
-
 /******************************************************************************
 *                                                                             *
 *  Paramètres  : content = élément GLib à constuire.                          *
diff --git a/src/analysis/contents/restricted-int.h b/src/analysis/contents/restricted-int.h
new file mode 100644
index 0000000..ab86359
--- /dev/null
+++ b/src/analysis/contents/restricted-int.h
@@ -0,0 +1,59 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * restricted-int.h - prototypes internes pour le chargement de données binaires à partir d'un contenu restreint
+ *
+ * Copyright (C) 2023 Cyrille Bagard
+ *
+ *  This file is part of Chrysalide.
+ *
+ *  Chrysalide is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  Chrysalide is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Chrysalide.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ANALYSIS_CONTENTS_RESTRICTED_INT_H
+#define _ANALYSIS_CONTENTS_RESTRICTED_INT_H
+
+
+#include "restricted.h"
+
+
+#include "../content-int.h"
+
+
+
+/* Contenu de données binaires issues d'un contenu restreint (instance) */
+struct _GRestrictedContent
+{
+    GBinContent parent;                     /* A laisser en premier        */
+
+    GBinContent *internal;                  /* Contenu de sous-traitance   */
+
+    mrange_t range;                         /* Restriction de couverture   */
+
+};
+
+/* Contenu de données binaires issues d'un contenu restreint (classe) */
+struct _GRestrictedContentClass
+{
+    GBinContentClass parent;                /* A laisser en premier        */
+
+};
+
+
+/* Met en place un contenu restreint de données brutes. */
+bool g_restricted_content_create(GRestrictedContent *, GBinContent *, const mrange_t *);
+
+
+
+#endif  /* _ANALYSIS_CONTENTS_RESTRICTED_INT_H */
diff --git a/src/analysis/contents/restricted.c b/src/analysis/contents/restricted.c
index 55bc83f..9b4e1c8 100644
--- a/src/analysis/contents/restricted.c
+++ b/src/analysis/contents/restricted.c
@@ -28,7 +28,7 @@
 #include <string.h>
 
 
-#include "../content-int.h"
+#include "restricted-int.h"
 #include "../db/misc/rlestr.h"
 #include "../storage/serialize-int.h"
 #include "../../common/extstr.h"
@@ -39,37 +39,12 @@
 /* -------------------------- ENSEMBLE DE DONNEES BINAIRES -------------------------- */
 
 
-/* Contenu de données binaires issues d'un contenu restreint (instance) */
-struct _GRestrictedContent
-{
-    GObject parent;                         /* A laisser en premier        */
-
-    GBinContent *internal;                  /* Contenu de sous-traitance   */
-
-    mrange_t range;                         /* Restriction de couverture   */
-
-};
-
-/* Contenu de données binaires issues d'un contenu restreint (classe) */
-struct _GRestrictedContentClass
-{
-    GObjectClass parent;                    /* A laisser en premier        */
-
-};
-
-
 /* Initialise la classe des contenus de données binaires. */
 static void g_restricted_content_class_init(GRestrictedContentClass *);
 
 /* Initialise une instance de contenu de données binaires. */
 static void g_restricted_content_init(GRestrictedContent *);
 
-/* Procède à l'initialisation de l'interface de lecture. */
-static void g_restricted_content_interface_init(GBinContentInterface *);
-
-/* Procède à l'initialisation de l'interface de sérialisation. */
-static void g_restricted_content_serializable_init(GSerializableObjectInterface *);
-
 /* Supprime toutes les références externes. */
 static void g_restricted_content_dispose(GRestrictedContent *);
 
@@ -78,7 +53,7 @@ static void g_restricted_content_finalize(GRestrictedContent *);
 
 
 
-/* ---------------------- INTERACTIONS AVEC UN CONTENU BINAIRE ---------------------- */
+/* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */
 
 
 /* Associe un ensemble d'attributs au contenu binaire. */
@@ -135,11 +110,6 @@ static bool g_restricted_content_read_uleb128(const GRestrictedContent *, vmpa2t
 /* Lit un nombre signé encodé au format LEB128. */
 static bool g_restricted_content_read_leb128(const GRestrictedContent *, vmpa2t *, leb128_t *);
 
-
-
-/* -------------------- CONSERVATION ET RECHARGEMENT DES DONNEES -------------------- */
-
-
 /* Charge un contenu depuis une mémoire tampon. */
 static bool g_restricted_content_load(GRestrictedContent *, GObjectStorage *, packed_buffer_t *);
 
@@ -154,9 +124,7 @@ static bool g_restricted_content_store(const GRestrictedContent *, GObjectStorag
 
 
 /* Indique le type défini par la GLib pour les contenus de données. */
-G_DEFINE_TYPE_WITH_CODE(GRestrictedContent, g_restricted_content, G_TYPE_OBJECT,
-                        G_IMPLEMENT_INTERFACE(G_TYPE_BIN_CONTENT, g_restricted_content_interface_init)
-                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_restricted_content_serializable_init));
+G_DEFINE_TYPE(GRestrictedContent, g_restricted_content, G_TYPE_BIN_CONTENT);
 
 
 /******************************************************************************
@@ -174,88 +142,53 @@ G_DEFINE_TYPE_WITH_CODE(GRestrictedContent, g_restricted_content, G_TYPE_OBJECT,
 static void g_restricted_content_class_init(GRestrictedContentClass *klass)
 {
     GObjectClass *object;                   /* Autre version de la classe  */
+    GBinContentClass *content;              /* Version parente de la classe*/
 
     object = G_OBJECT_CLASS(klass);
 
     object->dispose = (GObjectFinalizeFunc/* ! */)g_restricted_content_dispose;
     object->finalize = (GObjectFinalizeFunc)g_restricted_content_finalize;
 
-}
+    content = G_BIN_CONTENT_CLASS(klass);
 
+    content->set_attribs = (set_content_attributes)g_restricted_content_set_attributes;
+    content->get_attribs = (get_content_attributes)g_restricted_content_get_attributes;
 
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : content = instance à initialiser.                            *
-*                                                                             *
-*  Description : Initialise une instance de contenu de données binaires.      *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
+    content->get_root = (get_content_root_fc)g_restricted_content_get_root;
 
-static void g_restricted_content_init(GRestrictedContent *content)
-{
-    vmpa2t dummy;                           /* Localisation nulle          */
+    content->describe = (describe_content_fc)g_restricted_content_describe;
 
-    content->internal = NULL;
+    content->compute_checksum = (compute_checksum_fc)g_restricted_content_compute_checksum;
 
-    init_vmpa(&dummy, VMPA_NO_PHYSICAL, VMPA_NO_VIRTUAL);
-    init_mrange(&content->range, &dummy, 0);
+    content->compute_size = (compute_size_fc)g_restricted_content_compute_size;
+    content->compute_start_pos = (compute_start_pos_fc)g_restricted_content_compute_start_pos;
+    content->compute_end_pos = (compute_end_pos_fc)g_restricted_content_compute_end_pos;
 
-}
+    content->seek = (seek_fc)g_restricted_content_seek;
 
+    content->get_raw_access = (get_raw_access_fc)g_restricted_content_get_raw_access;
 
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
-*                                                                             *
-*  Description : Procède à l'initialisation de l'interface de lecture.        *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static void g_restricted_content_interface_init(GBinContentInterface *iface)
-{
-    iface->set_attribs = (set_content_attributes)g_restricted_content_set_attributes;
-    iface->get_attribs = (get_content_attributes)g_restricted_content_get_attributes;
-
-    iface->get_root = (get_content_root_fc)g_restricted_content_get_root;
+    content->read_raw = (read_raw_fc)g_restricted_content_read_raw;
+    content->read_u4 = (read_u4_fc)g_restricted_content_read_u4;
+    content->read_u8 = (read_u8_fc)g_restricted_content_read_u8;
+    content->read_u16 = (read_u16_fc)g_restricted_content_read_u16;
+    content->read_u32 = (read_u32_fc)g_restricted_content_read_u32;
+    content->read_u64 = (read_u64_fc)g_restricted_content_read_u64;
 
-    iface->describe = (describe_content_fc)g_restricted_content_describe;
+    content->read_uleb128 = (read_uleb128_fc)g_restricted_content_read_uleb128;
+    content->read_leb128 = (read_leb128_fc)g_restricted_content_read_leb128;
 
-    iface->compute_checksum = (compute_checksum_fc)g_restricted_content_compute_checksum;
-
-    iface->compute_size = (compute_size_fc)g_restricted_content_compute_size;
-    iface->compute_start_pos = (compute_start_pos_fc)g_restricted_content_compute_start_pos;
-    iface->compute_end_pos = (compute_end_pos_fc)g_restricted_content_compute_end_pos;
-
-    iface->seek = (seek_fc)g_restricted_content_seek;
-
-    iface->get_raw_access = (get_raw_access_fc)g_restricted_content_get_raw_access;
-
-    iface->read_raw = (read_raw_fc)g_restricted_content_read_raw;
-    iface->read_u4 = (read_u4_fc)g_restricted_content_read_u4;
-    iface->read_u8 = (read_u8_fc)g_restricted_content_read_u8;
-    iface->read_u16 = (read_u16_fc)g_restricted_content_read_u16;
-    iface->read_u32 = (read_u32_fc)g_restricted_content_read_u32;
-    iface->read_u64 = (read_u64_fc)g_restricted_content_read_u64;
-
-    iface->read_uleb128 = (read_uleb128_fc)g_restricted_content_read_uleb128;
-    iface->read_leb128 = (read_leb128_fc)g_restricted_content_read_leb128;
+    content->load = (load_content_cb)g_restricted_content_load;
+    content->store = (store_content_cb)g_restricted_content_store;
 
 }
 
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : iface = interface GLib à initialiser.                        *
+*  Paramètres  : content = instance à initialiser.                            *
 *                                                                             *
-*  Description : Procède à l'initialisation de l'interface de sérialisation.  *
+*  Description : Initialise une instance de contenu de données binaires.      *
 *                                                                             *
 *  Retour      : -                                                            *
 *                                                                             *
@@ -263,10 +196,14 @@ static void g_restricted_content_interface_init(GBinContentInterface *iface)
 *                                                                             *
 ******************************************************************************/
 
-static void g_restricted_content_serializable_init(GSerializableObjectInterface *iface)
+static void g_restricted_content_init(GRestrictedContent *content)
 {
-    iface->load = (load_serializable_object_cb)g_restricted_content_load;
-    iface->store = (store_serializable_object_cb)g_restricted_content_store;
+    vmpa2t dummy;                           /* Localisation nulle          */
+
+    content->internal = NULL;
+
+    init_vmpa(&dummy, VMPA_NO_PHYSICAL, VMPA_NO_VIRTUAL);
+    init_mrange(&content->range, &dummy, 0);
 
 }
 
@@ -313,8 +250,8 @@ static void g_restricted_content_finalize(GRestrictedContent *content)
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : content = contenu binaire où puiser les données à fournir.   *
-*                range   = espace de restrictions pour les accès.             *
+*  Paramètres  : internal = contenu binaire où puiser les données à fournir.  *
+*                range    = espace de restrictions pour les accès.            *
 *                                                                             *
 *  Description : Charge en mémoire le contenu d'un contenu restreint.         *
 *                                                                             *
@@ -324,47 +261,47 @@ static void g_restricted_content_finalize(GRestrictedContent *content)
 *                                                                             *
 ******************************************************************************/
 
-GBinContent *g_restricted_content_new(GBinContent *content, const mrange_t *range)
+GBinContent *g_restricted_content_new(GBinContent *internal, const mrange_t *range)
 {
-    GRestrictedContent *result;              /* Structure à retourner      */
+    GBinContent *result;                    /* Structure à retourner       */
 
     result = g_object_new(G_TYPE_RESTRICTED_CONTENT, NULL);
 
-    result->internal = content;
-    g_object_ref(G_OBJECT(result->internal));
+    if (!g_restricted_content_create(G_RESTRICTED_CONTENT(result), internal, range))
+        g_clear_object(&result);
 
-    copy_mrange(&result->range, range);
-
-    return G_BIN_CONTENT(result);
+    return result;
 
 }
 
 
 /******************************************************************************
 *                                                                             *
-*  Paramètres  : content = contenu binaire où puiser les données à fournir.   *
-*                range   = espace de restrictions pour les accès.             *
+*  Paramètres  : content  = instance à initialiser pleinement.                *
+*                base     = contenu binaire d'où réaliser une extraction.     *
+*                path     = chemin vers le contenu finalement ciblé.          *
+*                endpoint = contenu final rendu accessible.                   *
 *                                                                             *
-*  Description : Charge en mémoire le contenu d'un contenu restreint.         *
+*  Description : Met en place un contenu restreint de données brutes.         *
 *                                                                             *
-*  Retour      : Représentation de contenu à manipuler ou NULL en cas d'échec.*
+*  Retour      : Bilan de l'opération.                                        *
 *                                                                             *
 *  Remarques   : -                                                            *
 *                                                                             *
 ******************************************************************************/
 
-GBinContent *g_restricted_content_new_ro(const GBinContent *content, const mrange_t *range)
+bool g_restricted_content_create(GRestrictedContent *content, GBinContent *internal, const mrange_t *range)
 {
-    GRestrictedContent *result;              /* Structure à retourner      */
+    bool result;                            /* Bilan à retourner           */
 
-    result = g_object_new(G_TYPE_RESTRICTED_CONTENT, NULL);
+    content->internal = internal;
+    g_object_ref(G_OBJECT(content->internal));
 
-    result->internal = (GBinContent *)content;
-    g_object_ref(G_OBJECT(result->internal));
+    copy_mrange(&content->range, range);
 
-    copy_mrange(&result->range, range);
+    result = true;
 
-    return G_BIN_CONTENT(result);
+    return result;
 
 }
 
@@ -1027,12 +964,6 @@ static bool g_restricted_content_read_leb128(const GRestrictedContent *content,
 }
 
 
-
-/* ---------------------------------------------------------------------------------- */
-/*                      CONSERVATION ET RECHARGEMENT DES DONNEES                      */
-/* ---------------------------------------------------------------------------------- */
-
-
 /******************************************************************************
 *                                                                             *
 *  Paramètres  : content = élément GLib à constuire.                          *
diff --git a/src/analysis/contents/restricted.h b/src/analysis/contents/restricted.h
index 402282a..1cea390 100644
--- a/src/analysis/contents/restricted.h
+++ b/src/analysis/contents/restricted.h
@@ -53,9 +53,6 @@ GType g_restricted_content_get_type(void);
 /* Charge en mémoire le contenu d'un contenu restreint. */
 GBinContent *g_restricted_content_new(GBinContent *, const mrange_t *);
 
-/* Charge en mémoire le contenu d'un contenu restreint. */
-GBinContent *g_restricted_content_new_ro(const GBinContent *, const mrange_t *);
-
 /* Indique l'espace de restriction appliqué à un contenu. */
 void g_restricted_content_get_range(const GRestrictedContent *, mrange_t *);
 
diff --git a/src/analysis/type.c b/src/analysis/type.c
index f05b9a8..9ed5f3f 100644
--- a/src/analysis/type.c
+++ b/src/analysis/type.c
@@ -43,7 +43,7 @@ static void g_data_type_class_init(GDataTypeClass *);
 static void g_data_type_init(GDataType *);
 
 /* Procède à l'initialisation de l'interface de sérialisation. */
-static void g_serializable_object_interface_init(GSerializableObjectIface *);
+static void g_data_type_serializable_interface_init(GSerializableObjectIface *);
 
 /* Supprime toutes les références externes. */
 static void g_data_type_dispose(GDataType *);
@@ -67,7 +67,7 @@ static bool g_data_type_store(const GDataType *, GObjectStorage *, packed_buffer
 
 /* Indique le type défini pour un type quelconque. */
 G_DEFINE_TYPE_WITH_CODE(GDataType, g_data_type, G_TYPE_OBJECT,
-                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_serializable_object_interface_init));
+                        G_IMPLEMENT_INTERFACE(G_TYPE_SERIALIZABLE_OBJECT, g_data_type_serializable_interface_init));
 
 
 /******************************************************************************
@@ -136,7 +136,7 @@ static void g_data_type_init(GDataType *type)
 *                                                                             *
 ******************************************************************************/
 
-static void g_serializable_object_interface_init(GSerializableObjectIface *iface)
+static void g_data_type_serializable_interface_init(GSerializableObjectIface *iface)
 {
     iface->load = (load_serializable_object_cb)g_data_type_load;
     iface->store = (store_serializable_object_cb)g_data_type_store;
-- 
cgit v0.11.2-87-g4458