diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a2691d3658..cee952cf916 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 8919ebb7ce6..c22beef6cf4 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 99411596186..91f2f29858e 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 85061241784..0d4df7d760d 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 1ff1bf63507..dfc9fe0a068 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 02b0ecedef7..cac722ccfbf 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 85fa5c149e6..1e169a927f4 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 f8c9c8f5325..b436216ae06 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 edbe9881f56..4da4c7a9e9e 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 ae614bac0fe..177d2ae6f97 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 f990dd5de8a..edd62a84b7e 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 bc6d8d27df4..8ff4e07eba2 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 780be75e7e2..bcda86f384d 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 8fe78412c44..613fcb8759f 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 6e2e1e7b69b..9991661b7b8 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 b20be5ba851..f8cc72b76a1 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 e5f43ede013..56b325a5e5b 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 44c75cf1110..d9e694afb3a 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 9e46873a996..131d3a7f5df 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 e48e28f92ee..d731f2a8c94 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 f2931b0c6fc..f96f17a1be7 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 efce6d333a9..88d456515c8 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 ba63b8212d7..dd7a1375fd3 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 11a0f9faa7f..5d70d59a43a 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 df58f0494d1..acf56225603 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 ce1d1226dc0..36ba7b1ea91 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 eaf4c46d54c..9eb7da1061b 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 8e4c73fc5f3..7fd2cf1ffa3 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 35cde366910..25668099497 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 7e63c35282a..2fe68481db2 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 98610e575c9..55e43ec011f 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 18b3acf80cf..5a4df732686 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 524d4aa398b..95925305405 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 a587c0ef82c..134a36de2b1 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 2589b9b25f3..8fd45e9a422 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 9db0efc7ee0..481f951aee5 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 43d6a896458..7029488afdd 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 6bafc3a83bb..72a2ca771f0 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 8a8fbc26d5d..44a8015c394 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"