summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-04-30 16:56:33 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-04-30 16:56:33 (GMT)
commitb566cac68d7bb91f726b5353318b3a5eddd8f3c2 (patch)
tree6b9e7cdaf3273cde638dbfe9cbec0405c5708113 /Swift/Controllers/UIEvents
parent499f41d456203837b1ab8eb558a2855238957593 (diff)
downloadswift-b566cac68d7bb91f726b5353318b3a5eddd8f3c2.zip
swift-b566cac68d7bb91f726b5353318b3a5eddd8f3c2.tar.bz2
Support adding/removing bookmarks from the UI
Doesn't support editing meaningfully, nor do changes get saved.
Diffstat (limited to 'Swift/Controllers/UIEvents')
-rw-r--r--Swift/Controllers/UIEvents/AddMUCBookmarkUIEvent.h22
-rw-r--r--Swift/Controllers/UIEvents/EditMUCBookmarkUIEvent.h24
-rw-r--r--Swift/Controllers/UIEvents/RemoveMUCBookmarkUIEvent.h22
3 files changed, 68 insertions, 0 deletions
diff --git a/Swift/Controllers/UIEvents/AddMUCBookmarkUIEvent.h b/Swift/Controllers/UIEvents/AddMUCBookmarkUIEvent.h
new file mode 100644
index 0000000..715798b
--- /dev/null
+++ b/Swift/Controllers/UIEvents/AddMUCBookmarkUIEvent.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <boost/shared_ptr.hpp>
+
+#include "Swift/Controllers/UIEvents/UIEvent.h"
+#include "Swiften/MUC/MUCBookmark.h"
+
+namespace Swift {
+ class AddMUCBookmarkUIEvent : public UIEvent {
+ public:
+ AddMUCBookmarkUIEvent(const boost::shared_ptr<MUCBookmark> bookmark) : bookmark_(bookmark) {};
+ boost::shared_ptr<MUCBookmark> getBookmark() {return bookmark_;};
+ private:
+ boost::shared_ptr<MUCBookmark> bookmark_;
+ };
+}
diff --git a/Swift/Controllers/UIEvents/EditMUCBookmarkUIEvent.h b/Swift/Controllers/UIEvents/EditMUCBookmarkUIEvent.h
new file mode 100644
index 0000000..bcbcb76
--- /dev/null
+++ b/Swift/Controllers/UIEvents/EditMUCBookmarkUIEvent.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2010 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <boost/shared_ptr.hpp>
+
+#include "Swift/Controllers/UIEvents/UIEvent.h"
+#include "Swiften/MUC/MUCBookmark.h"
+
+namespace Swift {
+ class EditMUCBookmarkUIEvent : public UIEvent {
+ public:
+ EditMUCBookmarkUIEvent(const boost::shared_ptr<MUCBookmark> oldBookmark, const boost::shared_ptr<MUCBookmark> newBookmark) : oldBookmark_(oldBookmark) , newBookmark_(newBookmark) {};
+ boost::shared_ptr<MUCBookmark> getOldBookmark() {return oldBookmark_;};
+ boost::shared_ptr<MUCBookmark> getNewBookmark() {return newBookmark_;};
+ private:
+ boost::shared_ptr<MUCBookmark> oldBookmark_;
+ boost::shared_ptr<MUCBookmark> newBookmark_;
+ };
+}
diff --git a/Swift/Controllers/UIEvents/RemoveMUCBookmarkUIEvent.h b/Swift/Controllers/UIEvents/RemoveMUCBookmarkUIEvent.h
new file mode 100644
index 0000000..4a59b2c
--- /dev/null
+++ b/Swift/Controllers/UIEvents/RemoveMUCBookmarkUIEvent.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <boost/shared_ptr.hpp>
+
+#include "Swift/Controllers/UIEvents/UIEvent.h"
+#include "Swiften/MUC/MUCBookmark.h"
+
+namespace Swift {
+ class RemoveMUCBookmarkUIEvent : public UIEvent {
+ public:
+ RemoveMUCBookmarkUIEvent(const boost::shared_ptr<MUCBookmark> bookmark) : bookmark_(bookmark) {};
+ boost::shared_ptr<MUCBookmark> getBookmark() {return bookmark_;};
+ private:
+ boost::shared_ptr<MUCBookmark> bookmark_;
+ };
+}