summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r--Swift/Controllers/UIInterfaces/ChatListWindow.h3
-rw-r--r--Swift/Controllers/UIInterfaces/ChatWindow.h9
-rw-r--r--Swift/Controllers/UIInterfaces/UIFactory.h4
-rw-r--r--Swift/Controllers/UIInterfaces/WhiteboardWindow.h26
-rw-r--r--Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h19
5 files changed, 60 insertions, 1 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h
index d047f8c..cb55bb3 100644
--- a/Swift/Controllers/UIInterfaces/ChatListWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h
@@ -48,6 +48,8 @@ namespace Swift {
virtual void setBookmarksEnabled(bool enabled) = 0;
virtual void addMUCBookmark(const MUCBookmark& bookmark) = 0;
+ virtual void addWhiteboardSession(const ChatListWindow::Chat& chat) = 0;
+ virtual void removeWhiteboardSession(const JID& jid) = 0;
virtual void removeMUCBookmark(const MUCBookmark& bookmark) = 0;
virtual void setRecents(const std::list<Chat>& recents) = 0;
virtual void setUnreadCount(int unread) = 0;
@@ -55,6 +57,7 @@ namespace Swift {
boost::signal<void (const MUCBookmark&)> onMUCBookmarkActivated;
boost::signal<void (const Chat&)> onRecentActivated;
+ boost::signal<void (const JID&)> onWhiteboardActivated;
boost::signal<void ()> onClearRecentsRequested;
};
}
diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h
index 9188c7f..5db1a54 100644
--- a/Swift/Controllers/UIInterfaces/ChatWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatWindow.h
@@ -37,6 +37,7 @@ namespace Swift {
enum OccupantAction {Kick, Ban, MakeModerator, MakeParticipant, MakeVisitor, AddContact};
enum RoomAction {ChangeSubject, Configure, Affiliations, Destroy, Invite};
enum FileTransferState {WaitingForAccept, Negotiating, Transferring, Canceled, Finished, FTFailed};
+ enum WhiteboardSessionState {WhiteboardAccepted, WhiteboardTerminated, WhiteboardRejected};
ChatWindow() {}
virtual ~ChatWindow() {};
@@ -60,6 +61,9 @@ namespace Swift {
virtual void setFileTransferStatus(std::string, const FileTransferState state, const std::string& msg = "") = 0;
virtual void addMUCInvitation(const std::string& senderName, const JID& jid, const std::string& reason, const std::string& password, bool direct = true) = 0;
+ virtual std::string addWhiteboardRequest(bool senderIsSelf) = 0;
+ virtual void setWhiteboardSessionStatus(std::string id, const ChatWindow::WhiteboardSessionState state) = 0;
+
// message receipts
virtual void setMessageReceiptState(const std::string& id, ChatWindow::ReceiptState state) = 0;
@@ -132,6 +136,11 @@ namespace Swift {
boost::signal<void (std::string /* id */, std::string /* description */)> onFileTransferStart;
boost::signal<void (std::string /* id */, std::string /* path */)> onFileTransferAccept;
boost::signal<void (std::string /* path */)> onSendFileRequest;
+
+ //Whiteboard related
+ boost::signal<void ()> onWhiteboardSessionAccept;
+ boost::signal<void ()> onWhiteboardSessionCancel;
+ boost::signal<void ()> onWhiteboardWindowShow;
};
}
diff --git a/Swift/Controllers/UIInterfaces/UIFactory.h b/Swift/Controllers/UIInterfaces/UIFactory.h
index d6bea77..6b4efd8 100644
--- a/Swift/Controllers/UIInterfaces/UIFactory.h
+++ b/Swift/Controllers/UIInterfaces/UIFactory.h
@@ -20,6 +20,7 @@
#include <Swift/Controllers/UIInterfaces/ContactEditWindowFactory.h>
#include <Swift/Controllers/UIInterfaces/AdHocCommandWindowFactory.h>
#include <Swift/Controllers/UIInterfaces/FileTransferListWidgetFactory.h>
+#include <Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h>
namespace Swift {
class UIFactory :
@@ -36,7 +37,8 @@ namespace Swift {
public ProfileWindowFactory,
public ContactEditWindowFactory,
public AdHocCommandWindowFactory,
- public FileTransferListWidgetFactory {
+ public FileTransferListWidgetFactory,
+ public WhiteboardWindowFactory {
public:
virtual ~UIFactory() {}
};
diff --git a/Swift/Controllers/UIInterfaces/WhiteboardWindow.h b/Swift/Controllers/UIInterfaces/WhiteboardWindow.h
new file mode 100644
index 0000000..a4a9ef0
--- /dev/null
+++ b/Swift/Controllers/UIInterfaces/WhiteboardWindow.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2012 Mateusz Piękos
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include "Swiften/Base/boost_bsignals.h"
+
+#include <string>
+
+namespace Swift {
+ class WhiteboardSession;
+ class WhiteboardElement;
+
+ class WhiteboardWindow {
+ public:
+ virtual ~WhiteboardWindow() {}
+
+ virtual void show() = 0;
+ virtual void setSession(boost::shared_ptr<WhiteboardSession> session) = 0;
+ virtual void activateWindow() = 0;
+ virtual void setName(const std::string& name) = 0;
+ };
+}
diff --git a/Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h b/Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h
new file mode 100644
index 0000000..c2d2f6c
--- /dev/null
+++ b/Swift/Controllers/UIInterfaces/WhiteboardWindowFactory.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2012 Mateusz Piękos
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+namespace Swift {
+ class WhiteboardSession;
+ class WhiteboardWindow;
+
+ class WhiteboardWindowFactory {
+ public :
+ virtual ~WhiteboardWindowFactory() {};
+
+ virtual WhiteboardWindow* createWhiteboardWindow(boost::shared_ptr<WhiteboardSession> whiteboardSession) = 0;
+ };
+}