/* * Copyright (c) 2011 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Swift { class IQRouter; class ClientBlockListManager { public: ClientBlockListManager(IQRouter *iqRouter); ~ClientBlockListManager(); /** * Returns the blocklist. */ boost::shared_ptr getBlockList(); /** * Get the blocklist from the server. */ boost::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(boost::shared_ptr payload, ErrorPayload::ref); private: IQRouter* iqRouter; boost::shared_ptr > blockResponder; boost::shared_ptr > unblockResponder; boost::shared_ptr blockList; }; }