TrinityCore
ServiceBase Class Referenceabstract

#include <ServiceBase.h>

+ Inheritance diagram for ServiceBase:

Public Member Functions

 ServiceBase (uint32 serviceHash)
 
virtual ~ServiceBase ()
 
virtual void CallServerMethod (uint32 token, uint32 methodId, MessageBuffer buffer)=0
 
virtual std::string GetCallerInfo () const =0
 
void LogDisallowedMethod (uint32 methodId)
 
void LogCallClientMethod (char const *methodName, char const *inputTypeName, google::protobuf::Message const *request)
 
void LogCallServerMethod (char const *methodName, char const *inputTypeName, google::protobuf::Message const *request)
 
void LogUnimplementedServerMethod (char const *methodName, google::protobuf::Message const *request)
 
void LogInvalidMethod (uint32 methodId)
 
void LogFailedParsingRequest (char const *methodName)
 
uint32 GetServiceHash () const
 

Protected Member Functions

std::function< void(ServiceBase *, uint32, ::google::protobuf::Message const *)> CreateServerContinuation (uint32 token, uint32 methodId, char const *methodName, google::protobuf::Descriptor const *outputDescriptor)
 
virtual void SendRequest (uint32 serviceHash, uint32 methodId, google::protobuf::Message const *request, std::function< void(MessageBuffer)> callback)=0
 
virtual void SendRequest (uint32 serviceHash, uint32 methodId, google::protobuf::Message const *request)=0
 
virtual void SendResponse (uint32 serviceHash, uint32 methodId, uint32 token, uint32 status)=0
 
virtual void SendResponse (uint32 serviceHash, uint32 methodId, uint32 token, google::protobuf::Message const *response)=0
 

Protected Attributes

uint32 service_hash_
 

Detailed Description

Definition at line 35 of file ServiceBase.h.

Constructor & Destructor Documentation

◆ ServiceBase()

ServiceBase::ServiceBase ( uint32  serviceHash)
inlineexplicit

Definition at line 38 of file ServiceBase.h.

◆ ~ServiceBase()

virtual ServiceBase::~ServiceBase ( )
inlinevirtual

Definition at line 40 of file ServiceBase.h.

Member Function Documentation

◆ CallServerMethod()

◆ CreateServerContinuation()

std::function< void(ServiceBase *, uint32, google::protobuf::Message const *)> ServiceBase::CreateServerContinuation ( uint32  token,
uint32  methodId,
char const *  methodName,
google::protobuf::Descriptor const *  outputDescriptor 
)
protected

Definition at line 57 of file ServiceBase.cpp.

◆ GetCallerInfo()

virtual std::string ServiceBase::GetCallerInfo ( ) const
pure virtual
+ Here is the caller graph for this function:

◆ GetServiceHash()

uint32 ServiceBase::GetServiceHash ( ) const
inline

Definition at line 53 of file ServiceBase.h.

◆ LogCallClientMethod()

void ServiceBase::LogCallClientMethod ( char const *  methodName,
char const *  inputTypeName,
google::protobuf::Message const *  request 
)

Definition at line 29 of file ServiceBase.cpp.

+ Here is the call graph for this function:

◆ LogCallServerMethod()

void ServiceBase::LogCallServerMethod ( char const *  methodName,
char const *  inputTypeName,
google::protobuf::Message const *  request 
)

Definition at line 35 of file ServiceBase.cpp.

+ Here is the call graph for this function:

◆ LogDisallowedMethod()

void ServiceBase::LogDisallowedMethod ( uint32  methodId)

Definition at line 23 of file ServiceBase.cpp.

+ Here is the call graph for this function:

◆ LogFailedParsingRequest()

void ServiceBase::LogFailedParsingRequest ( char const *  methodName)

Definition at line 52 of file ServiceBase.cpp.

+ Here is the call graph for this function:

◆ LogInvalidMethod()

void ServiceBase::LogInvalidMethod ( uint32  methodId)

Definition at line 47 of file ServiceBase.cpp.

◆ LogUnimplementedServerMethod()

void ServiceBase::LogUnimplementedServerMethod ( char const *  methodName,
google::protobuf::Message const *  request 
)

Definition at line 41 of file ServiceBase.cpp.

+ Here is the call graph for this function:

◆ SendRequest() [1/2]

virtual void ServiceBase::SendRequest ( uint32  serviceHash,
uint32  methodId,
google::protobuf::Message const *  request 
)
protectedpure virtual

◆ SendRequest() [2/2]

virtual void ServiceBase::SendRequest ( uint32  serviceHash,
uint32  methodId,
google::protobuf::Message const *  request,
std::function< void(MessageBuffer)>  callback 
)
protectedpure virtual

◆ SendResponse() [1/2]

virtual void ServiceBase::SendResponse ( uint32  serviceHash,
uint32  methodId,
uint32  token,
google::protobuf::Message const *  response 
)
protectedpure virtual

◆ SendResponse() [2/2]

virtual void ServiceBase::SendResponse ( uint32  serviceHash,
uint32  methodId,
uint32  token,
uint32  status 
)
protectedpure virtual

Member Data Documentation

◆ service_hash_

uint32 ServiceBase::service_hash_
protected

Definition at line 63 of file ServiceBase.h.


The documentation for this class was generated from the following files: