Code

store: Introduced sdb_store_host_tojson() to serialize a single host.
[sysdb.git] / src / include / core / store.h
index 5558e77154f32f00e9d59edf75ea3d1f0a014119..99b2ead200cce151cc6775882903b6235fe042fc 100644 (file)
@@ -119,6 +119,18 @@ sdb_store_service(const char *hostname, const char *name,
 int
 sdb_store_tojson(sdb_strbuf_t *buf);
 
+/*
+ * sdb_store_host_tojson:
+ * Serialize a host object to JSON and append the result to the specified
+ * buffer.
+ *
+ * Returns:
+ *  - 0 on success
+ *  - a negative value on error
+ */
+int
+sdb_store_host_tojson(sdb_store_base_t *host, sdb_strbuf_t *buf);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif