diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-16 03:33:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 03:33:32 +0200 |
commit | 548958bcafa572fdfbb147b1bd590c02f9bb4b40 (patch) | |
tree | 0e6b51ffb96eeaa0873b5f47994aaf0959925bc4 /src/web_service/telemetry_json.h | |
parent | Merge pull request #1487 from lioncash/maybe-unused (diff) | |
parent | core/CMakeLists: Make all web_service-related libraries private (diff) | |
download | yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.tar yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.tar.gz yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.tar.bz2 yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.tar.lz yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.tar.xz yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.tar.zst yuzu-548958bcafa572fdfbb147b1bd590c02f9bb4b40.zip |
Diffstat (limited to 'src/web_service/telemetry_json.h')
-rw-r--r-- | src/web_service/telemetry_json.h | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/web_service/telemetry_json.h b/src/web_service/telemetry_json.h index 0fe6f9a3e..93371414a 100644 --- a/src/web_service/telemetry_json.h +++ b/src/web_service/telemetry_json.h @@ -4,11 +4,9 @@ #pragma once -#include <array> +#include <chrono> #include <string> -#include <json.hpp> #include "common/telemetry.h" -#include "common/web_result.h" namespace WebService { @@ -18,8 +16,8 @@ namespace WebService { */ class TelemetryJson : public Telemetry::VisitorInterface { public: - TelemetryJson(const std::string& host, const std::string& username, const std::string& token); - ~TelemetryJson(); + TelemetryJson(std::string host, std::string username, std::string token); + ~TelemetryJson() override; void Visit(const Telemetry::Field<bool>& field) override; void Visit(const Telemetry::Field<double>& field) override; @@ -39,20 +37,8 @@ public: void Complete() override; private: - nlohmann::json& TopSection() { - return sections[static_cast<u8>(Telemetry::FieldType::None)]; - } - - template <class T> - void Serialize(Telemetry::FieldType type, const std::string& name, T value); - - void SerializeSection(Telemetry::FieldType type, const std::string& name); - - nlohmann::json output; - std::array<nlohmann::json, 7> sections; - std::string host; - std::string username; - std::string token; + struct Impl; + std::unique_ptr<Impl> impl; }; } // namespace WebService |