Code

utils channel: Added sdb_channel_shutdown().
[sysdb.git] / src / include / utils / dbi.h
index 77d004296d333acaefc7460677a246765e182423..9d5cfc05cc66dd552be7073c225e8baacf896ee1 100644 (file)
@@ -29,7 +29,7 @@
 #define SDB_UTILS_DBI_H 1
 
 #include "core/object.h"
-#include "utils/data.h"
+#include "core/data.h"
 
 #include <stddef.h>
 
@@ -113,6 +113,17 @@ sdb_dbi_client_set_options(sdb_dbi_client_t *client,
 int
 sdb_dbi_client_connect(sdb_dbi_client_t *client);
 
+/*
+ * sdb_dbi_client_check_conn:
+ * Check the database-connection and try to reconnect if that fails.
+ *
+ * Returns:
+ *  - 0 on success (the connection is connected after the call)
+ *  - a negative value else (failed to reconnect)
+ */
+int
+sdb_dbi_client_check_conn(sdb_dbi_client_t *client);
+
 /*
  * sdb_dbi_exec_query:
  * Execute an SQL query on the database. The specified 'callback' will be