From 8abf808854e92af5f656744d582fbc7830eb68e2 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 27 Jun 2017 22:46:52 -0400 Subject: settings: Add telemetry endpoint URL. --- src/core/settings.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/settings.h b/src/core/settings.h index 03c64c94c..ee16bb90a 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -126,6 +126,9 @@ struct Values { // Debugging bool use_gdbstub; u16 gdbstub_port; + + // WebService + std::string telemetry_endpoint_url; } extern values; // a special value for Values::region_value indicating that citra will automatically select a region -- cgit v1.2.3 From 52fbe1e10cffcfd4c4ee1c50b7c8e98f3eb4cb50 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 27 Jun 2017 23:01:49 -0400 Subject: web_service: Add skeleton project. --- src/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ea09819e5..72233877b 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -386,5 +386,5 @@ set(HEADERS create_directory_groups(${SRCS} ${HEADERS}) add_library(core STATIC ${SRCS} ${HEADERS}) -target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) +target_link_libraries(core PUBLIC common PRIVATE audio_core video_core web_service) target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) -- cgit v1.2.3 From 8af3ebb149b057b40bc4efd5bae2b9cb70b2066c Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 9 Jul 2017 13:49:51 -0400 Subject: telemetry_session: Use TelemetryJson to submit real telemetry. --- src/core/telemetry_session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index ddc8b262e..1ba0a698d 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -6,12 +6,12 @@ #include "common/scm_rev.h" #include "core/telemetry_session.h" +#include "web_services/telemetry_json.h" namespace Core { TelemetrySession::TelemetrySession() { - // TODO(bunnei): Replace with a backend that logs to our web service - backend = std::make_unique(); + backend = std::make_unique(); // Log one-time session start information const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; -- cgit v1.2.3 From 33b012e86b846bbba1a42193cbaf34fa16b8fb93 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 9 Jul 2017 17:52:18 -0400 Subject: web_service: Add CMake flag to enable. --- src/core/CMakeLists.txt | 5 ++++- src/core/telemetry_session.cpp | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 72233877b..b80efe192 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -386,5 +386,8 @@ set(HEADERS create_directory_groups(${SRCS} ${HEADERS}) add_library(core STATIC ${SRCS} ${HEADERS}) -target_link_libraries(core PUBLIC common PRIVATE audio_core video_core web_service) +target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) +if (ENABLE_WEB_SERVICE) + target_link_libraries(core PUBLIC json-headers web_service) +endif() diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 1ba0a698d..70eff4340 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -6,13 +6,19 @@ #include "common/scm_rev.h" #include "core/telemetry_session.h" -#include "web_services/telemetry_json.h" + +#ifdef ENABLE_WEB_SERVICE +#include "web_service/telemetry_json.h" +#endif namespace Core { TelemetrySession::TelemetrySession() { +#ifdef ENABLE_WEB_SERVICE backend = std::make_unique(); - +#else + backend = std::make_unique(); +#endif // Log one-time session start information const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; const auto start_time{std::chrono::duration_cast(duration).count()}; -- cgit v1.2.3