summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-30 19:21:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-30 19:21:29 (GMT)
commit33880cfe5e5de8b81e8a825878b3bbe8ef736f3f (patch)
tree9dcbe3e9e9903e447eeac916be689cd2d39614de /src
parentb16071a35adaf95d5e67b0dd984e9ba9d7ba28f9 (diff)
Parsed Dex format fields using the new generic parser.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/format/dex/dex.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/format/dex/dex.c b/src/format/dex/dex.c
index b638b8a..e34318f 100755
--- a/src/format/dex/dex.c
+++ b/src/format/dex/dex.c
@@ -54,6 +54,9 @@ static void g_dex_format_dispose(GDexFormat *);
/* Procède à la libération totale de la mémoire. */
static void g_dex_format_finalize(GDexFormat *);
+/* Informe quant au boutisme utilisé. */
+static SourceEndian g_dex_format_get_endianness(const GDexFormat *);
+
/* Indique le type d'architecture visée par le format. */
static const char *g_dex_format_get_target_machine(const GDexFormat *);
@@ -148,6 +151,7 @@ G_DEFINE_TYPE(GDexFormat, g_dex_format, G_TYPE_EXE_FORMAT);
static void g_dex_format_class_init(GDexFormatClass *klass)
{
GObjectClass *object; /* Autre version de la classe */
+ GBinFormatClass *fmt; /* Version en format basique */
GExeFormatClass *exe; /* Version en exécutable */
object = G_OBJECT_CLASS(klass);
@@ -155,6 +159,10 @@ static void g_dex_format_class_init(GDexFormatClass *klass)
object->dispose = (GObjectFinalizeFunc/* ! */)g_dex_format_dispose;
object->finalize = (GObjectFinalizeFunc)g_dex_format_finalize;
+ fmt = G_BIN_FORMAT_CLASS(klass);
+
+ fmt->get_endian = (format_get_endian_fc)g_dex_format_get_endianness;
+
exe = G_EXE_FORMAT_CLASS(klass);
exe->get_machine = (get_target_machine_fc)g_dex_format_get_target_machine;
@@ -297,6 +305,25 @@ GBinFormat *g_dex_format_new(GBinContent *content, GExeFormat *parent, GtkStatus
* *
* Paramètres : format = informations chargées à consulter. *
* *
+* Description : Informe quant au boutisme utilisé. *
+* *
+* Retour : Indicateur de boutisme. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static SourceEndian g_dex_format_get_endianness(const GDexFormat *format)
+{
+ return SRE_LITTLE;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à consulter. *
+* *
* Description : Indique le type d'architecture visée par le format. *
* *
* Retour : Identifiant de l'architecture ciblée par le format. *