summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Queries/Responders/DiscoInfoResponder.cpp')
m---------Swiften0
-rw-r--r--Swiften/Queries/Responders/DiscoInfoResponder.cpp36
2 files changed, 0 insertions, 36 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/Queries/Responders/DiscoInfoResponder.cpp b/Swiften/Queries/Responders/DiscoInfoResponder.cpp
deleted file mode 100644
index 572f83f..0000000
--- a/Swiften/Queries/Responders/DiscoInfoResponder.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "Swiften/Queries/Responders/DiscoInfoResponder.h"
-#include "Swiften/Queries/IQRouter.h"
-#include "Swiften/Elements/DiscoInfo.h"
-
-namespace Swift {
-
-DiscoInfoResponder::DiscoInfoResponder(IQRouter* router) : GetResponder<DiscoInfo>(router) {
-}
-
-void DiscoInfoResponder::setDiscoInfo(const DiscoInfo& info) {
- info_ = info;
-}
-
-void DiscoInfoResponder::setDiscoInfo(const String& node, const DiscoInfo& info) {
- DiscoInfo newInfo(info);
- newInfo.setNode(node);
- nodeInfo_[node] = newInfo;
-}
-
-bool DiscoInfoResponder::handleGetRequest(const JID& from, const String& id, boost::shared_ptr<DiscoInfo> info) {
- if (info->getNode().isEmpty()) {
- sendResponse(from, id, boost::shared_ptr<DiscoInfo>(new DiscoInfo(info_)));
- }
- else {
- std::map<String,DiscoInfo>::const_iterator i = nodeInfo_.find(info->getNode());
- if (i != nodeInfo_.end()) {
- sendResponse(from, id, boost::shared_ptr<DiscoInfo>(new DiscoInfo((*i).second)));
- }
- else {
- sendError(from, id, ErrorPayload::ItemNotFound, ErrorPayload::Cancel);
- }
- }
- return true;
-}
-
-}