diff options
Diffstat (limited to 'src/format/part.h')
-rw-r--r-- | src/format/part.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/format/part.h b/src/format/part.h new file mode 100644 index 0000000..aec324d --- /dev/null +++ b/src/format/part.h @@ -0,0 +1,71 @@ + +/* OpenIDA - Outil d'analyse de fichiers binaires + * part.h - prototypes pour la manipulation des parties de code + * + * Copyright (C) 2009 Cyrille Bagard + * + * This file is part of OpenIDA. + * + * OpenIDA 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. + * + * OpenIDA 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 Foobar. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef _FORMAT_PART_H +#define _FORMAT_PART_H + + +#include <glib-object.h> +#include <sys/types.h> + + +#include "../arch/archbase.h" + + + +#define G_TYPE_BIN_PART (g_binary_part_get_type()) +#define G_BIN_PART(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_BIN_PART, GBinPart)) +#define G_IS_BIN_PART(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_BIN_PART)) +#define G_BIN_PART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_BIN_PART, GBinPartClass)) +#define G_IS_BIN_PART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_BIN_PART)) +#define G_BIN_PART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_BIN_PART, GBinPartClass)) + + +/* Bloc de données binaires quelconques (instance) */ +typedef struct _GBinPart GBinPart; + +/* Bloc de données binaires quelconques (classe) */ +typedef struct _GBinPartClass GBinPartClass; + + +/* Indique le type défini par la GLib pour les blocs de doonées. */ +GType g_binary_part_get_type(void); + +/* Crée une description de partie de code vierge. */ +GBinPart *g_binary_part_new(void); + +/* Attribue une description humaine à une partie de code. */ +void g_binary_part_set_name(GBinPart *, const char *); + +/* Définit les valeurs utiles d'une partie de code. */ +void g_binary_part_set_values(GBinPart *, off_t, off_t, vmpa_t); + +/* Fournit les valeurs utiles d'une partie de code. */ +void g_binary_part_get_values(const GBinPart *, off_t *, off_t *, vmpa_t *); + +/* Etablit la comparaison entre deux blocs binaires. */ +int g_binary_part_compare(const GBinPart **, const GBinPart **); + + + +#endif /* _FORMAT_PART_H */ |