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 7a1c5bc4c..5eb5da8fb 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 811f78d8c..5f9fc8ec2 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 000000000..286c2b0f4 --- /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 6329c6a0c..84d6105d7 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 {