summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-25 18:44:36 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-25 18:45:36 (GMT)
commitf77eeb87104a4ea0fd8e43399da14dc5f1cd97c3 (patch)
tree484a1755ccb69421de3ed9b7b9c731870f2de56a /Swiften/Elements
parentbd80c3b9054d91b3cbc309400f4db195c708115d (diff)
downloadswift-contrib-f77eeb87104a4ea0fd8e43399da14dc5f1cd97c3.zip
swift-contrib-f77eeb87104a4ea0fd8e43399da14dc5f1cd97c3.tar.bz2
Remove the use of Shared<>.
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/AuthFailure.h7
-rw-r--r--Swiften/Elements/Bytestreams.h6
-rw-r--r--Swiften/Elements/CapsInfo.h4
-rw-r--r--Swiften/Elements/Command.h7
-rw-r--r--Swiften/Elements/ComponentHandshake.h7
-rw-r--r--Swiften/Elements/DiscoInfo.h6
-rw-r--r--Swiften/Elements/EnableStreamManagement.h4
-rw-r--r--Swiften/Elements/Form.h6
-rw-r--r--Swiften/Elements/IBB.h7
-rw-r--r--Swiften/Elements/IQ.h13
-rw-r--r--Swiften/Elements/MUCUserPayload.h6
-rw-r--r--Swiften/Elements/Message.h9
-rw-r--r--Swiften/Elements/Presence.h6
-rw-r--r--Swiften/Elements/RosterPayload.h6
-rw-r--r--Swiften/Elements/Stanza.h3
-rw-r--r--Swiften/Elements/StanzaAck.h6
-rw-r--r--Swiften/Elements/StanzaAckRequest.h4
-rw-r--r--Swiften/Elements/StreamInitiation.h6
-rw-r--r--Swiften/Elements/StreamManagementEnabled.h4
-rw-r--r--Swiften/Elements/StreamManagementFailed.h4
-rw-r--r--Swiften/Elements/VCard.h7
21 files changed, 81 insertions, 47 deletions
diff --git a/Swiften/Elements/AuthFailure.h b/Swiften/Elements/AuthFailure.h
index 348a19b..7ffc762 100644
--- a/Swiften/Elements/AuthFailure.h
+++ b/Swiften/Elements/AuthFailure.h
@@ -6,12 +6,15 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/Shared.h"
namespace Swift {
- class AuthFailure : public Element, public Shared<AuthFailure> {
+ class AuthFailure : public Element {
public:
+ typedef boost::shared_ptr<AuthFailure> ref;
+
AuthFailure() {}
};
}
diff --git a/Swiften/Elements/Bytestreams.h b/Swiften/Elements/Bytestreams.h
index 323167c..9d45c8a 100644
--- a/Swiften/Elements/Bytestreams.h
+++ b/Swiften/Elements/Bytestreams.h
@@ -8,15 +8,17 @@
#include <vector>
#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
#include "Swiften/JID/JID.h"
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Elements/Payload.h"
namespace Swift {
- class Bytestreams : public Payload, public Shared<Bytestreams> {
+ class Bytestreams : public Payload {
public:
+ typedef boost::shared_ptr<Bytestreams> ref;
+
struct StreamHost {
StreamHost(const String& host = "", const JID& jid = JID(), int port = -1) : host(host), jid(jid), port(port) {}
diff --git a/Swiften/Elements/CapsInfo.h b/Swiften/Elements/CapsInfo.h
index 0fce90c..1968a29 100644
--- a/Swiften/Elements/CapsInfo.h
+++ b/Swiften/Elements/CapsInfo.h
@@ -7,11 +7,11 @@
#pragma once
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
+
#include "Swiften/Elements/Payload.h"
namespace Swift {
- class CapsInfo : public Payload, public Shared<CapsInfo> {
+ class CapsInfo : public Payload {
public:
CapsInfo(const String& node = "", const String& version = "", const String& hash = "sha-1") : node_(node), version_(version), hash_(hash) {}
diff --git a/Swiften/Elements/Command.h b/Swiften/Elements/Command.h
index 91ca915..73d359f 100644
--- a/Swiften/Elements/Command.h
+++ b/Swiften/Elements/Command.h
@@ -6,8 +6,9 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/Form.h"
@@ -15,8 +16,10 @@ namespace Swift {
/**
* Ad-Hoc Command (XEP-0050).
*/
- class Command : public Payload, public Shared<Command> {
+ class Command : public Payload {
public:
+ typedef boost::shared_ptr<Command> ref;
+
enum Status {Executing, Completed, Canceled, NoStatus};
enum Action {Cancel, Execute, Complete, Prev, Next, NoAction};
diff --git a/Swiften/Elements/ComponentHandshake.h b/Swiften/Elements/ComponentHandshake.h
index d9088e0..ca18e73 100644
--- a/Swiften/Elements/ComponentHandshake.h
+++ b/Swiften/Elements/ComponentHandshake.h
@@ -6,13 +6,16 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "Swiften/Elements/Element.h"
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
namespace Swift {
- class ComponentHandshake : public Element, public Shared<ComponentHandshake> {
+ class ComponentHandshake : public Element {
public:
+ typedef boost::shared_ptr<ComponentHandshake> ref;
+
ComponentHandshake(const String& data = "") : data(data) {
}
diff --git a/Swiften/Elements/DiscoInfo.h b/Swiften/Elements/DiscoInfo.h
index 2cc914a..249f9ac 100644
--- a/Swiften/Elements/DiscoInfo.h
+++ b/Swiften/Elements/DiscoInfo.h
@@ -11,12 +11,14 @@
#include "Swiften/Elements/Payload.h"
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
+
#include "Swiften/Elements/Form.h"
namespace Swift {
- class DiscoInfo : public Payload, public Shared<DiscoInfo> {
+ class DiscoInfo : public Payload {
public:
+ typedef boost::shared_ptr<DiscoInfo> ref;
+
const static std::string SecurityLabels;
class Identity {
public:
diff --git a/Swiften/Elements/EnableStreamManagement.h b/Swiften/Elements/EnableStreamManagement.h
index 3383e77..807db84 100644
--- a/Swiften/Elements/EnableStreamManagement.h
+++ b/Swiften/Elements/EnableStreamManagement.h
@@ -7,10 +7,10 @@
#pragma once
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/Shared.h"
+
namespace Swift {
- class EnableStreamManagement : public Element, public Shared<EnableStreamManagement> {
+ class EnableStreamManagement : public Element {
public:
EnableStreamManagement() {}
};
diff --git a/Swiften/Elements/Form.h b/Swiften/Elements/Form.h
index 0eb6ef0..5e8f994 100644
--- a/Swiften/Elements/Form.h
+++ b/Swiften/Elements/Form.h
@@ -11,7 +11,7 @@
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/FormField.h"
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
+
#include "Swiften/JID/JID.h"
namespace Swift {
@@ -20,8 +20,10 @@ namespace Swift {
* For the relevant Fields, the parsers and serialisers protect the API user against
* the strange multi-value instead of newline thing by transforming them.
*/
- class Form : public Payload, public Shared<Form> {
+ class Form : public Payload {
public:
+ typedef boost::shared_ptr<Form> ref;
+
enum Type { FormType, SubmitType, CancelType, ResultType };
public:
diff --git a/Swiften/Elements/IBB.h b/Swiften/Elements/IBB.h
index da9c18a..727755f 100644
--- a/Swiften/Elements/IBB.h
+++ b/Swiften/Elements/IBB.h
@@ -6,14 +6,17 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Base/ByteArray.h"
#include "Swiften/Elements/Payload.h"
namespace Swift {
- class IBB : public Payload, public Shared<IBB> {
+ class IBB : public Payload {
public:
+ typedef boost::shared_ptr<IBB> ref;
+
enum Action {
Open,
Close,
diff --git a/Swiften/Elements/IQ.h b/Swiften/Elements/IQ.h
index 2bb55e1..e15de24 100644
--- a/Swiften/Elements/IQ.h
+++ b/Swiften/Elements/IQ.h
@@ -6,15 +6,16 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "Swiften/Elements/Stanza.h"
#include "Swiften/Elements/ErrorPayload.h"
-#include "Swiften/Base/Shared.h"
-namespace Swift
-{
- class IQ : public Stanza, public Shared<IQ>
- {
- public:
+namespace Swift {
+ class IQ : public Stanza {
+ public:
+ typedef boost::shared_ptr<IQ> ref;
+
enum Type { Get, Set, Result, Error };
IQ(Type type = Get) : type_(type) { }
diff --git a/Swiften/Elements/MUCUserPayload.h b/Swiften/Elements/MUCUserPayload.h
index 8635176..f55c779 100644
--- a/Swiften/Elements/MUCUserPayload.h
+++ b/Swiften/Elements/MUCUserPayload.h
@@ -7,16 +7,18 @@
#pragma once
#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
#include "Swiften/JID/JID.h"
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Elements/Payload.h"
#include "Swiften/MUC/MUCOccupant.h"
namespace Swift {
- class MUCUserPayload : public Payload, public Shared<MUCUserPayload> {
+ class MUCUserPayload : public Payload {
public:
+ typedef boost::shared_ptr<MUCUserPayload> ref;
+
struct Item {
Item() : affiliation(MUCOccupant::NoAffiliation), role(MUCOccupant::NoRole) {}
boost::optional<JID> realJID;
diff --git a/Swiften/Elements/Message.h b/Swiften/Elements/Message.h
index e5e00ab..ea03299 100644
--- a/Swiften/Elements/Message.h
+++ b/Swiften/Elements/Message.h
@@ -7,18 +7,19 @@
#pragma once
#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Elements/Body.h"
#include "Swiften/Elements/Subject.h"
#include "Swiften/Elements/ErrorPayload.h"
#include "Swiften/Elements/Stanza.h"
-namespace Swift
-{
- class Message : public Stanza, public Shared<Message> {
+namespace Swift {
+ class Message : public Stanza {
public:
+ typedef boost::shared_ptr<Message> ref;
+
enum Type { Normal, Chat, Error, Groupchat, Headline };
Message() : type_(Chat) { }
diff --git a/Swiften/Elements/Presence.h b/Swiften/Elements/Presence.h
index 45638b9..642262c 100644
--- a/Swiften/Elements/Presence.h
+++ b/Swiften/Elements/Presence.h
@@ -6,15 +6,17 @@
#pragma once
-#include "Swiften/Base/Shared.h"
+
#include "Swiften/Elements/Stanza.h"
#include "Swiften/Elements/Status.h"
#include "Swiften/Elements/StatusShow.h"
#include "Swiften/Elements/Priority.h"
namespace Swift {
- class Presence : public Stanza, public Shared<Presence> {
+ class Presence : public Stanza {
public:
+ typedef boost::shared_ptr<Presence> ref;
+
enum Type { Available, Error, Probe, Subscribe, Subscribed, Unavailable, Unsubscribe, Unsubscribed };
Presence() : type_(Available) /*, showType_(Online)*/ {}
diff --git a/Swiften/Elements/RosterPayload.h b/Swiften/Elements/RosterPayload.h
index 0c987c4..b46b384 100644
--- a/Swiften/Elements/RosterPayload.h
+++ b/Swiften/Elements/RosterPayload.h
@@ -8,14 +8,16 @@
#include <vector>
#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
#include "Swiften/Elements/RosterItemPayload.h"
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/Shared.h"
+
namespace Swift {
- class RosterPayload : public Payload, public Shared<RosterPayload> {
+ class RosterPayload : public Payload {
public:
+ typedef boost::shared_ptr<RosterPayload> ref;
typedef std::vector<RosterItemPayload> RosterItemPayloads;
public:
diff --git a/Swiften/Elements/Stanza.h b/Swiften/Elements/Stanza.h
index 5d8fd6c..0f07223 100644
--- a/Swiften/Elements/Stanza.h
+++ b/Swiften/Elements/Stanza.h
@@ -14,13 +14,14 @@
#include "Swiften/Elements/Element.h"
#include "Swiften/Elements/Payload.h"
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Base/foreach.h"
#include "Swiften/JID/JID.h"
namespace Swift {
class Stanza : public Element {
public:
+ typedef boost::shared_ptr<Stanza> ref;
+
virtual ~Stanza();
template<typename T>
diff --git a/Swiften/Elements/StanzaAck.h b/Swiften/Elements/StanzaAck.h
index 53b62b4..8a57442 100644
--- a/Swiften/Elements/StanzaAck.h
+++ b/Swiften/Elements/StanzaAck.h
@@ -7,11 +7,13 @@
#pragma once
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/Shared.h"
+
namespace Swift {
- class StanzaAck : public Element, public Shared<StanzaAck> {
+ class StanzaAck : public Element {
public:
+ typedef boost::shared_ptr<StanzaAck> ref;
+
StanzaAck() : valid(false), handledStanzasCount(0) {}
StanzaAck(unsigned int handledStanzasCount) : valid(true), handledStanzasCount(handledStanzasCount) {}
diff --git a/Swiften/Elements/StanzaAckRequest.h b/Swiften/Elements/StanzaAckRequest.h
index ab4f354..024ebc9 100644
--- a/Swiften/Elements/StanzaAckRequest.h
+++ b/Swiften/Elements/StanzaAckRequest.h
@@ -7,9 +7,9 @@
#pragma once
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/Shared.h"
+
namespace Swift {
- class StanzaAckRequest : public Element, public Shared<StanzaAckRequest> {
+ class StanzaAckRequest : public Element {
};
}
diff --git a/Swiften/Elements/StreamInitiation.h b/Swiften/Elements/StreamInitiation.h
index fdf2399..55b6b87 100644
--- a/Swiften/Elements/StreamInitiation.h
+++ b/Swiften/Elements/StreamInitiation.h
@@ -8,14 +8,16 @@
#include <vector>
#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Elements/Payload.h"
namespace Swift {
- class StreamInitiation : public Payload, public Shared<StreamInitiation> {
+ class StreamInitiation : public Payload {
public:
+ typedef boost::shared_ptr<StreamInitiation> ref;
+
struct FileInfo {
FileInfo(const String& name = "", const String& description = "", int size = -1) : name(name), description(description), size(size) {}
diff --git a/Swiften/Elements/StreamManagementEnabled.h b/Swiften/Elements/StreamManagementEnabled.h
index 12cff51..0c72b84 100644
--- a/Swiften/Elements/StreamManagementEnabled.h
+++ b/Swiften/Elements/StreamManagementEnabled.h
@@ -7,10 +7,10 @@
#pragma once
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/Shared.h"
+
namespace Swift {
- class StreamManagementEnabled : public Element, public Shared<StreamManagementEnabled> {
+ class StreamManagementEnabled : public Element {
public:
StreamManagementEnabled() {}
};
diff --git a/Swiften/Elements/StreamManagementFailed.h b/Swiften/Elements/StreamManagementFailed.h
index e95d767..8302c94 100644
--- a/Swiften/Elements/StreamManagementFailed.h
+++ b/Swiften/Elements/StreamManagementFailed.h
@@ -7,10 +7,10 @@
#pragma once
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/Shared.h"
+
namespace Swift {
- class StreamManagementFailed : public Element, public Shared<StreamManagementFailed> {
+ class StreamManagementFailed : public Element {
public:
StreamManagementFailed() {}
};
diff --git a/Swiften/Elements/VCard.h b/Swiften/Elements/VCard.h
index 15173f1..e1f6f88 100644
--- a/Swiften/Elements/VCard.h
+++ b/Swiften/Elements/VCard.h
@@ -6,14 +6,17 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "Swiften/Base/String.h"
-#include "Swiften/Base/Shared.h"
#include "Swiften/Base/ByteArray.h"
#include "Swiften/Elements/Payload.h"
namespace Swift {
- class VCard : public Payload, public Shared<VCard> {
+ class VCard : public Payload {
public:
+ typedef boost::shared_ptr<VCard> ref;
+
struct EMailAddress {
EMailAddress() : isHome(false), isWork(false), isInternet(false), isPreferred(false), isX400(false) {
}