summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/AuthChallenge.h12
-rw-r--r--Swiften/Elements/AuthRequest.h15
-rw-r--r--Swiften/Elements/AuthResponse.h14
-rw-r--r--Swiften/Elements/AuthSuccess.h10
4 files changed, 26 insertions, 25 deletions
diff --git a/Swiften/Elements/AuthChallenge.h b/Swiften/Elements/AuthChallenge.h
index 124919c..f7f2796 100644
--- a/Swiften/Elements/AuthChallenge.h
+++ b/Swiften/Elements/AuthChallenge.h
@@ -7,8 +7,8 @@
#pragma once
#include <boost/optional.hpp>
+#include <vector>
-#include <Swiften/Base/ByteArray.h>
#include <Swiften/Elements/Element.h>
namespace Swift {
@@ -17,18 +17,18 @@ namespace Swift {
AuthChallenge() {
}
- AuthChallenge(const ByteArray& value) : value(value) {
+ AuthChallenge(const std::vector<unsigned char>& value) : value(value) {
}
- const boost::optional<ByteArray>& getValue() const {
+ const boost::optional< std::vector<unsigned char> >& getValue() const {
return value;
}
- void setValue(const ByteArray& value) {
- this->value = boost::optional<ByteArray>(value);
+ void setValue(const std::vector<unsigned char>& value) {
+ this->value = boost::optional<std::vector<unsigned char> >(value);
}
private:
- boost::optional<ByteArray> value;
+ boost::optional< std::vector<unsigned char> > value;
};
}
diff --git a/Swiften/Elements/AuthRequest.h b/Swiften/Elements/AuthRequest.h
index 3b3bd1a..5e4e4ab 100644
--- a/Swiften/Elements/AuthRequest.h
+++ b/Swiften/Elements/AuthRequest.h
@@ -6,9 +6,10 @@
#pragma once
+#include <vector>
+#include <string>
#include <boost/optional.hpp>
-#include <Swiften/Base/ByteArray.h>
#include <Swiften/Elements/Element.h>
namespace Swift {
@@ -17,20 +18,20 @@ namespace Swift {
AuthRequest(const std::string& mechanism = "") : mechanism_(mechanism) {
}
- AuthRequest(const std::string& mechanism, const ByteArray& message) :
+ AuthRequest(const std::string& mechanism, const std::vector<unsigned char>& message) :
mechanism_(mechanism), message_(message) {
}
- AuthRequest(const std::string& mechanism, const boost::optional<ByteArray>& message) :
+ AuthRequest(const std::string& mechanism, const boost::optional<std::vector<unsigned char> >& message) :
mechanism_(mechanism), message_(message) {
}
- const boost::optional<ByteArray>& getMessage() const {
+ const boost::optional<std::vector<unsigned char> >& getMessage() const {
return message_;
}
- void setMessage(const ByteArray& message) {
- message_ = boost::optional<ByteArray>(message);
+ void setMessage(const std::vector<unsigned char>& message) {
+ message_ = boost::optional<std::vector<unsigned char> >(message);
}
const std::string& getMechanism() const {
@@ -43,6 +44,6 @@ namespace Swift {
private:
std::string mechanism_;
- boost::optional<ByteArray> message_;
+ boost::optional<std::vector<unsigned char> > message_;
};
}
diff --git a/Swiften/Elements/AuthResponse.h b/Swiften/Elements/AuthResponse.h
index 30b76d3..a616005 100644
--- a/Swiften/Elements/AuthResponse.h
+++ b/Swiften/Elements/AuthResponse.h
@@ -6,9 +6,9 @@
#pragma once
+#include <vector>
#include <boost/optional.hpp>
-#include <Swiften/Base/ByteArray.h>
#include <Swiften/Elements/Element.h>
namespace Swift {
@@ -17,21 +17,21 @@ namespace Swift {
AuthResponse() {
}
- AuthResponse(const ByteArray& value) : value(value) {
+ AuthResponse(const std::vector<unsigned char>& value) : value(value) {
}
- AuthResponse(const boost::optional<ByteArray>& value) : value(value) {
+ AuthResponse(const boost::optional<std::vector<unsigned char> >& value) : value(value) {
}
- const boost::optional<ByteArray>& getValue() const {
+ const boost::optional<std::vector<unsigned char> >& getValue() const {
return value;
}
- void setValue(const ByteArray& value) {
- this->value = boost::optional<ByteArray>(value);
+ void setValue(const std::vector<unsigned char>& value) {
+ this->value = boost::optional<std::vector<unsigned char> >(value);
}
private:
- boost::optional<ByteArray> value;
+ boost::optional<std::vector<unsigned char> > value;
};
}
diff --git a/Swiften/Elements/AuthSuccess.h b/Swiften/Elements/AuthSuccess.h
index 85091e6..3c0f329 100644
--- a/Swiften/Elements/AuthSuccess.h
+++ b/Swiften/Elements/AuthSuccess.h
@@ -6,25 +6,25 @@
#pragma once
+#include <vector>
#include <boost/optional.hpp>
#include <Swiften/Elements/Element.h>
-#include <Swiften/Base/ByteArray.h>
namespace Swift {
class AuthSuccess : public Element {
public:
AuthSuccess() {}
- const boost::optional<ByteArray>& getValue() const {
+ const boost::optional<std::vector<unsigned char> >& getValue() const {
return value;
}
- void setValue(const ByteArray& value) {
- this->value = boost::optional<ByteArray>(value);
+ void setValue(const std::vector<unsigned char>& value) {
+ this->value = boost::optional<std::vector<unsigned char> >(value);
}
private:
- boost::optional<ByteArray> value;
+ boost::optional<std::vector<unsigned char> > value;
};
}