diff options
Diffstat (limited to 'plugins/pychrysalide/analysis/binary.c')
-rw-r--r-- | plugins/pychrysalide/analysis/binary.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/plugins/pychrysalide/analysis/binary.c b/plugins/pychrysalide/analysis/binary.c index 01160a5..e97bea6 100644 --- a/plugins/pychrysalide/analysis/binary.c +++ b/plugins/pychrysalide/analysis/binary.c @@ -55,6 +55,9 @@ static PyObject *py_loaded_binary_find_collection(PyObject *, PyObject *); /* Demande l'intégration d'une modification dans une collection. */ static PyObject *py_loaded_binary_add_to_collection(PyObject *, PyObject *); +/* Active les éléments en amont d'un horodatage donné. */ +static PyObject *py_loaded_binary_set_last_active(PyObject *, PyObject *); + /* Fournit le nom associé à l'élément binaire. */ static PyObject *py_loaded_binary_get_name(PyObject *, void *); @@ -268,6 +271,52 @@ static PyObject *py_loaded_binary_add_to_collection(PyObject *self, PyObject *ar /****************************************************************************** * * +* Paramètres : self = binaire chargé à manipuler. * +* args = arguments d'appel à consulter. * +* * +* Description : Active les éléments en amont d'un horodatage donné. * +* * +* Retour : True si la commande a bien été envoyée, False sinon. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static PyObject *py_loaded_binary_set_last_active(PyObject *self, PyObject *args) +{ + PyObject *result; /* Bilan à retourner */ + unsigned long long timestamp; /* Horodatage de limite */ + int ret; /* Bilan de lecture des args. */ + GLoadedBinary *binary; /* Binaire en cours d'analyse */ + bool status; /* Bilan de l'opération */ + +#define LOADED_BINARY_SET_LAST_ACTIVE_METHOD PYTHON_METHOD_DEF \ +( \ + set_last_active, "$self, timestamp, /", \ + METH_VARARGS, py_loaded_binary, \ + "Define the timestamp of the last active item in the collection" \ + " and returns the status of the request transmission." \ +) + + ret = PyArg_ParseTuple(args, "K", ×tamp); + if (!ret) return NULL; + + binary = G_LOADED_BINARY(pygobject_get(self)); + + status = g_loaded_binary_set_last_active(binary, timestamp); + + result = status ? Py_True : Py_False; + Py_INCREF(result); + + return result; + +} + + +/****************************************************************************** +* * * Paramètres : self = objet Python concerné par l'appel. * * closure = non utilisé ici. * * * @@ -468,6 +517,7 @@ PyTypeObject *get_python_loaded_binary_type(void) LOADED_BINARY_GET_CLIENT_METHOD, LOADED_BINARY_FIND_COLLECTION_METHOD, LOADED_BINARY_ADD_TO_COLLECTION_METHOD, + LOADED_BINARY_SET_LAST_ACTIVE_METHOD, { NULL } }; |