diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-28 21:32:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-28 21:32:57 (GMT) |
commit | 41efd099244b53a0edb40d097b34bf28a05b6367 (patch) | |
tree | 90f2419db6584e672b9f190e7e61e589e0345459 /src/analysis/db/client.c | |
parent | e56a0553f710235d829f36b1edbf3cea00148a98 (diff) |
Begun to manage collection items as active or inactive using timestamps.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@558 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/db/client.c')
-rw-r--r-- | src/analysis/db/client.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/analysis/db/client.c b/src/analysis/db/client.c index f0d3d4b..2a5a185 100644 --- a/src/analysis/db/client.c +++ b/src/analysis/db/client.c @@ -525,3 +525,33 @@ bool g_db_client_save(GDbClient *client) return result; } + + +/****************************************************************************** +* * +* Paramètres : client = client pour les accès distants à manipuler. * +* timestamp = date du dernier élément à garder comme actif. * +* * +* Description : Active les éléments en amont d'un horodatage donné. * +* * +* Retour : true si la commande a bien été envoyée, false sinon. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool g_db_client_set_last_active(GDbClient *client, timestamp_t timestamp) +{ + bool result; /* Bilan partiel à remonter */ + + g_db_client_get_fd(client); + + result = safe_send(client->fd, (uint32_t []) { htobe32(DBC_SET_LAST_ACTIVE) }, sizeof(uint32_t), 0); + + result &= send_timestamp(×tamp, client->fd, MSG_MORE); + + g_db_client_put_fd(client); + + return result; + +} |