diff options
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/BlockListEditorWidget.h | 32 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/BlockListEditorWidgetFactory.h | 20 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatWindow.h | 2 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/MainWindow.h | 1 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/UIFactory.h | 4 |
5 files changed, 58 insertions, 1 deletions
diff --git a/Swift/Controllers/UIInterfaces/BlockListEditorWidget.h b/Swift/Controllers/UIInterfaces/BlockListEditorWidget.h new file mode 100644 index 0000000..60a1c11 --- /dev/null +++ b/Swift/Controllers/UIInterfaces/BlockListEditorWidget.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <vector> + +#include <Swiften/JID/JID.h> +#include <Swiften/Base/boost_bsignals.h> + +namespace Swift { + + class ClientBlockListManager; + + class BlockListEditorWidget { + public: + virtual ~BlockListEditorWidget() {} + + virtual void show() = 0; + + virtual void setCurrentBlockList(const std::vector<JID>& blockedJIDs) = 0; + virtual void setBusy(bool isBusy) = 0; + + virtual std::vector<JID> getCurrentBlockList() const = 0; + + boost::signal<void (const std::vector<JID>& /* blockedJID */)> onSetNewBlockList; + }; + +} diff --git a/Swift/Controllers/UIInterfaces/BlockListEditorWidgetFactory.h b/Swift/Controllers/UIInterfaces/BlockListEditorWidgetFactory.h new file mode 100644 index 0000000..eb91ac1 --- /dev/null +++ b/Swift/Controllers/UIInterfaces/BlockListEditorWidgetFactory.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2013 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +namespace Swift { + + class BlockListEditorWidget; + + class BlockListEditorWidgetFactory { + public: + virtual ~BlockListEditorWidgetFactory() {} + + virtual BlockListEditorWidget* createBlockListEditorWidget() = 0; + }; + +} diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h index d6b3656..b8e6722 100644 --- a/Swift/Controllers/UIInterfaces/ChatWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatWindow.h @@ -39,6 +39,7 @@ namespace Swift { enum RoomAction {ChangeSubject, Configure, Affiliations, Destroy, Invite}; enum FileTransferState {WaitingForAccept, Negotiating, Transferring, Canceled, Finished, FTFailed}; enum WhiteboardSessionState {WhiteboardAccepted, WhiteboardTerminated, WhiteboardRejected}; + enum BlockingState {BlockingUnsupported, IsBlocked, IsUnblocked}; ChatWindow() {} virtual ~ChatWindow() {} @@ -89,6 +90,7 @@ namespace Swift { virtual void setSubject(const std::string& subject) = 0; virtual void setAffiliations(MUCOccupant::Affiliation, const std::vector<JID>&) = 0; virtual void setAvailableRoomActions(const std::vector<RoomAction> &actions) = 0; + virtual void setBlockingState(BlockingState state) = 0; /** * Set an alert on the window. * @param alertText Description of alert (required). diff --git a/Swift/Controllers/UIInterfaces/MainWindow.h b/Swift/Controllers/UIInterfaces/MainWindow.h index 2df2c10..3b10041 100644 --- a/Swift/Controllers/UIInterfaces/MainWindow.h +++ b/Swift/Controllers/UIInterfaces/MainWindow.h @@ -34,6 +34,7 @@ namespace Swift { /** Must be able to cope with NULL to clear the roster */ virtual void setRosterModel(Roster* roster) = 0; virtual void setConnecting() = 0; + virtual void setBlockingCommandAvailable(bool isAvailable) = 0; virtual void setAvailableAdHocCommands(const std::vector<DiscoItems::Item>& commands) = 0; virtual void setStreamEncryptionStatus(bool tlsInPlaceAndValid) = 0; virtual void openCertificateDialog(const std::vector<Certificate::ref>& chain) = 0; diff --git a/Swift/Controllers/UIInterfaces/UIFactory.h b/Swift/Controllers/UIInterfaces/UIFactory.h index dcd1779..990dc98 100644 --- a/Swift/Controllers/UIInterfaces/UIFactory.h +++ b/Swift/Controllers/UIInterfaces/UIFactory.h @@ -22,6 +22,7 @@ #include <Swift/Controllers/UIInterfaces/FileTransferListWidgetFactory.h> #include <Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h> #include <Swift/Controllers/UIInterfaces/HighlightEditorWidgetFactory.h> +#include <Swift/Controllers/UIInterfaces/BlockListEditorWidgetFactory.h> namespace Swift { class UIFactory : @@ -40,7 +41,8 @@ namespace Swift { public AdHocCommandWindowFactory, public FileTransferListWidgetFactory, public WhiteboardWindowFactory, - public HighlightEditorWidgetFactory { + public HighlightEditorWidgetFactory, + public BlockListEditorWidgetFactory { public: virtual ~UIFactory() {} }; |