summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-08-27 20:19:14 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-08-27 21:52:18 (GMT)
commit7f1bcf974efac0ed87b6f8f639e1fdc16a89eb09 (patch)
tree7fa948375b6cc56f37bd2be400d6d8be9ca97837 /Swiften/MUC/MUCRegistry.cpp
parentba774f85e77531c7971804cb738c6b434a197258 (diff)
downloadswift-7f1bcf974efac0ed87b6f8f639e1fdc16a89eb09.zip
swift-7f1bcf974efac0ed87b6f8f639e1fdc16a89eb09.tar.bz2
Separate MUCRegistry from ChatsManager.
Diffstat (limited to 'Swiften/MUC/MUCRegistry.cpp')
-rw-r--r--Swiften/MUC/MUCRegistry.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Swiften/MUC/MUCRegistry.cpp b/Swiften/MUC/MUCRegistry.cpp
index 910d740..e433165 100644
--- a/Swiften/MUC/MUCRegistry.cpp
+++ b/Swiften/MUC/MUCRegistry.cpp
@@ -6,9 +6,24 @@
#include "Swiften/MUC/MUCRegistry.h"
+#include <algorithm>
+
namespace Swift {
MUCRegistry::~MUCRegistry() {
}
+bool MUCRegistry::isMUC(const JID& j) const {
+ return std::find(mucs.begin(), mucs.end(), j) != mucs.end();
+}
+
+void MUCRegistry::addMUC(const JID& j) {
+ mucs.push_back(j);
+}
+
+void MUCRegistry::removeMUC(const JID& j) {
+ mucs.erase(std::remove(mucs.begin(), mucs.end(), j), mucs.end());
+}
+
+
}