summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base/ByteArray.h')
-rw-r--r--Swiften/Base/ByteArray.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/Swiften/Base/ByteArray.h b/Swiften/Base/ByteArray.h
index 01cd5d0..133b75f 100644
--- a/Swiften/Base/ByteArray.h
+++ b/Swiften/Base/ByteArray.h
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -10,9 +10,12 @@
#include <string>
+#include <Swiften/Base/API.h>
+#include <boost/filesystem/path.hpp>
+
namespace Swift {
typedef std::vector<unsigned char> ByteArray;
- ByteArray createByteArray(const std::string& s);
- ByteArray createByteArray(const char* c);
+ SWIFTEN_API ByteArray createByteArray(const std::string& s);
+ SWIFTEN_API ByteArray createByteArray(const char* c);
inline ByteArray createByteArray(const unsigned char* c, size_t n) {
@@ -25,5 +28,5 @@ namespace Swift {
inline ByteArray createByteArray(char c) {
- return std::vector<unsigned char>(1, c);
+ return std::vector<unsigned char>(1, static_cast<unsigned char>(c));
}
@@ -38,7 +41,7 @@ namespace Swift {
}
- std::string byteArrayToString(const ByteArray& b);
+ SWIFTEN_API std::string byteArrayToString(const ByteArray& b);
- void readByteArrayFromFile(ByteArray&, const std::string& file);
+ SWIFTEN_API void readByteArrayFromFile(ByteArray&, const boost::filesystem::path& file);
}