summaryrefslogtreecommitdiffstats
blob: 1655eb62fc29adb673a0e2f124f1ead617452fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (c) 2011-2018 Isode Limited.
 * Licensed under the simplified BSD license.
 * See Documentation/Licenses/BSD-simplified.txt for more information.
 */

#pragma once

#include <boost/optional.hpp>

#include <Swiften/Base/API.h>
#include <Swiften/Network/NATPortMapping.h>

namespace Swift {
    class SWIFTEN_API NATTraversalInterface {
        public:
            virtual ~NATTraversalInterface();

            virtual bool isAvailable() = 0;

            virtual boost::optional<HostAddress> getPublicIP() = 0;
            virtual boost::optional<NATPortMapping> addPortForward(unsigned short localPort, unsigned short publicPort) = 0;
            virtual bool removePortForward(const NATPortMapping&) = 0;
    };
}