src/DriverManager.h
branchv_0
changeset 34 24c05e69d68f
child 36 91cb012d779a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DriverManager.h	Mon May 25 19:36:06 2020 +0200
@@ -0,0 +1,51 @@
+/**
+ * Relational pipes
+ * Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include <vector>
+#include <codecvt>
+#include <locale>
+
+#include <relpipe/reader/typedefs.h>
+
+#include "SqlException.h"
+
+namespace relpipe {
+namespace tr {
+namespace sql {
+
+class DriverManager {
+private:
+	void* env;
+	std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings
+
+public:
+
+	class DataSource {
+	public:
+		relpipe::reader::string_t name;
+		relpipe::reader::string_t description;
+	};
+
+	DriverManager();
+	virtual ~DriverManager();
+	std::vector<DataSource> getDataSources();
+};
+
+}
+}
+}
\ No newline at end of file