diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-03-21 13:31:03 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-03-21 13:31:03 +0100 |
commit | c07b837dbad1ac176a6c18062dab9184e7080309 (patch) | |
tree | 277d5f7c06e2e71b25a9b9619917f04158b789e8 /src/Client | |
parent | 8f098fc3070f791302ec1f497588fab6ed409980 (diff) | |
download | mad-c07b837dbad1ac176a6c18062dab9184e7080309.tar mad-c07b837dbad1ac176a6c18062dab9184e7080309.zip |
Net::Connection-Klasse zur besseren Strukturierung gekapselt
Diffstat (limited to 'src/Client')
-rw-r--r-- | src/Client/CommandParser.h | 8 | ||||
-rw-r--r-- | src/Client/InformationManager.cpp | 2 | ||||
-rw-r--r-- | src/Client/InformationManager.h | 10 | ||||
-rw-r--r-- | src/Client/Requests/DaemonCommandRequest.h | 2 | ||||
-rw-r--r-- | src/Client/Requests/DaemonFSInfoRequest.h | 2 | ||||
-rw-r--r-- | src/Client/Requests/DaemonListRequest.h | 2 | ||||
-rw-r--r-- | src/Client/Requests/DaemonStatusRequest.h | 2 |
7 files changed, 11 insertions, 17 deletions
diff --git a/src/Client/CommandParser.h b/src/Client/CommandParser.h index 2827443..23330ca 100644 --- a/src/Client/CommandParser.h +++ b/src/Client/CommandParser.h @@ -29,7 +29,7 @@ namespace Mad { -namespace Net { +namespace Common { class Connection; } @@ -50,7 +50,7 @@ class CommandParser { static CommandParser commandParser; - Net::Connection *connection; + Common::Connection *connection; const Command* findCommand(const std::string& command); void printUsage(const std::string& command); @@ -73,11 +73,11 @@ class CommandParser { return &commandParser; } - Net::Connection *getConnection() const { + Common::Connection *getConnection() const { return connection; } - void setConnection(Net::Connection *con) { + void setConnection(Common::Connection *con) { connection = con; } diff --git a/src/Client/InformationManager.cpp b/src/Client/InformationManager.cpp index 4c9800b..d99791c 100644 --- a/src/Client/InformationManager.cpp +++ b/src/Client/InformationManager.cpp @@ -67,7 +67,7 @@ void InformationManager::doDeinit() { Common::RequestManager::get()->unregisterPacketType("UpdateHostState"); } -void InformationManager::updateDaemonList(Net::Connection *con) { +void InformationManager::updateDaemonList(Common::Connection *con) { if(updating) return; diff --git a/src/Client/InformationManager.h b/src/Client/InformationManager.h index 369eefd..fff26b3 100644 --- a/src/Client/InformationManager.h +++ b/src/Client/InformationManager.h @@ -28,12 +28,6 @@ #include <Common/Request.h> namespace Mad { - -namespace Net { -class Connection; - -} - namespace Client { class InformationManager : public Common::Initializable { @@ -43,7 +37,7 @@ class InformationManager : public Common::Initializable { virtual void handlePacket(const Common::XmlPacket &packet); public: - DaemonStateUpdateRequestHandler(Net::Connection *connection, uint16_t requestId) + DaemonStateUpdateRequestHandler(Common::Connection *connection, uint16_t requestId) : RequestHandler(connection, requestId) {} }; @@ -70,7 +64,7 @@ class InformationManager : public Common::Initializable { return &informationManager; } - void updateDaemonList(Net::Connection *con); + void updateDaemonList(Common::Connection *con); bool isUpdating() const { return updating; diff --git a/src/Client/Requests/DaemonCommandRequest.h b/src/Client/Requests/DaemonCommandRequest.h index 4e9e2d1..2e421e8 100644 --- a/src/Client/Requests/DaemonCommandRequest.h +++ b/src/Client/Requests/DaemonCommandRequest.h @@ -36,7 +36,7 @@ class DaemonCommandRequest : public Common::Request { virtual void sendRequest(); public: - DaemonCommandRequest(Net::Connection *connection, uint16_t requestId, slot_type slot, const std::string &daemon0, bool reboot0) + DaemonCommandRequest(Common::Connection *connection, uint16_t requestId, slot_type slot, const std::string &daemon0, bool reboot0) : Common::Request(connection, requestId, slot), daemon(daemon0), reboot(reboot0) {} }; diff --git a/src/Client/Requests/DaemonFSInfoRequest.h b/src/Client/Requests/DaemonFSInfoRequest.h index 2e6a68f..17d2aa0 100644 --- a/src/Client/Requests/DaemonFSInfoRequest.h +++ b/src/Client/Requests/DaemonFSInfoRequest.h @@ -36,7 +36,7 @@ class DaemonFSInfoRequest : public Common::Request { virtual void sendRequest(); public: - DaemonFSInfoRequest(Net::Connection *connection, uint16_t requestId, slot_type slot, const std::string &daemon0) + DaemonFSInfoRequest(Common::Connection *connection, uint16_t requestId, slot_type slot, const std::string &daemon0) : Common::Request(connection, requestId, slot), daemon(daemon0) {} }; diff --git a/src/Client/Requests/DaemonListRequest.h b/src/Client/Requests/DaemonListRequest.h index 017d355..27a025f 100644 --- a/src/Client/Requests/DaemonListRequest.h +++ b/src/Client/Requests/DaemonListRequest.h @@ -28,7 +28,7 @@ namespace Requests { class DaemonListRequest : public Common::Requests::SimpleRequest { public: - DaemonListRequest(Net::Connection *connection, uint16_t requestId, slot_type slot) + DaemonListRequest(Common::Connection *connection, uint16_t requestId, slot_type slot) : SimpleRequest(connection, requestId, slot, "ListHosts") {} }; diff --git a/src/Client/Requests/DaemonStatusRequest.h b/src/Client/Requests/DaemonStatusRequest.h index 83cba67..936692f 100644 --- a/src/Client/Requests/DaemonStatusRequest.h +++ b/src/Client/Requests/DaemonStatusRequest.h @@ -36,7 +36,7 @@ class DaemonStatusRequest : public Common::Request { virtual void sendRequest(); public: - DaemonStatusRequest(Net::Connection *connection, uint16_t requestId, slot_type slot, const std::string &daemon0) + DaemonStatusRequest(Common::Connection *connection, uint16_t requestId, slot_type slot, const std::string &daemon0) : Common::Request(connection, requestId, slot), daemon(daemon0) {} }; |