From d28233961bb83b155e2ddf25f3a2f3ae3ff6d278 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Fri, 26 Oct 2018 17:01:00 +0200 Subject: [PATCH] Put WebResult into a seperate file --- src/common/CMakeLists.txt | 1 + src/common/announce_multiplayer_room.h | 18 +----------------- src/common/web_result.h | 25 +++++++++++++++++++++++++ src/web_service/web_backend.cpp | 3 ++- 4 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 src/common/web_result.h diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 7a1c5bc4c3..5eb5da8fb0 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -90,6 +90,7 @@ add_library(common STATIC timer.cpp timer.h vector_math.h + web_result.h ) if(ARCHITECTURE_x86_64) diff --git a/src/common/announce_multiplayer_room.h b/src/common/announce_multiplayer_room.h index 811f78d8c6..5f9fc8ec26 100644 --- a/src/common/announce_multiplayer_room.h +++ b/src/common/announce_multiplayer_room.h @@ -9,23 +9,7 @@ #include #include #include "common/common_types.h" - -namespace Common { -struct WebResult { - enum class Code : u32 { - Success, - InvalidURL, - CredentialsMissing, - LibError, - HttpError, - WrongContent, - NoWebservice, - }; - Code result_code; - std::string result_string; - std::string returned_data; -}; -} // namespace Common +#include "common/web_result.h" namespace AnnounceMultiplayerRoom { diff --git a/src/common/web_result.h b/src/common/web_result.h new file mode 100644 index 0000000000..286c2b0f4a --- /dev/null +++ b/src/common/web_result.h @@ -0,0 +1,25 @@ +// Copyright 2018 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include "common/common_types.h" + +namespace Common { +struct WebResult { + enum class Code : u32 { + Success, + InvalidURL, + CredentialsMissing, + LibError, + HttpError, + WrongContent, + NoWebservice, + }; + Code result_code; + std::string result_string; + std::string returned_data; +}; +} // namespace Common diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 6329c6a0c7..84d6105d7d 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -2,14 +2,15 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include #include #include #include #include -#include "common/announce_multiplayer_room.h" #include "common/common_types.h" #include "common/logging/log.h" +#include "common/web_result.h" #include "web_service/web_backend.h" namespace WebService {