Put WebResult into a seperate file

This commit is contained in:
fearlessTobi 2018-10-26 17:01:00 +02:00
parent 6fb6737642
commit d28233961b
4 changed files with 29 additions and 18 deletions

View File

@ -90,6 +90,7 @@ add_library(common STATIC
timer.cpp
timer.h
vector_math.h
web_result.h
)
if(ARCHITECTURE_x86_64)

View File

@ -9,23 +9,7 @@
#include <string>
#include <vector>
#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 {

25
src/common/web_result.h Normal file
View File

@ -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 <string>
#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

View File

@ -2,14 +2,15 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <array>
#include <cstdlib>
#include <mutex>
#include <string>
#include <LUrlParser.h>
#include <httplib.h>
#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 {