summaryrefslogtreecommitdiffstats
path: root/src/web_service/web_backend.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-08-23 23:54:43 +0200
committerGitHub <noreply@github.com>2020-08-23 23:54:43 +0200
commit9619964e8c35f5b357230da96301dcc5a59bf4da (patch)
treefb3f33dd0e57fc6cb29af2df13c5e1c88953b0bd /src/web_service/web_backend.h
parentMerge pull request #4560 from lioncash/convert (diff)
parentweb_service: Move web_result.h into web_service (diff)
downloadyuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.tar
yuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.tar.gz
yuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.tar.bz2
yuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.tar.lz
yuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.tar.xz
yuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.tar.zst
yuzu-9619964e8c35f5b357230da96301dcc5a59bf4da.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;