From d513bcc4c33d23faaf2e48a82007ae2803d17acb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Fri, 3 Jun 2011 16:05:06 +0200
Subject: Added missing SafeString


diff --git a/Swiften/Base/SafeString.h b/Swiften/Base/SafeString.h
new file mode 100644
index 0000000..ef9c7cc
--- /dev/null
+++ b/Swiften/Base/SafeString.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/SafeByteArray.h>
+
+namespace Swift {
+	class SafeString {
+		public:
+			SafeString(const SafeByteArray& data) : data(data) {
+			}
+
+			SafeString(const std::string& s) {
+				data = createSafeByteArray(s);
+			}
+
+			SafeString(const char* s) {
+				data = createSafeByteArray(s);
+			}
+
+			operator SafeByteArray () const {
+				return data;
+			}
+
+		private:
+			SafeByteArray data;
+	};
+}
-- 
cgit v0.10.2-6-g49f6