/* * Copyright (c) 2011-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Swift { class IQRouter; class SWIFTEN_API ClientBlockListManager { public: ClientBlockListManager(IQRouter *iqRouter); ~ClientBlockListManager(); /** * Returns the blocklist. */ std::shared_ptr getBlockList(); /** * Get the blocklist from the server. */ std::shared_ptr requestBlockList(); GenericRequest::ref createBlockJIDRequest(const JID& jid); GenericRequest::ref createBlockJIDsRequest(const std::vector& jids); GenericRequest::ref createUnblockJIDRequest(const JID& jid); GenericRequest::ref createUnblockJIDsRequest(const std::vector& jids); GenericRequest::ref createUnblockAllRequest(); private: void handleBlockListReceived(std::shared_ptr payload, ErrorPayload::ref); private: IQRouter* iqRouter; std::shared_ptr > blockResponder; std::shared_ptr > unblockResponder; std::shared_ptr blockList; }; }