summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-28 12:08:54 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-28 12:18:04 (GMT)
commitf4e2f1deecd322e859bfb27bc5a9ab97726481c5 (patch)
treeb50dc4515108f5a19cbbd4b615cff01c13c5866c /Swift/Controllers/Chat/MUCSearchController.cpp
parent5caf2316dad81d6c02ff3e886a65121011ccc9fe (diff)
downloadswift-f4e2f1deecd322e859bfb27bc5a9ab97726481c5.zip
swift-f4e2f1deecd322e859bfb27bc5a9ab97726481c5.tar.bz2
Change error from optional to shared_ptr in GenericRequest
Resolves: #692
Diffstat (limited to 'Swift/Controllers/Chat/MUCSearchController.cpp')
-rw-r--r--Swift/Controllers/Chat/MUCSearchController.cpp16
1 files changed, 8 insertions, 8 deletions
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() {