TrinityCore
Loading...
Searching...
No Matches
Service.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "Service.h"
19#include "Session.h"
20
21void Battlenet::ServiceBaseCaller::SendRequest(uint32 serviceHash, uint32 methodId, google::protobuf::Message const* request, std::function<void(MessageBuffer)>&& callback)
22{
23 _session->SendRequest(serviceHash, methodId, request, std::move(callback));
24}
25
26void Battlenet::ServiceBaseCaller::SendRequest(uint32 serviceHash, uint32 methodId, google::protobuf::Message const* request)
27{
28 _session->SendRequest(serviceHash, methodId, request);
29}
30
31void Battlenet::ServiceBaseCaller::SendResponse(uint32 /*serviceHash*/, uint32 /*methodId*/, uint32 token, uint32 status)
32{
33 _session->SendResponse(token, status);
34}
35
36void Battlenet::ServiceBaseCaller::SendResponse(uint32 /*serviceHash*/, uint32 /*methodId*/, uint32 token, google::protobuf::Message const* response)
37{
38 _session->SendResponse(token, response);
39}
40
42{
43 return _session->GetClientInfo();
44}
uint32_t uint32
Definition Define.h:154
void SendResponse(uint32 serviceHash, uint32 methodId, uint32 token, uint32 status)
Definition Service.cpp:31
std::string GetCallerInfo() const
Definition Service.cpp:41
void SendRequest(uint32 serviceHash, uint32 methodId, google::protobuf::Message const *request, std::function< void(MessageBuffer)> &&callback)
Definition Service.cpp:21
void SendRequest(uint32 serviceHash, uint32 methodId, pb::Message const *request, std::function< void(MessageBuffer)> callback)
Definition Session.h:127