summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Presence')
-rw-r--r--Swiften/Presence/DirectedPresenceSender.cpp4
-rw-r--r--Swiften/Presence/DirectedPresenceSender.h4
-rw-r--r--Swiften/Presence/PayloadAddingPresenceSender.cpp4
-rw-r--r--Swiften/Presence/PayloadAddingPresenceSender.h12
-rw-r--r--Swiften/Presence/PresenceOracle.cpp2
-rw-r--r--Swiften/Presence/PresenceOracle.h4
-rw-r--r--Swiften/Presence/PresenceSender.cpp2
-rw-r--r--Swiften/Presence/PresenceSender.h2
-rw-r--r--Swiften/Presence/StanzaChannelPresenceSender.cpp4
-rw-r--r--Swiften/Presence/StanzaChannelPresenceSender.h2
-rw-r--r--Swiften/Presence/SubscriptionManager.cpp6
-rw-r--r--Swiften/Presence/SubscriptionManager.h6
-rw-r--r--Swiften/Presence/UnitTest/DirectedPresenceSenderTest.cpp22
-rw-r--r--Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp24
-rw-r--r--Swiften/Presence/UnitTest/PresenceOracleTest.cpp6
15 files changed, 52 insertions, 52 deletions
diff --git a/Swiften/Presence/DirectedPresenceSender.cpp b/Swiften/Presence/DirectedPresenceSender.cpp
index d824554..ec0bd3f 100644
--- a/Swiften/Presence/DirectedPresenceSender.cpp
+++ b/Swiften/Presence/DirectedPresenceSender.cpp
@@ -4,8 +4,8 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Presence/DirectedPresenceSender.h"
-#include "Swiften/Base/foreach.h"
+#include <Swiften/Presence/DirectedPresenceSender.h>
+#include <Swiften/Base/foreach.h>
namespace Swift {
diff --git a/Swiften/Presence/DirectedPresenceSender.h b/Swiften/Presence/DirectedPresenceSender.h
index 207de3e..7dbdd37 100644
--- a/Swiften/Presence/DirectedPresenceSender.h
+++ b/Swiften/Presence/DirectedPresenceSender.h
@@ -8,8 +8,8 @@
#include <set>
-#include "Swiften/Elements/Presence.h"
-#include "Swiften/Presence/PresenceSender.h"
+#include <Swiften/Elements/Presence.h>
+#include <Swiften/Presence/PresenceSender.h>
namespace Swift {
class DirectedPresenceSender : public PresenceSender {
diff --git a/Swiften/Presence/PayloadAddingPresenceSender.cpp b/Swiften/Presence/PayloadAddingPresenceSender.cpp
index c3d1638..1ece32a 100644
--- a/Swiften/Presence/PayloadAddingPresenceSender.cpp
+++ b/Swiften/Presence/PayloadAddingPresenceSender.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Presence/PayloadAddingPresenceSender.h"
+#include <Swiften/Presence/PayloadAddingPresenceSender.h>
namespace Swift {
@@ -34,7 +34,7 @@ bool PayloadAddingPresenceSender::isAvailable() const {
return sender->isAvailable();
}
-void PayloadAddingPresenceSender::setPayload(Payload::ref payload) {
+void PayloadAddingPresenceSender::setPayload(boost::shared_ptr<Payload> payload) {
this->payload = payload;
if (lastSentPresence) {
sendPresence(lastSentPresence);
diff --git a/Swiften/Presence/PayloadAddingPresenceSender.h b/Swiften/Presence/PayloadAddingPresenceSender.h
index ae82970..ddd460e 100644
--- a/Swiften/Presence/PayloadAddingPresenceSender.h
+++ b/Swiften/Presence/PayloadAddingPresenceSender.h
@@ -6,8 +6,8 @@
#pragma once
-#include "Swiften/Presence/PresenceSender.h"
-#include "Swiften/Elements/Payload.h"
+#include <Swiften/Presence/PresenceSender.h>
+#include <Swiften/Elements/Payload.h>
namespace Swift {
class StanzaChannel;
@@ -21,7 +21,7 @@ namespace Swift {
public:
PayloadAddingPresenceSender(PresenceSender*);
- void sendPresence(Presence::ref);
+ void sendPresence(boost::shared_ptr<Presence>);
bool isAvailable() const;
/**
@@ -30,11 +30,11 @@ namespace Swift {
* with an updated payload. Initial presence is reset when unavailable presence is
* sent.
*/
- void setPayload(Payload::ref);
+ void setPayload(boost::shared_ptr<Payload>);
private:
- Presence::ref lastSentPresence;
+ boost::shared_ptr<Presence> lastSentPresence;
PresenceSender* sender;
- Payload::ref payload;
+ boost::shared_ptr<Payload> payload;
};
}
diff --git a/Swiften/Presence/PresenceOracle.cpp b/Swiften/Presence/PresenceOracle.cpp
index 90e403c..1ad6fbf 100644
--- a/Swiften/Presence/PresenceOracle.cpp
+++ b/Swiften/Presence/PresenceOracle.cpp
@@ -8,7 +8,7 @@
#include <boost/bind.hpp>
-#include "Swiften/Client/StanzaChannel.h"
+#include <Swiften/Client/StanzaChannel.h>
namespace Swift {
diff --git a/Swiften/Presence/PresenceOracle.h b/Swiften/Presence/PresenceOracle.h
index f98e1cd..09126ea 100644
--- a/Swiften/Presence/PresenceOracle.h
+++ b/Swiften/Presence/PresenceOracle.h
@@ -9,9 +9,9 @@
#include <map>
#include <string>
-#include "Swiften/Elements/Presence.h"
+#include <Swiften/Elements/Presence.h>
-#include "Swiften/Base/boost_bsignals.h"
+#include <Swiften/Base/boost_bsignals.h>
namespace Swift {
class StanzaChannel;
diff --git a/Swiften/Presence/PresenceSender.cpp b/Swiften/Presence/PresenceSender.cpp
index 50d75eb..b75141d 100644
--- a/Swiften/Presence/PresenceSender.cpp
+++ b/Swiften/Presence/PresenceSender.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Presence/PresenceSender.h"
+#include <Swiften/Presence/PresenceSender.h>
namespace Swift {
diff --git a/Swiften/Presence/PresenceSender.h b/Swiften/Presence/PresenceSender.h
index 5abf2f3..c302074 100644
--- a/Swiften/Presence/PresenceSender.h
+++ b/Swiften/Presence/PresenceSender.h
@@ -6,7 +6,7 @@
#pragma once
-#include "Swiften/Elements/Presence.h"
+#include <Swiften/Elements/Presence.h>
namespace Swift {
class PresenceSender {
diff --git a/Swiften/Presence/StanzaChannelPresenceSender.cpp b/Swiften/Presence/StanzaChannelPresenceSender.cpp
index 654b7e7..5863a2d 100644
--- a/Swiften/Presence/StanzaChannelPresenceSender.cpp
+++ b/Swiften/Presence/StanzaChannelPresenceSender.cpp
@@ -4,8 +4,8 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Presence/StanzaChannelPresenceSender.h"
-#include "Swiften/Client/StanzaChannel.h"
+#include <Swiften/Presence/StanzaChannelPresenceSender.h>
+#include <Swiften/Client/StanzaChannel.h>
namespace Swift {
diff --git a/Swiften/Presence/StanzaChannelPresenceSender.h b/Swiften/Presence/StanzaChannelPresenceSender.h
index 23230ab..d60d29d 100644
--- a/Swiften/Presence/StanzaChannelPresenceSender.h
+++ b/Swiften/Presence/StanzaChannelPresenceSender.h
@@ -6,7 +6,7 @@
#pragma once
-#include "Swiften/Presence/PresenceSender.h"
+#include <Swiften/Presence/PresenceSender.h>
namespace Swift {
class StanzaChannel;
diff --git a/Swiften/Presence/SubscriptionManager.cpp b/Swiften/Presence/SubscriptionManager.cpp
index 004309e..01525dd 100644
--- a/Swiften/Presence/SubscriptionManager.cpp
+++ b/Swiften/Presence/SubscriptionManager.cpp
@@ -4,12 +4,12 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include "Swiften/Presence/SubscriptionManager.h"
+#include <Swiften/Presence/SubscriptionManager.h>
#include <boost/bind.hpp>
-#include "Swiften/Base/foreach.h"
-#include "Swiften/Client/StanzaChannel.h"
+#include <Swiften/Base/foreach.h>
+#include <Swiften/Client/StanzaChannel.h>
namespace Swift {
diff --git a/Swiften/Presence/SubscriptionManager.h b/Swiften/Presence/SubscriptionManager.h
index ad55f9d..efa3e1c 100644
--- a/Swiften/Presence/SubscriptionManager.h
+++ b/Swiften/Presence/SubscriptionManager.h
@@ -9,9 +9,9 @@
#include <map>
#include <string>
-#include "Swiften/JID/JID.h"
-#include "Swiften/Base/boost_bsignals.h"
-#include "Swiften/Elements/Presence.h"
+#include <Swiften/JID/JID.h>
+#include <Swiften/Base/boost_bsignals.h>
+#include <Swiften/Elements/Presence.h>
namespace Swift {
class StanzaChannel;
diff --git a/Swiften/Presence/UnitTest/DirectedPresenceSenderTest.cpp b/Swiften/Presence/UnitTest/DirectedPresenceSenderTest.cpp
index 80f5ebd..5b385c2 100644
--- a/Swiften/Presence/UnitTest/DirectedPresenceSenderTest.cpp
+++ b/Swiften/Presence/UnitTest/DirectedPresenceSenderTest.cpp
@@ -7,9 +7,9 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
-#include "Swiften/Client/DummyStanzaChannel.h"
-#include "Swiften/Presence/DirectedPresenceSender.h"
-#include "Swiften/Presence/StanzaChannelPresenceSender.h"
+#include <Swiften/Client/DummyStanzaChannel.h>
+#include <Swiften/Presence/DirectedPresenceSender.h>
+#include <Swiften/Presence/StanzaChannelPresenceSender.h>
using namespace Swift;
@@ -41,7 +41,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testSendPresence() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->sendPresence(testPresence);
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel->sentStanzas.size()));
@@ -50,7 +50,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testSendPresence_UndirectedPresenceWithDirectedPresenceReceivers() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->addDirectedPresenceReceiver(JID("alice@wonderland.lit/teaparty"), DirectedPresenceSender::AndSendPresence);
testling->sendPresence(testPresence);
@@ -64,7 +64,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testSendPresence_DirectedPresenceWithDirectedPresenceReceivers() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->addDirectedPresenceReceiver(JID("alice@wonderland.lit/teaparty"), DirectedPresenceSender::AndSendPresence);
channel->sentStanzas.clear();
@@ -77,7 +77,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testAddDirectedPresenceReceiver() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->sendPresence(testPresence);
channel->sentStanzas.clear();
@@ -90,7 +90,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testAddDirectedPresenceReceiver_WithoutSendingPresence() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->sendPresence(testPresence);
channel->sentStanzas.clear();
@@ -100,7 +100,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testAddDirectedPresenceReceiver_AfterSendingDirectedPresence() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->sendPresence(testPresence);
secondTestPresence->setTo(JID("foo@bar.com"));
testling->sendPresence(secondTestPresence);
@@ -115,7 +115,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testRemoveDirectedPresenceReceiver() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->addDirectedPresenceReceiver(JID("alice@wonderland.lit/teaparty"), DirectedPresenceSender::DontSendPresence);
testling->removeDirectedPresenceReceiver(JID("alice@wonderland.lit/teaparty"), DirectedPresenceSender::AndSendPresence);
@@ -127,7 +127,7 @@ class DirectedPresenceSenderTest : public CppUnit::TestFixture {
}
void testRemoveDirectedPresenceReceiver_WithoutSendingPresence() {
- std::auto_ptr<DirectedPresenceSender> testling(createPresenceSender());
+ boost::shared_ptr<DirectedPresenceSender> testling(createPresenceSender());
testling->addDirectedPresenceReceiver(JID("alice@wonderland.lit/teaparty"), DirectedPresenceSender::AndSendPresence);
channel->sentStanzas.clear();
diff --git a/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp b/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp
index 132c865..0dd6f74 100644
--- a/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp
+++ b/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp
@@ -9,10 +9,10 @@
#include <vector>
#include <boost/bind.hpp>
-#include "Swiften/Presence/PayloadAddingPresenceSender.h"
-#include "Swiften/Presence/StanzaChannelPresenceSender.h"
-#include "Swiften/Elements/Body.h"
-#include "Swiften/Client/DummyStanzaChannel.h"
+#include <Swiften/Presence/PayloadAddingPresenceSender.h>
+#include <Swiften/Presence/StanzaChannelPresenceSender.h>
+#include <Swiften/Elements/Body.h>
+#include <Swiften/Client/DummyStanzaChannel.h>
using namespace Swift;
@@ -38,7 +38,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
void testSetPayloadAddsPayloadOnPresenceSend() {
- std::auto_ptr<PayloadAddingPresenceSender> testling(createSender());
+ boost::shared_ptr<PayloadAddingPresenceSender> testling(createSender());
testling->setPayload(MyPayload::create("foo"));
testling->sendPresence(Presence::create("bar"));
@@ -49,7 +49,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
void testSetNullPayloadDoesNotAddPayloadOnPresenceSend() {
- std::auto_ptr<PayloadAddingPresenceSender> testling(createSender());
+ boost::shared_ptr<PayloadAddingPresenceSender> testling(createSender());
testling->setPayload(MyPayload::ref());
testling->sendPresence(Presence::create("bar"));
@@ -60,7 +60,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
void testSendPresenceDoesNotAlterOriginalPayload() {
- std::auto_ptr<PayloadAddingPresenceSender> testling(createSender());
+ boost::shared_ptr<PayloadAddingPresenceSender> testling(createSender());
testling->setPayload(MyPayload::create("foo"));
Presence::ref presence(Presence::create("bar"));
@@ -70,7 +70,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
void testSetPayloadAfterInitialPresenceResendsPresence() {
- std::auto_ptr<PayloadAddingPresenceSender> testling(createSender());
+ boost::shared_ptr<PayloadAddingPresenceSender> testling(createSender());
testling->sendPresence(Presence::create("bar"));
testling->setPayload(MyPayload::create("foo"));
@@ -81,7 +81,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
void testSetPayloadAfterUnavailablePresenceDoesNotResendPresence() {
- std::auto_ptr<PayloadAddingPresenceSender> testling(createSender());
+ boost::shared_ptr<PayloadAddingPresenceSender> testling(createSender());
Presence::ref presence = Presence::create("bar");
presence->setType(Presence::Unavailable);
@@ -93,7 +93,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
void testSendDirectedPresenceIsNotResent() {
- std::auto_ptr<PayloadAddingPresenceSender> testling(createSender());
+ boost::shared_ptr<PayloadAddingPresenceSender> testling(createSender());
testling->sendPresence(Presence::create("bar"));
Presence::ref directedPresence = Presence::create("baz");
@@ -106,8 +106,8 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture {
}
private:
- std::auto_ptr<PayloadAddingPresenceSender> createSender() {
- std::auto_ptr<PayloadAddingPresenceSender> sender(new PayloadAddingPresenceSender(presenceSender));
+ boost::shared_ptr<PayloadAddingPresenceSender> createSender() {
+ boost::shared_ptr<PayloadAddingPresenceSender> sender(new PayloadAddingPresenceSender(presenceSender));
return sender;
}
diff --git a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp
index 24cc62c..179538e 100644
--- a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp
+++ b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp
@@ -9,9 +9,9 @@
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
-#include "Swiften/Presence/PresenceOracle.h"
-#include "Swiften/Client/DummyStanzaChannel.h"
-#include "Swiften/Presence/SubscriptionManager.h"
+#include <Swiften/Presence/PresenceOracle.h>
+#include <Swiften/Client/DummyStanzaChannel.h>
+#include <Swiften/Presence/SubscriptionManager.h>
using namespace Swift;