diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a2691d36..cee952cf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ - Dev: Move `clang-tidy` checker to its own CI job. (#4996) - Dev: Refactored the Image Uploader feature. (#4971) - Dev: Refactored the SplitOverlay code. (#5082) +- Dev: Moved the Network files to their own folder. (#5089) - Dev: Fixed deadlock and use-after-free in tests. (#4981) - Dev: Moved all `.clang-format` files to the root directory. (#5037) - Dev: Load less message history upon reconnects. (#5001, #5018) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8919ebb7c..c22beef6c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,16 +33,6 @@ set(SOURCE_FILES common/Literals.hpp common/Modes.cpp common/Modes.hpp - common/NetworkCommon.cpp - common/NetworkCommon.hpp - common/NetworkManager.cpp - common/NetworkManager.hpp - common/NetworkPrivate.cpp - common/NetworkPrivate.hpp - common/NetworkRequest.cpp - common/NetworkRequest.hpp - common/NetworkResult.cpp - common/NetworkResult.hpp common/QLogging.cpp common/QLogging.hpp common/WindowDescriptors.cpp @@ -50,8 +40,18 @@ set(SOURCE_FILES common/enums/MessageOverflow.hpp - common/network/NetworkTask.hpp + common/network/NetworkCommon.cpp + common/network/NetworkCommon.hpp + common/network/NetworkManager.cpp + common/network/NetworkManager.hpp + common/network/NetworkPrivate.cpp + common/network/NetworkPrivate.hpp + common/network/NetworkRequest.cpp + common/network/NetworkRequest.hpp + common/network/NetworkResult.cpp + common/network/NetworkResult.hpp common/network/NetworkTask.cpp + common/network/NetworkTask.hpp controllers/accounts/Account.cpp controllers/accounts/Account.hpp diff --git a/src/RunGui.cpp b/src/RunGui.cpp index 994115961..91f2f2985 100644 --- a/src/RunGui.cpp +++ b/src/RunGui.cpp @@ -3,7 +3,7 @@ #include "Application.hpp" #include "common/Args.hpp" #include "common/Modes.hpp" -#include "common/NetworkManager.hpp" +#include "common/network/NetworkManager.hpp" #include "common/QLogging.hpp" #include "singletons/CrashHandler.hpp" #include "singletons/Paths.hpp" diff --git a/src/common/NetworkCommon.cpp b/src/common/network/NetworkCommon.cpp similarity index 95% rename from src/common/NetworkCommon.cpp rename to src/common/network/NetworkCommon.cpp index 850612417..0d4df7d76 100644 --- a/src/common/NetworkCommon.cpp +++ b/src/common/network/NetworkCommon.cpp @@ -1,4 +1,4 @@ -#include "common/NetworkCommon.hpp" +#include "common/network/NetworkCommon.hpp" #include diff --git a/src/common/NetworkCommon.hpp b/src/common/network/NetworkCommon.hpp similarity index 100% rename from src/common/NetworkCommon.hpp rename to src/common/network/NetworkCommon.hpp diff --git a/src/common/NetworkManager.cpp b/src/common/network/NetworkManager.cpp similarity index 90% rename from src/common/NetworkManager.cpp rename to src/common/network/NetworkManager.cpp index 1ff1bf635..dfc9fe0a0 100644 --- a/src/common/NetworkManager.cpp +++ b/src/common/network/NetworkManager.cpp @@ -1,4 +1,4 @@ -#include "common/NetworkManager.hpp" +#include "common/network/NetworkManager.hpp" #include diff --git a/src/common/NetworkManager.hpp b/src/common/network/NetworkManager.hpp similarity index 100% rename from src/common/NetworkManager.hpp rename to src/common/network/NetworkManager.hpp diff --git a/src/common/NetworkPrivate.cpp b/src/common/network/NetworkPrivate.cpp similarity index 97% rename from src/common/NetworkPrivate.cpp rename to src/common/network/NetworkPrivate.cpp index 02b0ecede..cac722ccf 100644 --- a/src/common/NetworkPrivate.cpp +++ b/src/common/network/NetworkPrivate.cpp @@ -1,8 +1,8 @@ -#include "common/NetworkPrivate.hpp" +#include "common/network/NetworkPrivate.hpp" +#include "common/network/NetworkManager.hpp" +#include "common/network/NetworkResult.hpp" #include "common/network/NetworkTask.hpp" -#include "common/NetworkManager.hpp" -#include "common/NetworkResult.hpp" #include "common/QLogging.hpp" #include "singletons/Paths.hpp" #include "util/AbandonObject.hpp" diff --git a/src/common/NetworkPrivate.hpp b/src/common/network/NetworkPrivate.hpp similarity index 97% rename from src/common/NetworkPrivate.hpp rename to src/common/network/NetworkPrivate.hpp index 85fa5c149..1e169a927 100644 --- a/src/common/NetworkPrivate.hpp +++ b/src/common/network/NetworkPrivate.hpp @@ -1,7 +1,7 @@ #pragma once #include "common/Common.hpp" -#include "common/NetworkCommon.hpp" +#include "common/network/NetworkCommon.hpp" #include #include diff --git a/src/common/NetworkRequest.cpp b/src/common/network/NetworkRequest.cpp similarity index 98% rename from src/common/NetworkRequest.cpp rename to src/common/network/NetworkRequest.cpp index f8c9c8f53..b436216ae 100644 --- a/src/common/NetworkRequest.cpp +++ b/src/common/network/NetworkRequest.cpp @@ -1,6 +1,6 @@ -#include "common/NetworkRequest.hpp" +#include "common/network/NetworkRequest.hpp" -#include "common/NetworkPrivate.hpp" +#include "common/network/NetworkPrivate.hpp" #include "common/QLogging.hpp" #include "common/Version.hpp" diff --git a/src/common/NetworkRequest.hpp b/src/common/network/NetworkRequest.hpp similarity index 98% rename from src/common/NetworkRequest.hpp rename to src/common/network/NetworkRequest.hpp index edbe9881f..4da4c7a9e 100644 --- a/src/common/NetworkRequest.hpp +++ b/src/common/network/NetworkRequest.hpp @@ -1,6 +1,6 @@ #pragma once -#include "common/NetworkCommon.hpp" +#include "common/network/NetworkCommon.hpp" #include diff --git a/src/common/NetworkResult.cpp b/src/common/network/NetworkResult.cpp similarity index 97% rename from src/common/NetworkResult.cpp rename to src/common/network/NetworkResult.cpp index ae614bac0..177d2ae6f 100644 --- a/src/common/NetworkResult.cpp +++ b/src/common/network/NetworkResult.cpp @@ -1,4 +1,4 @@ -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" diff --git a/src/common/NetworkResult.hpp b/src/common/network/NetworkResult.hpp similarity index 100% rename from src/common/NetworkResult.hpp rename to src/common/network/NetworkResult.hpp diff --git a/src/common/network/NetworkTask.cpp b/src/common/network/NetworkTask.cpp index f990dd5de..edd62a84b 100644 --- a/src/common/network/NetworkTask.cpp +++ b/src/common/network/NetworkTask.cpp @@ -1,8 +1,8 @@ #include "common/network/NetworkTask.hpp" -#include "common/NetworkManager.hpp" -#include "common/NetworkPrivate.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkManager.hpp" +#include "common/network/NetworkPrivate.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "singletons/Paths.hpp" #include "util/AbandonObject.hpp" diff --git a/src/controllers/commands/builtin/twitch/DeleteMessages.cpp b/src/controllers/commands/builtin/twitch/DeleteMessages.cpp index bc6d8d27d..8ff4e07eb 100644 --- a/src/controllers/commands/builtin/twitch/DeleteMessages.cpp +++ b/src/controllers/commands/builtin/twitch/DeleteMessages.cpp @@ -2,7 +2,7 @@ #include "Application.hpp" #include "common/Channel.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/commands/CommandContext.hpp" #include "messages/Message.hpp" diff --git a/src/controllers/commands/builtin/twitch/UpdateChannel.cpp b/src/controllers/commands/builtin/twitch/UpdateChannel.cpp index 780be75e7..bcda86f38 100644 --- a/src/controllers/commands/builtin/twitch/UpdateChannel.cpp +++ b/src/controllers/commands/builtin/twitch/UpdateChannel.cpp @@ -1,7 +1,7 @@ #include "controllers/commands/builtin/twitch/UpdateChannel.hpp" #include "common/Channel.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include "controllers/commands/CommandContext.hpp" #include "messages/MessageBuilder.hpp" #include "providers/twitch/api/Helix.hpp" diff --git a/src/messages/Image.cpp b/src/messages/Image.cpp index 8fe78412c..613fcb875 100644 --- a/src/messages/Image.cpp +++ b/src/messages/Image.cpp @@ -2,8 +2,8 @@ #include "Application.hpp" #include "common/Common.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "debug/AssertInGuiThread.hpp" #include "debug/Benchmark.hpp" diff --git a/src/providers/IvrApi.cpp b/src/providers/IvrApi.cpp index 6e2e1e7b6..9991661b7 100644 --- a/src/providers/IvrApi.cpp +++ b/src/providers/IvrApi.cpp @@ -1,6 +1,6 @@ #include "IvrApi.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include diff --git a/src/providers/IvrApi.hpp b/src/providers/IvrApi.hpp index b20be5ba8..f8cc72b76 100644 --- a/src/providers/IvrApi.hpp +++ b/src/providers/IvrApi.hpp @@ -1,6 +1,6 @@ #pragma once -#include "common/NetworkRequest.hpp" +#include "common/network/NetworkRequest.hpp" #include "providers/twitch/TwitchEmotes.hpp" #include diff --git a/src/providers/LinkResolver.cpp b/src/providers/LinkResolver.cpp index e5f43ede0..56b325a5e 100644 --- a/src/providers/LinkResolver.cpp +++ b/src/providers/LinkResolver.cpp @@ -1,8 +1,8 @@ #include "providers/LinkResolver.hpp" #include "common/Env.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "messages/Image.hpp" #include "messages/Link.hpp" #include "singletons/Settings.hpp" diff --git a/src/providers/bttv/BttvEmotes.cpp b/src/providers/bttv/BttvEmotes.cpp index 44c75cf11..d9e694afb 100644 --- a/src/providers/bttv/BttvEmotes.cpp +++ b/src/providers/bttv/BttvEmotes.cpp @@ -1,7 +1,7 @@ #include "providers/bttv/BttvEmotes.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/Outcome.hpp" #include "common/QLogging.hpp" #include "messages/Emote.hpp" diff --git a/src/providers/chatterino/ChatterinoBadges.cpp b/src/providers/chatterino/ChatterinoBadges.cpp index 9e46873a9..131d3a7f5 100644 --- a/src/providers/chatterino/ChatterinoBadges.cpp +++ b/src/providers/chatterino/ChatterinoBadges.cpp @@ -1,7 +1,7 @@ #include "ChatterinoBadges.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "messages/Emote.hpp" #include diff --git a/src/providers/ffz/FfzBadges.cpp b/src/providers/ffz/FfzBadges.cpp index e48e28f92..d731f2a8c 100644 --- a/src/providers/ffz/FfzBadges.cpp +++ b/src/providers/ffz/FfzBadges.cpp @@ -1,7 +1,7 @@ #include "FfzBadges.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "messages/Emote.hpp" #include "providers/ffz/FfzUtil.hpp" diff --git a/src/providers/ffz/FfzEmotes.cpp b/src/providers/ffz/FfzEmotes.cpp index f2931b0c6..f96f17a1b 100644 --- a/src/providers/ffz/FfzEmotes.cpp +++ b/src/providers/ffz/FfzEmotes.cpp @@ -1,7 +1,7 @@ #include "providers/ffz/FfzEmotes.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "messages/Emote.hpp" #include "messages/Image.hpp" diff --git a/src/providers/recentmessages/Api.cpp b/src/providers/recentmessages/Api.cpp index efce6d333..88d456515 100644 --- a/src/providers/recentmessages/Api.cpp +++ b/src/providers/recentmessages/Api.cpp @@ -1,7 +1,7 @@ #include "providers/recentmessages/Api.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "providers/recentmessages/Impl.hpp" #include "providers/twitch/TwitchMessageBuilder.hpp" diff --git a/src/providers/seventv/SeventvAPI.cpp b/src/providers/seventv/SeventvAPI.cpp index ba63b8212..dd7a1375f 100644 --- a/src/providers/seventv/SeventvAPI.cpp +++ b/src/providers/seventv/SeventvAPI.cpp @@ -1,8 +1,8 @@ #include "providers/seventv/SeventvAPI.hpp" #include "common/Literals.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" namespace { diff --git a/src/providers/seventv/SeventvEmotes.cpp b/src/providers/seventv/SeventvEmotes.cpp index 11a0f9faa..5d70d59a4 100644 --- a/src/providers/seventv/SeventvEmotes.cpp +++ b/src/providers/seventv/SeventvEmotes.cpp @@ -2,7 +2,7 @@ #include "Application.hpp" #include "common/Literals.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "messages/Emote.hpp" #include "messages/Image.hpp" diff --git a/src/providers/twitch/TwitchAccount.cpp b/src/providers/twitch/TwitchAccount.cpp index df58f0494..acf562256 100644 --- a/src/providers/twitch/TwitchAccount.cpp +++ b/src/providers/twitch/TwitchAccount.cpp @@ -3,7 +3,7 @@ #include "Application.hpp" #include "common/Channel.hpp" #include "common/Env.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "controllers/accounts/AccountController.hpp" #include "debug/AssertInGuiThread.hpp" diff --git a/src/providers/twitch/TwitchBadges.cpp b/src/providers/twitch/TwitchBadges.cpp index ce1d1226d..36ba7b1ea 100644 --- a/src/providers/twitch/TwitchBadges.cpp +++ b/src/providers/twitch/TwitchBadges.cpp @@ -1,7 +1,7 @@ #include "TwitchBadges.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "messages/Emote.hpp" #include "messages/Image.hpp" diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index eaf4c46d5..9eb7da106 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -3,8 +3,8 @@ #include "Application.hpp" #include "common/Common.hpp" #include "common/Env.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/notifications/NotificationController.hpp" diff --git a/src/providers/twitch/api/Helix.cpp b/src/providers/twitch/api/Helix.cpp index 8e4c73fc5..7fd2cf1ff 100644 --- a/src/providers/twitch/api/Helix.cpp +++ b/src/providers/twitch/api/Helix.cpp @@ -1,8 +1,8 @@ #include "providers/twitch/api/Helix.hpp" #include "common/Literals.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "util/CancellationToken.hpp" diff --git a/src/providers/twitch/api/Helix.hpp b/src/providers/twitch/api/Helix.hpp index 35cde3669..256680994 100644 --- a/src/providers/twitch/api/Helix.hpp +++ b/src/providers/twitch/api/Helix.hpp @@ -1,7 +1,7 @@ #pragma once #include "common/Aliases.hpp" -#include "common/NetworkRequest.hpp" +#include "common/network/NetworkRequest.hpp" #include "providers/twitch/TwitchEmotes.hpp" #include "util/Helpers.hpp" #include "util/QStringHash.hpp" diff --git a/src/singletons/ImageUploader.cpp b/src/singletons/ImageUploader.cpp index 7e63c3528..2fe68481d 100644 --- a/src/singletons/ImageUploader.cpp +++ b/src/singletons/ImageUploader.cpp @@ -1,8 +1,8 @@ #include "singletons/ImageUploader.hpp" #include "common/Env.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "messages/MessageBuilder.hpp" #include "providers/twitch/TwitchMessageBuilder.hpp" diff --git a/src/singletons/Updates.cpp b/src/singletons/Updates.cpp index 98610e575..55e43ec01 100644 --- a/src/singletons/Updates.cpp +++ b/src/singletons/Updates.cpp @@ -1,8 +1,8 @@ #include "Updates.hpp" #include "common/Modes.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "common/Version.hpp" #include "Settings.hpp" diff --git a/src/widgets/dialogs/LoginDialog.cpp b/src/widgets/dialogs/LoginDialog.cpp index 18b3acf80..5a4df7326 100644 --- a/src/widgets/dialogs/LoginDialog.cpp +++ b/src/widgets/dialogs/LoginDialog.cpp @@ -2,7 +2,7 @@ #include "Application.hpp" #include "common/Common.hpp" -#include "common/NetworkRequest.hpp" +#include "common/network/NetworkRequest.hpp" #include "common/QLogging.hpp" #include "controllers/accounts/AccountController.hpp" #include "providers/twitch/TwitchAccount.hpp" diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index 524d4aa39..959253054 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -2,7 +2,7 @@ #include "Application.hpp" #include "common/Channel.hpp" -#include "common/NetworkRequest.hpp" +#include "common/network/NetworkRequest.hpp" #include "common/QLogging.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/commands/CommandController.hpp" diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index a587c0ef8..134a36de2 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -2,8 +2,8 @@ #include "Application.hpp" #include "common/Common.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "common/QLogging.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/commands/CommandController.hpp" diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 2589b9b25..8fd45e9a4 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -1,9 +1,9 @@ #include "widgets/splits/SplitHeader.hpp" #include "Application.hpp" -#include "common/NetworkCommon.hpp" -#include "common/NetworkRequest.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkCommon.hpp" +#include "common/network/NetworkRequest.hpp" +#include "common/network/NetworkResult.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/commands/CommandController.hpp" #include "controllers/hotkeys/Hotkey.hpp" diff --git a/tests/src/NetworkCommon.cpp b/tests/src/NetworkCommon.cpp index 9db0efc7e..481f951ae 100644 --- a/tests/src/NetworkCommon.cpp +++ b/tests/src/NetworkCommon.cpp @@ -1,4 +1,4 @@ -#include "common/NetworkCommon.hpp" +#include "common/network/NetworkCommon.hpp" #include diff --git a/tests/src/NetworkRequest.cpp b/tests/src/NetworkRequest.cpp index 43d6a8964..7029488af 100644 --- a/tests/src/NetworkRequest.cpp +++ b/tests/src/NetworkRequest.cpp @@ -1,7 +1,7 @@ -#include "common/NetworkRequest.hpp" +#include "common/network/NetworkRequest.hpp" -#include "common/NetworkManager.hpp" -#include "common/NetworkResult.hpp" +#include "common/network/NetworkManager.hpp" +#include "common/network/NetworkResult.hpp" #include #include diff --git a/tests/src/NetworkResult.cpp b/tests/src/NetworkResult.cpp index 6bafc3a83..72a2ca771 100644 --- a/tests/src/NetworkResult.cpp +++ b/tests/src/NetworkResult.cpp @@ -1,4 +1,4 @@ -#include "common/NetworkResult.hpp" +#include "common/network/NetworkResult.hpp" #include diff --git a/tests/src/main.cpp b/tests/src/main.cpp index 8a8fbc26d..44a8015c3 100644 --- a/tests/src/main.cpp +++ b/tests/src/main.cpp @@ -1,4 +1,4 @@ -#include "common/NetworkManager.hpp" +#include "common/network/NetworkManager.hpp" #include "singletons/Resources.hpp" #include "singletons/Settings.hpp"