Code

frontend, proto: Include object type in FETCH and LOOKUP messages.
[sysdb.git] / src / include / frontend / proto.h
index 2fabad513b06e5c156c021617262606de628c7f2..e9001cbb413003b01e8a3ab745827e228eaab3fa 100644 (file)
@@ -108,7 +108,9 @@ typedef enum {
         * contain the type of the data and the result encoded as a JSON string.
         * The type is the same as the command code of the respective command (see
         * below) and is stored as an unsigned 32bit integer in network
-        * byte-order. The result may be empty (but the type is still included).
+        * byte-order. The result may be empty (but the type is still included) if
+        * the query did not return any result. The type and the result message
+        * are empty on empty commands.
         *
         * 0               32              64
         * +---------------+---------------+
@@ -169,20 +171,27 @@ typedef enum {
        /*
         * CONNECTION_FETCH:
         * Execute the 'FETCH' command in the server. The message body shall
-        * include the hostname of the host to be retrieved.
+        * include the type and the identifier of the object to be retrieved.
+        * Hosts are identified by their name. Other types are not supported yet.
+        * The type is encoded as a 32bit integer in network byte-order.
         */
        CONNECTION_FETCH,
 
        /*
         * CONNECTION_LIST:
-        * Execute the 'LIST' command in the server.
+        * Execute the 'LIST' command in the server. The message body may include
+        * the type of the objects to be listed, encoded as a 32bit integer in
+        * network byte-order. The response includes all hosts and the respective
+        * child objects. By default, all hosts are listed.
         */
        CONNECTION_LIST,
 
        /*
         * CONNECTION_LOOKUP:
         * Execute the 'LOOKUP' command in the server. The message body shall
-        * include the conditional expression of the 'MATCHING' clause.
+        * include the type of the objects to look up and a string representing
+        * the conditional expression of the 'MATCHING' clause. The type is
+        * encoded as a 32bit integer in network byte-order.
         */
        CONNECTION_LOOKUP,