diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2022-02-21 06:54:10 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2022-02-21 06:54:10 (GMT) |
commit | 8bf77ba6e5ef40d8bb936dc952ac2c8cc30aab3e (patch) | |
tree | 934661f2f30e0b8d23793f52084c736052e85f7c /plugins/pychrysalide/analysis/db/constants.c | |
parent | 8ce244d136b32b43d8553866747c68b503b2d10a (diff) |
Make the server drive the network exchanges.
Diffstat (limited to 'plugins/pychrysalide/analysis/db/constants.c')
-rw-r--r-- | plugins/pychrysalide/analysis/db/constants.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/pychrysalide/analysis/db/constants.c b/plugins/pychrysalide/analysis/db/constants.c index 8e7765a..5e8c20d 100644 --- a/plugins/pychrysalide/analysis/db/constants.c +++ b/plugins/pychrysalide/analysis/db/constants.c @@ -25,6 +25,7 @@ #include "constants.h" +#include <analysis/db/analyst.h> #include <analysis/db/item.h> #include <analysis/db/server.h> @@ -152,3 +153,45 @@ bool define_hub_server_constants(PyTypeObject *type) return result; } + + +/****************************************************************************** +* * +* Paramètres : type = type dont le dictionnaire est à compléter. * +* * +* Description : Définit les constantes pour les indications de chargement. * +* * +* Retour : true en cas de succès de l'opération, false sinon. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool define_loading_status_hint_constants(PyTypeObject *type) +{ + bool result; /* Bilan à retourner */ + PyObject *values; /* Groupe de valeurs à établir */ + + values = PyDict_New(); + + result = add_const_to_group(values, "READY", LSH_READY); + if (result) result = add_const_to_group(values, "ON_WAIT_LIST", LSH_ON_WAIT_LIST); + if (result) result = add_const_to_group(values, "NEED_CONTENT", LSH_NEED_CONTENT); + if (result) result = add_const_to_group(values, "NEED_FORMAT", LSH_NEED_FORMAT); + if (result) result = add_const_to_group(values, "NEED_ARCH", LSH_NEED_ARCH); + + if (!result) + { + Py_DECREF(values); + goto exit; + } + + result = attach_constants_group_to_type_with_pyg_enum(type, false, "LoadingStatusHint", values, + "Indication about a loading process state.", + G_TYPE_LOADING_STATUS_HINT); + + exit: + + return result; + +} |