summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/IBB.h')
-rw-r--r--Swiften/Elements/IBB.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/Swiften/Elements/IBB.h b/Swiften/Elements/IBB.h
index 55f2c4f..64c9f14 100644
--- a/Swiften/Elements/IBB.h
+++ b/Swiften/Elements/IBB.h
@@ -6,11 +6,12 @@
#pragma once
+#include <string>
+#include <vector>
#include <boost/shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
-#include <string>
-#include "Swiften/Base/ByteArray.h"
-#include "Swiften/Elements/Payload.h"
+#include <Swiften/Elements/Payload.h>
namespace Swift {
class IBB : public Payload {
@@ -31,20 +32,20 @@ namespace Swift {
}
static IBB::ref createIBBOpen(const std::string& streamID, int blockSize) {
- IBB::ref result(new IBB(Open, streamID));
+ IBB::ref result = boost::make_shared<IBB>(Open, streamID);
result->setBlockSize(blockSize);
return result;
}
- static IBB::ref createIBBData(const std::string& streamID, int sequenceNumber, const ByteArray& data) {
- IBB::ref result(new IBB(Data, streamID));
+ static IBB::ref createIBBData(const std::string& streamID, int sequenceNumber, const std::vector<unsigned char>& data) {
+ IBB::ref result = boost::make_shared<IBB>(Data, streamID);
result->setSequenceNumber(sequenceNumber);
result->setData(data);
return result;
}
static IBB::ref createIBBClose(const std::string& streamID) {
- return IBB::ref(new IBB(Close, streamID));
+ return boost::make_shared<IBB>(Close, streamID);
}
void setAction(Action action) {
@@ -71,11 +72,11 @@ namespace Swift {
return streamID;
}
- const ByteArray& getData() const {
+ const std::vector<unsigned char>& getData() const {
return data;
}
- void setData(const ByteArray& data) {
+ void setData(const std::vector<unsigned char>& data) {
this->data = data;
}
@@ -98,7 +99,7 @@ namespace Swift {
private:
Action action;
std::string streamID;
- ByteArray data;
+ std::vector<unsigned char> data;
StanzaType stanzaType;
int blockSize;
int sequenceNumber;