summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/AuthRequest.h12
-rw-r--r--Swiften/Elements/Body.h10
-rw-r--r--Swiften/Elements/Bytestreams.h12
-rw-r--r--Swiften/Elements/CapsInfo.h22
-rw-r--r--Swiften/Elements/ChatState.h2
-rw-r--r--Swiften/Elements/Command.h24
-rw-r--r--Swiften/Elements/ComponentHandshake.h10
-rw-r--r--Swiften/Elements/CompressRequest.h8
-rw-r--r--Swiften/Elements/DiscoInfo.cpp6
-rw-r--r--Swiften/Elements/DiscoInfo.h40
-rw-r--r--Swiften/Elements/DiscoItems.h18
-rw-r--r--Swiften/Elements/ErrorPayload.h10
-rw-r--r--Swiften/Elements/Form.cpp4
-rw-r--r--Swiften/Elements/Form.h18
-rw-r--r--Swiften/Elements/FormField.h48
-rw-r--r--Swiften/Elements/IBB.h16
-rw-r--r--Swiften/Elements/IQ.cpp10
-rw-r--r--Swiften/Elements/IQ.h10
-rw-r--r--Swiften/Elements/InBandRegistrationPayload.h110
-rw-r--r--Swiften/Elements/JingleContent.h6
-rw-r--r--Swiften/Elements/JingleIBBTransport.h8
-rw-r--r--Swiften/Elements/JinglePayload.h14
-rw-r--r--Swiften/Elements/MUCOccupant.cpp6
-rw-r--r--Swiften/Elements/MUCOccupant.h10
-rw-r--r--Swiften/Elements/MUCPayload.h2
-rw-r--r--Swiften/Elements/MUCUserPayload.h5
-rw-r--r--Swiften/Elements/Message.h10
-rw-r--r--Swiften/Elements/Nickname.h10
-rw-r--r--Swiften/Elements/Presence.h8
-rw-r--r--Swiften/Elements/ProtocolHeader.h26
-rw-r--r--Swiften/Elements/RawXMLPayload.h8
-rw-r--r--Swiften/Elements/ResourceBind.h8
-rw-r--r--Swiften/Elements/RosterItemPayload.h24
-rw-r--r--Swiften/Elements/SearchPayload.h40
-rw-r--r--Swiften/Elements/SecurityLabel.h32
-rw-r--r--Swiften/Elements/SecurityLabelsCatalog.h14
-rw-r--r--Swiften/Elements/SoftwareVersion.h26
-rw-r--r--Swiften/Elements/Stanza.h8
-rw-r--r--Swiften/Elements/StartSession.h2
-rw-r--r--Swiften/Elements/Status.h10
-rw-r--r--Swiften/Elements/StatusShow.h4
-rw-r--r--Swiften/Elements/Storage.h12
-rw-r--r--Swiften/Elements/StreamError.h10
-rw-r--r--Swiften/Elements/StreamFeatures.h18
-rw-r--r--Swiften/Elements/StreamInitiation.h20
-rw-r--r--Swiften/Elements/StreamInitiationFileInfo.h8
-rw-r--r--Swiften/Elements/Subject.h10
-rw-r--r--Swiften/Elements/UnitTest/FormTest.cpp6
-rw-r--r--Swiften/Elements/UnitTest/IQTest.cpp6
-rw-r--r--Swiften/Elements/UnitTest/StanzaTest.cpp10
-rw-r--r--Swiften/Elements/VCard.h70
-rw-r--r--Swiften/Elements/VCardUpdate.h10
-rw-r--r--Swiften/Elements/Version.h16
53 files changed, 434 insertions, 433 deletions
diff --git a/Swiften/Elements/AuthRequest.h b/Swiften/Elements/AuthRequest.h
index a1aac31..ba86900 100644
--- a/Swiften/Elements/AuthRequest.h
+++ b/Swiften/Elements/AuthRequest.h
@@ -14,14 +14,14 @@
namespace Swift {
class AuthRequest : public Element {
public:
- AuthRequest(const String& mechanism = "") : mechanism_(mechanism) {
+ AuthRequest(const std::string& mechanism = "") : mechanism_(mechanism) {
}
- AuthRequest(const String& mechanism, const ByteArray& message) :
+ AuthRequest(const std::string& mechanism, const ByteArray& message) :
mechanism_(mechanism), message_(message) {
}
- AuthRequest(const String& mechanism, const boost::optional<ByteArray>& message) :
+ AuthRequest(const std::string& mechanism, const boost::optional<ByteArray>& message) :
mechanism_(mechanism), message_(message) {
}
@@ -33,16 +33,16 @@ namespace Swift {
message_ = boost::optional<ByteArray>(message);
}
- const String& getMechanism() const {
+ const std::string& getMechanism() const {
return mechanism_;
}
- void setMechanism(const String& mechanism) {
+ void setMechanism(const std::string& mechanism) {
mechanism_ = mechanism;
}
private:
- String mechanism_;
+ std::string mechanism_;
boost::optional<ByteArray> message_;
};
}
diff --git a/Swiften/Elements/Body.h b/Swiften/Elements/Body.h
index 8262e09..2887390 100644
--- a/Swiften/Elements/Body.h
+++ b/Swiften/Elements/Body.h
@@ -7,25 +7,25 @@
#pragma once
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class Body : public Payload {
public:
typedef boost::shared_ptr<Body> ref;
- Body(const String& text = "") : text_(text) {
+ Body(const std::string& text = "") : text_(text) {
}
- void setText(const String& text) {
+ void setText(const std::string& text) {
text_ = text;
}
- const String& getText() const {
+ const std::string& getText() const {
return text_;
}
private:
- String text_;
+ std::string text_;
};
}
diff --git a/Swiften/Elements/Bytestreams.h b/Swiften/Elements/Bytestreams.h
index 9d45c8a..b493375 100644
--- a/Swiften/Elements/Bytestreams.h
+++ b/Swiften/Elements/Bytestreams.h
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
@@ -20,20 +20,20 @@ namespace Swift {
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) {}
+ StreamHost(const std::string& host = "", const JID& jid = JID(), int port = -1) : host(host), jid(jid), port(port) {}
- String host;
+ std::string host;
JID jid;
int port;
};
Bytestreams() {}
- const String& getStreamID() const {
+ const std::string& getStreamID() const {
return id;
}
- void setStreamID(const String& id) {
+ void setStreamID(const std::string& id) {
this->id = id;
}
@@ -54,7 +54,7 @@ namespace Swift {
}
private:
- String id;
+ std::string id;
boost::optional<JID> usedStreamHost;
std::vector<StreamHost> streamHosts;
};
diff --git a/Swiften/Elements/CapsInfo.h b/Swiften/Elements/CapsInfo.h
index dc3cc2e..ccad278 100644
--- a/Swiften/Elements/CapsInfo.h
+++ b/Swiften/Elements/CapsInfo.h
@@ -8,7 +8,7 @@
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
@@ -16,7 +16,7 @@ namespace Swift {
public:
typedef boost::shared_ptr<CapsInfo> ref;
- CapsInfo(const String& node = "", const String& version = "", const String& hash = "sha-1") : node_(node), version_(version), hash_(hash) {}
+ CapsInfo(const std::string& node = "", const std::string& version = "", const std::string& hash = "sha-1") : node_(node), version_(version), hash_(hash) {}
bool operator==(const CapsInfo& o) const {
return o.node_ == node_ && o.version_ == version_ && o.hash_ == hash_;
@@ -36,24 +36,24 @@ namespace Swift {
}
}
- const String& getNode() const { return node_; }
- void setNode(const String& node) {
+ const std::string& getNode() const { return node_; }
+ void setNode(const std::string& node) {
node_ = node;
}
- const String& getVersion() const { return version_; }
- void setVersion(const String& version) {
+ const std::string& getVersion() const { return version_; }
+ void setVersion(const std::string& version) {
version_ = version;
}
- const String& getHash() const { return hash_; }
- void setHash(const String& hash) {
+ const std::string& getHash() const { return hash_; }
+ void setHash(const std::string& hash) {
hash_ = hash;
}
private:
- String node_;
- String version_;
- String hash_;
+ std::string node_;
+ std::string version_;
+ std::string hash_;
};
}
diff --git a/Swiften/Elements/ChatState.h b/Swiften/Elements/ChatState.h
index 8dcf77c..2896877 100644
--- a/Swiften/Elements/ChatState.h
+++ b/Swiften/Elements/ChatState.h
@@ -6,7 +6,7 @@
#pragma once
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
diff --git a/Swiften/Elements/Command.h b/Swiften/Elements/Command.h
index 73d359f..f4059a8 100644
--- a/Swiften/Elements/Command.h
+++ b/Swiften/Elements/Command.h
@@ -8,7 +8,7 @@
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/Form.h"
@@ -26,21 +26,21 @@ namespace Swift {
struct Note {
enum Type {Info, Warn, Error};
- Note(String note, Type type) : note(note), type(type) {};
+ Note(std::string note, Type type) : note(note), type(type) {};
- String note;
+ std::string note;
Type type;
};
public:
- Command(const String& node, const String& sessionID, Status status) { constructor(node, sessionID, NoAction, status);}
- Command(const String& node = "", const String& sessionID = "", Action action = Execute) { constructor(node, sessionID, action, NoStatus); }
+ Command(const std::string& node, const std::string& sessionID, Status status) { constructor(node, sessionID, NoAction, status);}
+ Command(const std::string& node = "", const std::string& sessionID = "", Action action = Execute) { constructor(node, sessionID, action, NoStatus); }
- const String& getNode() const { return node_; }
- void setNode(const String& node) { node_ = node; }
+ const std::string& getNode() const { return node_; }
+ void setNode(const std::string& node) { node_ = node; }
- const String& getSessionID() const { return sessionID_; }
- void setSessionID(const String& id) { sessionID_ = id; }
+ const std::string& getSessionID() const { return sessionID_; }
+ void setSessionID(const std::string& id) { sessionID_ = id; }
Action getAction() const { return action_; }
void setAction(Action action) { action_ = action; }
@@ -60,7 +60,7 @@ namespace Swift {
void setForm(Form::ref payload) { form_ = payload; }
private:
- void constructor(const String& node, const String& sessionID, Action action, Status status) {
+ void constructor(const std::string& node, const std::string& sessionID, Action action, Status status) {
node_ = node;
sessionID_ = sessionID;
action_ = action;
@@ -69,8 +69,8 @@ namespace Swift {
}
private:
- String node_;
- String sessionID_;
+ std::string node_;
+ std::string sessionID_;
Action action_;
Status status_;
Action executeAction_;
diff --git a/Swiften/Elements/ComponentHandshake.h b/Swiften/Elements/ComponentHandshake.h
index ca18e73..6047eab 100644
--- a/Swiften/Elements/ComponentHandshake.h
+++ b/Swiften/Elements/ComponentHandshake.h
@@ -9,25 +9,25 @@
#include <boost/shared_ptr.hpp>
#include "Swiften/Elements/Element.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class ComponentHandshake : public Element {
public:
typedef boost::shared_ptr<ComponentHandshake> ref;
- ComponentHandshake(const String& data = "") : data(data) {
+ ComponentHandshake(const std::string& data = "") : data(data) {
}
- void setData(const String& d) {
+ void setData(const std::string& d) {
data = d;
}
- const String& getData() const {
+ const std::string& getData() const {
return data;
}
private:
- String data;
+ std::string data;
};
}
diff --git a/Swiften/Elements/CompressRequest.h b/Swiften/Elements/CompressRequest.h
index b6f01e3..0eb302a 100644
--- a/Swiften/Elements/CompressRequest.h
+++ b/Swiften/Elements/CompressRequest.h
@@ -13,18 +13,18 @@ namespace Swift {
class CompressRequest : public Element
{
public:
- CompressRequest(const String& method = "") : method_(method) {}
+ CompressRequest(const std::string& method = "") : method_(method) {}
- const String& getMethod() const {
+ const std::string& getMethod() const {
return method_;
}
- void setMethod(const String& method) {
+ void setMethod(const std::string& method) {
method_ = method;
}
private:
- String method_;
+ std::string method_;
};
}
diff --git a/Swiften/Elements/DiscoInfo.cpp b/Swiften/Elements/DiscoInfo.cpp
index a939d48..9c43ef4 100644
--- a/Swiften/Elements/DiscoInfo.cpp
+++ b/Swiften/Elements/DiscoInfo.cpp
@@ -8,9 +8,9 @@
namespace Swift {
-const String DiscoInfo::ChatStatesFeature = String("http://jabber.org/protocol/chatstates");
-const String DiscoInfo::SecurityLabelsFeature = String("urn:xmpp:sec-label:0");
-const String DiscoInfo::JabberSearchFeature = String("jabber:iq:search");
+const std::string DiscoInfo::ChatStatesFeature = std::string("http://jabber.org/protocol/chatstates");
+const std::string DiscoInfo::SecurityLabelsFeature = std::string("urn:xmpp:sec-label:0");
+const std::string DiscoInfo::JabberSearchFeature = std::string("jabber:iq:search");
bool DiscoInfo::Identity::operator<(const Identity& other) const {
diff --git a/Swiften/Elements/DiscoInfo.h b/Swiften/Elements/DiscoInfo.h
index 41bf6bf..5101884 100644
--- a/Swiften/Elements/DiscoInfo.h
+++ b/Swiften/Elements/DiscoInfo.h
@@ -10,7 +10,7 @@
#include <algorithm>
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Form.h"
@@ -19,29 +19,29 @@ namespace Swift {
public:
typedef boost::shared_ptr<DiscoInfo> ref;
- static const String ChatStatesFeature;
- static const String SecurityLabelsFeature;
- static const String JabberSearchFeature;
+ static const std::string ChatStatesFeature;
+ static const std::string SecurityLabelsFeature;
+ static const std::string JabberSearchFeature;
const static std::string SecurityLabels;
class Identity {
public:
- Identity(const String& name, const String& category = "client", const String& type = "pc", const String& lang = "") : name_(name), category_(category), type_(type), lang_(lang) {
+ Identity(const std::string& name, const std::string& category = "client", const std::string& type = "pc", const std::string& lang = "") : name_(name), category_(category), type_(type), lang_(lang) {
}
- const String& getCategory() const {
+ const std::string& getCategory() const {
return category_;
}
- const String& getType() const {
+ const std::string& getType() const {
return type_;
}
- const String& getLanguage() const {
+ const std::string& getLanguage() const {
return lang_;
}
- const String& getName() const {
+ const std::string& getName() const {
return name_;
}
@@ -49,20 +49,20 @@ namespace Swift {
bool operator<(const Identity& other) const;
private:
- String name_;
- String category_;
- String type_;
- String lang_;
+ std::string name_;
+ std::string category_;
+ std::string type_;
+ std::string lang_;
};
DiscoInfo() {
}
- const String& getNode() const {
+ const std::string& getNode() const {
return node_;
}
- void setNode(const String& node) {
+ void setNode(const std::string& node) {
node_ = node;
}
@@ -74,15 +74,15 @@ namespace Swift {
identities_.push_back(identity);
}
- const std::vector<String>& getFeatures() const {
+ const std::vector<std::string>& getFeatures() const {
return features_;
}
- void addFeature(const String& feature) {
+ void addFeature(const std::string& feature) {
features_.push_back(feature);
}
- bool hasFeature(const String& feature) const {
+ bool hasFeature(const std::string& feature) const {
return std::find(features_.begin(), features_.end(), feature) != features_.end();
}
@@ -95,9 +95,9 @@ namespace Swift {
}
private:
- String node_;
+ std::string node_;
std::vector<Identity> identities_;
- std::vector<String> features_;
+ std::vector<std::string> features_;
std::vector<Form::ref> extensions_;
};
}
diff --git a/Swiften/Elements/DiscoItems.h b/Swiften/Elements/DiscoItems.h
index 400947a..cc5a583 100644
--- a/Swiften/Elements/DiscoItems.h
+++ b/Swiften/Elements/DiscoItems.h
@@ -10,7 +10,7 @@
#include <algorithm>
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/JID/JID.h"
namespace Swift {
@@ -18,14 +18,14 @@ namespace Swift {
public:
class Item {
public:
- Item(const String& name, const JID& jid, const String& node="") : name_(name), jid_(jid), node_(node) {
+ Item(const std::string& name, const JID& jid, const std::string& node="") : name_(name), jid_(jid), node_(node) {
}
- const String& getName() const {
+ const std::string& getName() const {
return name_;
}
- const String& getNode() const {
+ const std::string& getNode() const {
return node_;
}
@@ -34,19 +34,19 @@ namespace Swift {
}
private:
- String name_;
+ std::string name_;
JID jid_;
- String node_;
+ std::string node_;
};
DiscoItems() {
}
- const String& getNode() const {
+ const std::string& getNode() const {
return node_;
}
- void setNode(const String& node) {
+ void setNode(const std::string& node) {
node_ = node;
}
@@ -59,7 +59,7 @@ namespace Swift {
}
private:
- String node_;
+ std::string node_;
std::vector<Item> items_;
};
}
diff --git a/Swiften/Elements/ErrorPayload.h b/Swiften/Elements/ErrorPayload.h
index 8f849f2..12ad574 100644
--- a/Swiften/Elements/ErrorPayload.h
+++ b/Swiften/Elements/ErrorPayload.h
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class ErrorPayload : public Payload {
@@ -43,7 +43,7 @@ namespace Swift {
UnexpectedRequest
};
- ErrorPayload(Condition condition = UndefinedCondition, Type type = Cancel, const String& text = String()) : type_(type), condition_(condition), text_(text) { }
+ ErrorPayload(Condition condition = UndefinedCondition, Type type = Cancel, const std::string& text = std::string()) : type_(type), condition_(condition), text_(text) { }
Type getType() const {
return type_;
@@ -61,17 +61,17 @@ namespace Swift {
condition_ = condition;
}
- void setText(const String& text) {
+ void setText(const std::string& text) {
text_ = text;
}
- const String& getText() const {
+ const std::string& getText() const {
return text_;
}
private:
Type type_;
Condition condition_;
- String text_;
+ std::string text_;
};
}
diff --git a/Swiften/Elements/Form.cpp b/Swiften/Elements/Form.cpp
index 41014ba..03fd1a4 100644
--- a/Swiften/Elements/Form.cpp
+++ b/Swiften/Elements/Form.cpp
@@ -9,13 +9,13 @@
namespace Swift {
-String Form::getFormType() const {
+std::string Form::getFormType() const {
FormField::ref field = getField("FORM_TYPE");
boost::shared_ptr<HiddenFormField> f = boost::dynamic_pointer_cast<HiddenFormField>(field);
return (f ? f->getValue() : "");
}
-FormField::ref Form::getField(const String& name) const {
+FormField::ref Form::getField(const std::string& name) const {
foreach(FormField::ref field, fields_) {
if (field->getName() == name) {
return field;
diff --git a/Swiften/Elements/Form.h b/Swiften/Elements/Form.h
index 5e8f994..1c50f0c 100644
--- a/Swiften/Elements/Form.h
+++ b/Swiften/Elements/Form.h
@@ -10,7 +10,7 @@
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/FormField.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/JID/JID.h"
@@ -31,23 +31,23 @@ namespace Swift {
void addField(boost::shared_ptr<FormField> field) { fields_.push_back(field); }
const std::vector<boost::shared_ptr<FormField> >& getFields() const { return fields_; }
- void setTitle(const String& title) { title_ = title; }
- const String& getTitle() { return title_; }
+ void setTitle(const std::string& title) { title_ = title; }
+ const std::string& getTitle() { return title_; }
- void setInstructions(const String& instructions) { instructions_ = instructions; }
- const String& getInstructions() { return instructions_; }
+ void setInstructions(const std::string& instructions) { instructions_ = instructions; }
+ const std::string& getInstructions() { return instructions_; }
Type getType() { return type_; }
void setType(Type type) { type_ = type; }
- String getFormType() const;
+ std::string getFormType() const;
- FormField::ref getField(const String& name) const;
+ FormField::ref getField(const std::string& name) const;
private:
std::vector<boost::shared_ptr<FormField> > fields_;
- String title_;
- String instructions_;
+ std::string title_;
+ std::string instructions_;
Type type_;
};
}
diff --git a/Swiften/Elements/FormField.h b/Swiften/Elements/FormField.h
index 0221dae..f455303 100644
--- a/Swiften/Elements/FormField.h
+++ b/Swiften/Elements/FormField.h
@@ -12,7 +12,7 @@
#include <vector>
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/JID/JID.h"
namespace Swift {
@@ -23,19 +23,19 @@ namespace Swift {
virtual ~FormField() {}
struct Option {
- Option(const String& label, const String& value) : label(label), value(value) {}
- String label;
- String value;
+ Option(const std::string& label, const std::string& value) : label(label), value(value) {}
+ std::string label;
+ std::string value;
};
- void setName(const String& name) { this->name = name; }
- const String& getName() const { return name; }
+ void setName(const std::string& name) { this->name = name; }
+ const std::string& getName() const { return name; }
- void setLabel(const String& label) { this->label = label; }
- const String& getLabel() const { return label; }
+ void setLabel(const std::string& label) { this->label = label; }
+ const std::string& getLabel() const { return label; }
- void setDescription(const String& description) { this->description = description; }
- const String& getDescription() const { return description; }
+ void setDescription(const std::string& description) { this->description = description; }
+ const std::string& getDescription() const { return description; }
void setRequired(bool required) { this->required = required; }
bool getRequired() const { return required; }
@@ -48,11 +48,11 @@ namespace Swift {
return options;
}
- const std::vector<String> getRawValues() const {
+ const std::vector<std::string> getRawValues() const {
return rawValues;
}
- void addRawValue(const String& value) {
+ void addRawValue(const std::string& value) {
rawValues.push_back(value);
}
@@ -60,12 +60,12 @@ namespace Swift {
FormField() : required(false) {}
private:
- String name;
- String label;
- String description;
+ std::string name;
+ std::string label;
+ std::string description;
bool required;
std::vector<Option> options;
- std::vector<String> rawValues;
+ std::vector<std::string> rawValues;
};
template<typename T> class GenericFormField : public FormField {
@@ -102,14 +102,14 @@ namespace Swift {
};
SWIFTEN_DECLARE_FORM_FIELD(Boolean, bool);
- SWIFTEN_DECLARE_FORM_FIELD(Fixed, String);
- SWIFTEN_DECLARE_FORM_FIELD(Hidden, String);
- SWIFTEN_DECLARE_FORM_FIELD(ListSingle, String);
- SWIFTEN_DECLARE_FORM_FIELD(TextMulti, String);
- SWIFTEN_DECLARE_FORM_FIELD(TextPrivate, String);
- SWIFTEN_DECLARE_FORM_FIELD(TextSingle, String);
+ SWIFTEN_DECLARE_FORM_FIELD(Fixed, std::string);
+ SWIFTEN_DECLARE_FORM_FIELD(Hidden, std::string);
+ SWIFTEN_DECLARE_FORM_FIELD(ListSingle, std::string);
+ SWIFTEN_DECLARE_FORM_FIELD(TextMulti, std::string);
+ SWIFTEN_DECLARE_FORM_FIELD(TextPrivate, std::string);
+ SWIFTEN_DECLARE_FORM_FIELD(TextSingle, std::string);
SWIFTEN_DECLARE_FORM_FIELD(JIDSingle, JID);
SWIFTEN_DECLARE_FORM_FIELD(JIDMulti, std::vector<JID>);
- SWIFTEN_DECLARE_FORM_FIELD(ListMulti, std::vector<String>);
- SWIFTEN_DECLARE_FORM_FIELD(Untyped, std::vector<String>);
+ SWIFTEN_DECLARE_FORM_FIELD(ListMulti, std::vector<std::string>);
+ SWIFTEN_DECLARE_FORM_FIELD(Untyped, std::vector<std::string>);
}
diff --git a/Swiften/Elements/IBB.h b/Swiften/Elements/IBB.h
index 727755f..55f2c4f 100644
--- a/Swiften/Elements/IBB.h
+++ b/Swiften/Elements/IBB.h
@@ -8,7 +8,7 @@
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Base/ByteArray.h"
#include "Swiften/Elements/Payload.h"
@@ -27,23 +27,23 @@ namespace Swift {
MessageStanza,
};
- IBB(Action action = Open, const String& streamID = "") : action(action), streamID(streamID), stanzaType(IQStanza), blockSize(-1), sequenceNumber(-1) {
+ IBB(Action action = Open, const std::string& streamID = "") : action(action), streamID(streamID), stanzaType(IQStanza), blockSize(-1), sequenceNumber(-1) {
}
- static IBB::ref createIBBOpen(const String& streamID, int blockSize) {
+ static IBB::ref createIBBOpen(const std::string& streamID, int blockSize) {
IBB::ref result(new IBB(Open, streamID));
result->setBlockSize(blockSize);
return result;
}
- static IBB::ref createIBBData(const String& streamID, int sequenceNumber, const ByteArray& data) {
+ static IBB::ref createIBBData(const std::string& streamID, int sequenceNumber, const ByteArray& data) {
IBB::ref result(new IBB(Data, streamID));
result->setSequenceNumber(sequenceNumber);
result->setData(data);
return result;
}
- static IBB::ref createIBBClose(const String& streamID) {
+ static IBB::ref createIBBClose(const std::string& streamID) {
return IBB::ref(new IBB(Close, streamID));
}
@@ -63,11 +63,11 @@ namespace Swift {
return stanzaType;
}
- void setStreamID(const String& id) {
+ void setStreamID(const std::string& id) {
streamID = id;
}
- const String& getStreamID() const {
+ const std::string& getStreamID() const {
return streamID;
}
@@ -97,7 +97,7 @@ namespace Swift {
private:
Action action;
- String streamID;
+ std::string streamID;
ByteArray data;
StanzaType stanzaType;
int blockSize;
diff --git a/Swiften/Elements/IQ.cpp b/Swiften/Elements/IQ.cpp
index abf32e9..eb62ee4 100644
--- a/Swiften/Elements/IQ.cpp
+++ b/Swiften/Elements/IQ.cpp
@@ -9,7 +9,7 @@
namespace Swift {
boost::shared_ptr<IQ> IQ::createRequest(
- Type type, const JID& to, const String& id, boost::shared_ptr<Payload> payload) {
+ Type type, const JID& to, const std::string& id, boost::shared_ptr<Payload> payload) {
boost::shared_ptr<IQ> iq(new IQ(type));
if (to.isValid()) {
iq->setTo(to);
@@ -21,7 +21,7 @@ boost::shared_ptr<IQ> IQ::createRequest(
return iq;
}
-boost::shared_ptr<IQ> IQ::createResult(const JID& to, const String& id, boost::shared_ptr<Payload> payload) {
+boost::shared_ptr<IQ> IQ::createResult(const JID& to, const std::string& id, boost::shared_ptr<Payload> payload) {
boost::shared_ptr<IQ> iq(new IQ(Result));
iq->setTo(to);
iq->setID(id);
@@ -31,7 +31,7 @@ boost::shared_ptr<IQ> IQ::createResult(const JID& to, const String& id, boost::s
return iq;
}
-boost::shared_ptr<IQ> IQ::createResult(const JID& to, const JID& from, const String& id, boost::shared_ptr<Payload> payload) {
+boost::shared_ptr<IQ> IQ::createResult(const JID& to, const JID& from, const std::string& id, boost::shared_ptr<Payload> payload) {
boost::shared_ptr<IQ> iq(new IQ(Result));
iq->setTo(to);
iq->setFrom(from);
@@ -42,7 +42,7 @@ boost::shared_ptr<IQ> IQ::createResult(const JID& to, const JID& from, const Str
return iq;
}
-boost::shared_ptr<IQ> IQ::createError(const JID& to, const String& id, ErrorPayload::Condition condition, ErrorPayload::Type type) {
+boost::shared_ptr<IQ> IQ::createError(const JID& to, const std::string& id, ErrorPayload::Condition condition, ErrorPayload::Type type) {
boost::shared_ptr<IQ> iq(new IQ(IQ::Error));
iq->setTo(to);
iq->setID(id);
@@ -50,7 +50,7 @@ boost::shared_ptr<IQ> IQ::createError(const JID& to, const String& id, ErrorPayl
return iq;
}
-boost::shared_ptr<IQ> IQ::createError(const JID& to, const JID& from, const String& id, ErrorPayload::Condition condition, ErrorPayload::Type type) {
+boost::shared_ptr<IQ> IQ::createError(const JID& to, const JID& from, const std::string& id, ErrorPayload::Condition condition, ErrorPayload::Type type) {
boost::shared_ptr<IQ> iq(new IQ(IQ::Error));
iq->setTo(to);
iq->setFrom(from);
diff --git a/Swiften/Elements/IQ.h b/Swiften/Elements/IQ.h
index 007dda2..78a8bbd 100644
--- a/Swiften/Elements/IQ.h
+++ b/Swiften/Elements/IQ.h
@@ -26,26 +26,26 @@ namespace Swift {
static boost::shared_ptr<IQ> createRequest(
Type type,
const JID& to,
- const String& id,
+ const std::string& id,
boost::shared_ptr<Payload> payload);
static boost::shared_ptr<IQ> createResult(
const JID& to,
- const String& id,
+ const std::string& id,
boost::shared_ptr<Payload> payload = boost::shared_ptr<Payload>());
static boost::shared_ptr<IQ> createResult(
const JID& to,
const JID& from,
- const String& id,
+ const std::string& id,
boost::shared_ptr<Payload> payload = boost::shared_ptr<Payload>());
static boost::shared_ptr<IQ> createError(
const JID& to,
- const String& id,
+ const std::string& id,
ErrorPayload::Condition condition = ErrorPayload::BadRequest,
ErrorPayload::Type type = ErrorPayload::Cancel);
static boost::shared_ptr<IQ> createError(
const JID& to,
const JID& from,
- const String& id,
+ const std::string& id,
ErrorPayload::Condition condition = ErrorPayload::BadRequest,
ErrorPayload::Type type = ErrorPayload::Cancel);
diff --git a/Swiften/Elements/InBandRegistrationPayload.h b/Swiften/Elements/InBandRegistrationPayload.h
index 1a293ba..e4e1e6f 100644
--- a/Swiften/Elements/InBandRegistrationPayload.h
+++ b/Swiften/Elements/InBandRegistrationPayload.h
@@ -11,7 +11,7 @@
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/Form.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class InBandRegistrationPayload : public Payload {
@@ -39,147 +39,147 @@ namespace Swift {
remove = b;
}
- const boost::optional<String>& getInstructions() const {
+ const boost::optional<std::string>& getInstructions() const {
return instructions;
}
- const boost::optional<String>& getUsername() const {
+ const boost::optional<std::string>& getUsername() const {
return username;
}
- const boost::optional<String>& getNick() const {
+ const boost::optional<std::string>& getNick() const {
return nick;
}
- const boost::optional<String>& getPassword() const {
+ const boost::optional<std::string>& getPassword() const {
return password;
}
- const boost::optional<String>& getName() const {
+ const boost::optional<std::string>& getName() const {
return name;
}
- const boost::optional<String>& getFirst() const {
+ const boost::optional<std::string>& getFirst() const {
return first;
}
- const boost::optional<String>& getLast() const {
+ const boost::optional<std::string>& getLast() const {
return last;
}
- const boost::optional<String>& getEMail() const {
+ const boost::optional<std::string>& getEMail() const {
return email;
}
- const boost::optional<String>& getAddress() const {
+ const boost::optional<std::string>& getAddress() const {
return address;
}
- const boost::optional<String>& getCity() const {
+ const boost::optional<std::string>& getCity() const {
return city;
}
- const boost::optional<String>& getState() const {
+ const boost::optional<std::string>& getState() const {
return state;
}
- const boost::optional<String>& getZip() const {
+ const boost::optional<std::string>& getZip() const {
return zip;
}
- const boost::optional<String>& getPhone() const {
+ const boost::optional<std::string>& getPhone() const {
return phone;
}
- const boost::optional<String>& getURL() const {
+ const boost::optional<std::string>& getURL() const {
return url;
}
- const boost::optional<String>& getDate() const {
+ const boost::optional<std::string>& getDate() const {
return date;
}
- const boost::optional<String>& getMisc() const {
+ const boost::optional<std::string>& getMisc() const {
return misc;
}
- const boost::optional<String>& getText() const {
+ const boost::optional<std::string>& getText() const {
return text;
}
- const boost::optional<String>& getKey() const {
+ const boost::optional<std::string>& getKey() const {
return key;
}
- void setInstructions(const String& v) {
+ void setInstructions(const std::string& v) {
this->instructions = v;
}
- void setUsername(const String& v) {
+ void setUsername(const std::string& v) {
this->username = v;
}
- void setNick(const String& v) {
+ void setNick(const std::string& v) {
this->nick = v;
}
- void setPassword(const String& v) {
+ void setPassword(const std::string& v) {
this->password = v;
}
- void setName(const String& v) {
+ void setName(const std::string& v) {
this->name = v;
}
- void setFirst(const String& v) {
+ void setFirst(const std::string& v) {
this->first = v;
}
- void setLast(const String& v) {
+ void setLast(const std::string& v) {
this->last = v;
}
- void setEMail(const String& v) {
+ void setEMail(const std::string& v) {
this->email = v;
}
- void setAddress(const String& v) {
+ void setAddress(const std::string& v) {
this->address = v;
}
- void setCity(const String& v) {
+ void setCity(const std::string& v) {
this->city = v;
}
- void setState(const String& v) {
+ void setState(const std::string& v) {
this->state = v;
}
- void setZip(const String& v) {
+ void setZip(const std::string& v) {
this->zip = v;
}
- void setPhone(const String& v) {
+ void setPhone(const std::string& v) {
this->phone = v;
}
- void setURL(const String& v) {
+ void setURL(const std::string& v) {
this->url = v;
}
- void setDate(const String& v) {
+ void setDate(const std::string& v) {
this->date = v;
}
- void setMisc(const String& v) {
+ void setMisc(const std::string& v) {
this->misc = v;
}
- void setText(const String& v) {
+ void setText(const std::string& v) {
this->text = v;
}
- void setKey(const String& v) {
+ void setKey(const std::string& v) {
this->key = v;
}
@@ -187,23 +187,23 @@ namespace Swift {
Form::ref form;
bool registered;
bool remove;
- boost::optional<String> instructions;
- boost::optional<String> username;
- boost::optional<String> nick;
- boost::optional<String> password;
- boost::optional<String> name;
- boost::optional<String> first;
- boost::optional<String> last;
- boost::optional<String> email;
- boost::optional<String> address;
- boost::optional<String> city;
- boost::optional<String> state;
- boost::optional<String> zip;
- boost::optional<String> phone;
- boost::optional<String> url;
- boost::optional<String> date;
- boost::optional<String> misc;
- boost::optional<String> text;
- boost::optional<String> key;
+ boost::optional<std::string> instructions;
+ boost::optional<std::string> username;
+ boost::optional<std::string> nick;
+ boost::optional<std::string> password;
+ boost::optional<std::string> name;
+ boost::optional<std::string> first;
+ boost::optional<std::string> last;
+ boost::optional<std::string> email;
+ boost::optional<std::string> address;
+ boost::optional<std::string> city;
+ boost::optional<std::string> state;
+ boost::optional<std::string> zip;
+ boost::optional<std::string> phone;
+ boost::optional<std::string> url;
+ boost::optional<std::string> date;
+ boost::optional<std::string> misc;
+ boost::optional<std::string> text;
+ boost::optional<std::string> key;
};
}
diff --git a/Swiften/Elements/JingleContent.h b/Swiften/Elements/JingleContent.h
index bf419aa..4ae908b 100644
--- a/Swiften/Elements/JingleContent.h
+++ b/Swiften/Elements/JingleContent.h
@@ -9,7 +9,7 @@
#include <vector>
#include <boost/optional.hpp>
-#include <Swiften/Base/String.h>
+#include <string>
#include <Swiften/JID/JID.h>
#include <Swiften/Elements/Payload.h>
#include <Swiften/Elements/JingleDescription.h>
@@ -37,7 +37,7 @@ namespace Swift {
this->creator = creator;
}
- void setName(const String& name) {
+ void setName(const std::string& name) {
this->name = name;
}
@@ -81,7 +81,7 @@ namespace Swift {
private:
Creator creator;
- String name;
+ std::string name;
//Senders senders;
std::vector<JingleDescription::ref> descriptions;
std::vector<JingleTransport::ref> transports;
diff --git a/Swiften/Elements/JingleIBBTransport.h b/Swiften/Elements/JingleIBBTransport.h
index ca3ecc8..faa5af3 100644
--- a/Swiften/Elements/JingleIBBTransport.h
+++ b/Swiften/Elements/JingleIBBTransport.h
@@ -6,7 +6,7 @@
#pragma once
-#include <Swiften/Base/String.h>
+#include <string>
#include <Swiften/Elements/JingleTransport.h>
namespace Swift {
@@ -25,11 +25,11 @@ namespace Swift {
return stanzaType;
}
- void setSessionID(const String& id) {
+ void setSessionID(const std::string& id) {
sessionID = id;
}
- const String& getSessionID() const {
+ const std::string& getSessionID() const {
return sessionID;
}
@@ -42,7 +42,7 @@ namespace Swift {
}
private:
- String sessionID;
+ std::string sessionID;
int blockSize;
StanzaType stanzaType;
};
diff --git a/Swiften/Elements/JinglePayload.h b/Swiften/Elements/JinglePayload.h
index 66b6d43..59d3c99 100644
--- a/Swiften/Elements/JinglePayload.h
+++ b/Swiften/Elements/JinglePayload.h
@@ -9,7 +9,7 @@
#include <vector>
#include <boost/optional.hpp>
-#include <Swiften/Base/String.h>
+#include <string>
#include <Swiften/JID/JID.h>
#include <Swiften/Elements/Payload.h>
#include <Swiften/Elements/JingleContent.h>
@@ -40,9 +40,9 @@ namespace Swift {
UnsupportedTransports
};
- Reason(Type type, const String& text = "") : type(type), text(text) {}
+ Reason(Type type, const std::string& text = "") : type(type), text(text) {}
Type type;
- String text;
+ std::string text;
};
enum Action {
@@ -63,7 +63,7 @@ namespace Swift {
TransportReplace
};
- JinglePayload(Action action, const String& sessionID) : action(action), sessionID(sessionID) {
+ JinglePayload(Action action, const std::string& sessionID) : action(action), sessionID(sessionID) {
}
void setAction(Action action) {
@@ -90,11 +90,11 @@ namespace Swift {
return responder;
}
- void setSessionID(const String& id) {
+ void setSessionID(const std::string& id) {
sessionID = id;
}
- const String& getSessionID() const {
+ const std::string& getSessionID() const {
return sessionID;
}
@@ -118,7 +118,7 @@ namespace Swift {
Action action;
JID initiator;
JID responder;
- String sessionID;
+ std::string sessionID;
std::vector<JingleContent::ref> contents;
boost::optional<Reason> reason;
};
diff --git a/Swiften/Elements/MUCOccupant.cpp b/Swiften/Elements/MUCOccupant.cpp
index 0d3773e..a5d8f0e 100644
--- a/Swiften/Elements/MUCOccupant.cpp
+++ b/Swiften/Elements/MUCOccupant.cpp
@@ -8,7 +8,7 @@
namespace Swift {
-MUCOccupant::MUCOccupant(const String &nick, Role role, Affiliation affiliation) : nick_(nick), role_(role), affiliation_(affiliation) {
+MUCOccupant::MUCOccupant(const std::string &nick, Role role, Affiliation affiliation) : nick_(nick), role_(role), affiliation_(affiliation) {
}
MUCOccupant::~MUCOccupant() {
@@ -18,7 +18,7 @@ MUCOccupant::MUCOccupant(const MUCOccupant& other) : nick_(other.getNick()), rol
}
-String MUCOccupant::getNick() const {
+std::string MUCOccupant::getNick() const {
return nick_;
}
@@ -34,7 +34,7 @@ void MUCOccupant::setRealJID(const JID& realJID) {
realJID_ = realJID;
}
-void MUCOccupant::setNick(const String& nick) {
+void MUCOccupant::setNick(const std::string& nick) {
nick_ = nick;
}
diff --git a/Swiften/Elements/MUCOccupant.h b/Swiften/Elements/MUCOccupant.h
index 96ac5ad..b3ae4aa 100644
--- a/Swiften/Elements/MUCOccupant.h
+++ b/Swiften/Elements/MUCOccupant.h
@@ -8,7 +8,7 @@
#include <boost/optional.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/JID/JID.h"
namespace Swift {
@@ -19,19 +19,19 @@ namespace Swift {
enum Role {Moderator, Participant, Visitor, NoRole};
enum Affiliation {Owner, Admin, Member, Outcast, NoAffiliation};
- MUCOccupant(const String &nick, Role role, Affiliation affiliation);
+ MUCOccupant(const std::string &nick, Role role, Affiliation affiliation);
MUCOccupant(const MUCOccupant& other);
~MUCOccupant();
- String getNick() const;
+ std::string getNick() const;
Role getRole() const;
Affiliation getAffiliation() const;
boost::optional<JID> getRealJID() const;
void setRealJID(const JID& jid);
- void setNick(const String& nick);
+ void setNick(const std::string& nick);
private:
- String nick_;
+ std::string nick_;
Role role_;
Affiliation affiliation_;
boost::optional<JID> realJID_;
diff --git a/Swiften/Elements/MUCPayload.h b/Swiften/Elements/MUCPayload.h
index b8210e1..c372360 100644
--- a/Swiften/Elements/MUCPayload.h
+++ b/Swiften/Elements/MUCPayload.h
@@ -10,7 +10,7 @@
#include <boost/date_time/posix_time/posix_time.hpp>
#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
diff --git a/Swiften/Elements/MUCUserPayload.h b/Swiften/Elements/MUCUserPayload.h
index 2364b6c..fb6d4c4 100644
--- a/Swiften/Elements/MUCUserPayload.h
+++ b/Swiften/Elements/MUCUserPayload.h
@@ -8,9 +8,10 @@
#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
+#include <string>
+#include <vector>
#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/MUCOccupant.h"
@@ -22,7 +23,7 @@ namespace Swift {
struct Item {
Item(MUCOccupant::Affiliation affiliation = MUCOccupant::NoAffiliation, MUCOccupant::Role role = MUCOccupant::NoRole) : affiliation(affiliation), role(role) {}
boost::optional<JID> realJID;
- boost::optional<String> nick;
+ boost::optional<std::string> nick;
MUCOccupant::Affiliation affiliation;
MUCOccupant::Role role;
};
diff --git a/Swiften/Elements/Message.h b/Swiften/Elements/Message.h
index ea03299..a553eb3 100644
--- a/Swiften/Elements/Message.h
+++ b/Swiften/Elements/Message.h
@@ -9,7 +9,7 @@
#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Body.h"
#include "Swiften/Elements/Subject.h"
#include "Swiften/Elements/ErrorPayload.h"
@@ -24,7 +24,7 @@ namespace Swift {
Message() : type_(Chat) { }
- String getSubject() const {
+ std::string getSubject() const {
boost::shared_ptr<Subject> subject(getPayload<Subject>());
if (subject) {
return subject->getText();
@@ -32,11 +32,11 @@ namespace Swift {
return "";
}
- void setSubject(const String& subject) {
+ void setSubject(const std::string& subject) {
updatePayload(boost::shared_ptr<Subject>(new Subject(subject)));
}
- String getBody() const {
+ std::string getBody() const {
boost::shared_ptr<Body> body(getPayload<Body>());
if (body) {
return body->getText();
@@ -44,7 +44,7 @@ namespace Swift {
return "";
}
- void setBody(const String& body) {
+ void setBody(const std::string& body) {
updatePayload(boost::shared_ptr<Body>(new Body(body)));
}
diff --git a/Swiften/Elements/Nickname.h b/Swiften/Elements/Nickname.h
index 1a8d648..540f6da 100644
--- a/Swiften/Elements/Nickname.h
+++ b/Swiften/Elements/Nickname.h
@@ -7,23 +7,23 @@
#pragma once
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class Nickname : public Payload {
public:
- Nickname(const String& nickname = "") : nickname(nickname) {
+ Nickname(const std::string& nickname = "") : nickname(nickname) {
}
- void setNickname(const String& nickname) {
+ void setNickname(const std::string& nickname) {
this->nickname = nickname;
}
- const String& getNickname() const {
+ const std::string& getNickname() const {
return nickname;
}
private:
- String nickname;
+ std::string nickname;
};
}
diff --git a/Swiften/Elements/Presence.h b/Swiften/Elements/Presence.h
index 642262c..7f957ba 100644
--- a/Swiften/Elements/Presence.h
+++ b/Swiften/Elements/Presence.h
@@ -20,7 +20,7 @@ namespace Swift {
enum Type { Available, Error, Probe, Subscribe, Subscribed, Unavailable, Unsubscribe, Unsubscribed };
Presence() : type_(Available) /*, showType_(Online)*/ {}
- Presence(const String& status) : type_(Available) {
+ Presence(const std::string& status) : type_(Available) {
setStatus(status);
}
@@ -28,7 +28,7 @@ namespace Swift {
return ref(new Presence());
}
- static ref create(const String& status) {
+ static ref create(const std::string& status) {
return ref(new Presence(status));
}
@@ -51,7 +51,7 @@ namespace Swift {
updatePayload(boost::shared_ptr<StatusShow>(new StatusShow(show)));
}
- String getStatus() const {
+ std::string getStatus() const {
boost::shared_ptr<Status> status(getPayload<Status>());
if (status) {
return status->getText();
@@ -59,7 +59,7 @@ namespace Swift {
return "";
}
- void setStatus(const String& status) {
+ void setStatus(const std::string& status) {
updatePayload(boost::shared_ptr<Status>(new Status(status)));
}
diff --git a/Swiften/Elements/ProtocolHeader.h b/Swiften/Elements/ProtocolHeader.h
index 36ece34..841f7a0 100644
--- a/Swiften/Elements/ProtocolHeader.h
+++ b/Swiften/Elements/ProtocolHeader.h
@@ -6,37 +6,37 @@
#pragma once
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class ProtocolHeader {
public:
ProtocolHeader() : version("1.0") {}
- const String& getTo() const { return to; }
- void setTo(const String& a) {
+ const std::string& getTo() const { return to; }
+ void setTo(const std::string& a) {
to = a;
}
- const String& getFrom() const { return from; }
- void setFrom(const String& a) {
+ const std::string& getFrom() const { return from; }
+ void setFrom(const std::string& a) {
from = a;
}
- const String& getVersion() const { return version; }
- void setVersion(const String& a) {
+ const std::string& getVersion() const { return version; }
+ void setVersion(const std::string& a) {
version = a;
}
- const String& getID() const { return id; }
- void setID(const String& a) {
+ const std::string& getID() const { return id; }
+ void setID(const std::string& a) {
id = a;
}
private:
- String to;
- String from;
- String id;
- String version;
+ std::string to;
+ std::string from;
+ std::string id;
+ std::string version;
};
}
diff --git a/Swiften/Elements/RawXMLPayload.h b/Swiften/Elements/RawXMLPayload.h
index 0a381ac..b042b95 100644
--- a/Swiften/Elements/RawXMLPayload.h
+++ b/Swiften/Elements/RawXMLPayload.h
@@ -6,7 +6,7 @@
#pragma once
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
@@ -14,15 +14,15 @@ namespace Swift {
public:
RawXMLPayload() {}
- void setRawXML(const String& data) {
+ void setRawXML(const std::string& data) {
rawXML_ = data;
}
- const String& getRawXML() const {
+ const std::string& getRawXML() const {
return rawXML_;
}
private:
- String rawXML_;
+ std::string rawXML_;
};
}
diff --git a/Swiften/Elements/ResourceBind.h b/Swiften/Elements/ResourceBind.h
index c13ac69..3569eb3 100644
--- a/Swiften/Elements/ResourceBind.h
+++ b/Swiften/Elements/ResourceBind.h
@@ -7,7 +7,7 @@
#ifndef SWIFTEN_ResourceBind_H
#define SWIFTEN_ResourceBind_H
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
#include "Swiften/JID/JID.h"
@@ -25,17 +25,17 @@ namespace Swift {
return jid_;
}
- void setResource(const String& resource) {
+ void setResource(const std::string& resource) {
resource_ = resource;
}
- const String& getResource() const {
+ const std::string& getResource() const {
return resource_;
}
private:
JID jid_;
- String resource_;
+ std::string resource_;
};
}
diff --git a/Swiften/Elements/RosterItemPayload.h b/Swiften/Elements/RosterItemPayload.h
index 84b2887..b8a1b10 100644
--- a/Swiften/Elements/RosterItemPayload.h
+++ b/Swiften/Elements/RosterItemPayload.h
@@ -10,7 +10,7 @@
#include <vector>
#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class RosterItemPayload
@@ -19,36 +19,36 @@ namespace Swift {
enum Subscription { None, To, From, Both, Remove };
RosterItemPayload() : subscription_(None), ask_(false) {}
- RosterItemPayload(const JID& jid, const String& name, Subscription subscription) : jid_(jid), name_(name), subscription_(subscription), ask_(false) { }
+ RosterItemPayload(const JID& jid, const std::string& name, Subscription subscription) : jid_(jid), name_(name), subscription_(subscription), ask_(false) { }
void setJID(const JID& jid) { jid_ = jid; }
const JID& getJID() const { return jid_; }
- void setName(const String& name) { name_ = name; }
- const String& getName() const { return name_; }
+ void setName(const std::string& name) { name_ = name; }
+ const std::string& getName() const { return name_; }
void setSubscription(Subscription subscription) { subscription_ = subscription; }
const Subscription& getSubscription() const { return subscription_; }
- void addGroup(const String& group) { groups_.push_back(group); }
- void setGroups(const std::vector<String>& groups) { groups_ = groups; }
- const std::vector<String>& getGroups() const { return groups_; }
+ void addGroup(const std::string& group) { groups_.push_back(group); }
+ void setGroups(const std::vector<std::string>& groups) { groups_ = groups; }
+ const std::vector<std::string>& getGroups() const { return groups_; }
void setSubscriptionRequested() { ask_ = true; }
bool getSubscriptionRequested() const { return ask_; }
- const String& getUnknownContent() const { return unknownContent_; }
- void addUnknownContent(const String& c) {
+ const std::string& getUnknownContent() const { return unknownContent_; }
+ void addUnknownContent(const std::string& c) {
unknownContent_ += c;
}
private:
JID jid_;
- String name_;
+ std::string name_;
Subscription subscription_;
- std::vector<String> groups_;
+ std::vector<std::string> groups_;
bool ask_;
- String unknownContent_;
+ std::string unknownContent_;
};
}
diff --git a/Swiften/Elements/SearchPayload.h b/Swiften/Elements/SearchPayload.h
index 61b8547..3a484cc 100644
--- a/Swiften/Elements/SearchPayload.h
+++ b/Swiften/Elements/SearchPayload.h
@@ -11,7 +11,7 @@
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/Form.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
/**
@@ -22,10 +22,10 @@ namespace Swift {
typedef boost::shared_ptr<SearchPayload> ref;
struct Item {
- String first;
- String last;
- String nick;
- String email;
+ std::string first;
+ std::string last;
+ std::string nick;
+ std::string email;
JID jid;
};
@@ -34,43 +34,43 @@ namespace Swift {
Form::ref getForm() const { return form; }
void setForm(Form::ref f) { form = f; }
- const boost::optional<String>& getInstructions() const {
+ const boost::optional<std::string>& getInstructions() const {
return instructions;
}
- const boost::optional<String>& getNick() const {
+ const boost::optional<std::string>& getNick() const {
return nick;
}
- const boost::optional<String>& getFirst() const {
+ const boost::optional<std::string>& getFirst() const {
return first;
}
- const boost::optional<String>& getLast() const {
+ const boost::optional<std::string>& getLast() const {
return last;
}
- const boost::optional<String>& getEMail() const {
+ const boost::optional<std::string>& getEMail() const {
return email;
}
- void setInstructions(const String& v) {
+ void setInstructions(const std::string& v) {
this->instructions = v;
}
- void setNick(const String& v) {
+ void setNick(const std::string& v) {
this->nick = v;
}
- void setFirst(const String& v) {
+ void setFirst(const std::string& v) {
this->first = v;
}
- void setLast(const String& v) {
+ void setLast(const std::string& v) {
this->last = v;
}
- void setEMail(const String& v) {
+ void setEMail(const std::string& v) {
this->email = v;
}
@@ -84,11 +84,11 @@ namespace Swift {
private:
Form::ref form;
- boost::optional<String> instructions;
- boost::optional<String> nick;
- boost::optional<String> first;
- boost::optional<String> last;
- boost::optional<String> email;
+ boost::optional<std::string> instructions;
+ boost::optional<std::string> nick;
+ boost::optional<std::string> first;
+ boost::optional<std::string> last;
+ boost::optional<std::string> email;
std::vector<Item> items;
};
}
diff --git a/Swiften/Elements/SecurityLabel.h b/Swiften/Elements/SecurityLabel.h
index 978d14f..ca38e32 100644
--- a/Swiften/Elements/SecurityLabel.h
+++ b/Swiften/Elements/SecurityLabel.h
@@ -9,7 +9,7 @@
#include <vector>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
@@ -17,46 +17,46 @@ namespace Swift {
public:
SecurityLabel() {}
- const String& getDisplayMarking() const { return displayMarking_; }
+ const std::string& getDisplayMarking() const { return displayMarking_; }
- void setDisplayMarking(const String& displayMarking) {
+ void setDisplayMarking(const std::string& displayMarking) {
displayMarking_ = displayMarking;
}
- const String& getForegroundColor() const {
+ const std::string& getForegroundColor() const {
return foregroundColor_;
}
- void setForegroundColor(const String& foregroundColor) {
+ void setForegroundColor(const std::string& foregroundColor) {
foregroundColor_ = foregroundColor;
}
- const String& getBackgroundColor() const {
+ const std::string& getBackgroundColor() const {
return backgroundColor_;
}
- void setBackgroundColor(const String& backgroundColor) {
+ void setBackgroundColor(const std::string& backgroundColor) {
backgroundColor_ = backgroundColor;
}
- const String& getLabel() const { return label_; }
+ const std::string& getLabel() const { return label_; }
- void setLabel(const String& label) {
+ void setLabel(const std::string& label) {
label_ = label;
}
- const std::vector<String>& getEquivalentLabels() const { return equivalentLabels_; }
+ const std::vector<std::string>& getEquivalentLabels() const { return equivalentLabels_; }
- void addEquivalentLabel(const String& label) {
+ void addEquivalentLabel(const std::string& label) {
equivalentLabels_.push_back(label);
}
private:
- String displayMarking_;
- String foregroundColor_;
- String backgroundColor_;
- String label_;
- std::vector<String> equivalentLabels_;
+ std::string displayMarking_;
+ std::string foregroundColor_;
+ std::string backgroundColor_;
+ std::string label_;
+ std::vector<std::string> equivalentLabels_;
};
}
diff --git a/Swiften/Elements/SecurityLabelsCatalog.h b/Swiften/Elements/SecurityLabelsCatalog.h
index e0c7bcb..1c13fdf 100644
--- a/Swiften/Elements/SecurityLabelsCatalog.h
+++ b/Swiften/Elements/SecurityLabelsCatalog.h
@@ -10,7 +10,7 @@
#include <vector>
#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
#include "Swiften/Elements/SecurityLabel.h"
@@ -35,26 +35,26 @@ namespace Swift {
to_ = to;
}
- const String& getName() const {
+ const std::string& getName() const {
return name_;
}
- void setName(const String& name) {
+ void setName(const std::string& name) {
name_ = name;
}
- const String& getDescription() const {
+ const std::string& getDescription() const {
return description_;
}
- void setDescription(const String& description) {
+ void setDescription(const std::string& description) {
description_ = description;
}
private:
JID to_;
- String name_;
- String description_;
+ std::string name_;
+ std::string description_;
std::vector<SecurityLabel> labels_;
};
}
diff --git a/Swiften/Elements/SoftwareVersion.h b/Swiften/Elements/SoftwareVersion.h
index 1a33f2c..26d49b1 100644
--- a/Swiften/Elements/SoftwareVersion.h
+++ b/Swiften/Elements/SoftwareVersion.h
@@ -8,45 +8,45 @@
#define SWIFTEN_SoftwareVersion_H
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class SoftwareVersion : public Payload {
public:
SoftwareVersion(
- const String& name = "",
- const String& version = "",
- const String& os = "") :
+ const std::string& name = "",
+ const std::string& version = "",
+ const std::string& os = "") :
name_(name), version_(version), os_(os) {}
- const String& getName() const {
+ const std::string& getName() const {
return name_;
}
- void setName(const String& name) {
+ void setName(const std::string& name) {
name_ = name;
}
- const String& getVersion() const {
+ const std::string& getVersion() const {
return version_;
}
- void setVersion(const String& version) {
+ void setVersion(const std::string& version) {
version_ = version;
}
- const String& getOS() const {
+ const std::string& getOS() const {
return os_;
}
- void setOS(const String& os) {
+ void setOS(const std::string& os) {
os_ = os;
}
private:
- String name_;
- String version_;
- String os_;
+ std::string name_;
+ std::string version_;
+ std::string os_;
};
}
diff --git a/Swiften/Elements/Stanza.h b/Swiften/Elements/Stanza.h
index 0f07223..9b934e4 100644
--- a/Swiften/Elements/Stanza.h
+++ b/Swiften/Elements/Stanza.h
@@ -13,7 +13,7 @@
#include "Swiften/Elements/Element.h"
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Base/foreach.h"
#include "Swiften/JID/JID.h"
@@ -66,8 +66,8 @@ namespace Swift {
const JID& getTo() const { return to_; }
void setTo(const JID& to) { to_ = to; }
- const String& getID() const { return id_; }
- void setID(const String& id) { id_ = id; }
+ const std::string& getID() const { return id_; }
+ void setID(const std::string& id) { id_ = id; }
boost::optional<boost::posix_time::ptime> getTimestamp() const;
@@ -75,7 +75,7 @@ namespace Swift {
boost::optional<boost::posix_time::ptime> getTimestampFrom(const JID& jid) const;
private:
- String id_;
+ std::string id_;
JID from_;
JID to_;
diff --git a/Swiften/Elements/StartSession.h b/Swiften/Elements/StartSession.h
index 921f1e8..0586f40 100644
--- a/Swiften/Elements/StartSession.h
+++ b/Swiften/Elements/StartSession.h
@@ -7,7 +7,7 @@
#ifndef SWIFTEN_StartSession_H
#define SWIFTEN_StartSession_H
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
diff --git a/Swiften/Elements/Status.h b/Swiften/Elements/Status.h
index e0e3951..3ef6401 100644
--- a/Swiften/Elements/Status.h
+++ b/Swiften/Elements/Status.h
@@ -8,24 +8,24 @@
#define SWIFTEN_Status_H
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class Status : public Payload {
public:
- Status(const String& text = "") : text_(text) {
+ Status(const std::string& text = "") : text_(text) {
}
- void setText(const String& text) {
+ void setText(const std::string& text) {
text_ = text;
}
- const String& getText() const {
+ const std::string& getText() const {
return text_;
}
private:
- String text_;
+ std::string text_;
};
}
diff --git a/Swiften/Elements/StatusShow.h b/Swiften/Elements/StatusShow.h
index 1bdae96..f579ace 100644
--- a/Swiften/Elements/StatusShow.h
+++ b/Swiften/Elements/StatusShow.h
@@ -8,7 +8,7 @@
#define SWIFTEN_StatusShow_H
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class StatusShow : public Payload {
@@ -26,7 +26,7 @@ namespace Swift {
return type_;
}
- static String typeToFriendlyName(Type type) {
+ static std::string typeToFriendlyName(Type type) {
switch (type) {
case Online: return "Available";
case FFC: return "Available";
diff --git a/Swiften/Elements/Storage.h b/Swiften/Elements/Storage.h
index 447ca2e..a2f244c 100644
--- a/Swiften/Elements/Storage.h
+++ b/Swiften/Elements/Storage.h
@@ -9,7 +9,7 @@
#include <vector>
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/JID/JID.h"
namespace Swift {
@@ -18,18 +18,18 @@ namespace Swift {
struct Room {
Room() : autoJoin(false) {}
- String name;
+ std::string name;
JID jid;
bool autoJoin;
- String nick;
- String password;
+ std::string nick;
+ std::string password;
};
struct URL {
URL() {}
- String name;
- String url;
+ std::string name;
+ std::string url;
};
Storage() {
diff --git a/Swiften/Elements/StreamError.h b/Swiften/Elements/StreamError.h
index 4311055..0d0551c 100644
--- a/Swiften/Elements/StreamError.h
+++ b/Swiften/Elements/StreamError.h
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
#include <Swiften/Elements/Element.h>
-#include <Swiften/Base/String.h>
+#include <string>
namespace Swift {
class StreamError : public Element {
@@ -44,7 +44,7 @@ namespace Swift {
UnsupportedVersion,
};
- StreamError(Type type = UndefinedCondition, const String& text = String()) : type_(type), text_(text) { }
+ StreamError(Type type = UndefinedCondition, const std::string& text = std::string()) : type_(type), text_(text) { }
Type getType() const {
return type_;
@@ -54,16 +54,16 @@ namespace Swift {
type_ = type;
}
- void setText(const String& text) {
+ void setText(const std::string& text) {
text_ = text;
}
- const String& getText() const {
+ const std::string& getText() const {
return text_;
}
private:
Type type_;
- String text_;
+ std::string text_;
};
}
diff --git a/Swiften/Elements/StreamFeatures.h b/Swiften/Elements/StreamFeatures.h
index 32446ce..fbc0bb8 100644
--- a/Swiften/Elements/StreamFeatures.h
+++ b/Swiften/Elements/StreamFeatures.h
@@ -9,7 +9,7 @@
#include <vector>
#include <algorithm>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Element.h"
namespace Swift {
@@ -43,27 +43,27 @@ namespace Swift {
return hasResourceBind_;
}
- const std::vector<String>& getCompressionMethods() const {
+ const std::vector<std::string>& getCompressionMethods() const {
return compressionMethods_;
}
- void addCompressionMethod(const String& mechanism) {
+ void addCompressionMethod(const std::string& mechanism) {
compressionMethods_.push_back(mechanism);
}
- bool hasCompressionMethod(const String& mechanism) const {
+ bool hasCompressionMethod(const std::string& mechanism) const {
return std::find(compressionMethods_.begin(), compressionMethods_.end(), mechanism) != compressionMethods_.end();
}
- const std::vector<String>& getAuthenticationMechanisms() const {
+ const std::vector<std::string>& getAuthenticationMechanisms() const {
return authenticationMechanisms_;
}
- void addAuthenticationMechanism(const String& mechanism) {
+ void addAuthenticationMechanism(const std::string& mechanism) {
authenticationMechanisms_.push_back(mechanism);
}
- bool hasAuthenticationMechanism(const String& mechanism) const {
+ bool hasAuthenticationMechanism(const std::string& mechanism) const {
return std::find(authenticationMechanisms_.begin(), authenticationMechanisms_.end(), mechanism) != authenticationMechanisms_.end();
}
@@ -81,8 +81,8 @@ namespace Swift {
private:
bool hasStartTLS_;
- std::vector<String> compressionMethods_;
- std::vector<String> authenticationMechanisms_;
+ std::vector<std::string> compressionMethods_;
+ std::vector<std::string> authenticationMechanisms_;
bool hasResourceBind_;
bool hasSession_;
bool hasStreamManagement_;
diff --git a/Swiften/Elements/StreamInitiation.h b/Swiften/Elements/StreamInitiation.h
index 16dfd4d..6217cbb 100644
--- a/Swiften/Elements/StreamInitiation.h
+++ b/Swiften/Elements/StreamInitiation.h
@@ -10,7 +10,7 @@
#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
#include <Swiften/Elements/StreamInitiationFileInfo.h>
@@ -21,11 +21,11 @@ namespace Swift {
StreamInitiation() : isFileTransfer(true) {}
- const String& getID() const {
+ const std::string& getID() const {
return id;
}
- void setID(const String& id) {
+ void setID(const std::string& id) {
this->id = id;
}
@@ -37,19 +37,19 @@ namespace Swift {
fileInfo = info;
}
- const std::vector<String>& getProvidedMethods() const {
+ const std::vector<std::string>& getProvidedMethods() const {
return providedMethods;
}
- void addProvidedMethod(const String& method) {
+ void addProvidedMethod(const std::string& method) {
providedMethods.push_back(method);
}
- void setRequestedMethod(const String& method) {
+ void setRequestedMethod(const std::string& method) {
requestedMethod = method;
}
- const String& getRequestedMethod() const {
+ const std::string& getRequestedMethod() const {
return requestedMethod;
}
@@ -63,9 +63,9 @@ namespace Swift {
private:
bool isFileTransfer;
- String id;
+ std::string id;
boost::optional<StreamInitiationFileInfo> fileInfo;
- std::vector<String> providedMethods;
- String requestedMethod;
+ std::vector<std::string> providedMethods;
+ std::string requestedMethod;
};
}
diff --git a/Swiften/Elements/StreamInitiationFileInfo.h b/Swiften/Elements/StreamInitiationFileInfo.h
index 15b5a66..92b9824 100644
--- a/Swiften/Elements/StreamInitiationFileInfo.h
+++ b/Swiften/Elements/StreamInitiationFileInfo.h
@@ -6,14 +6,14 @@
#pragma once
-#include <Swiften/Base/String.h>
+#include <string>
namespace Swift {
struct StreamInitiationFileInfo {
- StreamInitiationFileInfo(const String& name = "", const String& description = "", int size = -1) : name(name), description(description), size(size) {}
+ StreamInitiationFileInfo(const std::string& name = "", const std::string& description = "", int size = -1) : name(name), description(description), size(size) {}
- String name;
- String description;
+ std::string name;
+ std::string description;
int size;
};
}
diff --git a/Swiften/Elements/Subject.h b/Swiften/Elements/Subject.h
index 745ddb5..6b5a916 100644
--- a/Swiften/Elements/Subject.h
+++ b/Swiften/Elements/Subject.h
@@ -7,23 +7,23 @@
#pragma once
#include "Swiften/Elements/Payload.h"
-#include "Swiften/Base/String.h"
+#include <string>
namespace Swift {
class Subject : public Payload {
public:
- Subject(const String& text = "") : text_(text) {
+ Subject(const std::string& text = "") : text_(text) {
}
- void setText(const String& text) {
+ void setText(const std::string& text) {
text_ = text;
}
- const String& getText() const {
+ const std::string& getText() const {
return text_;
}
private:
- String text_;
+ std::string text_;
};
}
diff --git a/Swiften/Elements/UnitTest/FormTest.cpp b/Swiften/Elements/UnitTest/FormTest.cpp
index 715111b..de92d70 100644
--- a/Swiften/Elements/UnitTest/FormTest.cpp
+++ b/Swiften/Elements/UnitTest/FormTest.cpp
@@ -31,7 +31,7 @@ class FormTest : public CppUnit::TestFixture {
form.addField(FixedFormField::create("Bar"));
- CPPUNIT_ASSERT_EQUAL(String("jabber:bot"), form.getFormType());
+ CPPUNIT_ASSERT_EQUAL(std::string("jabber:bot"), form.getFormType());
}
void testGetFormType_InvalidFormType() {
@@ -41,7 +41,7 @@ class FormTest : public CppUnit::TestFixture {
field->setName("FORM_TYPE");
form.addField(field);
- CPPUNIT_ASSERT_EQUAL(String(""), form.getFormType());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), form.getFormType());
}
void testGetFormType_NoFormType() {
@@ -49,7 +49,7 @@ class FormTest : public CppUnit::TestFixture {
form.addField(FixedFormField::create("Foo"));
- CPPUNIT_ASSERT_EQUAL(String(""), form.getFormType());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), form.getFormType());
}
};
diff --git a/Swiften/Elements/UnitTest/IQTest.cpp b/Swiften/Elements/UnitTest/IQTest.cpp
index 532cec0..c170d61 100644
--- a/Swiften/Elements/UnitTest/IQTest.cpp
+++ b/Swiften/Elements/UnitTest/IQTest.cpp
@@ -29,7 +29,7 @@ class IQTest : public CppUnit::TestFixture
boost::shared_ptr<IQ> iq(IQ::createResult(JID("foo@bar/fum"), "myid", payload));
CPPUNIT_ASSERT_EQUAL(JID("foo@bar/fum"), iq->getTo());
- CPPUNIT_ASSERT_EQUAL(String("myid"), iq->getID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), iq->getID());
CPPUNIT_ASSERT(iq->getPayload<SoftwareVersion>());
CPPUNIT_ASSERT(payload == iq->getPayload<SoftwareVersion>());
}
@@ -38,7 +38,7 @@ class IQTest : public CppUnit::TestFixture
boost::shared_ptr<IQ> iq(IQ::createResult(JID("foo@bar/fum"), "myid"));
CPPUNIT_ASSERT_EQUAL(JID("foo@bar/fum"), iq->getTo());
- CPPUNIT_ASSERT_EQUAL(String("myid"), iq->getID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), iq->getID());
CPPUNIT_ASSERT(!iq->getPayload<SoftwareVersion>());
}
@@ -46,7 +46,7 @@ class IQTest : public CppUnit::TestFixture
boost::shared_ptr<IQ> iq(IQ::createError(JID("foo@bar/fum"), "myid", ErrorPayload::BadRequest, ErrorPayload::Modify));
CPPUNIT_ASSERT_EQUAL(JID("foo@bar/fum"), iq->getTo());
- CPPUNIT_ASSERT_EQUAL(String("myid"), iq->getID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), iq->getID());
boost::shared_ptr<ErrorPayload> error(iq->getPayload<ErrorPayload>());
CPPUNIT_ASSERT(error);
CPPUNIT_ASSERT_EQUAL(ErrorPayload::BadRequest, error->getCondition());
diff --git a/Swiften/Elements/UnitTest/StanzaTest.cpp b/Swiften/Elements/UnitTest/StanzaTest.cpp
index 27b0f09..4020f8b 100644
--- a/Swiften/Elements/UnitTest/StanzaTest.cpp
+++ b/Swiften/Elements/UnitTest/StanzaTest.cpp
@@ -43,9 +43,9 @@ class StanzaTest : public CppUnit::TestFixture
class MyPayload2 : public Payload {
public:
- MyPayload2(const String& s = "") : text_(s) {}
+ MyPayload2(const std::string& s = "") : text_(s) {}
- String text_;
+ std::string text_;
};
class MyPayload3 : public Payload {
@@ -143,7 +143,7 @@ class StanzaTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), m.getPayloads().size());
boost::shared_ptr<MyPayload2> p(m.getPayload<MyPayload2>());
- CPPUNIT_ASSERT_EQUAL(String("bar"), p->text_);
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), p->text_);
}
void testUpdatePayload_NewPayload() {
@@ -155,7 +155,7 @@ class StanzaTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), m.getPayloads().size());
boost::shared_ptr<MyPayload2> p(m.getPayload<MyPayload2>());
- CPPUNIT_ASSERT_EQUAL(String("bar"), p->text_);
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), p->text_);
}
void testGetPayloadOfSameType() {
@@ -166,7 +166,7 @@ class StanzaTest : public CppUnit::TestFixture
boost::shared_ptr<MyPayload2> payload(boost::dynamic_pointer_cast<MyPayload2>(m.getPayloadOfSameType(boost::shared_ptr<MyPayload2>(new MyPayload2("bar")))));
CPPUNIT_ASSERT(payload);
- CPPUNIT_ASSERT_EQUAL(String("foo"), payload->text_);
+ CPPUNIT_ASSERT_EQUAL(std::string("foo"), payload->text_);
}
void testGetPayloadOfSameType_NoSuchPayload() {
diff --git a/Swiften/Elements/VCard.h b/Swiften/Elements/VCard.h
index 5e26003..d2423e1 100644
--- a/Swiften/Elements/VCard.h
+++ b/Swiften/Elements/VCard.h
@@ -8,7 +8,7 @@
#include <boost/shared_ptr.hpp>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Base/ByteArray.h"
#include "Swiften/Elements/Payload.h"
@@ -26,47 +26,47 @@ namespace Swift {
bool isInternet;
bool isPreferred;
bool isX400;
- String address;
+ std::string address;
};
VCard() {}
- void setVersion(const String& version) { version_ = version; }
- const String& getVersion() const { return version_; }
+ void setVersion(const std::string& version) { version_ = version; }
+ const std::string& getVersion() const { return version_; }
- void setFullName(const String& fullName) { fullName_ = fullName; }
- const String& getFullName() const { return fullName_; }
+ void setFullName(const std::string& fullName) { fullName_ = fullName; }
+ const std::string& getFullName() const { return fullName_; }
- void setFamilyName(const String& familyName) { familyName_ = familyName; }
- const String& getFamilyName() const { return familyName_; }
+ void setFamilyName(const std::string& familyName) { familyName_ = familyName; }
+ const std::string& getFamilyName() const { return familyName_; }
- void setGivenName(const String& givenName) { givenName_ = givenName; }
- const String& getGivenName() const { return givenName_; }
+ void setGivenName(const std::string& givenName) { givenName_ = givenName; }
+ const std::string& getGivenName() const { return givenName_; }
- void setMiddleName(const String& middleName) { middleName_ = middleName; }
- const String& getMiddleName() const { return middleName_; }
+ void setMiddleName(const std::string& middleName) { middleName_ = middleName; }
+ const std::string& getMiddleName() const { return middleName_; }
- void setPrefix(const String& prefix) { prefix_ = prefix; }
- const String& getPrefix() const { return prefix_; }
+ void setPrefix(const std::string& prefix) { prefix_ = prefix; }
+ const std::string& getPrefix() const { return prefix_; }
- void setSuffix(const String& suffix) { suffix_ = suffix; }
- const String& getSuffix() const { return suffix_; }
+ void setSuffix(const std::string& suffix) { suffix_ = suffix; }
+ const std::string& getSuffix() const { return suffix_; }
- //void setEMailAddress(const String& email) { email_ = email; }
- //const String& getEMailAddress() const { return email_; }
+ //void setEMailAddress(const std::string& email) { email_ = email; }
+ //const std::string& getEMailAddress() const { return email_; }
- void setNickname(const String& nick) { nick_ = nick; }
- const String& getNickname() const { return nick_; }
+ void setNickname(const std::string& nick) { nick_ = nick; }
+ const std::string& getNickname() const { return nick_; }
void setPhoto(const ByteArray& photo) { photo_ = photo; }
const ByteArray& getPhoto() { return photo_; }
- void setPhotoType(const String& photoType) { photoType_ = photoType; }
- const String& getPhotoType() { return photoType_; }
+ void setPhotoType(const std::string& photoType) { photoType_ = photoType; }
+ const std::string& getPhotoType() { return photoType_; }
- const String& getUnknownContent() const { return unknownContent_; }
- void addUnknownContent(const String& c) {
+ const std::string& getUnknownContent() const { return unknownContent_; }
+ void addUnknownContent(const std::string& c) {
unknownContent_ += c;
}
@@ -81,18 +81,18 @@ namespace Swift {
EMailAddress getPreferredEMailAddress() const;
private:
- String version_;
- String fullName_;
- String familyName_;
- String givenName_;
- String middleName_;
- String prefix_;
- String suffix_;
- //String email_;
+ std::string version_;
+ std::string fullName_;
+ std::string familyName_;
+ std::string givenName_;
+ std::string middleName_;
+ std::string prefix_;
+ std::string suffix_;
+ //std::string email_;
ByteArray photo_;
- String photoType_;
- String nick_;
- String unknownContent_;
+ std::string photoType_;
+ std::string nick_;
+ std::string unknownContent_;
std::vector<EMailAddress> emailAddresses_;
};
}
diff --git a/Swiften/Elements/VCardUpdate.h b/Swiften/Elements/VCardUpdate.h
index 40eda76..bbfd31e 100644
--- a/Swiften/Elements/VCardUpdate.h
+++ b/Swiften/Elements/VCardUpdate.h
@@ -6,18 +6,18 @@
#pragma once
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
class VCardUpdate : public Payload {
public:
- VCardUpdate(const String& photoHash = "") : photoHash_(photoHash) {}
+ VCardUpdate(const std::string& photoHash = "") : photoHash_(photoHash) {}
- void setPhotoHash(const String& photoHash) { photoHash_ = photoHash; }
- const String& getPhotoHash() { return photoHash_; }
+ void setPhotoHash(const std::string& photoHash) { photoHash_ = photoHash; }
+ const std::string& getPhotoHash() { return photoHash_; }
private:
- String photoHash_;
+ std::string photoHash_;
};
}
diff --git a/Swiften/Elements/Version.h b/Swiften/Elements/Version.h
index 3ed1958..0a65573 100644
--- a/Swiften/Elements/Version.h
+++ b/Swiften/Elements/Version.h
@@ -7,23 +7,23 @@
#ifndef SWIFTEN_STANZAS_VERSION_H
#define SWIFTEN_STANZAS_VERSION_H
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Elements/Payload.h"
namespace Swift {
class Version : public Payload
{
public:
- Version(const String& name = "", const String& version = "", const String& os = "") : name_(name), version_(version), os_(os) { }
+ Version(const std::string& name = "", const std::string& version = "", const std::string& os = "") : name_(name), version_(version), os_(os) { }
- const String& getName() const { return name_; }
- const String& getVersion() const { return version_; }
- const String& getOS() const { return os_; }
+ const std::string& getName() const { return name_; }
+ const std::string& getVersion() const { return version_; }
+ const std::string& getOS() const { return os_; }
private:
- String name_;
- String version_;
- String os_;
+ std::string name_;
+ std::string version_;
+ std::string os_;
};
}