X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=clients%2Fgrpc-sync.h;fp=clients%2Fgrpc-sync.h;h=caaee5409bc8e8fc8b1d825a684bda380522f57f;hb=33aea95f02b025ecaf5917b10975119c07c353b3;hp=0000000000000000000000000000000000000000;hpb=0eedfd70b4682a51c81b4b8738ab42f665dc8798;p=src%2Fagl-compositor.git diff --git a/clients/grpc-sync.h b/clients/grpc-sync.h new file mode 100644 index 0000000..caaee54 --- /dev/null +++ b/clients/grpc-sync.h @@ -0,0 +1,46 @@ +#pragma once + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "shell.h" +#include "agl_shell.grpc.pb.h" + +namespace { + const char kDefaultGrpcServiceAddress[] = "127.0.0.1:14005"; +} + + +class GrpcServiceImpl final : public agl_shell_ipc::AglShellManagerService::CallbackService { +public: + GrpcServiceImpl(Shell *aglShell) : m_aglShell(aglShell) {} + + grpc::ServerUnaryReactor *ActivateApp(grpc::CallbackServerContext *context, + const ::agl_shell_ipc::ActivateRequest* request, + google::protobuf::Empty* /*response*/); + + grpc::ServerUnaryReactor *DeactivateApp(grpc::CallbackServerContext *context, + const ::agl_shell_ipc::DeactivateRequest* request, + google::protobuf::Empty* /*response*/); + + grpc::ServerUnaryReactor *SetAppSplit(grpc::CallbackServerContext *context, + const ::agl_shell_ipc::SplitRequest* request, + google::protobuf::Empty* /*response*/); + + grpc::ServerUnaryReactor *SetAppFloat(grpc::CallbackServerContext *context, + const ::agl_shell_ipc::FloatRequest* request, + google::protobuf::Empty* /*response*/); + grpc::ServerUnaryReactor *AppStatusState(grpc::CallbackServerContext *context, + google::protobuf::Empty *empty, + ::grpc::ServerWriter<::agl_shell_ipc::AppState>* writer); +private: + Shell *m_aglShell; +};