identt
Protected Member Functions | List of all members
identt::hrpc::ProtoServiceBase< HttpServerT > Class Template Reference
Inheritance diagram for identt::hrpc::ProtoServiceBase< HttpServerT >:
identt::hrpc::HrpcMasterEndpointService< HttpServerT > identt::hrpc::HrpcRemoteEndpointService< HttpServerT >

Protected Member Functions

bool ProtoRequest (typename HttpServerT::ReqPtr request)
 ProtoRequest : Check if request is protobuf from Content-Type and Accept fields. More...
 
bool SharedSecretOK (typename HttpServerT::ReqPtr request, std::string sharedkey)
 SharedSecretOK : Check if shared key header is present and ok. More...
 
int ServiceName (typename HttpServerT::ReqPtr request)
 ServiceName : Check protobuf request service name. More...
 
void ServiceOKAction (typename HttpServerT::RespPtr response, typename HttpServerT::ReqPtr request, std::string &payload)
 ServiceOKAction : OK Action template for service. More...
 
void ServiceOKAction (typename HttpServerT::RespPtr response, typename HttpServerT::ReqPtr request, std::string &&payload)
 ServiceOKAction : OK Action template for service. More...
 
void ServiceErrAction (typename HttpServerT::RespPtr response, typename HttpServerT::ReqPtr request, int ecode, std::string &emsg)
 ServiceErrAction : Error Action template for service. More...
 

Member Function Documentation

§ ProtoRequest()

template<class HttpServerT >
bool identt::hrpc::ProtoServiceBase< HttpServerT >::ProtoRequest ( typename HttpServerT::ReqPtr  request)
inlineprotected

ProtoRequest : Check if request is protobuf from Content-Type and Accept fields.

Parameters
requesttypename HttpServerT::ReqPtr request
Returns
bool is proto

§ ServiceErrAction()

template<class HttpServerT >
void identt::hrpc::ProtoServiceBase< HttpServerT >::ServiceErrAction ( typename HttpServerT::RespPtr  response,
typename HttpServerT::ReqPtr  request,
int  ecode,
std::string &  emsg 
)
inlineprotected

ServiceErrAction : Error Action template for service.

Parameters
responsetypename HttpServerT::RespPtr response
requesttypename HttpServerT::ReqPtr request
ecodeint error code
emsgstd::string& error message
Returns
none

§ ServiceName()

template<class HttpServerT >
int identt::hrpc::ProtoServiceBase< HttpServerT >::ServiceName ( typename HttpServerT::ReqPtr  request)
inlineprotected

ServiceName : Check protobuf request service name.

Parameters
requesttypename HttpServerT::ReqPtr request
Returns
int service id

§ ServiceOKAction() [1/2]

template<class HttpServerT >
void identt::hrpc::ProtoServiceBase< HttpServerT >::ServiceOKAction ( typename HttpServerT::RespPtr  response,
typename HttpServerT::ReqPtr  request,
std::string &  payload 
)
inlineprotected

ServiceOKAction : OK Action template for service.

Parameters
responsetypename HttpServerT::RespPtr response
requesttypename HttpServerT::ReqPtr request
payloadstd::string& payload
Returns
none

§ ServiceOKAction() [2/2]

template<class HttpServerT >
void identt::hrpc::ProtoServiceBase< HttpServerT >::ServiceOKAction ( typename HttpServerT::RespPtr  response,
typename HttpServerT::ReqPtr  request,
std::string &&  payload 
)
inlineprotected

ServiceOKAction : OK Action template for service.

Parameters
responsetypename HttpServerT::RespPtr response
requesttypename HttpServerT::ReqPtr request
payloadstd::string&& payload
Returns
none

§ SharedSecretOK()

template<class HttpServerT >
bool identt::hrpc::ProtoServiceBase< HttpServerT >::SharedSecretOK ( typename HttpServerT::ReqPtr  request,
std::string  sharedkey 
)
inlineprotected

SharedSecretOK : Check if shared key header is present and ok.

Parameters
requesttypename HttpServerT::ReqPtr request
sharedkeystd::string shared key to compare
Returns
bool is valid

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