Code

sysdb: Use a custom output format instead of pretty-printed JSON.
[sysdb.git] / src / tools / sysdb / input.h
index b8501f472383cd454608c19aebcab8688e784c60..6002c1f3d5464f992c01bae48aa38b55819a0eae 100644 (file)
@@ -33,7 +33,7 @@
 
 typedef struct {
        sdb_client_t *client;
-       const char *user;
+       char *user;
 
        sdb_strbuf_t *input;
        size_t tokenizer_pos;
@@ -61,6 +61,14 @@ extern sdb_input_t *sysdb_input;
 int
 sdb_input_init(sdb_input_t *input);
 
+/*
+ * sdb_input_reset:
+ * Reset the input handler and free all dynamically allocated memory. The
+ * input handler object itself will not be freed.
+ */
+void
+sdb_input_reset(sdb_input_t *input);
+
 /*
  * sdb_input_mainloop:
  * Wait for and handle all user and server input until end-of-file is read