summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Chat')
-rw-r--r--Swiften/Chat/ChatStateNotifier.cpp17
-rw-r--r--Swiften/Chat/ChatStateNotifier.h8
-rw-r--r--Swiften/Chat/ChatStateTracker.cpp2
-rw-r--r--Swiften/Chat/ChatStateTracker.h8
-rw-r--r--Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp7
5 files changed, 22 insertions, 20 deletions
diff --git a/Swiften/Chat/ChatStateNotifier.cpp b/Swiften/Chat/ChatStateNotifier.cpp
index 6e0f458..d507c4d 100644
--- a/Swiften/Chat/ChatStateNotifier.cpp
+++ b/Swiften/Chat/ChatStateNotifier.cpp
@@ -4,14 +4,15 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Chat/ChatStateNotifier.h"
+#include <Swiften/Chat/ChatStateNotifier.h>
#include <boost/bind.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
-#include "Swiften/Elements/Message.h"
-#include "Swiften/Elements/ChatState.h"
-#include "Swiften/Client/StanzaChannel.h"
-#include "Swiften/Disco/EntityCapsProvider.h"
+#include <Swiften/Elements/Message.h>
+#include <Swiften/Elements/ChatState.h>
+#include <Swiften/Client/StanzaChannel.h>
+#include <Swiften/Disco/EntityCapsProvider.h>
namespace Swift {
@@ -68,15 +69,15 @@ bool ChatStateNotifier::contactShouldReceiveStates() {
}
void ChatStateNotifier::changeState(ChatState::ChatStateType state) {
- boost::shared_ptr<Message> message(new Message());
+ boost::shared_ptr<Message> message(boost::make_shared<Message>());
message->setTo(contact_);
- message->addPayload(boost::shared_ptr<Payload>(new ChatState(state)));
+ message->addPayload(boost::make_shared<ChatState>(state));
stanzaChannel_->sendMessage(message);
}
void ChatStateNotifier::addChatStateRequest(Message::ref message) {
if (contactShouldReceiveStates()) {
- message->addPayload(boost::shared_ptr<Payload>(new ChatState(ChatState::Active)));
+ message->addPayload(boost::make_shared<ChatState>(ChatState::Active));
}
}
diff --git a/Swiften/Chat/ChatStateNotifier.h b/Swiften/Chat/ChatStateNotifier.h
index 1185ed0..c691092 100644
--- a/Swiften/Chat/ChatStateNotifier.h
+++ b/Swiften/Chat/ChatStateNotifier.h
@@ -6,12 +6,12 @@
#pragma once
-#include "Swiften/Base/boost_bsignals.h"
+#include <Swiften/Base/boost_bsignals.h>
#include <boost/shared_ptr.hpp>
-#include "Swiften/Elements/Message.h"
-#include "Swiften/Elements/ChatState.h"
-#include "Swiften/JID/JID.h"
+#include <Swiften/Elements/Message.h>
+#include <Swiften/Elements/ChatState.h>
+#include <Swiften/JID/JID.h>
namespace Swift {
class StanzaChannel;
diff --git a/Swiften/Chat/ChatStateTracker.cpp b/Swiften/Chat/ChatStateTracker.cpp
index 2afcf67..27be86c 100644
--- a/Swiften/Chat/ChatStateTracker.cpp
+++ b/Swiften/Chat/ChatStateTracker.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Chat/ChatStateTracker.h"
+#include <Swiften/Chat/ChatStateTracker.h>
namespace Swift {
ChatStateTracker::ChatStateTracker() {
diff --git a/Swiften/Chat/ChatStateTracker.h b/Swiften/Chat/ChatStateTracker.h
index 343d828..b356644 100644
--- a/Swiften/Chat/ChatStateTracker.h
+++ b/Swiften/Chat/ChatStateTracker.h
@@ -6,12 +6,12 @@
#pragma once
-#include "Swiften/Base/boost_bsignals.h"
+#include <Swiften/Base/boost_bsignals.h>
#include <boost/shared_ptr.hpp>
-#include "Swiften/Elements/Message.h"
-#include "Swiften/Elements/Presence.h"
-#include "Swiften/Elements/ChatState.h"
+#include <Swiften/Elements/Message.h>
+#include <Swiften/Elements/Presence.h>
+#include <Swiften/Elements/ChatState.h>
namespace Swift {
class ChatStateTracker {
diff --git a/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp b/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp
index 5d7961b..1b91076 100644
--- a/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp
+++ b/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp
@@ -8,9 +8,10 @@
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <boost/bind.hpp>
-#include "Swiften/Chat/ChatStateNotifier.h"
-#include "Swiften/Client/DummyStanzaChannel.h"
-#include "Swiften/Disco/DummyEntityCapsProvider.h"
+#include <Swiften/Base/foreach.h>
+#include <Swiften/Chat/ChatStateNotifier.h>
+#include <Swiften/Client/DummyStanzaChannel.h>
+#include <Swiften/Disco/DummyEntityCapsProvider.h>
using namespace Swift;