diff options
Diffstat (limited to 'src/format/format.h')
-rw-r--r-- | src/format/format.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/format/format.h b/src/format/format.h index 626bb8a..f11b1db 100644 --- a/src/format/format.h +++ b/src/format/format.h @@ -40,14 +40,23 @@ /* Depuis ../mangling/demangler.h : Décodeur de désignations générique (instance) */ typedef struct _GCompDemangler GCompDemangler; +/* Indications supplémentaires liées aux formats */ +typedef enum _FormatFlag +{ + FFL_NONE = (0 << 0), /* Aucune propriété */ + FFL_RUN_IN_KERNEL_SPACE = (1 << 0), /* Exécution en espace noyau */ + + FFL_MASK = (1 << 1) - 1, /* Indication de nature */ +} FormatFlag; -#define G_TYPE_BIN_FORMAT g_binary_format_get_type() -#define G_BIN_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_binary_format_get_type(), GBinFormat)) -#define G_IS_BIN_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_binary_format_get_type())) -#define G_BIN_FORMAT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_BIN_FORMAT, GBinFormatClass)) -#define G_IS_BIN_FORMAT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_BIN_FORMAT)) -#define G_BIN_FORMAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_BIN_FORMAT, GBinFormatClass)) + +#define G_TYPE_BIN_FORMAT g_binary_format_get_type() +#define G_BIN_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_BIN_FORMAT, GBinFormat)) +#define G_IS_BIN_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_BIN_FORMAT)) +#define G_BIN_FORMAT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_BIN_FORMAT, GBinFormatClass)) +#define G_IS_BIN_FORMAT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_BIN_FORMAT)) +#define G_BIN_FORMAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_BIN_FORMAT, GBinFormatClass)) /* Format binaire générique (instance) */ @@ -63,6 +72,18 @@ 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 *); +/* Ajoute une information complémentaire à un format. */ +bool g_binary_format_set_flag(GBinFormat *, FormatFlag); + +/* Retire une information complémentaire à un format. */ +bool g_binary_format_unset_flag(GBinFormat *, FormatFlag); + +/* Détermine si un format possède un fanion particulier. */ +bool g_binary_format_has_flag(const GBinFormat *, FormatFlag); + +/* Fournit les particularités du format. */ +FormatFlag g_binary_format_get_flags(const GBinFormat *); + /* Indique la désignation interne du format. */ const char *g_binary_format_get_name(const GBinFormat *); |