diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-01-16 19:56:10 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-01-20 21:40:49 (GMT) |
commit | 004dfd8d4305b767b624be10072597ef3e311753 (patch) | |
tree | 7f9a70ce336e9eca3bc78397640530939e55fa20 /Swift/Controllers/UIInterfaces | |
parent | 03d69bfd11549e1c8dcbf3b5300029ba9892cf8a (diff) | |
download | swift-contrib-004dfd8d4305b767b624be10072597ef3e311753.zip swift-contrib-004dfd8d4305b767b624be10072597ef3e311753.tar.bz2 |
Use a dedicated Join MUC dialog.
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/JoinMUCWindow.h | 27 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/JoinMUCWindowFactory.h | 18 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/MUCSearchWindow.h | 11 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h | 2 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/UIFactory.h | 12 |
5 files changed, 62 insertions, 8 deletions
diff --git a/Swift/Controllers/UIInterfaces/JoinMUCWindow.h b/Swift/Controllers/UIInterfaces/JoinMUCWindow.h new file mode 100644 index 0000000..8cf712c --- /dev/null +++ b/Swift/Controllers/UIInterfaces/JoinMUCWindow.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <vector> + +#include <Swiften/Base/String.h> +#include <Swiften/Base/boost_bsignals.h> +#include <Swiften/JID/JID.h> + +namespace Swift { + class JoinMUCWindow { + public: + virtual ~JoinMUCWindow() {}; + + virtual void setNick(const String& nick) = 0; + virtual void setMUC(const String& nick) = 0; + virtual void show() = 0; + + boost::signal<void (const JID& /* muc */, const String& /* nick */, bool /* autoJoin */)> onJoinMUC; + boost::signal<void ()> onSearchMUC; + }; +} diff --git a/Swift/Controllers/UIInterfaces/JoinMUCWindowFactory.h b/Swift/Controllers/UIInterfaces/JoinMUCWindowFactory.h new file mode 100644 index 0000000..9c8bd77 --- /dev/null +++ b/Swift/Controllers/UIInterfaces/JoinMUCWindowFactory.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <Swift/Controllers/UIInterfaces/JoinMUCWindow.h> + +namespace Swift { + class JoinMUCWindowFactory { + public: + virtual ~JoinMUCWindowFactory() {}; + + virtual JoinMUCWindow* createJoinMUCWindow() = 0; + }; +} diff --git a/Swift/Controllers/UIInterfaces/MUCSearchWindow.h b/Swift/Controllers/UIInterfaces/MUCSearchWindow.h index 3c0ab12..ded2a0a 100644 --- a/Swift/Controllers/UIInterfaces/MUCSearchWindow.h +++ b/Swift/Controllers/UIInterfaces/MUCSearchWindow.h @@ -10,10 +10,10 @@ #include <vector> +#include <boost/optional.hpp> #include "Swiften/Base/String.h" #include "Swiften/JID/JID.h" - -#include "Swift/Controllers/Chat/MUCSearchController.h" +#include <Swift/Controllers/Chat/MUCSearchController.h> namespace Swift { @@ -21,15 +21,14 @@ namespace Swift { public: virtual ~MUCSearchWindow() {}; - virtual void setNick(const String& nick) = 0; - virtual void setMUC(const String& nick) = 0; virtual void clearList() = 0; virtual void addService(const MUCService& service) = 0; - virtual void addSavedServices(const std::vector<JID>& services) = 0; + virtual void addSavedServices(const std::list<JID>& services) = 0; virtual void setSearchInProgress(bool searching) = 0; virtual void show() = 0; - boost::signal<void (const JID&)> onAddService; + boost::signal<void (const JID&)> onSearchService; + boost::signal<void (const boost::optional<JID>&)> onFinished; }; } diff --git a/Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h b/Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h index 1f0bf90..d334dff 100644 --- a/Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h +++ b/Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h @@ -14,6 +14,6 @@ namespace Swift { public: virtual ~MUCSearchWindowFactory() {}; - virtual MUCSearchWindow* createMUCSearchWindow(UIEventStream* eventStream) = 0; + virtual MUCSearchWindow* createMUCSearchWindow() = 0; }; } diff --git a/Swift/Controllers/UIInterfaces/UIFactory.h b/Swift/Controllers/UIInterfaces/UIFactory.h index acb7638..4783dc8 100644 --- a/Swift/Controllers/UIInterfaces/UIFactory.h +++ b/Swift/Controllers/UIInterfaces/UIFactory.h @@ -12,11 +12,21 @@ #include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h> #include <Swift/Controllers/UIInterfaces/MainWindowFactory.h> #include <Swift/Controllers/UIInterfaces/MUCSearchWindowFactory.h> +#include <Swift/Controllers/UIInterfaces/JoinMUCWindowFactory.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, public UserSearchWindowFactory { + class UIFactory : + public ChatListWindowFactory, + public ChatWindowFactory, + public EventWindowFactory, + public LoginWindowFactory, + public MainWindowFactory, + public MUCSearchWindowFactory, + public XMLConsoleWidgetFactory, + public UserSearchWindowFactory, + public JoinMUCWindowFactory { public: virtual ~UIFactory() {} }; |