summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/HostAddress.h')
-rw-r--r--Swiften/Network/HostAddress.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Swiften/Network/HostAddress.h b/Swiften/Network/HostAddress.h
new file mode 100644
index 0000000..11f8a2b
--- /dev/null
+++ b/Swiften/Network/HostAddress.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <string>
+#include <vector>
+
+namespace Swift {
+ class String;
+
+ class HostAddress {
+ public:
+ HostAddress();
+ HostAddress(const String&);
+ HostAddress(const unsigned char* address, int length);
+
+ const std::vector<unsigned char>& getRawAddress() const {
+ return address_;
+ }
+
+ std::string toString() const;
+
+ bool operator==(const HostAddress& o) const {
+ return address_ == o.address_;
+ }
+
+ private:
+ std::vector<unsigned char> address_;
+ };
+}