summaryrefslogtreecommitdiffstats
path: root/src/web_service/web_backend.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-23 01:23:22 +0200
committerLioncash <mathew1800@gmail.com>2020-08-23 01:29:54 +0200
commitca5ed50655b744ae4d3242b2105676a43d1482e0 (patch)
treeac342b98c89c4a15d536e8e1e98ea9f753154e32 /src/web_service/web_backend.h
parentMerge pull request #4546 from lioncash/telemetry (diff)
downloadyuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.tar
yuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.tar.gz
yuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.tar.bz2
yuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.tar.lz
yuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.tar.xz
yuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.tar.zst
yuzu-ca5ed50655b744ae4d3242b2105676a43d1482e0.zip
Diffstat (limited to '')
-rw-r--r--src/web_service/web_backend.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/web_service/web_backend.h b/src/web_service/web_backend.h
index 04121f17e..81f58583c 100644
--- a/src/web_service/web_backend.h
+++ b/src/web_service/web_backend.h
@@ -7,12 +7,10 @@
#include <memory>
#include <string>
-namespace Common {
-struct WebResult;
-}
-
namespace WebService {
+struct WebResult;
+
class Client {
public:
Client(std::string host, std::string username, std::string token);
@@ -25,8 +23,7 @@ public:
* @param allow_anonymous If true, allow anonymous unauthenticated requests.
* @return the result of the request.
*/
- Common::WebResult PostJson(const std::string& path, const std::string& data,
- bool allow_anonymous);
+ WebResult PostJson(const std::string& path, const std::string& data, bool allow_anonymous);
/**
* Gets JSON from the specified path.
@@ -34,7 +31,7 @@ public:
* @param allow_anonymous If true, allow anonymous unauthenticated requests.
* @return the result of the request.
*/
- Common::WebResult GetJson(const std::string& path, bool allow_anonymous);
+ WebResult GetJson(const std::string& path, bool allow_anonymous);
/**
* Deletes JSON to the specified path.
@@ -43,8 +40,7 @@ public:
* @param allow_anonymous If true, allow anonymous unauthenticated requests.
* @return the result of the request.
*/
- Common::WebResult DeleteJson(const std::string& path, const std::string& data,
- bool allow_anonymous);
+ WebResult DeleteJson(const std::string& path, const std::string& data, bool allow_anonymous);
/**
* Gets a plain string from the specified path.
@@ -52,7 +48,7 @@ public:
* @param allow_anonymous If true, allow anonymous unauthenticated requests.
* @return the result of the request.
*/
- Common::WebResult GetPlain(const std::string& path, bool allow_anonymous);
+ WebResult GetPlain(const std::string& path, bool allow_anonymous);
/**
* Gets an PNG image from the specified path.
@@ -60,14 +56,14 @@ public:
* @param allow_anonymous If true, allow anonymous unauthenticated requests.
* @return the result of the request.
*/
- Common::WebResult GetImage(const std::string& path, bool allow_anonymous);
+ WebResult GetImage(const std::string& path, bool allow_anonymous);
/**
* Requests an external JWT for the specific audience provided.
* @param audience the audience of the JWT requested.
* @return the result of the request.
*/
- Common::WebResult GetExternalJWT(const std::string& audience);
+ WebResult GetExternalJWT(const std::string& audience);
private:
struct Impl;