Other: Event Stream refactor.

Other: GRPCClient keeps track of the event stream status. [skip-ci]
Other: renamed StartEventStream to RunEventStream for clarity. [skip-ci]
This commit is contained in:
Xavier Michelon
2022-08-22 15:46:54 +02:00
committed by Jakub
parent 35d2cc9be7
commit 275a92ae93
13 changed files with 152 additions and 127 deletions

View File

@ -778,15 +778,31 @@ grpc::Status GRPCClient::setCurrentKeychain(QString const &keychain)
}
//****************************************************************************************************************************************************
/// \return true iff the event stream is active.
//****************************************************************************************************************************************************
bool GRPCClient::isEventStreamActive() const
{
QMutexLocker locker(&eventStreamMutex_);
return eventStreamContext_.get();
}
//****************************************************************************************************************************************************
/// \return The status for the gRPC coll.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::startEventStream()
grpc::Status GRPCClient::runEventStreamReader()
{
grpc::ClientContext ctx;
{
QMutexLocker locker(&eventStreamMutex_);
if (eventStreamContext_)
return Status(grpc::ALREADY_EXISTS, "event stream is already active.");
eventStreamContext_ = std::make_unique<ClientContext>();
}
EventStreamRequest request;
request.set_clientplatform(QSysInfo::prettyProductName().toStdString());
std::unique_ptr<grpc::ClientReader<grpc::StreamEvent>> reader(stub_->StartEventStream(&ctx, request));
std::unique_ptr<grpc::ClientReader<grpc::StreamEvent>> reader(stub_->RunEventStream(eventStreamContext_.get(), request));
grpc::StreamEvent event;
while (reader->Read(&event))
@ -823,15 +839,20 @@ grpc::Status GRPCClient::startEventStream()
}
}
return this->logGRPCCallStatus(reader->Finish(), __FUNCTION__);
Status result = this->logGRPCCallStatus(reader->Finish(), __FUNCTION__);
QMutexLocker locker(&eventStreamMutex_);
eventStreamContext_.reset();
return result;
}
//****************************************************************************************************************************************************
/// \return The status for the call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::stopEventStream()
grpc::Status GRPCClient::stopEventStreamReader()
{
if (!this->isEventStreamActive())
return Status::OK;
grpc::ClientContext ctx;
return this->logGRPCCallStatus(stub_->StopEventStream(&ctx, empty, &empty), __FUNCTION__);
}

View File

@ -191,8 +191,9 @@ signals: // mail related events
void apiCertIssue();
public:
grpc::Status startEventStream(); ///< Retrieve and signal the events in the event stream.
grpc::Status stopEventStream(); ///< Stop the event stream.
bool isEventStreamActive() const; ///< Check if the event stream is active.
grpc::Status runEventStreamReader(); ///< Retrieve and signal the events in the event stream.
grpc::Status stopEventStreamReader(); ///< Stop the event stream.
private slots:
void configFolderChanged();
@ -227,6 +228,8 @@ private: // data members.
Log *log_ { nullptr }; ///< The log for the GRPC client.
std::shared_ptr<grpc::Channel> channel_ { nullptr }; ///< The gRPC channel.
std::shared_ptr<grpc::Bridge::Stub> stub_ { nullptr }; ///< The gRPC stub (a.k.a. client).
mutable QMutex eventStreamMutex_; ///< The event stream mutex.
std::unique_ptr<grpc::ClientContext> eventStreamContext_; /// the client context for the gRPC event stream. Access protected by eventStreamMutex_.
};

View File

