diff options
Diffstat (limited to 'src/format')
| -rw-r--r-- | src/format/format-int.h | 10 | ||||
| -rw-r--r-- | src/format/format.c | 48 | ||||
| -rw-r--r-- | src/format/format.h | 8 | 
3 files changed, 65 insertions, 1 deletions
| diff --git a/src/format/format-int.h b/src/format/format-int.h index 78da2f6..37dac0f 100644 --- a/src/format/format-int.h +++ b/src/format/format-int.h @@ -37,6 +37,12 @@  /* ------------------------ TRAITEMENT INDIVIDUEL DE FORMATS ------------------------ */ +/* Indique la désignation interne du format. */ +typedef const char * (* format_get_name_fc) (const GBinFormat *); + +/*Assure l'interprétation d'un format en différé. */ +typedef bool (* format_analyze_fc) (GBinFormat *, wgroup_id_t, GtkStatusStack *); +  /* Indique le boutisme employé par le format binaire analysé. */  typedef SourceEndian (* format_get_endian_fc) (const GBinFormat *); @@ -109,6 +115,10 @@ struct _GBinFormatClass  {      GObjectClass parent;                    /* A laisser en premier        */ +    format_get_name_fc get_name;            /* Désignation interne         */ + +    format_analyze_fc analyze;              /* Interprétation du format    */ +      format_get_endian_fc get_endian;        /* Boutisme employé            */      format_complete_analysis_fc complete;   /* Terminaison d'analyse       */ diff --git a/src/format/format.c b/src/format/format.c index 29709c9..675fd2f 100644 --- a/src/format/format.c +++ b/src/format/format.c @@ -262,6 +262,54 @@ GBinContent *g_binary_format_get_content(const GBinFormat *format)  *                                                                             *  *  Paramètres  : format = description de l'exécutable à consulter.            *  *                                                                             * +*  Description : Indique la désignation interne du format.                    * +*                                                                             * +*  Retour      : Description du format.                                       * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +const char *g_binary_format_get_name(const GBinFormat *format) +{ +    const char *result;                     /* Désignation à retourner     */ + +    result = G_BIN_FORMAT_GET_CLASS(format)->get_name(format); + +    return result; + +} + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : format = format chargé dont l'analyse est lancée.            * +*                gid    = groupe de travail dédié.                            * +*                status = barre de statut à tenir informée.                   * +*                                                                             * +*  Description : Assure l'interprétation d'un format en différé.              * +*                                                                             * +*  Retour      : Bilan de l'opération.                                        * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +bool g_binary_format_analyze(GBinFormat *format, wgroup_id_t gid, GtkStatusStack *status) +{ +    bool result;                            /* Bilan à retourner           */ + +    result = G_BIN_FORMAT_GET_CLASS(format)->analyze(format, gid, status); + +    return result; + +} + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : format = description de l'exécutable à consulter.            * +*                                                                             *  *  Description : Indique le boutisme employé par le format binaire analysé.   *  *                                                                             *  *  Retour      : Boutisme associé au format.                                  * diff --git a/src/format/format.h b/src/format/format.h index 806c14f..982907c 100644 --- a/src/format/format.h +++ b/src/format/format.h @@ -33,7 +33,7 @@  #include "symbol.h"  #include "../analysis/content.h"  #include "../arch/context.h" -#include "../gtkext/gtkstatusstack.h" +#include "../glibext/delayed.h" @@ -58,6 +58,12 @@ GType g_binary_format_get_type(void);  /* Fournit une référence vers le contenu binaire analysé. */  GBinContent *g_binary_format_get_content(const GBinFormat *); +/* Indique la désignation interne du format. */ +const char *g_binary_format_get_name(const GBinFormat *); + +/* Assure l'interprétation d'un format en différé. */ +bool g_binary_format_analyze(GBinFormat *, wgroup_id_t, GtkStatusStack *); +  /* Indique le boutisme employé par le format binaire analysé. */  SourceEndian g_binary_format_get_endianness(const GBinFormat *); | 
