summaryrefslogtreecommitdiff
path: root/src/format/known-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/known-int.h')
-rw-r--r--src/format/known-int.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/format/known-int.h b/src/format/known-int.h
new file mode 100644
index 0000000..e4d3bd6
--- /dev/null
+++ b/src/format/known-int.h
@@ -0,0 +1,65 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * known-int.h - prototypes utiles aux formats binaires reconnus
+ *
+ * Copyright (C) 2019 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 _FORMAT_KNOWN_INT_H
+#define _FORMAT_KNOWN_INT_H
+
+
+#include "known.h"
+
+
+
+/* Indique la désignation interne du format. */
+typedef const char * (* known_get_name_fc) (const GKnownFormat *);
+
+/* Fournit une description humaine du format. */
+typedef const char * (* known_get_desc_fc) (const GKnownFormat *);
+
+/*Assure l'interprétation d'un format en différé. */
+typedef bool (* known_analyze_fc) (GKnownFormat *, wgroup_id_t, GtkStatusStack *);
+
+
+/* Format binaire générique (instance) */
+struct _GKnownFormat
+{
+ GObject parent; /* A laisser en premier */
+
+ GBinContent *content; /* Contenu binaire à étudier */
+
+};
+
+/* Format binaire générique (classe) */
+struct _GKnownFormatClass
+{
+ GObjectClass parent; /* A laisser en premier */
+
+ known_get_name_fc get_name; /* Désignation interne */
+ known_get_desc_fc get_desc; /* Désignation humaine */
+
+ known_analyze_fc analyze; /* Interprétation du format */
+
+};
+
+
+
+#endif /* _FORMAT_KNOWN_INT_H */