summaryrefslogtreecommitdiff
path: root/src/analysis/contents/restricted.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/restricted.c
parent315146a49b5570294ca20beca720c4e3f74a86bd (diff)
Improved the way file formats are detected and loaded.
Diffstat (limited to 'src/analysis/contents/restricted.c')
-rw-r--r--src/analysis/contents/restricted.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/analysis/contents/restricted.c b/src/analysis/contents/restricted.c
index 711f963..d52e1c0 100644
--- a/src/analysis/contents/restricted.c
+++ b/src/analysis/contents/restricted.c
@@ -66,6 +66,9 @@ static void g_restricted_content_dispose(GRestrictedContent *);
/* Procède à la libération totale de la mémoire. */
static void g_restricted_content_finalize(GRestrictedContent *);
+/* Donne l'origine d'un contenu binaire. */
+static GBinContent *g_restricted_content_get_root(GRestrictedContent *);
+
/* Calcule une empreinte unique (SHA256) pour les données. */
static void g_restricted_content_compute_checksum(GRestrictedContent *, GChecksum *);
@@ -168,6 +171,8 @@ static void g_restricted_content_init(GRestrictedContent *content)
static void g_restricted_content_interface_init(GBinContentInterface *iface)
{
+ iface->get_root = (get_content_root_fc)g_restricted_content_get_root;
+
iface->compute_checksum = (compute_checksum_fc)g_restricted_content_compute_checksum;
iface->compute_size = (compute_size_fc)g_restricted_content_compute_size;
@@ -290,6 +295,29 @@ GBinContent *g_restricted_content_new_ro(const GBinContent *content, const mrang
/******************************************************************************
* *
+* 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_restricted_content_get_root(GRestrictedContent *content)
+{
+ GBinContent *result; /* Contenu en place à renvoyer */
+
+ result = g_binary_content_get_root(content->internal);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : content = contenu binaire à venir lire. *
* checksum = empreinte de zone mémoire à compléter. *
* *