diff options
author | fearlessTobi <thm.frey@gmail.com> | 2018-09-17 17:16:01 +0200 |
---|---|---|
committer | fearlessTobi <thm.frey@gmail.com> | 2018-10-02 15:30:48 +0200 |
commit | b4ace6ec6f86079b3bd297f95dfe133240b53e15 (patch) | |
tree | efbbacb734024ad2b0be5980bf67f553976c2c11 /src/web_service | |
parent | Port web_service from Citra (diff) | |
download | yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.tar yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.tar.gz yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.tar.bz2 yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.tar.lz yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.tar.xz yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.tar.zst yuzu-b4ace6ec6f86079b3bd297f95dfe133240b53e15.zip |
Diffstat (limited to 'src/web_service')
-rw-r--r-- | src/web_service/telemetry_json.cpp | 5 | ||||
-rw-r--r-- | src/web_service/telemetry_json.h | 5 | ||||
-rw-r--r-- | src/web_service/web_backend.cpp | 8 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/web_service/telemetry_json.cpp b/src/web_service/telemetry_json.cpp index a0b7f9c4e..033ea1ea4 100644 --- a/src/web_service/telemetry_json.cpp +++ b/src/web_service/telemetry_json.cpp @@ -10,6 +10,11 @@ namespace WebService { +TelemetryJson::TelemetryJson(const std::string& host, const std::string& username, + const std::string& token) + : host(std::move(host)), username(std::move(username)), token(std::move(token)) {} +TelemetryJson::~TelemetryJson() = default; + template <class T> void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) { sections[static_cast<u8>(type)][name] = value; diff --git a/src/web_service/telemetry_json.h b/src/web_service/telemetry_json.h index 9bc886538..29d565964 100644 --- a/src/web_service/telemetry_json.h +++ b/src/web_service/telemetry_json.h @@ -18,9 +18,8 @@ namespace WebService { */ class TelemetryJson : public Telemetry::VisitorInterface { public: - TelemetryJson(const std::string& host, const std::string& username, const std::string& token) - : host(host), username(username), token(token) {} - ~TelemetryJson() = default; + TelemetryJson(const std::string& host, const std::string& username, const std::string& token); + ~TelemetryJson(); void Visit(const Telemetry::Field<bool>& field) override; void Visit(const Telemetry::Field<double>& field) override; diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index a726fb8eb..3a3f44dc2 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -13,12 +13,12 @@ namespace WebService { -static constexpr char API_VERSION[]{"1"}; +constexpr char API_VERSION[]{"1"}; -constexpr int HTTP_PORT = 80; -constexpr int HTTPS_PORT = 443; +constexpr u32 HTTP_PORT = 80; +constexpr u32 HTTPS_PORT = 443; -constexpr int TIMEOUT_SECONDS = 30; +constexpr u32 TIMEOUT_SECONDS = 30; Client::JWTCache Client::jwt_cache{}; |