Commit Graph

28 Commits

Author SHA1 Message Date
Lioncash eb88e9d088 general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-01 12:53:47 -04:00
Lioncash c0350fb7b7 web_service: Remove unnecessary inclusions
Reduces the potential amount of rebuilding necessary if any headers
change. In particular, we were including a header from the core library
when we don't even link the core library to the web_service library, so
this also gets rid of an indirect dependency.
2019-03-02 14:58:49 -05:00
fearlessTobi 381e04453a compatdb: Use a seperate endpoint for testcase submission 2018-10-28 13:23:02 +01:00
bunnei 77c463e249 Merge pull request #1542 from lioncash/project
CMakeLists: Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
2018-10-23 18:44:08 -04:00
Lioncash 62d2810fa6 CMakeLists: Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
This is more localized to what we want to enforce directory-wise with
the project. CMAKE_SOURCE_DIR indicates the root of the source tree, but
this would cause the wrong behavior if someone included yuzu as part of
a larger buildsystem (for whatever reason). Instead, we want to use the
directory where the "project(yuzu)" command was declared as the root
path reference.
2018-10-20 17:36:31 -04:00
Lioncash ef0db6d459 web_service/CMakeLists: Make the CPPHTTPLIB_OPENSSL_SUPPORT constrained to the web_service library only
Given we link in httplib privately, we can also make the definition
enabling OpenSSL support private as well. Prevents leaking a definition
into other libraries that link with this one, like the core library.
2018-10-20 16:59:10 -04:00
Lioncash 2619abec47 web_backend: Make Client use the PImpl idiom
Like with TelemetryJson, we can make the implementation details private
and avoid the need to expose httplib to external libraries that need to
use the Client class.
2018-10-10 22:29:35 -04:00
Lioncash 1d3abb95da telemetry_json: Use the PImpl idiom to avoid unnecessary dependency exposure
Users of the web_service library shouldn't need to care about an
external library like json.h. However, given it's exposed in our
interface, this requires that other libraries publicly link in the JSON
library. We can do better.

By using the PImpl idiom, we can hide this dependency in the cpp file
and remove the need to link that library in altogether.
2018-10-10 21:10:36 -04:00
Lioncash 2af958df3a telemetry_json: Add missing override specifier to the destructor of TelemetryJson 2018-10-10 21:00:39 -04:00
Lioncash ef83cc5f94 telemetry_json: Take std::string parameters by value
Taking them by const reference isn't advisable here, because it means
the std::move calls were doing nothing and we were always copying the
std::string instances.
2018-10-10 20:59:28 -04:00
Lioncash 08f596c2eb telemetry_json: Remove unnecessary includes
Removes unused includes. Also rectifies a missing <chrono> include.
2018-10-10 20:57:31 -04:00
fearlessTobi c32e0c6847 Review comments - part 5 2018-10-02 16:04:10 +02:00
fearlessTobi cd5b9645a4 Review comments -part 4 2018-10-02 15:30:49 +02:00
fearlessTobi 015fa7e556 Review comments - part 3 2018-10-02 15:30:48 +02:00
Weiyi Wang 2b4cefc8f9 web_backend: protect jwt cache with a mutex 2018-10-02 15:30:48 +02:00
fearlessTobi fb46c8b426 Address a bunch of review comments 2018-10-02 15:30:48 +02:00
fearlessTobi 92e939952c Port web_service from Citra 2018-10-02 15:30:48 +02:00
James Rowe 5dbd091a80 Massive removal of unused modules 2018-01-12 19:11:03 -07:00
B3n30 fdd8a6ef0c WebService: Verify username and token (#2930)
* WebService: Verify username and token; Log errors in PostJson

* Fixup: added docstrings to the functions

* Webservice: Added Icons to the verification, imrpved error detection in cpr, fixup nits

* fixup: fmt warning
2017-09-18 21:18:26 -04:00
bunnei 2c616c7f45 web_backend: Fix CPR bug where Winsock is not properly initializing. 2017-08-26 19:45:41 -04:00
bunnei 85bfee814a web_backend: Fix asynchronous JSON post by spawning new thread. 2017-08-25 23:37:47 -04:00
bunnei 0783d36b5a web_services: Refactor to remove dependency on Core. 2017-08-25 23:10:02 -04:00
bunnei 5dddc43fde web_backend: User config for username and token, support anonymous post. 2017-08-25 23:10:01 -04:00
bunnei 425200bca5 web_backend: Specify api-version on JSON post. 2017-07-11 18:34:30 -04:00
bunnei d253007194 telemetry_session: Use TelemetryJson to submit real telemetry. 2017-07-11 18:33:40 -04:00
bunnei d5a3ab8aef web_service: Implement JSON serialization of telemetry data. 2017-07-11 18:33:38 -04:00
bunnei 07f0f623d1 web_backend: Add initial interface to POST data to Citra Web Services. 2017-07-11 18:33:25 -04:00
bunnei 061f10e286 web_service: Add skeleton project. 2017-07-10 00:15:40 -04:00