web_service: hide dependencies to private
This commit is contained in:
parent
57d68bb541
commit
65ec8de31e
@ -445,8 +445,8 @@ create_target_directory_groups(core)
|
|||||||
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core)
|
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core)
|
||||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt open_source_archives)
|
target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp fmt open_source_archives)
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE)
|
||||||
add_definitions(-DENABLE_WEB_SERVICE)
|
target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE)
|
||||||
target_link_libraries(core PUBLIC json-headers web_service)
|
target_link_libraries(core PRIVATE json-headers web_service)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86_64)
|
||||||
|
@ -14,5 +14,5 @@ create_target_directory_groups(web_service)
|
|||||||
get_directory_property(OPENSSL_LIBS
|
get_directory_property(OPENSSL_LIBS
|
||||||
DIRECTORY ${CMAKE_SOURCE_DIR}/externals/libressl
|
DIRECTORY ${CMAKE_SOURCE_DIR}/externals/libressl
|
||||||
DEFINITION OPENSSL_LIBS)
|
DEFINITION OPENSSL_LIBS)
|
||||||
target_compile_definitions(web_service PUBLIC -DCPPHTTPLIB_OPENSSL_SUPPORT)
|
target_compile_definitions(web_service PRIVATE -DCPPHTTPLIB_OPENSSL_SUPPORT)
|
||||||
target_link_libraries(web_service PRIVATE common json-headers ${OPENSSL_LIBS} httplib lurlparser)
|
target_link_libraries(web_service PRIVATE common json-headers ${OPENSSL_LIBS} httplib lurlparser)
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <LUrlParser.h>
|
#include <LUrlParser.h>
|
||||||
|
#include <httplib.h>
|
||||||
#include "common/announce_multiplayer_room.h"
|
#include "common/announce_multiplayer_room.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/settings.h"
|
|
||||||
#include "web_service/web_backend.h"
|
#include "web_service/web_backend.h"
|
||||||
|
|
||||||
namespace WebService {
|
namespace WebService {
|
||||||
@ -30,6 +30,8 @@ Client::Client(const std::string& host, const std::string& username, const std::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Client::~Client() = default;
|
||||||
|
|
||||||
Common::WebResult Client::GenericJson(const std::string& method, const std::string& path,
|
Common::WebResult Client::GenericJson(const std::string& method, const std::string& path,
|
||||||
const std::string& data, const std::string& jwt,
|
const std::string& data, const std::string& jwt,
|
||||||
const std::string& username, const std::string& token) {
|
const std::string& username, const std::string& token) {
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <httplib.h>
|
|
||||||
#include "common/announce_multiplayer_room.h"
|
#include "common/announce_multiplayer_room.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
@ -21,6 +20,7 @@ namespace WebService {
|
|||||||
class Client {
|
class Client {
|
||||||
public:
|
public:
|
||||||
Client(const std::string& host, const std::string& username, const std::string& token);
|
Client(const std::string& host, const std::string& username, const std::string& token);
|
||||||
|
~Client();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Posts JSON to the specified path.
|
* Posts JSON to the specified path.
|
||||||
|
Loading…
Reference in New Issue
Block a user