Browse Source

sql configuration dbo

develop
Robin Thoni 8 years ago
parent
commit
5519f2e3fb
2 changed files with 89 additions and 0 deletions
  1. 48
    0
      src/DBO/SqlConfiguration.cpp
  2. 41
    0
      src/DBO/SqlConfiguration.h

+ 48
- 0
src/DBO/SqlConfiguration.cpp View File

@@ -0,0 +1,48 @@
1
+//
2
+// Created by robin on 8/8/15.
3
+//
4
+
5
+#include "SqlConfiguration.h"
6
+
7
+SqlConfiguration::SqlConfiguration()
8
+{
9
+}
10
+const std::string &SqlConfiguration::getHost() const
11
+{
12
+    return _host;
13
+}
14
+
15
+void SqlConfiguration::setHost(const std::string &host)
16
+{
17
+    _host = host;
18
+}
19
+
20
+const std::string &SqlConfiguration::getUser() const
21
+{
22
+    return _user;
23
+}
24
+
25
+void SqlConfiguration::setUser(const std::string &user)
26
+{
27
+    _user = user;
28
+}
29
+
30
+const std::string &SqlConfiguration::getPassword() const
31
+{
32
+    return _password;
33
+}
34
+
35
+void SqlConfiguration::setPassword(const std::string &password)
36
+{
37
+    _password = password;
38
+}
39
+
40
+const std::string &SqlConfiguration::getDatabase() const
41
+{
42
+    return _database;
43
+}
44
+
45
+void SqlConfiguration::setDatabase(const std::string &database)
46
+{
47
+    _database = database;
48
+}

+ 41
- 0
src/DBO/SqlConfiguration.h View File

@@ -0,0 +1,41 @@
1
+//
2
+// Created by robin on 8/8/15.
3
+//
4
+
5
+#ifndef PDNS_SLAVE_SQLCONFIGURATION_H
6
+#define PDNS_SLAVE_SQLCONFIGURATION_H
7
+
8
+# include <string>
9
+
10
+class SqlConfiguration
11
+{
12
+public:
13
+    SqlConfiguration();
14
+    const std::string &getHost() const;
15
+
16
+    void setHost(const std::string &host);
17
+
18
+    const std::string &getUser() const;
19
+
20
+    void setUser(const std::string &user);
21
+
22
+    const std::string &getPassword() const;
23
+
24
+    void setPassword(const std::string &passwd);
25
+
26
+    const std::string &getDatabase() const;
27
+
28
+    void setDatabase(const std::string &database);
29
+
30
+private:
31
+    std::string _host;
32
+
33
+    std::string _user;
34
+
35
+    std::string _password;
36
+
37
+    std::string _database;
38
+};
39
+
40
+
41
+#endif //PDNS_SLAVE_SQLCONFIGURATION_H

Loading…
Cancel
Save