aboutsummaryrefslogtreecommitdiff
path: root/Database/databaseinterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'Database/databaseinterface.h')
-rw-r--r--Database/databaseinterface.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Database/databaseinterface.h b/Database/databaseinterface.h
new file mode 100644
index 0000000..f80c93a
--- /dev/null
+++ b/Database/databaseinterface.h
@@ -0,0 +1,24 @@
+#ifndef DATABASEINTERFACE_H
+#define DATABASEINTERFACE_H
+
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlError>
+#include <QDataStream>
+#include "Core/version.h"
+#include "Logger/logprimitive.h"
+
+// database file path (following README structure)
+const QString _sqlitePath = "../data/masterserver.db";
+
+// init and close
+bool initDatabase(const QString applicationPath);
+void closeDatabase();
+
+// report execution errors (terminal/display only)
+bool reportQuery(const QSqlQuery &q); // always returns false!
+
+// generate tables in first run
+bool createTables();
+
+#endif // DATABASEINTERFACE_H