summaryrefslogtreecommitdiff
path: root/src/analysis/contents/memory.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-21 22:00:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-21 22:00:00 (GMT)
commit8eb95d316f7b6fbad0ff798abfe7f70f89e812d2 (patch)
tree4f310c7ffdb94d48fff236e63c7e6f0ed9f1dee1 /src/analysis/contents/memory.c
parent315146a49b5570294ca20beca720c4e3f74a86bd (diff)
Improved the way file formats are detected and loaded.
Diffstat (limited to 'src/analysis/contents/memory.c')
-rw-r--r--src/analysis/contents/memory.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/analysis/contents/memory.c b/src/analysis/contents/memory.c
index a7bdbea..beefe89 100644
--- a/src/analysis/contents/memory.c
+++ b/src/analysis/contents/memory.c
@@ -73,6 +73,9 @@ static void g_memory_content_dispose(GMemoryContent *);
/* Procède à la libération totale de la mémoire. */
static void g_memory_content_finalize(GMemoryContent *);
+/* Donne l'origine d'un contenu binaire. */
+static GBinContent *g_memory_content_get_root(GMemoryContent *);
+
/* Fournit le nom associé au contenu binaire. */
static const char *g_memory_content_describe(const GMemoryContent *, bool);
@@ -183,6 +186,8 @@ static void g_memory_content_init(GMemoryContent *content)
static void g_memory_content_interface_init(GBinContentInterface *iface)
{
+ iface->get_root = (get_content_root_fc)g_memory_content_get_root;
+
iface->describe = (describe_content_fc)g_memory_content_describe;
iface->save = (save_content_fc)g_memory_content_save;
@@ -357,6 +362,29 @@ GBinContent *g_memory_content_new_from_xml(xmlXPathContextPtr context, const cha
/******************************************************************************
* *
* Paramètres : content = contenu binaire à consulter. *
+* *
+* Description : Donne l'origine d'un contenu binaire. *
+* *
+* Retour : Contenu à l'origine du contenu courant. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static GBinContent *g_memory_content_get_root(GMemoryContent *content)
+{
+ GBinContent *result; /* Contenu en place à renvoyer */
+
+ result = G_BIN_CONTENT(content);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* 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. *