summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-09 09:52:51 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-09 14:20:47 (GMT)
commitc5bb67eab6f97ae0f5f7e673ff0ba9b1111191f4 (patch)
treead17bd2ee34263af472340a839a4757859ddaea1 /Swiften/Elements
parent0a84186a22fd48485deed77bc067877ac332d0b4 (diff)
downloadswift-contrib-c5bb67eab6f97ae0f5f7e673ff0ba9b1111191f4.zip
swift-contrib-c5bb67eab6f97ae0f5f7e673ff0ba9b1111191f4.tar.bz2
Added EchoBot walkthrough example.
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/Presence.h12
-rw-r--r--Swiften/Elements/RosterPayload.h8
2 files changed, 15 insertions, 5 deletions
diff --git a/Swiften/Elements/Presence.h b/Swiften/Elements/Presence.h
index 7297339..45638b9 100644
--- a/Swiften/Elements/Presence.h
+++ b/Swiften/Elements/Presence.h
@@ -22,6 +22,18 @@ namespace Swift {
setStatus(status);
}
+ static ref create() {
+ return ref(new Presence());
+ }
+
+ static ref create(const String& status) {
+ return ref(new Presence(status));
+ }
+
+ static ref create(Presence::ref presence) {
+ return ref(new Presence(*presence));
+ }
+
Type getType() const { return type_; }
void setType(Type type) { type_ = type; }
diff --git a/Swiften/Elements/RosterPayload.h b/Swiften/Elements/RosterPayload.h
index 58c5726..0c987c4 100644
--- a/Swiften/Elements/RosterPayload.h
+++ b/Swiften/Elements/RosterPayload.h
@@ -4,17 +4,17 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_RosterPayload_H
-#define SWIFTEN_RosterPayload_H
+#pragma once
#include <vector>
#include <boost/optional.hpp>
#include "Swiften/Elements/RosterItemPayload.h"
#include "Swiften/Elements/Payload.h"
+#include "Swiften/Base/Shared.h"
namespace Swift {
- class RosterPayload : public Payload {
+ class RosterPayload : public Payload, public Shared<RosterPayload> {
public:
typedef std::vector<RosterItemPayload> RosterItemPayloads;
@@ -35,5 +35,3 @@ namespace Swift {
RosterItemPayloads items_;
};
}
-
-#endif