summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis/db/constants.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/analysis/db/constants.c')
-rw-r--r--plugins/pychrysalide/analysis/db/constants.c43
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;
+
+}