1/*
2 * LegacyClonk
3 *
4 * Copyright (c) 2012-2016, The OpenClonk Team and contributors
5 * Copyright (c) 2022, The LegacyClonk Team and contributors
6 *
7 * Distributed under the terms of the ISC license; see accompanying file
8 * "COPYING" for details.
9 *
10 * "Clonk" is a registered trademark of Matthes Bender, used with permission.
11 * See accompanying file "TRADEMARK" for details.
12 *
13 * To redistribute this file separately, substitute the full license texts
14 * for the above references.
15 */
16
17#pragma once
18
19#include "C4Log.h"
20#include "C4Network2IO.h"
21
22#include <memory>
23
24class C4Network2UPnP
25{
26private:
27 struct Impl;
28
29public:
30 C4Network2UPnP();
31 ~C4Network2UPnP() noexcept;
32
33public:
34 void AddMapping(C4Network2IOProtocol protocol, std::uint16_t internalPort, std::uint16_t externalPort);
35
36private:
37 std::unique_ptr<Impl> impl;
38};
39
40C4LOGGERCONFIG_NAME_TYPE(C4Network2UPnP);
41
42template<>
43struct C4LoggerConfig::Defaults<C4Network2UPnP>
44{
45 static constexpr spdlog::level::level_enum GuiLogLevel{spdlog::level::off};
46};
47