summaryrefslogtreecommitdiffstats
path: root/src/json.h
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-09-09 11:27:45 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-09-10 14:48:26 +0200
commit0efc182c9ba71cb7a8afeeaea6593c52c35cc4ae (patch)
tree537c11d1c712a9ef10714b72a1642ec12fb545f0 /src/json.h
parenta1aaad46fb480fd7bd3204d7e7f5ade15eb4d031 (diff)
#1004 Handle new fields in /image/create response
ogClient now includes more information regarding the new image. This patch modifies ogServer to support new elements sent in ogClient /image/create response and store them in the database. Example of new /image/create response: { "disk": "1", "partition": "1", "code": "131", "id": "1", "name": "ubuntu", "repository": "192.168.56.10", "software": "Ubuntu 18.04.5 LTS \naccountsservice 0.6.45\n...", "clonator": "PARTCLONE", "compressor": "LZOP", "filesystem": "EXTFS", "datasize": 2100000 } New fields are "clonator", "compressor", "filesystem" and "datasize".
Diffstat (limited to 'src/json.h')
-rw-r--r--src/json.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.h b/src/json.h
index 580eb4f..cf78d46 100644
--- a/src/json.h
+++ b/src/json.h
@@ -5,6 +5,7 @@
#include "schedule.h"
int og_json_parse_string(json_t *element, const char **str);
+int og_json_parse_uint64(json_t *element, uint64_t *integer);
int og_json_parse_uint(json_t *element, uint32_t *integer);
int og_json_parse_bool(json_t *element, bool *value);