diff options
Diffstat (limited to 'src/analysis/contents/encapsulated.c')
| -rw-r--r-- | src/analysis/contents/encapsulated.c | 46 | 
1 files changed, 30 insertions, 16 deletions
| diff --git a/src/analysis/contents/encapsulated.c b/src/analysis/contents/encapsulated.c index e0e6ed1..451c340 100644 --- a/src/analysis/contents/encapsulated.c +++ b/src/analysis/contents/encapsulated.c @@ -54,12 +54,13 @@ static void g_encaps_content_finalize(GEncapsContent *);  /* --------------------- IMPLEMENTATION DES FONCTIONS DE CLASSE --------------------- */ - +#if 0 // FIXME  /* Associe un ensemble d'attributs au contenu binaire. */  static void g_encaps_content_set_attributes(GEncapsContent *, GContentAttributes *);  /* Fournit l'ensemble des attributs associés à un contenu. */  static GContentAttributes *g_encaps_content_get_attributes(const GEncapsContent *); +#endif  /* Donne l'origine d'un contenu binaire. */  static GBinContent *g_encaps_content_get_root(GEncapsContent *); @@ -68,16 +69,16 @@ static GBinContent *g_encaps_content_get_root(GEncapsContent *);  static char *g_encaps_content_describe(const GEncapsContent *, bool);  /* Fournit une empreinte unique (SHA256) pour les données. */ -static void g_encaps_content_compute_checksum(GEncapsContent *, GChecksum *); +static void g_encaps_content_compute_checksum(const GEncapsContent *, GChecksum *);  /* Détermine le nombre d'octets lisibles. */  static phys_t g_encaps_content_compute_size(const GEncapsContent *);  /* Détermine la position initiale d'un contenu. */ -static void g_encaps_content_compute_start_pos(const GEncapsContent *, vmpa2t *); +static bool g_encaps_content_compute_start_pos(const GEncapsContent *, vmpa2t *);  /* Détermine la position finale d'un contenu. */ -static void g_encaps_content_compute_end_pos(const GEncapsContent *, vmpa2t *); +static bool g_encaps_content_compute_end_pos(const GEncapsContent *, vmpa2t *);  /* Avance la tête de lecture d'une certaine quantité de données. */  static bool g_encaps_content_seek(const GEncapsContent *, vmpa2t *, phys_t); @@ -108,13 +109,13 @@ static bool g_encaps_content_read_uleb128(const GEncapsContent *, vmpa2t *, uleb  /* Lit un nombre signé encodé au format LEB128. */  static bool g_encaps_content_read_leb128(const GEncapsContent *, vmpa2t *, leb128_t *); - +#if 0 // FIXME  /* Charge un contenu depuis une mémoire tampon. */  static bool g_encaps_content_load(GEncapsContent *, GObjectStorage *, packed_buffer_t *);  /* Sauvegarde un contenu dans une mémoire tampon. */  static bool g_encaps_content_store(const GEncapsContent *, GObjectStorage *, packed_buffer_t *); - +#endif  /* ---------------------------------------------------------------------------------- */ @@ -150,8 +151,10 @@ static void g_encaps_content_class_init(GEncapsContentClass *klass)      content = G_BIN_CONTENT_CLASS(klass); +#if 0 // FIXME      content->set_attribs = (set_content_attributes)g_encaps_content_set_attributes;      content->get_attribs = (get_content_attributes)g_encaps_content_get_attributes; +#endif      content->get_root = (get_content_root_fc)g_encaps_content_get_root; @@ -177,8 +180,10 @@ static void g_encaps_content_class_init(GEncapsContentClass *klass)      content->read_uleb128 = (read_uleb128_fc)g_encaps_content_read_uleb128;      content->read_leb128 = (read_leb128_fc)g_encaps_content_read_leb128; +#if 0 // FIXME      content->load = (load_content_cb)g_encaps_content_load;      content->store = (store_content_cb)g_encaps_content_store; +#endif  } @@ -408,7 +413,7 @@ GBinContent *g_encaps_content_get_endpoint(const GEncapsContent *content)  /*                       IMPLEMENTATION DES FONCTIONS DE CLASSE                       */  /* ---------------------------------------------------------------------------------- */ - +#if 0 // FIXME  /******************************************************************************  *                                                                             *  *  Paramètres  : content = contenu binaire à actualiser.                      * @@ -450,7 +455,7 @@ static GContentAttributes *g_encaps_content_get_attributes(const GEncapsContent      return result;  } - +#endif  /******************************************************************************  *                                                                             * @@ -515,7 +520,7 @@ static char *g_encaps_content_describe(const GEncapsContent *content, bool full)  *                                                                             *  ******************************************************************************/ -static void g_encaps_content_compute_checksum(GEncapsContent *content, GChecksum *checksum) +static void g_encaps_content_compute_checksum(const GEncapsContent *content, GChecksum *checksum)  {      GBinContentClass *class;                /* Classe de l'instance        */ @@ -556,15 +561,19 @@ static phys_t g_encaps_content_compute_size(const GEncapsContent *content)  *                                                                             *  *  Description : Détermine la position initiale d'un contenu.                 *  *                                                                             * -*  Retour      : -                                                            * +*  Retour      : Validité finale de la position fournie.                      *  *                                                                             *  *  Remarques   : -                                                            *  *                                                                             *  ******************************************************************************/ -static void g_encaps_content_compute_start_pos(const GEncapsContent *content, vmpa2t *pos) +static bool g_encaps_content_compute_start_pos(const GEncapsContent *content, vmpa2t *pos)  { -    g_binary_content_compute_start_pos(content->endpoint, pos); +    bool result;                            /* Bilan à retourner           */ + +    result = g_binary_content_compute_start_pos(content->endpoint, pos); + +    return result;  } @@ -576,15 +585,19 @@ static void g_encaps_content_compute_start_pos(const GEncapsContent *content, vm  *                                                                             *  *  Description : Détermine la position finale d'un contenu.                   *  *                                                                             * -*  Retour      : -                                                            * +*  Retour      : Validité finale de la position fournie.                      *  *                                                                             *  *  Remarques   : -                                                            *  *                                                                             *  ******************************************************************************/ -static void g_encaps_content_compute_end_pos(const GEncapsContent *content, vmpa2t *pos) +static bool g_encaps_content_compute_end_pos(const GEncapsContent *content, vmpa2t *pos)  { -    g_binary_content_compute_end_pos(content->endpoint, pos); +    bool result;                            /* Bilan à retourner           */ + +    result = g_binary_content_compute_end_pos(content->endpoint, pos); + +    return result;  } @@ -858,7 +871,7 @@ static bool g_encaps_content_read_leb128(const GEncapsContent *content, vmpa2t *  *  Remarques   : -                                                            *  *                                                                             *  ******************************************************************************/ - +#if 0 // FIXME  static bool g_encaps_content_load(GEncapsContent *content, GObjectStorage *storage, packed_buffer_t *pbuf)  {      bool result;                            /* Bilan à retourner           */ @@ -979,3 +992,4 @@ static bool g_encaps_content_store(const GEncapsContent *content, GObjectStorage      return result;  } +#endif | 
