summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/NATTraversalInterface.h')
-rw-r--r--Swiften/Network/NATTraversalInterface.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Swiften/Network/NATTraversalInterface.h b/Swiften/Network/NATTraversalInterface.h
new file mode 100644
index 0000000..428db10
--- /dev/null
+++ b/Swiften/Network/NATTraversalInterface.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <boost/optional.hpp>
+#include <natpmp.h>
+
+#include <Swiften/Network/NATPortMapping.h>
+
+namespace Swift {
+ class NATTraversalInterface {
+ public:
+ virtual ~NATTraversalInterface();
+
+ virtual bool isAvailable() = 0;
+
+ virtual boost::optional<HostAddress> getPublicIP() = 0;
+ virtual boost::optional<NATPortMapping> addPortForward(int localPort, int publicPort) = 0;
+ virtual bool removePortForward(const NATPortMapping&) = 0;
+ };
+}