summaryrefslogtreecommitdiff
path: root/src/analysis/scan/matches/bytes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/scan/matches/bytes.h')
-rw-r--r--src/analysis/scan/matches/bytes.h58
1 files changed, 34 insertions, 24 deletions
diff --git a/src/analysis/scan/matches/bytes.h b/src/analysis/scan/matches/bytes.h
index bd7425d..9e046aa 100644
--- a/src/analysis/scan/matches/bytes.h
+++ b/src/analysis/scan/matches/bytes.h
@@ -1,6 +1,6 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * bytes.h - prototypes pour la sauvegarde d'une correspondance identifiée de suite d'octets
+ * bytes.h - prototypes pour la sauvegarde de correspondances avec des suites d'octets identifiées
*
* Copyright (C) 2022 Cyrille Bagard
*
@@ -28,43 +28,53 @@
#include <glib-object.h>
-#include "../match.h"
-#include "../../content.h"
+#include "area.h"
+#include "../context.h"
+#include "../matches.h"
-#define G_TYPE_SCAN_BYTES_MATCH g_scan_bytes_match_get_type()
-#define G_SCAN_BYTES_MATCH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_SCAN_BYTES_MATCH, GScanBytesMatch))
-#define G_IS_SCAN_BYTES_MATCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_SCAN_BYTES_MATCH))
-#define G_SCAN_BYTES_MATCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_SCAN_BYTES_MATCH, GScanBytesMatchClass))
-#define G_IS_SCAN_BYTES_MATCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_SCAN_BYTES_MATCH))
-#define G_SCAN_BYTES_MATCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_SCAN_BYTES_MATCH, GScanBytesMatchClass))
+/* -------------------- CONSERVATION DE CORRESPONDANCES ETABLIES -------------------- */
-/* Correspondance trouvée avec une chaîne (instance) */
-typedef struct _GScanBytesMatch GScanBytesMatch;
+#define G_TYPE_SCAN_BYTES_MATCHES g_scan_bytes_matches_get_type()
+#define G_SCAN_BYTES_MATCHES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_SCAN_BYTES_MATCHES, GScanBytesMatches))
+#define G_IS_SCAN_BYTES_MATCHES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_SCAN_BYTES_MATCHES))
+#define G_SCAN_BYTES_MATCHES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_SCAN_BYTES_MATCHES, GScanBytesMatchesClass))
+#define G_IS_SCAN_BYTES_MATCHES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_SCAN_BYTES_MATCHES))
+#define G_SCAN_BYTES_MATCHES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_SCAN_BYTES_MATCHES, GScanBytesMatchesClass))
-/* Correspondance trouvée avec une chaîne (classe) */
-typedef struct _GScanBytesMatchClass GScanBytesMatchClass;
+/* Correspondances trouvées avec des suite d'octets (instance) */
+typedef struct _GScanBytesMatches GScanBytesMatches;
-/* Indique le type défini pour un correspondance de chaîne identifiée. */
-GType g_scan_bytes_match_get_type(void);
+/* Correspondances trouvées avec des suite d'octets (classe) */
+typedef struct _GScanBytesMatchesClass GScanBytesMatchesClass;
-/* Prend note d'une correspondance trouvée avec un motif. */
-GScanMatch *g_scan_bytes_match_new(GSearchPattern *, GBinContent *, phys_t, phys_t);
-/* Fournit une référence au contenu lié à la correspondance. */
-GBinContent *g_scan_bytes_match_get_content(const GScanBytesMatch *);
+/* Indique le type défini pour une série de correspondances d'octets identifiées. */
+GType g_scan_bytes_matches_get_type(void);
-/* Indique la localisation d'une correspondance établie. */
-phys_t g_scan_bytes_match_get_location(const GScanBytesMatch *, phys_t *, phys_t *);
+/* Crée un suivi pour série de correspondances avec des octets. */
+GScanMatches *g_scan_bytes_matches_new(GSearchPattern *, GScanContext *);
+
+/* Fournit le contexte du scan associé aux correspondances. */
+GScanContext *g_scan_bytes_matches_get_context(const GScanBytesMatches *);
+
+/* Intègre une liste de correspondances vérifiées. */
+void g_scan_bytes_matches_set_list(GScanBytesMatches *, match_area_t *, size_t);
-/* Mémorise l'origine d'une correspondance à partir d'un indice. */
-void g_scan_bytes_match_remember_modifier_path(GScanBytesMatch *, size_t);
+/* Indique le nombre de correspondances pour une définition. */
+size_t g_scan_bytes_matches_count(const GScanBytesMatches *);
+
+/* Fournit les informations relatives à une correspondance. */
+const match_area_t *g_scan_bytes_matches_get(const GScanBytesMatches *, size_t);
+
+/* Indique la localisation d'une correspondance établie. */
+phys_t g_scan_bytes_matches_get_location(const GScanBytesMatches *, size_t, phys_t *, phys_t *);
/* Retrouve l'origine d'une correspondance à partir d'un indice. */
-char *g_scan_bytes_match_get_modifier_path(const GScanBytesMatch *);
+char *g_scan_bytes_matches_get_modifier_path(const GScanBytesMatches *);