summaryrefslogtreecommitdiffstats
path: root/src/Core/RequestHandlers
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-03-21 13:31:03 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-03-21 13:31:03 +0100
commitc07b837dbad1ac176a6c18062dab9184e7080309 (patch)
tree277d5f7c06e2e71b25a9b9619917f04158b789e8 /src/Core/RequestHandlers
parent8f098fc3070f791302ec1f497588fab6ed409980 (diff)
downloadmad-c07b837dbad1ac176a6c18062dab9184e7080309.tar
mad-c07b837dbad1ac176a6c18062dab9184e7080309.zip
Net::Connection-Klasse zur besseren Strukturierung gekapselt
Diffstat (limited to 'src/Core/RequestHandlers')
-rw-r--r--src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp2
-rw-r--r--src/Core/RequestHandlers/DaemonCommandRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp2
-rw-r--r--src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/DaemonListRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp2
-rw-r--r--src/Core/RequestHandlers/DaemonStatusRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp6
-rw-r--r--src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/IdentifyRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/LogRequestHandler.h2
-rw-r--r--src/Core/RequestHandlers/UserListRequestHandler.h2
12 files changed, 15 insertions, 13 deletions
diff --git a/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp b/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp
index c9a4530..0e316bc 100644
--- a/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp
+++ b/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp
@@ -45,7 +45,7 @@ void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet)
std::string command = packet["command"];
try {
- Net::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]);
+ Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]);
Common::RequestManager::get()->sendRequest<Requests::CommandRequest>(daemonCon,
sigc::mem_fun(this, &DaemonCommandRequestHandler::requestFinished), command == "reboot");
}
diff --git a/src/Core/RequestHandlers/DaemonCommandRequestHandler.h b/src/Core/RequestHandlers/DaemonCommandRequestHandler.h
index 9e089e3..aab9539 100644
--- a/src/Core/RequestHandlers/DaemonCommandRequestHandler.h
+++ b/src/Core/RequestHandlers/DaemonCommandRequestHandler.h
@@ -36,7 +36,7 @@ class DaemonCommandRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- DaemonCommandRequestHandler(Net::Connection *connection, uint16_t requestId)
+ DaemonCommandRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};
diff --git a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp b/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp
index ae12a8e..547611c 100644
--- a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp
+++ b/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp
@@ -44,7 +44,7 @@ void DaemonFSInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) {
// TODO Require authentication
try {
- Net::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]);
+ Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]);
Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(daemonCon,
sigc::mem_fun(this, &DaemonFSInfoRequestHandler::requestFinished));
}
diff --git a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h b/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h
index 6a70c5e..66800d8 100644
--- a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h
+++ b/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h
@@ -36,7 +36,7 @@ class DaemonFSInfoRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- DaemonFSInfoRequestHandler(Net::Connection *connection, uint16_t requestId)
+ DaemonFSInfoRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};
diff --git a/src/Core/RequestHandlers/DaemonListRequestHandler.h b/src/Core/RequestHandlers/DaemonListRequestHandler.h
index 07badae..a469603 100644
--- a/src/Core/RequestHandlers/DaemonListRequestHandler.h
+++ b/src/Core/RequestHandlers/DaemonListRequestHandler.h
@@ -31,7 +31,7 @@ class DaemonListRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- DaemonListRequestHandler(Net::Connection *connection, uint16_t requestId)
+ DaemonListRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};
diff --git a/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp b/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp
index 66c3aa1..a84307b 100644
--- a/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp
+++ b/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp
@@ -46,7 +46,7 @@ void DaemonStatusRequestHandler::handlePacket(const Common::XmlPacket &packet) {
std::string daemonName = packet["daemonName"];
try {
- Net::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName);
+ Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName);
Common::RequestManager::get()->sendRequest<Common::Requests::StatusRequest>(daemonCon,
sigc::mem_fun(this, &DaemonStatusRequestHandler::requestFinished));
}
diff --git a/src/Core/RequestHandlers/DaemonStatusRequestHandler.h b/src/Core/RequestHandlers/DaemonStatusRequestHandler.h
index f232649..5ef6089 100644
--- a/src/Core/RequestHandlers/DaemonStatusRequestHandler.h
+++ b/src/Core/RequestHandlers/DaemonStatusRequestHandler.h
@@ -36,7 +36,7 @@ class DaemonStatusRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- DaemonStatusRequestHandler(Net::Connection *connection, uint16_t requestId)
+ DaemonStatusRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};
diff --git a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp
index ad0a293..7c2b482 100644
--- a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp
+++ b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp
@@ -84,10 +84,12 @@ void GSSAPIAuthRequestHandler::handlePacket(const Common::XmlPacket &packet) {
if(!packet["binary"].isEmpty())
return;
- const gnutls_datum_t *cert = getConnection()->getCertificate();
+ /*const gnutls_datum_t *cert = getConnection()->getCertificate();
recvBuffer.length = cert->size;
- recvBuffer.value = cert->data;
+ recvBuffer.value = cert->data;*/
+
+ recvBuffer.value = getConnection()->getCertificate(&recvBuffer.length);
majStat = gss_get_mic(&minStat, gssContext, GSS_C_QOP_DEFAULT, &recvBuffer, &sendBuffer);
diff --git a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h
index 06c1886..dd4d564 100644
--- a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h
+++ b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h
@@ -37,7 +37,7 @@ class GSSAPIAuthRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- GSSAPIAuthRequestHandler(Net::Connection *connection, uint16_t requestId)
+ GSSAPIAuthRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId), gssContext(GSS_C_NO_CONTEXT), gssContinue(true), sentSignature(false) {}
};
diff --git a/src/Core/RequestHandlers/IdentifyRequestHandler.h b/src/Core/RequestHandlers/IdentifyRequestHandler.h
index 37aa74b..016f777 100644
--- a/src/Core/RequestHandlers/IdentifyRequestHandler.h
+++ b/src/Core/RequestHandlers/IdentifyRequestHandler.h
@@ -31,7 +31,7 @@ class IdentifyRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- IdentifyRequestHandler(Net::Connection *connection, uint16_t requestId)
+ IdentifyRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};
diff --git a/src/Core/RequestHandlers/LogRequestHandler.h b/src/Core/RequestHandlers/LogRequestHandler.h
index 9cf63ec..c391346 100644
--- a/src/Core/RequestHandlers/LogRequestHandler.h
+++ b/src/Core/RequestHandlers/LogRequestHandler.h
@@ -31,7 +31,7 @@ class LogRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- LogRequestHandler(Net::Connection *connection, uint16_t requestId)
+ LogRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};
diff --git a/src/Core/RequestHandlers/UserListRequestHandler.h b/src/Core/RequestHandlers/UserListRequestHandler.h
index 8eae11e..a80c451 100644
--- a/src/Core/RequestHandlers/UserListRequestHandler.h
+++ b/src/Core/RequestHandlers/UserListRequestHandler.h
@@ -38,7 +38,7 @@ class UserListRequestHandler : public Common::RequestHandler {
virtual void handlePacket(const Common::XmlPacket &packet);
public:
- UserListRequestHandler(Net::Connection *connection, uint16_t requestId)
+ UserListRequestHandler(Common::Connection *connection, uint16_t requestId)
: RequestHandler(connection, requestId) {}
};