diff options
| author | Remko Tronçon <git@el-tramo.be> | 2009-11-10 21:24:03 (GMT) |
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2009-11-10 21:24:03 (GMT) |
| commit | 54781ce12f7654f8136e645d4ebc5934d90c6bea (patch) | |
| tree | 90bad869f9f64d57a3c0af209b83a538a47c7762 /Swiften/Queries/Responder.h | |
| parent | fcfac59db5cb4503554f2b30854b2e91928296f6 (diff) | |
| parent | 66ced3654ad295478b33d3e4f1716f66ab4048b5 (diff) | |
| download | swift-54781ce12f7654f8136e645d4ebc5934d90c6bea.zip swift-54781ce12f7654f8136e645d4ebc5934d90c6bea.tar.bz2 | |
Refactored session management.
Diffstat (limited to 'Swiften/Queries/Responder.h')
| -rw-r--r-- | Swiften/Queries/Responder.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Queries/Responder.h b/Swiften/Queries/Responder.h index e6e8ca6..9c025eb 100644 --- a/Swiften/Queries/Responder.h +++ b/Swiften/Queries/Responder.h @@ -1,12 +1,12 @@ #ifndef SWIFTEN_Responder_H #define SWIFTEN_Responder_H #include "Swiften/Queries/IQHandler.h" #include "Swiften/Queries/IQRouter.h" -#include "Swiften/Elements/Error.h" +#include "Swiften/Elements/ErrorPayload.h" namespace Swift { template<typename PAYLOAD_TYPE> class Responder : public IQHandler { public: Responder(IQRouter* router) : router_(router) { @@ -22,13 +22,13 @@ namespace Swift { virtual bool handleSetRequest(const JID& from, const String& id, boost::shared_ptr<PAYLOAD_TYPE> payload) = 0; void sendResponse(const JID& to, const String& id, boost::shared_ptr<Payload> payload) { router_->sendIQ(IQ::createResult(to, id, payload)); } - void sendError(const JID& to, const String& id, Error::Condition condition, Error::Type type) { + void sendError(const JID& to, const String& id, ErrorPayload::Condition condition, ErrorPayload::Type type) { router_->sendIQ(IQ::createError(to, id, condition, type)); } private: virtual bool handleIQ(boost::shared_ptr<IQ> iq) { if (iq->getType() == IQ::Set || iq->getType() == IQ::Get) { @@ -39,13 +39,13 @@ namespace Swift { result = handleSetRequest(iq->getFrom(), iq->getID(), payload); } else { result = handleGetRequest(iq->getFrom(), iq->getID(), payload); } if (!result) { - router_->sendIQ(IQ::createError(iq->getFrom(), iq->getID(), Error::NotAllowed, Error::Cancel)); + router_->sendIQ(IQ::createError(iq->getFrom(), iq->getID(), ErrorPayload::NotAllowed, ErrorPayload::Cancel)); } return true; } } return false; } |
Swift