Remove Config.hpp options and refactor headers

- Rename Config.hpp to Export.hpp
- Remove Debug.hpp and DebugOff.hpp (not used anymore)
This commit is contained in:
SirLynix
2024-02-19 13:56:31 +01:00
committed by Jérôme Leclercq
parent 3c7e2a1685
commit 5130a2ff84
1350 changed files with 1881 additions and 4103 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,8 +8,8 @@
#define NAZARA_NETWORK_ABSTRACTSOCKET_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Enums.hpp>
#include <Nazara/Network/Export.hpp>
#include <Nazara/Network/SocketHandle.hpp>
#include <NazaraUtils/Signal.hpp>

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -73,4 +72,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,8 +8,8 @@
#define NAZARA_NETWORK_ALGORITHM_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Enums.hpp>
#include <Nazara/Network/Export.hpp>
#include <type_traits>
namespace Nz

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <NazaraUtils/Endianness.hpp>
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -20,4 +19,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,19 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_NETWORK_CONFIGCHECK_HPP
#define NAZARA_NETWORK_CONFIGCHECK_HPP
/// This file is used to check the constant values defined in Config.hpp
#include <type_traits>
#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type <decltype(name)>::value && name op val, #type err)
// config checks
#undef NazaraCheckTypeAndVal
#endif // NAZARA_NETWORK_CONFIGCHECK_HPP

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
// no header guards

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,7 +8,7 @@
#define NAZARA_NETWORK_CURLLIBRARY_HPP
#include <Nazara/Core/DynLib.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <curl/curl.h>
namespace Nz

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -22,4 +21,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,5 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// no header guards

View File

@@ -1,5 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// no header guards

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
/*
Copyright(c) 2002 - 2016 Lee Salzman
@@ -22,7 +22,7 @@
#define NAZARA_NETWORK_ENETCOMPRESSOR_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <Nazara/Network/NetBuffer.hpp>
namespace Nz

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
/*
Copyright(c) 2002 - 2016 Lee Salzman

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <utility>
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -115,4 +114,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
/*
Copyright(c) 2002 - 2016 Lee Salzman

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -118,4 +117,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -32,4 +31,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -24,24 +24,14 @@
#pragma once
#ifndef NAZARA_NETWORK_CONFIG_HPP
#define NAZARA_NETWORK_CONFIG_HPP
#ifndef NAZARA_NETWORK_EXPORT_HPP
#define NAZARA_NETWORK_EXPORT_HPP
/*!
* \defgroup network (NazaraNetwork) Network module
* Network/System module including classes to handle networking elements...
*/
/// Each modification of a paramater of the module needs a recompilation of the unit
// Activate the security tests based on the code (Advised for development)
#define NAZARA_NETWORK_SAFE 1
/// Each modification of a parameter following implies a modification (often minor) of the code
/// Checking the values and types of certain constants
#include <Nazara/Network/ConfigCheck.hpp>
#if defined(NAZARA_STATIC)
#define NAZARA_NETWORK_API
#else
@@ -52,4 +42,4 @@
#endif
#endif
#endif // NAZARA_NETWORK_CONFIG_HPP
#endif // NAZARA_NETWORK_EXPORT_HPP

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,8 +8,8 @@
#define NAZARA_NETWORK_IPADDRESS_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Enums.hpp>
#include <Nazara/Network/Export.hpp>
#include <array>
#include <iosfwd>
#include <string>

View File

@@ -1,11 +1,10 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Core/Error.hpp>
#include <limits>
#include <ostream>
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -410,4 +409,3 @@ namespace std
}
};
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,6 +8,7 @@
#define NAZARA_NETWORK_NETBUFFER_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <cstddef>
namespace Nz
{

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -10,7 +10,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/ByteStream.hpp>
#include <Nazara/Core/MemoryStream.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <mutex>
namespace Nz

View File

@@ -1,12 +1,11 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Core/ByteArray.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Network/Enums.hpp>
#include <cstring>
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -221,4 +220,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,7 +9,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Core.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <memory>
namespace Nz

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,11 +1,9 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -82,4 +81,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <utility>
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -86,4 +85,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -114,4 +113,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,8 +9,8 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Clock.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Enums.hpp>
#include <Nazara/Network/Export.hpp>
#include <Nazara/Network/WebRequestResult.hpp>
#include <NazaraUtils/MovablePtr.hpp>
#include <functional>

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -79,4 +78,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,7 +9,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Time.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <NazaraUtils/MovablePtr.hpp>
#include <NazaraUtils/Result.hpp>
#include <functional>

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <cassert>
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -53,4 +52,3 @@ namespace Nz
}
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,13 +1,13 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
#ifndef NAZARA_NETWORK_WEBSERVICE_HPP
#define NAZARA_NETWORK_WEBSERVICE_HPP
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <Nazara/Network/WebRequest.hpp>
#include <NazaraUtils/FunctionRef.hpp>
#include <NazaraUtils/MovablePtr.hpp>

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
@@ -44,4 +43,3 @@ namespace Nz
#endif
}
#include <Nazara/Network/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,7 +9,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/ApplicationComponent.hpp>
#include <Nazara/Network/Config.hpp>
#include <Nazara/Network/Export.hpp>
#include <Nazara/Network/WebRequest.hpp>
#include <NazaraUtils/FunctionRef.hpp>

View File

@@ -1,11 +1,9 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Network module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Network/Debug.hpp>
namespace Nz
{
}
#include <Nazara/Network/DebugOff.hpp>