diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-14 23:16:58 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-14 23:16:58 +0200 |
commit | 082dac7a8cb39ec1b005680680c4f3e1e8ddc256 (patch) | |
tree | 1db7b02d84cdd1882e15d3a1abfd8e93925a4af6 /src/Client/Requests | |
parent | fd9b1506a3b3858235e91cce45805f6d54caae4f (diff) | |
download | mad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.tar mad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.zip |
Verwende statische Instanzen von ConfigManager, ConnectionManager und RequestManager (Singleton)
Diffstat (limited to 'src/Client/Requests')
-rw-r--r-- | src/Client/Requests/CoreStatusRequest.cpp | 4 | ||||
-rw-r--r-- | src/Client/Requests/CoreStatusRequest.h | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/Client/Requests/CoreStatusRequest.cpp b/src/Client/Requests/CoreStatusRequest.cpp index fa3f1f1..6d0f634 100644 --- a/src/Client/Requests/CoreStatusRequest.cpp +++ b/src/Client/Requests/CoreStatusRequest.cpp @@ -28,12 +28,12 @@ namespace Mad { namespace Client { namespace Requests { -bool CoreStatusRequest::send(Net::Connection *connection, Common::RequestManager &requestManager, const sigc::slot<void,const Net::Packets::HostStatusPacket&> &callback) { +bool CoreStatusRequest::send(Net::Connection *connection, const sigc::slot<void,const Net::Packets::HostStatusPacket&> &callback) { CoreStatusRequest *request = new CoreStatusRequest(); request->finished.connect(callback); - if(requestManager.sendRequest(connection, request)) + if(Mad::Common::RequestManager::getRequestManager()->sendRequest(connection, request)) return true; delete request; diff --git a/src/Client/Requests/CoreStatusRequest.h b/src/Client/Requests/CoreStatusRequest.h index 7de8a68..55d6a22 100644 --- a/src/Client/Requests/CoreStatusRequest.h +++ b/src/Client/Requests/CoreStatusRequest.h @@ -26,10 +26,6 @@ namespace Mad { -namespace Common { -class RequestManager; -} - namespace Net { namespace Packets { class HostStatusPacket; @@ -46,7 +42,7 @@ class CoreStatusRequest : public Common::Request { CoreStatusRequest() {} public: - static bool send(Net::Connection *connection, Common::RequestManager &requestManager, const sigc::slot<void,const Net::Packets::HostStatusPacket&> &callback); + static bool send(Net::Connection *connection, const sigc::slot<void,const Net::Packets::HostStatusPacket&> &callback); virtual bool sendRequest(Net::Connection *connection, uint16_t requestId); virtual bool handlePacket(Net::Connection*, const Net::Packet &packet); |