summaryrefslogtreecommitdiff
path: root/src/analysis/db/analyst.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/db/analyst.c')
-rw-r--r--src/analysis/db/analyst.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/analysis/db/analyst.c b/src/analysis/db/analyst.c
index 87a60d3..dff073a 100644
--- a/src/analysis/db/analyst.c
+++ b/src/analysis/db/analyst.c
@@ -78,6 +78,9 @@ static void g_analyst_client_dispose(GAnalystClient *);
/* Procède à la libération totale de la mémoire. */
static void g_analyst_client_finalize(GAnalystClient *);
+/* Termine la constitution des données initiales à présenter. */
+static bool g_analyst_client_complete_hello(GAnalystClient *, packed_buffer_t *);
+
/* Assure l'accueil des nouvelles mises à jour. */
static void *g_analyst_client_update(GAnalystClient *);
@@ -118,6 +121,7 @@ static void g_analyst_client_class_init(GAnalystClientClass *klass)
client = G_HUB_CLIENT_CLASS(klass);
client->role = CRL_ANALYST;
+ client->complete_hello = (complete_client_hello_fc)g_analyst_client_complete_hello;
client->recv_func = (GThreadFunc)g_analyst_client_update;
g_signal_new("snapshots-updated",
@@ -243,7 +247,7 @@ GAnalystClient *g_analyst_client_new(const char *hash, GList *collections)
{
GAnalystClient *result; /* Adresse à retourner */
- result = g_object_new(G_TYPE_HUB_CLIENT, NULL);
+ result = g_object_new(G_TYPE_ANALYST_CLIENT, NULL);
init_static_rle_string(&result->hash, hash);
result->collections = collections;
@@ -256,6 +260,30 @@ GAnalystClient *g_analyst_client_new(const char *hash, GList *collections)
/******************************************************************************
* *
* Paramètres : client = client pour les accès distants à manipuler. *
+* pbuf = tampon d'émission initial à compléter. *
+* *
+* Description : Termine la constitution des données initiales à présenter. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static bool g_analyst_client_complete_hello(GAnalystClient *client, packed_buffer_t *pbuf)
+{
+ bool result; /* Bilan à retourner */
+
+ result = pack_rle_string(&client->hash, pbuf);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : client = client pour les accès distants à manipuler. *
* *
* Description : Assure l'accueil des nouvelles mises à jour. *
* *