summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-09-28 16:45:00 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-09-28 16:45:00 (GMT)
commit1daf22de85758cfd035f1fcf6a70007315db4f28 (patch)
treeae822e3db619af06ec1b26fd342165b24fe89543 /Swift/Controllers/Chat
parent5c544f02222a3318b8581f68071b6a6b66b1d4c0 (diff)
downloadswift-1daf22de85758cfd035f1fcf6a70007315db4f28.zip
swift-1daf22de85758cfd035f1fcf6a70007315db4f28.tar.bz2
Destroy rooms.
Resolves: #990
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp5
-rw-r--r--Swift/Controllers/Chat/MUCController.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 56cc639..e1d02ae 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -73,6 +73,7 @@ MUCController::MUCController (
chatWindow_->onOccupantActionSelected.connect(boost::bind(&MUCController::handleActionRequestedOnOccupant, this, _1, _2));
chatWindow_->onChangeSubjectRequest.connect(boost::bind(&MUCController::handleChangeSubjectRequest, this, _1));
chatWindow_->onConfigureRequest.connect(boost::bind(&MUCController::handleConfigureRequest, this, _1));
+ chatWindow_->onDestroyRequest.connect(boost::bind(&MUCController::handleDestroyRoomRequest, this));
muc_->onJoinComplete.connect(boost::bind(&MUCController::handleJoinComplete, this, _1));
muc_->onJoinFailed.connect(boost::bind(&MUCController::handleJoinFailed, this, _1));
muc_->onOccupantJoined.connect(boost::bind(&MUCController::handleOccupantJoined, this, _1));
@@ -598,4 +599,8 @@ void MUCController::handleConfigurationFormReceived(Form::ref form) {
chatWindow_->showRoomConfigurationForm(form);
}
+void MUCController::handleDestroyRoomRequest() {
+ muc_->destroyRoom();
+}
+
}
diff --git a/Swift/Controllers/Chat/MUCController.h b/Swift/Controllers/Chat/MUCController.h
index 4be1488..7a7461b 100644
--- a/Swift/Controllers/Chat/MUCController.h
+++ b/Swift/Controllers/Chat/MUCController.h
@@ -91,6 +91,7 @@ namespace Swift {
void handleConfigureRequest(Form::ref);
void handleConfigurationFailed(ErrorPayload::ref);
void handleConfigurationFormReceived(Form::ref);
+ void handleDestroyRoomRequest();
private:
MUC::ref muc_;