18#ifndef TRINITYCORE_GAME_UTILITIES_SERVICE_H
19#define TRINITYCORE_GAME_UTILITIES_SERVICE_H
22#include "Client/game_utilities_service.pb.h"
23#include "Client/api/client/v2/game_utilities_service.pb.h"
29 using Variant = std::variant<bool, int64, double, std::string, std::vector<uint8>,
uint64>;
38 static std::vector<uint8>
CompressJson(std::string
const& json);
41 std::vector<std::pair<std::string_view, Variant>>&
params,
42 std::vector<std::pair<std::string_view, Variant>>& responseValues);
48 std::vector<std::pair<std::string_view, Variant>>& responseValues);
50 std::vector<std::pair<std::string_view, Variant>>& responseValues);
52 std::vector<std::pair<std::string_view, Variant>>& responseValues);
54 std::vector<std::pair<std::string_view, Variant>>& responseValues);
56 std::vector<std::pair<std::string_view, Variant>>& responseValues);
73 uint32 HandleGetAllValuesForAttribute(game_utilities::v1::GetAllValuesForAttributeRequest
const* request, game_utilities::v1::GetAllValuesForAttributeResponse* response, std::function<
void(
ServiceBase*,
uint32, ::google::protobuf::Message
const*)>& continuation)
override;
89 uint32 HandleProcessTask(game_utilities::v2::client::ProcessTaskRequest
const* request, game_utilities::v2::client::ProcessTaskResponse* response, std::function<
void(
ServiceBase*,
uint32, ::google::protobuf::Message
const*)>& continuation)
override;
90 uint32 HandleGetAllValuesForAttribute(game_utilities::v2::client::GetAllValuesForAttributeRequest
const* request, game_utilities::v2::client::GetAllValuesForAttributeResponse* response, std::function<
void(
ServiceBase*,
uint32, ::google::protobuf::Message
const*)>& continuation)
override;
std::unordered_set< uint32 > params[2]
static uint32 GetLastCharPlayed(Session const *session, std::vector< std::pair< std::string_view, Variant > > ¶ms, std::vector< std::pair< std::string_view, Variant > > &responseValues)
static Variant * FindParamValue(std::vector< std::pair< std::string_view, Variant > > ¶ms, std::string_view paramName)
static uint32 HandleClientRequest(Session *session, std::vector< std::pair< std::string_view, Variant > > ¶ms, std::vector< std::pair< std::string_view, Variant > > &responseValues)
static std::string_view ParseParamName(std::string_view command)
static uint32 JoinRealm(Session const *session, std::vector< std::pair< std::string_view, Variant > > ¶ms, std::vector< std::pair< std::string_view, Variant > > &responseValues)
static uint32 GetRealmList(Session const *session, std::vector< std::pair< std::string_view, Variant > > ¶ms, std::vector< std::pair< std::string_view, Variant > > &responseValues)
static uint32 GetBleepProxies(Session const *session, std::vector< std::pair< std::string_view, Variant > > ¶ms, std::vector< std::pair< std::string_view, Variant > > &responseValues)
static uint32 HandleGetAllValuesForAttribute(Session const *session, std::string_view command, std::vector< Variant > &responseValues)
static uint32 GetRealmListTicket(Session *session, std::vector< std::pair< std::string_view, Variant > > ¶ms, std::vector< std::pair< std::string_view, Variant > > &responseValues)
static std::vector< uint8 > CompressJson(std::string const &json)
Service< game_utilities::v1::GameUtilitiesService > GameUtilitiesService
uint32 HandleProcessClientRequest(game_utilities::v1::ClientRequest const *request, game_utilities::v1::ClientResponse *response, std::function< void(ServiceBase *, uint32, ::google::protobuf::Message const *)> &continuation) override
uint32 HandleGetAllValuesForAttribute(game_utilities::v1::GetAllValuesForAttributeRequest const *request, game_utilities::v1::GetAllValuesForAttributeResponse *response, std::function< void(ServiceBase *, uint32, ::google::protobuf::Message const *)> &continuation) override
uint32 HandleProcessTask(game_utilities::v2::client::ProcessTaskRequest const *request, game_utilities::v2::client::ProcessTaskResponse *response, std::function< void(ServiceBase *, uint32, ::google::protobuf::Message const *)> &continuation) override
uint32 HandleGetAllValuesForAttribute(game_utilities::v2::client::GetAllValuesForAttributeRequest const *request, game_utilities::v2::client::GetAllValuesForAttributeResponse *response, std::function< void(ServiceBase *, uint32, ::google::protobuf::Message const *)> &continuation) override
Service< game_utilities::v2::client::GameUtilitiesService > GameUtilitiesService
Battlenet::Services::Variant FromProto(bgs::protocol::Variant const &from)
void ToProto(Battlenet::Services::Variant const &from, bgs::protocol::Variant *to)
Battlenet::Services::Variant FromProto(bgs::protocol::v2::Variant const &from)
void ToProto(Battlenet::Services::Variant const &from, bgs::protocol::v2::Variant *to)
std::variant< bool, int64, double, std::string, std::vector< uint8 >, uint64 > Variant