@ -75,7 +75,7 @@ static const char* Bridge_method_names[] = {
"/grpc.Bridge/LogoutUser",
"/grpc.Bridge/RemoveUser",
"/grpc.Bridge/ConfigureUserAppleMail",
"/grpc.Bridge/StartEventStream",
"/grpc.Bridge/RunEventStream",
"/grpc.Bridge/StopEventStream",
};
@ -139,7 +139,7 @@ Bridge::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, co
, rpcmethod_LogoutUser_(Bridge_method_names[50], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_RemoveUser_(Bridge_method_names[51], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ConfigureUserAppleMail_(Bridge_method_names[52], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_StartEventStream_(Bridge_method_names[53], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
, rpcmethod_RunEventStream_(Bridge_method_names[53], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
, rpcmethod_StopEventStream_(Bridge_method_names[54], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
{}
@ -1362,20 +1362,20 @@ void Bridge::Stub::async::ConfigureUserAppleMail(::grpc::ClientContext* context,
return result;
}
::grpc::ClientReader< ::grpc::StreamEvent>* Bridge::Stub::StartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) {
return ::grpc::internal::ClientReaderFactory< ::grpc::StreamEvent>::Create(channel_.get(), rpcmethod_StartEventStream_, context, request);
::grpc::ClientReader< ::grpc::StreamEvent>* Bridge::Stub::RunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) {
return ::grpc::internal::ClientReaderFactory< ::grpc::StreamEvent>::Create(channel_.get(), rpcmethod_RunEventStream_, context, request);
}
void Bridge::Stub::async::StartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ClientReadReactor< ::grpc::StreamEvent>* reactor) {
::grpc::internal::ClientCallbackReaderFactory< ::grpc::StreamEvent>::Create(stub_->channel_.get(), stub_->rpcmethod_StartEventStream_, context, request, reactor);
void Bridge::Stub::async::RunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ClientReadReactor< ::grpc::StreamEvent>* reactor) {
::grpc::internal::ClientCallbackReaderFactory< ::grpc::StreamEvent>::Create(stub_->channel_.get(), stub_->rpcmethod_RunEventStream_, context, request, reactor);
}
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* Bridge::Stub::AsyncStartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
return ::grpc::internal::ClientAsyncReaderFactory< ::grpc::StreamEvent>::Create(channel_.get(), cq, rpcmethod_StartEventStream_, context, request, true, tag);
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* Bridge::Stub::AsyncRunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
return ::grpc::internal::ClientAsyncReaderFactory< ::grpc::StreamEvent>::Create(channel_.get(), cq, rpcmethod_RunEventStream_, context, request, true, tag);
}
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* Bridge::Stub::PrepareAsyncStartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncReaderFactory< ::grpc::StreamEvent>::Create(channel_.get(), cq, rpcmethod_StartEventStream_, context, request, false, nullptr);
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* Bridge::Stub::PrepareAsyncRunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncReaderFactory< ::grpc::StreamEvent>::Create(channel_.get(), cq, rpcmethod_RunEventStream_, context, request, false, nullptr);
}
::grpc::Status Bridge::Stub::StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Empty* response) {
@ -1940,7 +1940,7 @@ Bridge::Service::Service() {
::grpc::ServerContext* ctx,
const ::grpc::EventStreamRequest* req,
::grpc::ServerWriter<::grpc::StreamEvent>* writer) {
return service->StartEventStream(ctx, req, writer);
return service->RunEventStream(ctx, req, writer);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[54],
@ -2328,7 +2328,7 @@ Bridge::Service::~Service() {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::StartEventStream(::grpc::ServerContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ServerWriter< ::grpc::StreamEvent>* writer) {
::grpc::Status Bridge::Service::RunEventStream(::grpc::ServerContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ServerWriter< ::grpc::StreamEvent>* writer) {
(void) context;
(void) request;
(void) writer;

View File

@ -436,14 +436,14 @@ class Bridge final {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncConfigureUserAppleMailRaw(context, request, cq));
}
// Server -> Client event stream
std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::StreamEvent>> StartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) {
return std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::StreamEvent>>(StartEventStreamRaw(context, request));
std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::StreamEvent>> RunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) {
return std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::StreamEvent>>(RunEventStreamRaw(context, request));
}
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>> AsyncStartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>>(AsyncStartEventStreamRaw(context, request, cq, tag));
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>> AsyncRunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>>(AsyncRunEventStreamRaw(context, request, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>> PrepareAsyncStartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>>(PrepareAsyncStartEventStreamRaw(context, request, cq));
std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>> PrepareAsyncRunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>>(PrepareAsyncRunEventStreamRaw(context, request, cq));
}
// Keep streaming until StopEventStream is called.
virtual ::grpc::Status StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Empty* response) = 0;
@ -571,7 +571,7 @@ class Bridge final {
virtual void ConfigureUserAppleMail(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) = 0;
virtual void ConfigureUserAppleMail(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0;
// Server -> Client event stream
virtual void StartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ClientReadReactor< ::grpc::StreamEvent>* reactor) = 0;
virtual void RunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ClientReadReactor< ::grpc::StreamEvent>* reactor) = 0;
// Keep streaming until StopEventStream is called.
virtual void StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) = 0;
virtual void StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0;
@ -686,9 +686,9 @@ class Bridge final {
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncRemoveUserRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncConfigureUserAppleMailRaw(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncConfigureUserAppleMailRaw(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientReaderInterface< ::grpc::StreamEvent>* StartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>* AsyncStartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>* PrepareAsyncStartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientReaderInterface< ::grpc::StreamEvent>* RunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>* AsyncRunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
virtual ::grpc::ClientAsyncReaderInterface< ::grpc::StreamEvent>* PrepareAsyncRunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncStopEventStreamRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncStopEventStreamRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0;
};
@ -1066,14 +1066,14 @@ class Bridge final {
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncConfigureUserAppleMail(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncConfigureUserAppleMailRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientReader< ::grpc::StreamEvent>> StartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) {
return std::unique_ptr< ::grpc::ClientReader< ::grpc::StreamEvent>>(StartEventStreamRaw(context, request));
std::unique_ptr< ::grpc::ClientReader< ::grpc::StreamEvent>> RunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) {
return std::unique_ptr< ::grpc::ClientReader< ::grpc::StreamEvent>>(RunEventStreamRaw(context, request));
}
std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>> AsyncStartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>>(AsyncStartEventStreamRaw(context, request, cq, tag));
std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>> AsyncRunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>>(AsyncRunEventStreamRaw(context, request, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>> PrepareAsyncStartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>>(PrepareAsyncStartEventStreamRaw(context, request, cq));
std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>> PrepareAsyncRunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::StreamEvent>>(PrepareAsyncRunEventStreamRaw(context, request, cq));
}
::grpc::Status StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Empty* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncStopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
@ -1191,7 +1191,7 @@ class Bridge final {
void RemoveUser(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override;
void ConfigureUserAppleMail(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) override;
void ConfigureUserAppleMail(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override;
void StartEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ClientReadReactor< ::grpc::StreamEvent>* reactor) override;
void RunEventStream(::grpc::ClientContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ClientReadReactor< ::grpc::StreamEvent>* reactor) override;
void StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) override;
void StopEventStream(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override;
private:
@ -1311,9 +1311,9 @@ class Bridge final {
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncRemoveUserRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncConfigureUserAppleMailRaw(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncConfigureUserAppleMailRaw(::grpc::ClientContext* context, const ::grpc::ConfigureAppleMailRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientReader< ::grpc::StreamEvent>* StartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) override;
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* AsyncStartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) override;
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* PrepareAsyncStartEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientReader< ::grpc::StreamEvent>* RunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request) override;
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* AsyncRunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq, void* tag) override;
::grpc::ClientAsyncReader< ::grpc::StreamEvent>* PrepareAsyncRunEventStreamRaw(::grpc::ClientContext* context, const ::grpc::EventStreamRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncStopEventStreamRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncStopEventStreamRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_AddLogEntry_;
@ -1369,7 +1369,7 @@ class Bridge final {
const ::grpc::internal::RpcMethod rpcmethod_LogoutUser_;
const ::grpc::internal::RpcMethod rpcmethod_RemoveUser_;
const ::grpc::internal::RpcMethod rpcmethod_ConfigureUserAppleMail_;
const ::grpc::internal::RpcMethod rpcmethod_StartEventStream_;
const ::grpc::internal::RpcMethod rpcmethod_RunEventStream_;
const ::grpc::internal::RpcMethod rpcmethod_StopEventStream_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
@ -1440,7 +1440,7 @@ class Bridge final {
virtual ::grpc::Status RemoveUser(::grpc::ServerContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response);
virtual ::grpc::Status ConfigureUserAppleMail(::grpc::ServerContext* context, const ::grpc::ConfigureAppleMailRequest* request, ::google::protobuf::Empty* response);
// Server -> Client event stream
virtual ::grpc::Status StartEventStream(::grpc::ServerContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ServerWriter< ::grpc::StreamEvent>* writer);
virtual ::grpc::Status RunEventStream(::grpc::ServerContext* context, const ::grpc::EventStreamRequest* request, ::grpc::ServerWriter< ::grpc::StreamEvent>* writer);
// Keep streaming until StopEventStream is called.
virtual ::grpc::Status StopEventStream(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response);
};
@ -2505,22 +2505,22 @@ class Bridge final {
}
};
template <class BaseClass>
class WithAsyncMethod_StartEventStream : public BaseClass {
class WithAsyncMethod_RunEventStream : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithAsyncMethod_StartEventStream() {
WithAsyncMethod_RunEventStream() {
::grpc::Service::MarkMethodAsync(53);
}
~WithAsyncMethod_StartEventStream() override {
~WithAsyncMethod_RunEventStream() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StartEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
::grpc::Status RunEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestStartEventStream(::grpc::ServerContext* context, ::grpc::EventStreamRequest* request, ::grpc::ServerAsyncWriter< ::grpc::StreamEvent>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
void RequestRunEventStream(::grpc::ServerContext* context, ::grpc::EventStreamRequest* request, ::grpc::ServerAsyncWriter< ::grpc::StreamEvent>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncServerStreaming(53, context, request, writer, new_call_cq, notification_cq, tag);
}
};
@ -2544,7 +2544,7 @@ class Bridge final {
::grpc::Service::RequestAsyncUnary(54, context, request, response, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_AddLogEntry<WithAsyncMethod_GuiReady<WithAsyncMethod_Quit<WithAsyncMethod_Restart<WithAsyncMethod_ShowOnStartup<WithAsyncMethod_ShowSplashScreen<WithAsyncMethod_IsFirstGuiStart<WithAsyncMethod_SetIsAutostartOn<WithAsyncMethod_IsAutostartOn<WithAsyncMethod_SetIsBetaEnabled<WithAsyncMethod_IsBetaEnabled<WithAsyncMethod_GoOs<WithAsyncMethod_TriggerReset<WithAsyncMethod_Version<WithAsyncMethod_LogsPath<WithAsyncMethod_LicensePath<WithAsyncMethod_ReleaseNotesPageLink<WithAsyncMethod_DependencyLicensesLink<WithAsyncMethod_LandingPageLink<WithAsyncMethod_SetColorSchemeName<WithAsyncMethod_ColorSchemeName<WithAsyncMethod_CurrentEmailClient<WithAsyncMethod_ReportBug<WithAsyncMethod_ForceLauncher<WithAsyncMethod_Login<WithAsyncMethod_Login2FA<WithAsyncMethod_Login2Passwords<WithAsyncMethod_LoginAbort<WithAsyncMethod_CheckUpdate<WithAsyncMethod_InstallUpdate<WithAsyncMethod_SetIsAutomaticUpdateOn<WithAsyncMethod_IsAutomaticUpdateOn<WithAsyncMethod_IsCacheOnDiskEnabled<WithAsyncMethod_DiskCachePath<WithAsyncMethod_ChangeLocalCache<WithAsyncMethod_SetIsDoHEnabled<WithAsyncMethod_IsDoHEnabled<WithAsyncMethod_SetUseSslForSmtp<WithAsyncMethod_UseSslForSmtp<WithAsyncMethod_Hostname<WithAsyncMethod_ImapPort<WithAsyncMethod_SmtpPort<WithAsyncMethod_ChangePorts<WithAsyncMethod_IsPortFree<WithAsyncMethod_AvailableKeychains<WithAsyncMethod_SetCurrentKeychain<WithAsyncMethod_CurrentKeychain<WithAsyncMethod_GetUserList<WithAsyncMethod_GetUser<WithAsyncMethod_SetUserSplitMode<WithAsyncMethod_LogoutUser<WithAsyncMethod_RemoveUser<WithAsyncMethod_ConfigureUserAppleMail<WithAsyncMethod_StartEventStream<WithAsyncMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
typedef WithAsyncMethod_AddLogEntry<WithAsyncMethod_GuiReady<WithAsyncMethod_Quit<WithAsyncMethod_Restart<WithAsyncMethod_ShowOnStartup<WithAsyncMethod_ShowSplashScreen<WithAsyncMethod_IsFirstGuiStart<WithAsyncMethod_SetIsAutostartOn<WithAsyncMethod_IsAutostartOn<WithAsyncMethod_SetIsBetaEnabled<WithAsyncMethod_IsBetaEnabled<WithAsyncMethod_GoOs<WithAsyncMethod_TriggerReset<WithAsyncMethod_Version<WithAsyncMethod_LogsPath<WithAsyncMethod_LicensePath<WithAsyncMethod_ReleaseNotesPageLink<WithAsyncMethod_DependencyLicensesLink<WithAsyncMethod_LandingPageLink<WithAsyncMethod_SetColorSchemeName<WithAsyncMethod_ColorSchemeName<WithAsyncMethod_CurrentEmailClient<WithAsyncMethod_ReportBug<WithAsyncMethod_ForceLauncher<WithAsyncMethod_Login<WithAsyncMethod_Login2FA<WithAsyncMethod_Login2Passwords<WithAsyncMethod_LoginAbort<WithAsyncMethod_CheckUpdate<WithAsyncMethod_InstallUpdate<WithAsyncMethod_SetIsAutomaticUpdateOn<WithAsyncMethod_IsAutomaticUpdateOn<WithAsyncMethod_IsCacheOnDiskEnabled<WithAsyncMethod_DiskCachePath<WithAsyncMethod_ChangeLocalCache<WithAsyncMethod_SetIsDoHEnabled<WithAsyncMethod_IsDoHEnabled<WithAsyncMethod_SetUseSslForSmtp<WithAsyncMethod_UseSslForSmtp<WithAsyncMethod_Hostname<WithAsyncMethod_ImapPort<WithAsyncMethod_SmtpPort<WithAsyncMethod_ChangePorts<WithAsyncMethod_IsPortFree<WithAsyncMethod_AvailableKeychains<WithAsyncMethod_SetCurrentKeychain<WithAsyncMethod_CurrentKeychain<WithAsyncMethod_GetUserList<WithAsyncMethod_GetUser<WithAsyncMethod_SetUserSplitMode<WithAsyncMethod_LogoutUser<WithAsyncMethod_RemoveUser<WithAsyncMethod_ConfigureUserAppleMail<WithAsyncMethod_RunEventStream<WithAsyncMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
template <class BaseClass>
class WithCallbackMethod_AddLogEntry : public BaseClass {
private:
@ -3977,25 +3977,25 @@ class Bridge final {
::grpc::CallbackServerContext* /*context*/, const ::grpc::ConfigureAppleMailRequest* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; }
};
template <class BaseClass>
class WithCallbackMethod_StartEventStream : public BaseClass {
class WithCallbackMethod_RunEventStream : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithCallbackMethod_StartEventStream() {
WithCallbackMethod_RunEventStream() {
::grpc::Service::MarkMethodCallback(53,
new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::EventStreamRequest, ::grpc::StreamEvent>(
[this](
::grpc::CallbackServerContext* context, const ::grpc::EventStreamRequest* request) { return this->StartEventStream(context, request); }));
::grpc::CallbackServerContext* context, const ::grpc::EventStreamRequest* request) { return this->RunEventStream(context, request); }));
}
~WithCallbackMethod_StartEventStream() override {
~WithCallbackMethod_RunEventStream() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StartEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
::grpc::Status RunEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerWriteReactor< ::grpc::StreamEvent>* StartEventStream(
virtual ::grpc::ServerWriteReactor< ::grpc::StreamEvent>* RunEventStream(
::grpc::CallbackServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/) { return nullptr; }
};
template <class BaseClass>
@ -4025,7 +4025,7 @@ class Bridge final {
virtual ::grpc::ServerUnaryReactor* StopEventStream(
::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; }
};
typedef WithCallbackMethod_AddLogEntry<WithCallbackMethod_GuiReady<WithCallbackMethod_Quit<WithCallbackMethod_Restart<WithCallbackMethod_ShowOnStartup<WithCallbackMethod_ShowSplashScreen<WithCallbackMethod_IsFirstGuiStart<WithCallbackMethod_SetIsAutostartOn<WithCallbackMethod_IsAutostartOn<WithCallbackMethod_SetIsBetaEnabled<WithCallbackMethod_IsBetaEnabled<WithCallbackMethod_GoOs<WithCallbackMethod_TriggerReset<WithCallbackMethod_Version<WithCallbackMethod_LogsPath<WithCallbackMethod_LicensePath<WithCallbackMethod_ReleaseNotesPageLink<WithCallbackMethod_DependencyLicensesLink<WithCallbackMethod_LandingPageLink<WithCallbackMethod_SetColorSchemeName<WithCallbackMethod_ColorSchemeName<WithCallbackMethod_CurrentEmailClient<WithCallbackMethod_ReportBug<WithCallbackMethod_ForceLauncher<WithCallbackMethod_Login<WithCallbackMethod_Login2FA<WithCallbackMethod_Login2Passwords<WithCallbackMethod_LoginAbort<WithCallbackMethod_CheckUpdate<WithCallbackMethod_InstallUpdate<WithCallbackMethod_SetIsAutomaticUpdateOn<WithCallbackMethod_IsAutomaticUpdateOn<WithCallbackMethod_IsCacheOnDiskEnabled<WithCallbackMethod_DiskCachePath<WithCallbackMethod_ChangeLocalCache<WithCallbackMethod_SetIsDoHEnabled<WithCallbackMethod_IsDoHEnabled<WithCallbackMethod_SetUseSslForSmtp<WithCallbackMethod_UseSslForSmtp<WithCallbackMethod_Hostname<WithCallbackMethod_ImapPort<WithCallbackMethod_SmtpPort<WithCallbackMethod_ChangePorts<WithCallbackMethod_IsPortFree<WithCallbackMethod_AvailableKeychains<WithCallbackMethod_SetCurrentKeychain<WithCallbackMethod_CurrentKeychain<WithCallbackMethod_GetUserList<WithCallbackMethod_GetUser<WithCallbackMethod_SetUserSplitMode<WithCallbackMethod_LogoutUser<WithCallbackMethod_RemoveUser<WithCallbackMethod_ConfigureUserAppleMail<WithCallbackMethod_StartEventStream<WithCallbackMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService;
typedef WithCallbackMethod_AddLogEntry<WithCallbackMethod_GuiReady<WithCallbackMethod_Quit<WithCallbackMethod_Restart<WithCallbackMethod_ShowOnStartup<WithCallbackMethod_ShowSplashScreen<WithCallbackMethod_IsFirstGuiStart<WithCallbackMethod_SetIsAutostartOn<WithCallbackMethod_IsAutostartOn<WithCallbackMethod_SetIsBetaEnabled<WithCallbackMethod_IsBetaEnabled<WithCallbackMethod_GoOs<WithCallbackMethod_TriggerReset<WithCallbackMethod_Version<WithCallbackMethod_LogsPath<WithCallbackMethod_LicensePath<WithCallbackMethod_ReleaseNotesPageLink<WithCallbackMethod_DependencyLicensesLink<WithCallbackMethod_LandingPageLink<WithCallbackMethod_SetColorSchemeName<WithCallbackMethod_ColorSchemeName<WithCallbackMethod_CurrentEmailClient<WithCallbackMethod_ReportBug<WithCallbackMethod_ForceLauncher<WithCallbackMethod_Login<WithCallbackMethod_Login2FA<WithCallbackMethod_Login2Passwords<WithCallbackMethod_LoginAbort<WithCallbackMethod_CheckUpdate<WithCallbackMethod_InstallUpdate<WithCallbackMethod_SetIsAutomaticUpdateOn<WithCallbackMethod_IsAutomaticUpdateOn<WithCallbackMethod_IsCacheOnDiskEnabled<WithCallbackMethod_DiskCachePath<WithCallbackMethod_ChangeLocalCache<WithCallbackMethod_SetIsDoHEnabled<WithCallbackMethod_IsDoHEnabled<WithCallbackMethod_SetUseSslForSmtp<WithCallbackMethod_UseSslForSmtp<WithCallbackMethod_Hostname<WithCallbackMethod_ImapPort<WithCallbackMethod_SmtpPort<WithCallbackMethod_ChangePorts<WithCallbackMethod_IsPortFree<WithCallbackMethod_AvailableKeychains<WithCallbackMethod_SetCurrentKeychain<WithCallbackMethod_CurrentKeychain<WithCallbackMethod_GetUserList<WithCallbackMethod_GetUser<WithCallbackMethod_SetUserSplitMode<WithCallbackMethod_LogoutUser<WithCallbackMethod_RemoveUser<WithCallbackMethod_ConfigureUserAppleMail<WithCallbackMethod_RunEventStream<WithCallbackMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService;
typedef CallbackService ExperimentalCallbackService;
template <class BaseClass>
class WithGenericMethod_AddLogEntry : public BaseClass {
@ -4929,18 +4929,18 @@ class Bridge final {
}
};
template <class BaseClass>
class WithGenericMethod_StartEventStream : public BaseClass {
class WithGenericMethod_RunEventStream : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithGenericMethod_StartEventStream() {
WithGenericMethod_RunEventStream() {
::grpc::Service::MarkMethodGeneric(53);
}
~WithGenericMethod_StartEventStream() override {
~WithGenericMethod_RunEventStream() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StartEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
::grpc::Status RunEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@ -6023,22 +6023,22 @@ class Bridge final {
}
};
template <class BaseClass>
class WithRawMethod_StartEventStream : public BaseClass {
class WithRawMethod_RunEventStream : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawMethod_StartEventStream() {
WithRawMethod_RunEventStream() {
::grpc::Service::MarkMethodRaw(53);
}
~WithRawMethod_StartEventStream() override {
~WithRawMethod_RunEventStream() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StartEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
::grpc::Status RunEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestStartEventStream(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
void RequestRunEventStream(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncServerStreaming(53, context, request, writer, new_call_cq, notification_cq, tag);
}
};
@ -7229,25 +7229,25 @@ class Bridge final {
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
};
template <class BaseClass>
class WithRawCallbackMethod_StartEventStream : public BaseClass {
class WithRawCallbackMethod_RunEventStream : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawCallbackMethod_StartEventStream() {
WithRawCallbackMethod_RunEventStream() {
::grpc::Service::MarkMethodRawCallback(53,
new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this](
::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->StartEventStream(context, request); }));
::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->RunEventStream(context, request); }));
}
~WithRawCallbackMethod_StartEventStream() override {
~WithRawCallbackMethod_RunEventStream() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status StartEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
::grpc::Status RunEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* StartEventStream(
virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* RunEventStream(
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; }
};
template <class BaseClass>
@ -8732,34 +8732,34 @@ class Bridge final {
};
typedef WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_IsCacheOnDiskEnabled<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_ChangeLocalCache<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService;
template <class BaseClass>
class WithSplitStreamingMethod_StartEventStream : public BaseClass {
class WithSplitStreamingMethod_RunEventStream : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithSplitStreamingMethod_StartEventStream() {
WithSplitStreamingMethod_RunEventStream() {
::grpc::Service::MarkMethodStreamed(53,
new ::grpc::internal::SplitServerStreamingHandler<
::grpc::EventStreamRequest, ::grpc::StreamEvent>(
[this](::grpc::ServerContext* context,
::grpc::ServerSplitStreamer<
::grpc::EventStreamRequest, ::grpc::StreamEvent>* streamer) {
return this->StreamedStartEventStream(context,
return this->StreamedRunEventStream(context,
streamer);
}));
}
~WithSplitStreamingMethod_StartEventStream() override {
~WithSplitStreamingMethod_RunEventStream() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status StartEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
::grpc::Status RunEventStream(::grpc::ServerContext* /*context*/, const ::grpc::EventStreamRequest* /*request*/, ::grpc::ServerWriter< ::grpc::StreamEvent>* /*writer*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with split streamed
virtual ::grpc::Status StreamedStartEventStream(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::grpc::EventStreamRequest,::grpc::StreamEvent>* server_split_streamer) = 0;
virtual ::grpc::Status StreamedRunEventStream(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::grpc::EventStreamRequest,::grpc::StreamEvent>* server_split_streamer) = 0;
};
typedef WithSplitStreamingMethod_StartEventStream<Service > SplitStreamedService;
typedef WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_IsCacheOnDiskEnabled<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_ChangeLocalCache<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithSplitStreamingMethod_StartEventStream<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
typedef WithSplitStreamingMethod_RunEventStream<Service > SplitStreamedService;
typedef WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_IsCacheOnDiskEnabled<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_ChangeLocalCache<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithSplitStreamingMethod_RunEventStream<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
};
} // namespace grpc

View File

@ -1467,7 +1467,7 @@ const char descriptor_table_protodef_bridge_2eproto[] PROTOBUF_SECTION_VARIABLE(
"LABLE_ERROR\020\000\022\031\n\025CACHE_CANT_MOVE_ERROR\020\001"
"\022\r\n\tDISK_FULL\020\002*A\n\025MailSettingsErrorType"
"\022\023\n\017IMAP_PORT_ISSUE\020\000\022\023\n\017SMTP_PORT_ISSUE"
"\020\0012\300\035\n\006Bridge\022\?\n\013AddLogEntry\022\030.grpc.AddL"
"\020\0012\276\035\n\006Bridge\022\?\n\013AddLogEntry\022\030.grpc.AddL"
"ogEntryRequest\032\026.google.protobuf.Empty\022:"
"\n\010GuiReady\022\026.google.protobuf.Empty\032\026.goo"
"gle.protobuf.Empty\0226\n\004Quit\022\026.google.prot"
@ -1558,12 +1558,12 @@ const char descriptor_table_protodef_bridge_2eproto[] PROTOBUF_SECTION_VARIABLE(
"protobuf.StringValue\032\026.google.protobuf.E"
"mpty\022Q\n\026ConfigureUserAppleMail\022\037.grpc.Co"
"nfigureAppleMailRequest\032\026.google.protobu"
"f.Empty\022A\n\020StartEventStream\022\030.grpc.Event"
"StreamRequest\032\021.grpc.StreamEvent0\001\022A\n\017St"
"opEventStream\022\026.google.protobuf.Empty\032\026."
"google.protobuf.EmptyB6Z4github.com/Prot"
"onMail/proton-bridge/v2/internal/grpcb\006p"
"roto3"
"f.Empty\022\?\n\016RunEventStream\022\030.grpc.EventSt"
"reamRequest\032\021.grpc.StreamEvent0\001\022A\n\017Stop"
"EventStream\022\026.google.protobuf.Empty\032\026.go"
"ogle.protobuf.EmptyB6Z4github.com/Proton"
"Mail/proton-bridge/v2/internal/grpcb\006pro"
"to3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_bridge_2eproto_deps[2] = {
&::descriptor_table_google_2fprotobuf_2fempty_2eproto,
@ -1571,7 +1571,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_bridge_2eproto_deps
};
static ::_pbi::once_flag descriptor_table_bridge_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_bridge_2eproto = {
false, false, 9325, descriptor_table_protodef_bridge_2eproto,
false, false, 9323, descriptor_table_protodef_bridge_2eproto,
"bridge.proto",
&descriptor_table_bridge_2eproto_once, descriptor_table_bridge_2eproto_deps, 2, 57,
schemas, file_default_instances, TableStruct_bridge_2eproto::offsets,