summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Disco/DiscoServiceWalker.h')
-rw-r--r--Swiften/Disco/DiscoServiceWalker.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/Swiften/Disco/DiscoServiceWalker.h b/Swiften/Disco/DiscoServiceWalker.h
index 17376b7..bd8102b 100644
--- a/Swiften/Disco/DiscoServiceWalker.h
+++ b/Swiften/Disco/DiscoServiceWalker.h
@@ -22,55 +22,55 @@
#include <Swiften/JID/JID.h>
namespace Swift {
- class IQRouter;
- /**
- * Recursively walk service discovery trees to find all services offered.
- * This stops on any disco item that's not reporting itself as a server.
- */
- class SWIFTEN_API DiscoServiceWalker {
- public:
- DiscoServiceWalker(const JID& service, IQRouter* iqRouter, size_t maxSteps = 200);
+ class IQRouter;
+ /**
+ * Recursively walk service discovery trees to find all services offered.
+ * This stops on any disco item that's not reporting itself as a server.
+ */
+ class SWIFTEN_API DiscoServiceWalker {
+ public:
+ DiscoServiceWalker(const JID& service, IQRouter* iqRouter, size_t maxSteps = 200);
- /**
- * Start the walk.
- *
- * Call this exactly once.
- */
- void beginWalk();
+ /**
+ * Start the walk.
+ *
+ * Call this exactly once.
+ */
+ void beginWalk();
- /**
- * End the walk.
- */
- void endWalk();
+ /**
+ * End the walk.
+ */
+ void endWalk();
- bool isActive() const {
- return active_;
- }
+ bool isActive() const {
+ return active_;
+ }
- /** Emitted for each service found. */
- boost::signal<void(const JID&, boost::shared_ptr<DiscoInfo>)> onServiceFound;
+ /** Emitted for each service found. */
+ boost::signal<void(const JID&, boost::shared_ptr<DiscoInfo>)> onServiceFound;
- /** Emitted when walking is aborted. */
- boost::signal<void()> onWalkAborted;
+ /** Emitted when walking is aborted. */
+ boost::signal<void()> onWalkAborted;
- /** Emitted when walking is complete.*/
- boost::signal<void()> onWalkComplete;
+ /** Emitted when walking is complete.*/
+ boost::signal<void()> onWalkComplete;
- private:
- void walkNode(const JID& jid);
- void markNodeCompleted(const JID& jid);
- void handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> info, ErrorPayload::ref error, GetDiscoInfoRequest::ref request);
- void handleDiscoItemsResponse(boost::shared_ptr<DiscoItems> items, ErrorPayload::ref error, GetDiscoItemsRequest::ref request);
- void handleDiscoError(const JID& jid, ErrorPayload::ref error);
+ private:
+ void walkNode(const JID& jid);
+ void markNodeCompleted(const JID& jid);
+ void handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> info, ErrorPayload::ref error, GetDiscoInfoRequest::ref request);
+ void handleDiscoItemsResponse(boost::shared_ptr<DiscoItems> items, ErrorPayload::ref error, GetDiscoItemsRequest::ref request);
+ void handleDiscoError(const JID& jid, ErrorPayload::ref error);
- private:
- JID service_;
- IQRouter* iqRouter_;
- size_t maxSteps_;
- bool active_;
- std::set<JID> servicesBeingSearched_;
- std::set<JID> searchedServices_;
- std::set<GetDiscoInfoRequest::ref> pendingDiscoInfoRequests_;
- std::set<GetDiscoItemsRequest::ref> pendingDiscoItemsRequests_;
- };
+ private:
+ JID service_;
+ IQRouter* iqRouter_;
+ size_t maxSteps_;
+ bool active_;
+ std::set<JID> servicesBeingSearched_;
+ std::set<JID> searchedServices_;
+ std::set<GetDiscoInfoRequest::ref> pendingDiscoInfoRequests_;
+ std::set<GetDiscoItemsRequest::ref> pendingDiscoItemsRequests_;
+ };
}