/* * Copyright (c) 2010-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 namespace Swift { class IQRouter; class MainWindow; class UIEventStream; class AdHocCommandWindowFactory; class AdHocManager { public: AdHocManager(const JID& jid, AdHocCommandWindowFactory* factory, IQRouter* iqRouter, UIEventStream* uiEventStream, MainWindow* mainWindow); ~AdHocManager(); void removeController(std::shared_ptr contoller); void setServerDiscoInfo(std::shared_ptr info); void setOnline(bool online); private: void handleServerDiscoItemsResponse(std::shared_ptr, ErrorPayload::ref error); void handleUIEvent(std::shared_ptr event); boost::signals2::signal onControllerComplete; JID jid_; IQRouter* iqRouter_; UIEventStream* uiEventStream_; MainWindow* mainWindow_; AdHocCommandWindowFactory* factory_; GetDiscoItemsRequest::ref discoItemsRequest_; std::vector > controllers_; }; }