diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2015-09-19 22:28:42 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2015-09-19 22:28:42 (GMT) | 
| commit | 0e3059731d9687027c913135b3b856596c49a689 (patch) | |
| tree | d3c3754f95c90ae50168817e6248afee6873fbf3 /src/core/formats.h | |
| parent | 18648e4e8763a3bc005d6fae51eae3d1528d7d29 (diff) | |
Extended the prototype for matching formats in order to get it suitable for plugins.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@577 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/core/formats.h')
| -rw-r--r-- | src/core/formats.h | 20 | 
1 files changed, 16 insertions, 4 deletions
diff --git a/src/core/formats.h b/src/core/formats.h index 8857217..76b57d0 100644 --- a/src/core/formats.h +++ b/src/core/formats.h @@ -34,15 +34,27 @@ +/* Conclusion d'une opération de reconnaissance */ +typedef enum _FormatMatchStatus +{ +    FMS_MATCHED,                            /* Correspondance établie      */ +    FMS_FORWARDED,                          /* Sous-formats détectés       */ +    FMS_UNKNOWN,                            /* Aucun format reconnu        */ + +    FMS_COUNT + +} FormatMatchStatus; + +  /* Indication à propos du support d'un format */ -typedef const char * (* format_match_fc) (GBinContent *, GExeFormat *); +typedef FormatMatchStatus (* format_match_fc) (GBinContent *, GExeFormat *, void *, char **);  /* Méthode de chargement d'un format */  typedef GBinFormat * (* format_load_fc) (GBinContent *, GExeFormat *);  /* Enregistre un détection de format(s) binaire(s). */ -bool register_format_matcher(format_match_fc); +bool register_format_matcher(format_match_fc, void *);  /* Enregistre un format de contenu binaire donné. */  bool register_format_loader(const char *, const char *, format_load_fc); @@ -57,11 +69,11 @@ void unload_formats_definitions(void);  const char *get_binary_format_name(const char *);  /* Identifie un format binaire par son contenu. */ -const char *find_matching_format(GBinContent *, GExeFormat *); +FormatMatchStatus find_matching_format(GBinContent *, GExeFormat *, char **);  /* Charge le format binaire correspondant à un type. */  GBinFormat *load_new_named_format(const char *, GBinContent *, GExeFormat *); -#endif  /* _ANALYSIS_DB_COLLECTION_H */ +#endif  /* _CORE_FORMATS_H */  | 
