summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/ClientBlockListManager.h')
-rw-r--r--Swiften/Client/ClientBlockListManager.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/Swiften/Client/ClientBlockListManager.h b/Swiften/Client/ClientBlockListManager.h
index 21d35e3..e715737 100644
--- a/Swiften/Client/ClientBlockListManager.h
+++ b/Swiften/Client/ClientBlockListManager.h
@@ -13,4 +13,5 @@
#include <Swiften/Elements/BlockListPayload.h>
#include <Swiften/Elements/UnblockPayload.h>
+#include <Swiften/Elements/DiscoInfo.h>
#include <Swiften/Queries/SetResponder.h>
#include <Swiften/Queries/GenericRequest.h>
@@ -26,6 +27,4 @@ namespace Swift {
~ClientBlockListManager();
- bool isSupported() const;
-
/**
* Returns the blocklist.
@@ -33,4 +32,16 @@ namespace Swift {
boost::shared_ptr<BlockList> getBlockList();
+ /**
+ * Get the blocklist from the server.
+ */
+ boost::shared_ptr<BlockList> requestBlockList();
+
+ GenericRequest<BlockPayload>::ref createBlockJIDRequest(const JID& jid);
+ GenericRequest<BlockPayload>::ref createBlockJIDsRequest(const std::vector<JID>& jids);
+
+ GenericRequest<UnblockPayload>::ref createUnblockJIDRequest(const JID& jid);
+ GenericRequest<UnblockPayload>::ref createUnblockJIDsRequest(const std::vector<JID>& jids);
+ GenericRequest<UnblockPayload>::ref createUnblockAllRequest();
+
private:
void handleBlockListReceived(boost::shared_ptr<BlockListPayload> payload, ErrorPayload::ref);
@@ -38,5 +49,4 @@ namespace Swift {
private:
IQRouter* iqRouter;
- boost::shared_ptr<GenericRequest<BlockListPayload> > getRequest;
boost::shared_ptr<SetResponder<BlockPayload> > blockResponder;
boost::shared_ptr<SetResponder<UnblockPayload> > unblockResponder;