summaryrefslogtreecommitdiff
path: root/bouncer/core.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bouncer/core.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/bouncer/core.h b/bouncer/core.h
index 8817b77..1a13a1d 100644
--- a/bouncer/core.h
+++ b/bouncer/core.h
@@ -284,6 +284,9 @@ public:
Server(NetCore *_netCore);
virtual ~Server();
+ virtual void loadFromConfig(std::map<std::string, std::string> &data) = 0;
+ virtual void saveToConfig(std::map<std::string, std::string> &data) = 0;
+
protected:
void connect(const char *hostname, int _port, bool _useTls);
@@ -361,6 +364,9 @@ private:
public:
// This probably *shouldn't* be public... ><
void deleteQuery(Query *query);
+
+ virtual void loadFromConfig(std::map<std::string, std::string> &data);
+ virtual void saveToConfig(std::map<std::string, std::string> &data);
};
@@ -389,8 +395,12 @@ public:
Client *findClientWithSessionKey(uint8_t *key) const;
private:
virtual Client *constructClient() = 0;
+ virtual Server *constructServer(const char *type) = 0;
public:
+ void loadConfig();
+ void saveConfig();
+
int registerServer(Server *server); // THIS FUNCTION WILL BE PROTECTED LATER
protected:
void deregisterServer(int id);
@@ -400,6 +410,7 @@ protected:
class Bouncer : public NetCore {
private:
virtual Client *constructClient();
+ virtual Server *constructServer(const char *type);
};