summaryrefslogtreecommitdiff
path: root/src/analysis/db/protocol.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-10-20 13:01:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-10-20 13:01:24 (GMT)
commitb1c08dd388a86d9a9d7c379ca143ae85310c3c68 (patch)
treea1a078e09ce4d8bd0db24c9139d5fad640353d79 /src/analysis/db/protocol.h
parentf2c79b92f09fa796afe66d5886e678e9a7275ac1 (diff)
Provided a way to update snapshots name and description.
Diffstat (limited to 'src/analysis/db/protocol.h')
-rw-r--r--src/analysis/db/protocol.h59
1 files changed, 31 insertions, 28 deletions
diff --git a/src/analysis/db/protocol.h b/src/analysis/db/protocol.h
index 273be8e..b57c25c 100644
--- a/src/analysis/db/protocol.h
+++ b/src/analysis/db/protocol.h
@@ -129,11 +129,6 @@ typedef enum _DBCommand
* [ Ordre de sauvegarde : DBC_SAVE ]
* [ Statut d'exécution ; cf. DBError ]
*
- * Les traitements se réalisent dans :
- * - g_db_client_save() pour la partie client en émission ;
- * - g_cdb_archive_process() pour la partie serveur ;
- * - g_db_client_update() pour la partie client en réception.
- *
*/
DBC_SAVE, /* Enregistrement de l'archive */
@@ -167,10 +162,6 @@ typedef enum _DBCommand
* [ Notification de maj : DBC_SET_ALL_ITEMS ]
* [ marqueur de fin : octet 0x0 ]
*
- * Les traitements se réalisent dans :
- * - g_db_client_update() pour la partie client ;
- * - g_cdb_archive_process() pour la partie serveur.
- *
*/
DBC_GET_ALL_ITEMS, /* Mise à jour à la connexion */
@@ -191,10 +182,6 @@ typedef enum _DBCommand
* [ Action : DBA_CHANGE_STATE ]
* [ <élément dont le statut a évolué> ]
*
- * Les traitements se réalisent dans :
- * - g_db_collection_disable_at() pour la partie serveur ;
- * - g_db_collection_update_item_state() pour la partie client.
- *
*/
DBC_SET_LAST_ACTIVE, /* Définition du dernier actif */ // REMME
@@ -208,9 +195,6 @@ typedef enum _DBCommand
*
* [ Gestion d'instantané : DBC_GET_SNAPSHOTS ]
*
- * La définition d'un nouvel identifiant d'instantané courant se réalise dans :
- * - g_hub_client_update() pour la partie client ;
- * - g_cdb_archive_process() pour la partie serveur.
*/
DBC_GET_SNAPSHOTS,
@@ -224,9 +208,6 @@ typedef enum _DBCommand
* [ <liste de descriptions d'instantanés> ]
* [ Marqueur de fin : SNAPSHOT_END_MARK ]
*
- * La définition d'un nouvel identifiant d'instantané courant se réalise dans :
- * - g_cdb_archive_process() pour la partie serveur ;
- * - g_hub_client_update() pour la partie client.
*/
DBC_SNAPSHOTS_UPDATED, /* Identification d'instantanés*/
@@ -238,9 +219,6 @@ typedef enum _DBCommand
*
* [ Gestion d'instantané : DBC_GET_CUR_SNAPSHOT ]
*
- * La définition d'un nouvel identifiant d'instantané courant se réalise dans :
- * - g_hub_client_update() pour la partie client ;
- * - g_cdb_archive_process() pour la partie serveur.
*/
DBC_GET_CUR_SNAPSHOT, /* Demande d'identification */
@@ -253,9 +231,6 @@ typedef enum _DBCommand
* [ Gestion d'instantané : DBC_CUR_SNAPSHOT_UPDATED ]
* [ <identifiant d'instantané> ]
*
- * La définition d'un nouvel identifiant d'instantané courant se réalise dans :
- * - g_cdb_archive_process() pour la partie serveur ;
- * - g_hub_client_update() pour la partie client.
*/
DBC_CUR_SNAPSHOT_UPDATED, /* Mise à jour de l'instantané */
@@ -268,13 +243,40 @@ typedef enum _DBCommand
* [ Gestion d'instantané : DBC_SET_CUR_SNAPSHOT ]
* [ <identifiant d'instantané> ]
*
- * La définition d'un nouvel identifiant d'instantané courant se réalise dans :
- * - g_hub_client_set_current_snapshot() pour la partie client ;
- * -
*/
DBC_SET_CUR_SNAPSHOT, /* Définition de l'instantané */
+ /**
+ * Gestion de la commande 'DBC_SET_SNAPSHOT_NAME'.
+ *
+ * Le client connecté envoie un paquet de la forme suivante :
+ *
+ * [ Gestion d'instantané : DBC_SET_SNAPSHOT_NAME ]
+ * [ <identifiant d'instantané> ]
+ * [ <chaîne de caractères> ]
+ *
+ * Le serveur renvoie ensuite automatiquement un paquet
+ * de type 'DBC_SNAPSHOTS_UPDATED'.
+ */
+
+ DBC_SET_SNAPSHOT_NAME, /* Désignation de l'instantané */
+
+ /**
+ * Gestion de la commande 'DBC_SET_SNAPSHOT_DESC'.
+ *
+ * Le client connecté envoie un paquet de la forme suivante :
+ *
+ * [ Gestion d'instantané : DBC_SET_SNAPSHOT_DESC ]
+ * [ <identifiant d'instantané> ]
+ * [ <chaîne de caractères> ]
+ *
+ * Le serveur renvoie ensuite automatiquement un paquet
+ * de type 'DBC_SNAPSHOTS_UPDATED'.
+ */
+
+ DBC_SET_SNAPSHOT_DESC, /* Description de l'instantané */
+
DBC_COUNT
} DBCommand;
@@ -300,6 +302,7 @@ typedef enum _DBError
DBE_DB_LOADING_ERROR, /* Erreur pendant le chargement*/
DBE_XML_ERROR, /* Erreur lors d'une définition*/
+ DBE_SNAPSHOT_NOT_FOUND, /* Instantané non trouvé */
DBE_COUNT