summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp2
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.h2
-rw-r--r--Swift/Controllers/Chat/MUCSearchController.cpp16
-rw-r--r--Swift/Controllers/Chat/MUCSearchController.h8
4 files changed, 14 insertions, 14 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index bbc04f6..7430f69 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -106,7 +106,7 @@ void ChatControllerBase::handleSendMessageRequest(const String &body) {
postSendMessage(message->getBody(), boost::dynamic_pointer_cast<Stanza>(message));
}
-void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, const boost::optional<ErrorPayload>& error) {
+void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, ErrorPayload::ref error) {
if (!error) {
if (catalog->getLabels().size() == 0) {
chatWindow_->setSecurityLabelsEnabled(false);
diff --git a/Swift/Controllers/Chat/ChatControllerBase.h b/Swift/Controllers/Chat/ChatControllerBase.h
index efbf7b4..e1e5e62 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.h
+++ b/Swift/Controllers/Chat/ChatControllerBase.h
@@ -66,7 +66,7 @@ namespace Swift {
void createDayChangeTimer();
void handleSendMessageRequest(const String &body);
void handleAllMessagesRead();
- void handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog>, const boost::optional<ErrorPayload>& error);
+ void handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog>, ErrorPayload::ref error);
String getErrorMessage(boost::shared_ptr<ErrorPayload>);
void handleDayChangeTick();
diff --git a/Swift/Controllers/Chat/MUCSearchController.cpp b/Swift/Controllers/Chat/MUCSearchController.cpp
index e4592a9..7368dbb 100644
--- a/Swift/Controllers/Chat/MUCSearchController.cpp
+++ b/Swift/Controllers/Chat/MUCSearchController.cpp
@@ -108,9 +108,9 @@ void MUCSearchController::removeService(const JID& jid) {
refreshView();
}
-void MUCSearchController::handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> info, const boost::optional<ErrorPayload>& error, const JID& jid) {
+void MUCSearchController::handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> info, ErrorPayload::ref error, const JID& jid) {
if (error) {
- handleDiscoError(jid, error.get());
+ handleDiscoError(jid, error);
return;
}
GetDiscoItemsRequest::ref discoItemsRequest = GetDiscoItemsRequest::create(jid, iqRouter_);
@@ -148,9 +148,9 @@ void MUCSearchController::handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> i
refreshView();
}
-void MUCSearchController::handleRoomsItemsResponse(boost::shared_ptr<DiscoItems> items, const boost::optional<ErrorPayload>& error, const JID& jid) {
+void MUCSearchController::handleRoomsItemsResponse(boost::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid) {
if (error) {
- handleDiscoError(jid, error.get());
+ handleDiscoError(jid, error);
return;
}
serviceDetails_[jid].clearRooms();
@@ -161,9 +161,9 @@ void MUCSearchController::handleRoomsItemsResponse(boost::shared_ptr<DiscoItems>
refreshView();
}
-void MUCSearchController::handleServerItemsResponse(boost::shared_ptr<DiscoItems> items, const boost::optional<ErrorPayload>& error, const JID& jid) {
+void MUCSearchController::handleServerItemsResponse(boost::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid) {
if (error) {
- handleDiscoError(jid, error.get());
+ handleDiscoError(jid, error);
return;
}
if (jid.isValid()) {
@@ -180,9 +180,9 @@ void MUCSearchController::handleServerItemsResponse(boost::shared_ptr<DiscoItems
refreshView();
}
-void MUCSearchController::handleDiscoError(const JID& jid, const ErrorPayload& error) {
+void MUCSearchController::handleDiscoError(const JID& jid, ErrorPayload::ref error) {
serviceDetails_[jid].setComplete(true);
- serviceDetails_[jid].setError(error.getText());
+ serviceDetails_[jid].setError(error->getText());
}
void MUCSearchController::refreshView() {
diff --git a/Swift/Controllers/Chat/MUCSearchController.h b/Swift/Controllers/Chat/MUCSearchController.h
index 10988ad..f09a801 100644
--- a/Swift/Controllers/Chat/MUCSearchController.h
+++ b/Swift/Controllers/Chat/MUCSearchController.h
@@ -91,10 +91,10 @@ namespace Swift {
private:
void handleUIEvent(boost::shared_ptr<UIEvent> event);
void handleAddService(const JID& jid, bool userTriggered=false);
- void handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> info, const boost::optional<ErrorPayload>& error, const JID& jid);
- void handleRoomsItemsResponse(boost::shared_ptr<DiscoItems> items, const boost::optional<ErrorPayload>& error, const JID& jid);
- void handleServerItemsResponse(boost::shared_ptr<DiscoItems> items, const boost::optional<ErrorPayload>& error, const JID& jid);
- void handleDiscoError(const JID& jid, const ErrorPayload& error);
+ void handleDiscoInfoResponse(boost::shared_ptr<DiscoInfo> info, ErrorPayload::ref error, const JID& jid);
+ void handleRoomsItemsResponse(boost::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid);
+ void handleServerItemsResponse(boost::shared_ptr<DiscoItems> items, ErrorPayload::ref error, const JID& jid);
+ void handleDiscoError(const JID& jid, ErrorPayload::ref error);
void removeService(const JID& jid);
void refreshView();
void loadServices();