diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-04-21 22:00:00 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-04-21 22:00:00 (GMT) |
commit | 8eb95d316f7b6fbad0ff798abfe7f70f89e812d2 (patch) | |
tree | 4f310c7ffdb94d48fff236e63c7e6f0ed9f1dee1 /src/analysis/loading.h | |
parent | 315146a49b5570294ca20beca720c4e3f74a86bd (diff) |
Improved the way file formats are detected and loaded.
Diffstat (limited to 'src/analysis/loading.h')
-rw-r--r-- | src/analysis/loading.h | 96 |
1 files changed, 55 insertions, 41 deletions
diff --git a/src/analysis/loading.h b/src/analysis/loading.h index 46b42a1..4755226 100644 --- a/src/analysis/loading.h +++ b/src/analysis/loading.h @@ -28,74 +28,88 @@ #include <glib-object.h> -#include "project.h" +#include "content.h" +#include "loaded.h" +#include "../glibext/delayed.h" -/* ----------------------- AMORCE POUR CHARGEMENT DE CONTENUS ----------------------- */ +/* --------------------- EXPLORATION NON BLOQUANTE DES CONTENUS --------------------- */ -#define G_TYPE_DELAYED_STUDY g_delayed_study_get_type() -#define G_DELAYED_STUDY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_delayed_study_get_type(), GDelayedStudy)) -#define G_IS_DELAYED_STUDY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_delayed_study_get_type())) -#define G_DELAYED_STUDY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DELAYED_STUDY, GDelayedStudyClass)) -#define G_IS_DELAYED_STUDY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DELAYED_STUDY)) -#define G_DELAYED_STUDY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DELAYED_STUDY, GDelayedStudyClass)) +#define G_TYPE_CONTENT_EXPLORER g_content_explorer_get_type() +#define G_CONTENT_EXPLORER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_CONTENT_EXPLORER, GContentExplorer)) +#define G_IS_CONTENT_EXPLORER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_CONTENT_EXPLORER)) +#define G_CONTENT_EXPLORER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_CONTENT_EXPLORER, GContentExplorerClass)) +#define G_IS_CONTENT_EXPLORER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_CONTENT_EXPLORER)) +#define G_CONTENT_EXPLORER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_CONTENT_EXPLORER, GContentExplorerClass)) -/* Ensembles binaires à désassembler (instance) */ -typedef struct _GDelayedStudy GDelayedStudy; +/* Exploration de contenus binaires (instance) */ +typedef struct _GContentExplorer GContentExplorer; -/* Ensembles binaires à désassembler (classe) */ -typedef struct _GDelayedStudyClass GDelayedStudyClass; +/* Exploration de contenus binaires (classe) */ +typedef struct _GContentExplorerClass GContentExplorerClass; -/* Indique le type défini pour les tâches de préparations d'étude. */ -GType g_delayed_study_get_type(void); +/* Indique le type défini pour l'exploration de contenus binaires. */ +GType g_content_explorer_get_type(void); -/* Crée une tâche d'intégration de contenu binaire. */ -GDelayedStudy *g_delayed_study_new(GStudyProject *, GBinContent *, ProjectContentState); +/* Crée un gestionnaire des explorations de contenus binaires. */ +GContentExplorer *g_content_explorer_new(void); -/* Limite l'étude et l'intégration d'un contenu binaire. */ -void g_delayed_study_preload_only(GDelayedStudy *); +/* Initie une nouvelle vague d'exploration de contenu. */ +const gid_t *g_content_explorer_create_group(GContentExplorer *, GBinContent *); -/* Programme l'étude et l'intégration d'un contenu binaire. */ -void qck_study_new_content(GBinContent *, ProjectContentState); +/* Fournit l'identifiant attribué pour les tâches parallèles. */ +const wgroup_id_t *g_content_explorer_get_group_work_id(GContentExplorer *, gid_t); -/* Programme l'étude et l'intégration d'un contenu binaire. */ -void study_new_content(GDelayedStudy *); +/* Termine une vague d'exploration de contenu. */ +void g_content_explorer_delete_group(GContentExplorer *, gid_t); +/* Ajoute un nouveau contenu découvert au crédit d'un groupe. */ +void g_content_explorer_populate_group(GContentExplorer *, gid_t, GBinContent *); +/* Fournit la liste de tous les contenus disponibles. */ +GBinContent **g_content_explorer_get_all(GContentExplorer *, gid_t, size_t *); -/* ----------------------- CHARGEMENT DE BINAIRE NON BLOQUANT ----------------------- */ -#define G_TYPE_BINARY_LOADER g_binary_loader_get_type() -#define G_BINARY_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_BINARY_LOADER, GBinaryLoader)) -#define G_IS_BINARY_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_BINARY_LOADER)) -#define G_BINARY_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_BINARY_LOADER, GBinaryLoaderClass)) -#define G_IS_BINARY_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_BINARY_LOADER)) -#define G_BINARY_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_BINARY_LOADER, GBinaryLoaderClass)) +/* ------------------- RESOLUTION DE CONTENUS BINAIRES EN CHARGES ------------------- */ -/* Chargement non bloquant d'un binaire (instance) */ -typedef struct _GBinaryLoader GBinaryLoader; +#define G_TYPE_CONTENT_RESOLVER g_content_resolver_get_type() +#define G_CONTENT_RESOLVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_CONTENT_RESOLVER, GContentResolver)) +#define G_IS_CONTENT_RESOLVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_CONTENT_RESOLVER)) +#define G_CONTENT_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_CONTENT_RESOLVER, GContentResolverClass)) +#define G_IS_CONTENT_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_CONTENT_RESOLVER)) +#define G_CONTENT_RESOLVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_CONTENT_RESOLVER, GContentResolverClass)) -/* Chargement non bloquant d'un binaire (classe) */ -typedef struct _GBinaryLoaderClass GBinaryLoaderClass; +/* Résolution de contenus binaires en formats chargés (instance) */ +typedef struct _GContentResolver GContentResolver; -/* Indique le type défini pour le chargement non bloquant d'un binaire. */ -GType g_binary_loader_get_type(void); +/* Résolution de contenus binaires en formats chargés (classe) */ +typedef struct _GContentResolverClass GContentResolverClass; -/* Prépare le chargement non bloqué d'un contenu binaire. */ -GBinaryLoader *g_binary_loader_new(GBinContent *, GStudyProject *); -/* Prépare le chargement non bloqué d'un contenu XML. */ -GBinaryLoader *g_binary_loader_new_from_xml(const char *, const char *, GStudyProject *); +/* Indique le type défini pour la résolution de contenus binaires en formats chargés. */ +GType g_content_resolver_get_type(void); -/* Retourne l'instance du binaire chargé en cas de succès. */ -GLoadedBinary *g_binary_loader_get_result(const GBinaryLoader *); +/* Crée un gestionnaire des résolutions de contenus binaires. */ +GContentResolver *g_content_resolver_new(void); + +/* Initie une nouvelle vague de résolution de contenus. */ +void g_content_resolver_create_group(GContentResolver *, const wgroup_id_t *, const gid_t *, GBinContent **, size_t); + +/* Termine une vague de résolution de contenu. */ +void g_content_resolver_delete_group(GContentResolver *, gid_t); + +/* Intègre un contenu chargé dans les résultats. */ +void g_content_resolver_add_detected(GContentResolver *, gid_t, GLoadedContent *); + +/* Fournit la liste de tous les contenus chargés valables. */ +GLoadedContent **g_content_resolver_get_all(GContentResolver *, gid_t, size_t *); |