diff options
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/MUCSearchWindow.h | 1 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/UIFactory.h | 3 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/UserSearchWindow.h | 35 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h | 19 |
4 files changed, 57 insertions, 1 deletions
diff --git a/Swift/Controllers/UIInterfaces/MUCSearchWindow.h b/Swift/Controllers/UIInterfaces/MUCSearchWindow.h index da54ded..3c0ab12 100644 --- a/Swift/Controllers/UIInterfaces/MUCSearchWindow.h +++ b/Swift/Controllers/UIInterfaces/MUCSearchWindow.h @@ -26,6 +26,7 @@ namespace Swift { virtual void clearList() = 0; virtual void addService(const MUCService& service) = 0; virtual void addSavedServices(const std::vector<JID>& services) = 0; + virtual void setSearchInProgress(bool searching) = 0; virtual void show() = 0; diff --git a/Swift/Controllers/UIInterfaces/UIFactory.h b/Swift/Controllers/UIInterfaces/UIFactory.h index 4e15b27..acb7638 100644 --- a/Swift/Controllers/UIInterfaces/UIFactory.h +++ b/Swift/Controllers/UIInterfaces/UIFactory.h @@ -12,10 +12,11 @@ #include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h> #include <Swift/Controllers/UIInterfaces/MainWindowFactory.h> #include <Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h> +#include <Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h> #include <Swift/Controllers/UIInterfaces/XMLConsoleWidgetFactory.h> namespace Swift { - class UIFactory : public ChatListWindowFactory, public ChatWindowFactory, public EventWindowFactory, public LoginWindowFactory, public MainWindowFactory, public MUCSearchWindowFactory, public XMLConsoleWidgetFactory { + class UIFactory : public ChatListWindowFactory, public ChatWindowFactory, public EventWindowFactory, public LoginWindowFactory, public MainWindowFactory, public MUCSearchWindowFactory, public XMLConsoleWidgetFactory, public UserSearchWindowFactory { public: virtual ~UIFactory() {} }; diff --git a/Swift/Controllers/UIInterfaces/UserSearchWindow.h b/Swift/Controllers/UIInterfaces/UserSearchWindow.h new file mode 100644 index 0000000..dda3409 --- /dev/null +++ b/Swift/Controllers/UIInterfaces/UserSearchWindow.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swiften/Base/boost_bsignals.h" + +#include <vector> + +#include "Swiften/Base/String.h" +#include "Swiften/JID/JID.h" +#include "Swift/Controllers/Chat/UserSearchController.h" + +namespace Swift { + + class UserSearchWindow { + public: + virtual ~UserSearchWindow() {}; + + virtual void clear() = 0; + virtual void setResults(const std::vector<UserSearchResult>& results) = 0; + virtual void addSavedServices(const std::vector<JID>& services) = 0; + virtual void setSelectedService(const JID& service) = 0; + virtual void setServerSupportsSearch(bool support) = 0; + virtual void setSearchError(bool support) = 0; + virtual void setSearchFields(boost::shared_ptr<SearchPayload> fields) = 0; + virtual void show() = 0; + + boost::signal<void (const JID&)> onFormRequested; + boost::signal<void (boost::shared_ptr<SearchPayload>, const JID&)> onSearchRequested; + }; +} diff --git a/Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h b/Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h new file mode 100644 index 0000000..808c1db --- /dev/null +++ b/Swift/Controllers/UIInterfaces/UserSearchWindowFactory.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swift/Controllers/UIInterfaces/UserSearchWindow.h" + +namespace Swift { + class UIEventStream; + class UserSearchWindowFactory { + public: + virtual ~UserSearchWindowFactory() {}; + + virtual UserSearchWindow* createUserSearchWindow(UIEventStream* eventStream) = 0; + }; +} |