diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-01-30 06:59:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-01-30 06:59:35 (GMT) |
commit | db3b204dd7a71b2f74a4e69b2159a96e3ab66614 (patch) | |
tree | 34174311b7ac504f03a10a889ada7f28db7a06c0 /src/core/global.c | |
parent | 34ee1bfca78e8423cfa29329fdc756569d6b1960 (diff) |
Save an initial version of rost.
Diffstat (limited to 'src/core/global.c')
-rw-r--r-- | src/core/global.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/core/global.c b/src/core/global.c index 4ebb9e0..c99d711 100644 --- a/src/core/global.c +++ b/src/core/global.c @@ -40,6 +40,9 @@ static GContentExplorer *_explorer = NULL; /* Résolveur de contenus */ static GContentResolver *_resolver = NULL; +/* Espace de noms racine pour ROST */ +static GScanNamespace *_rost_root_ns = NULL; + /* Projet global actif */ static GStudyProject *_project = NULL; @@ -224,6 +227,54 @@ GContentResolver *get_current_content_resolver(void) /****************************************************************************** * * +* Paramètres : ns = espace de noms racine de ROST. * +* * +* Description : Définit l'adresse de l'espace de noms principal pour ROST. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void set_rost_root_namespace(GScanNamespace *ns) +{ + if (_rost_root_ns != NULL) + g_object_unref(G_OBJECT(_rost_root_ns)); + + _rost_root_ns = ns; + + if (ns != NULL) + g_object_ref_sink(G_OBJECT(ns)); + +} + + +/****************************************************************************** +* * +* Paramètres : - * +* * +* Description : Fournit l'adresse de l'espace de noms principal pour ROST. * +* * +* Retour : Espace de noms racine de ROST ou NULL si aucun (!). * +* * +* Remarques : - * +* * +******************************************************************************/ + +GScanNamespace *get_rost_root_namespace(void) +{ + assert(_rost_root_ns != NULL); + + g_object_ref(G_OBJECT(_rost_root_ns)); + + return _rost_root_ns; + +} + + +/****************************************************************************** +* * * Paramètres : project = éventuelle adresse du nouveau projet principal. * * * * Description : Définit l'adresse du projet courant. * |