Program Listing for File app_driver.grpc.pb.h

Return to documentation for file (src/core/services/generated/app_driver.grpc.pb.h)

Copy
Copied!
            

// Generated by the gRPC C++ plugin. // If you make any local change, they will be lost. // source: app_driver.proto // Original file comments: // // SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-License-Identifier: Apache-2.0 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #ifndef GRPC_app_5fdriver_2eproto__INCLUDED #define GRPC_app_5fdriver_2eproto__INCLUDED #include "app_driver.pb.h" #include <functional> #include <grpcpp/generic/async_generic_service.h> #include <grpcpp/support/async_stream.h> #include <grpcpp/support/async_unary_call.h> #include <grpcpp/support/client_callback.h> #include <grpcpp/client_context.h> #include <grpcpp/completion_queue.h> #include <grpcpp/support/message_allocator.h> #include <grpcpp/support/method_handler.h> #include <grpcpp/impl/proto_utils.h> #include <grpcpp/impl/rpc_method.h> #include <grpcpp/support/server_callback.h> #include <grpcpp/impl/server_callback_handlers.h> #include <grpcpp/server_context.h> #include <grpcpp/impl/service_type.h> #include <grpcpp/support/status.h> #include <grpcpp/support/stub_options.h> #include <grpcpp/support/sync_stream.h> namespace holoscan { namespace service { class AppDriverService final { public: static constexpr char const* service_full_name() { return "holoscan.service.AppDriverService"; } class StubInterface { public: virtual ~StubInterface() {} virtual ::grpc::Status AllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::holoscan::service::FragmentAllocationResponse* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::FragmentAllocationResponse>> AsyncAllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::FragmentAllocationResponse>>(AsyncAllocateFragmentsRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::FragmentAllocationResponse>> PrepareAsyncAllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::FragmentAllocationResponse>>(PrepareAsyncAllocateFragmentsRaw(context, request, cq)); } virtual ::grpc::Status ReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::holoscan::service::WorkerExecutionFinishedResponse* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::WorkerExecutionFinishedResponse>> AsyncReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::WorkerExecutionFinishedResponse>>(AsyncReportWorkerExecutionFinishedRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::WorkerExecutionFinishedResponse>> PrepareAsyncReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::WorkerExecutionFinishedResponse>>(PrepareAsyncReportWorkerExecutionFinishedRaw(context, request, cq)); } class async_interface { public: virtual ~async_interface() {} virtual void AllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest* request, ::holoscan::service::FragmentAllocationResponse* response, std::function<void(::grpc::Status)>) = 0; virtual void AllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest* request, ::holoscan::service::FragmentAllocationResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void ReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest* request, ::holoscan::service::WorkerExecutionFinishedResponse* response, std::function<void(::grpc::Status)>) = 0; virtual void ReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest* request, ::holoscan::service::WorkerExecutionFinishedResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } class async_interface* experimental_async() { return async(); } private: virtual ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::FragmentAllocationResponse>* AsyncAllocateFragmentsRaw(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::FragmentAllocationResponse>* PrepareAsyncAllocateFragmentsRaw(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::WorkerExecutionFinishedResponse>* AsyncReportWorkerExecutionFinishedRaw(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::holoscan::service::WorkerExecutionFinishedResponse>* PrepareAsyncReportWorkerExecutionFinishedRaw(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); ::grpc::Status AllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::holoscan::service::FragmentAllocationResponse* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::FragmentAllocationResponse>> AsyncAllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::FragmentAllocationResponse>>(AsyncAllocateFragmentsRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::FragmentAllocationResponse>> PrepareAsyncAllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::FragmentAllocationResponse>>(PrepareAsyncAllocateFragmentsRaw(context, request, cq)); } ::grpc::Status ReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::holoscan::service::WorkerExecutionFinishedResponse* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::WorkerExecutionFinishedResponse>> AsyncReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::WorkerExecutionFinishedResponse>>(AsyncReportWorkerExecutionFinishedRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::WorkerExecutionFinishedResponse>> PrepareAsyncReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::holoscan::service::WorkerExecutionFinishedResponse>>(PrepareAsyncReportWorkerExecutionFinishedRaw(context, request, cq)); } class async final : public StubInterface::async_interface { public: void AllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest* request, ::holoscan::service::FragmentAllocationResponse* response, std::function<void(::grpc::Status)>) override; void AllocateFragments(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest* request, ::holoscan::service::FragmentAllocationResponse* response, ::grpc::ClientUnaryReactor* reactor) override; void ReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest* request, ::holoscan::service::WorkerExecutionFinishedResponse* response, std::function<void(::grpc::Status)>) override; void ReportWorkerExecutionFinished(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest* request, ::holoscan::service::WorkerExecutionFinishedResponse* response, ::grpc::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } Stub* stub() { return stub_; } Stub* stub_; }; class async* async() override { return &async_stub_; } private: std::shared_ptr< ::grpc::ChannelInterface> channel_; class async async_stub_{this}; ::grpc::ClientAsyncResponseReader< ::holoscan::service::FragmentAllocationResponse>* AsyncAllocateFragmentsRaw(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::holoscan::service::FragmentAllocationResponse>* PrepareAsyncAllocateFragmentsRaw(::grpc::ClientContext* context, const ::holoscan::service::FragmentAllocationRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::holoscan::service::WorkerExecutionFinishedResponse>* AsyncReportWorkerExecutionFinishedRaw(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::holoscan::service::WorkerExecutionFinishedResponse>* PrepareAsyncReportWorkerExecutionFinishedRaw(::grpc::ClientContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_AllocateFragments_; const ::grpc::internal::RpcMethod rpcmethod_ReportWorkerExecutionFinished_; }; static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); class Service : public ::grpc::Service { public: Service(); virtual ~Service(); virtual ::grpc::Status AllocateFragments(::grpc::ServerContext* context, const ::holoscan::service::FragmentAllocationRequest* request, ::holoscan::service::FragmentAllocationResponse* response); virtual ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest* request, ::holoscan::service::WorkerExecutionFinishedResponse* response); }; template <class BaseClass> class WithAsyncMethod_AllocateFragments : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_AllocateFragments() { ::grpc::Service::MarkMethodAsync(0); } ~WithAsyncMethod_AllocateFragments() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status AllocateFragments(::grpc::ServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestAllocateFragments(::grpc::ServerContext* context, ::holoscan::service::FragmentAllocationRequest* request, ::grpc::ServerAsyncResponseWriter< ::holoscan::service::FragmentAllocationResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); } }; template <class BaseClass> class WithAsyncMethod_ReportWorkerExecutionFinished : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_ReportWorkerExecutionFinished() { ::grpc::Service::MarkMethodAsync(1); } ~WithAsyncMethod_ReportWorkerExecutionFinished() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestReportWorkerExecutionFinished(::grpc::ServerContext* context, ::holoscan::service::WorkerExecutionFinishedRequest* request, ::grpc::ServerAsyncResponseWriter< ::holoscan::service::WorkerExecutionFinishedResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); } }; typedef WithAsyncMethod_AllocateFragments<WithAsyncMethod_ReportWorkerExecutionFinished<Service > > AsyncService; template <class BaseClass> class WithCallbackMethod_AllocateFragments : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_AllocateFragments() { ::grpc::Service::MarkMethodCallback(0, new ::grpc::internal::CallbackUnaryHandler< ::holoscan::service::FragmentAllocationRequest, ::holoscan::service::FragmentAllocationResponse>( [this]( ::grpc::CallbackServerContext* context, const ::holoscan::service::FragmentAllocationRequest* request, ::holoscan::service::FragmentAllocationResponse* response) { return this->AllocateFragments(context, request, response); }));} void SetMessageAllocatorFor_AllocateFragments( ::grpc::MessageAllocator< ::holoscan::service::FragmentAllocationRequest, ::holoscan::service::FragmentAllocationResponse>* allocator) { ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); static_cast<::grpc::internal::CallbackUnaryHandler< ::holoscan::service::FragmentAllocationRequest, ::holoscan::service::FragmentAllocationResponse>*>(handler) ->SetMessageAllocator(allocator); } ~WithCallbackMethod_AllocateFragments() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status AllocateFragments(::grpc::ServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* AllocateFragments( ::grpc::CallbackServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) { return nullptr; } }; template <class BaseClass> class WithCallbackMethod_ReportWorkerExecutionFinished : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_ReportWorkerExecutionFinished() { ::grpc::Service::MarkMethodCallback(1, new ::grpc::internal::CallbackUnaryHandler< ::holoscan::service::WorkerExecutionFinishedRequest, ::holoscan::service::WorkerExecutionFinishedResponse>( [this]( ::grpc::CallbackServerContext* context, const ::holoscan::service::WorkerExecutionFinishedRequest* request, ::holoscan::service::WorkerExecutionFinishedResponse* response) { return this->ReportWorkerExecutionFinished(context, request, response); }));} void SetMessageAllocatorFor_ReportWorkerExecutionFinished( ::grpc::MessageAllocator< ::holoscan::service::WorkerExecutionFinishedRequest, ::holoscan::service::WorkerExecutionFinishedResponse>* allocator) { ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); static_cast<::grpc::internal::CallbackUnaryHandler< ::holoscan::service::WorkerExecutionFinishedRequest, ::holoscan::service::WorkerExecutionFinishedResponse>*>(handler) ->SetMessageAllocator(allocator); } ~WithCallbackMethod_ReportWorkerExecutionFinished() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* ReportWorkerExecutionFinished( ::grpc::CallbackServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) { return nullptr; } }; typedef WithCallbackMethod_AllocateFragments<WithCallbackMethod_ReportWorkerExecutionFinished<Service > > CallbackService; typedef CallbackService ExperimentalCallbackService; template <class BaseClass> class WithGenericMethod_AllocateFragments : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_AllocateFragments() { ::grpc::Service::MarkMethodGeneric(0); } ~WithGenericMethod_AllocateFragments() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status AllocateFragments(::grpc::ServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template <class BaseClass> class WithGenericMethod_ReportWorkerExecutionFinished : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_ReportWorkerExecutionFinished() { ::grpc::Service::MarkMethodGeneric(1); } ~WithGenericMethod_ReportWorkerExecutionFinished() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template <class BaseClass> class WithRawMethod_AllocateFragments : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_AllocateFragments() { ::grpc::Service::MarkMethodRaw(0); } ~WithRawMethod_AllocateFragments() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status AllocateFragments(::grpc::ServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestAllocateFragments(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); } }; template <class BaseClass> class WithRawMethod_ReportWorkerExecutionFinished : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_ReportWorkerExecutionFinished() { ::grpc::Service::MarkMethodRaw(1); } ~WithRawMethod_ReportWorkerExecutionFinished() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestReportWorkerExecutionFinished(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); } }; template <class BaseClass> class WithRawCallbackMethod_AllocateFragments : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_AllocateFragments() { ::grpc::Service::MarkMethodRawCallback(0, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AllocateFragments(context, request, response); })); } ~WithRawCallbackMethod_AllocateFragments() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status AllocateFragments(::grpc::ServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* AllocateFragments( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template <class BaseClass> class WithRawCallbackMethod_ReportWorkerExecutionFinished : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_ReportWorkerExecutionFinished() { ::grpc::Service::MarkMethodRawCallback(1, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ReportWorkerExecutionFinished(context, request, response); })); } ~WithRawCallbackMethod_ReportWorkerExecutionFinished() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* ReportWorkerExecutionFinished( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template <class BaseClass> class WithStreamedUnaryMethod_AllocateFragments : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_AllocateFragments() { ::grpc::Service::MarkMethodStreamed(0, new ::grpc::internal::StreamedUnaryHandler< ::holoscan::service::FragmentAllocationRequest, ::holoscan::service::FragmentAllocationResponse>( [this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::holoscan::service::FragmentAllocationRequest, ::holoscan::service::FragmentAllocationResponse>* streamer) { return this->StreamedAllocateFragments(context, streamer); })); } ~WithStreamedUnaryMethod_AllocateFragments() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status AllocateFragments(::grpc::ServerContext* /*context*/, const ::holoscan::service::FragmentAllocationRequest* /*request*/, ::holoscan::service::FragmentAllocationResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary virtual ::grpc::Status StreamedAllocateFragments(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::holoscan::service::FragmentAllocationRequest,::holoscan::service::FragmentAllocationResponse>* server_unary_streamer) = 0; }; template <class BaseClass> class WithStreamedUnaryMethod_ReportWorkerExecutionFinished : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_ReportWorkerExecutionFinished() { ::grpc::Service::MarkMethodStreamed(1, new ::grpc::internal::StreamedUnaryHandler< ::holoscan::service::WorkerExecutionFinishedRequest, ::holoscan::service::WorkerExecutionFinishedResponse>( [this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::holoscan::service::WorkerExecutionFinishedRequest, ::holoscan::service::WorkerExecutionFinishedResponse>* streamer) { return this->StreamedReportWorkerExecutionFinished(context, streamer); })); } ~WithStreamedUnaryMethod_ReportWorkerExecutionFinished() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status ReportWorkerExecutionFinished(::grpc::ServerContext* /*context*/, const ::holoscan::service::WorkerExecutionFinishedRequest* /*request*/, ::holoscan::service::WorkerExecutionFinishedResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary virtual ::grpc::Status StreamedReportWorkerExecutionFinished(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::holoscan::service::WorkerExecutionFinishedRequest,::holoscan::service::WorkerExecutionFinishedResponse>* server_unary_streamer) = 0; }; typedef WithStreamedUnaryMethod_AllocateFragments<WithStreamedUnaryMethod_ReportWorkerExecutionFinished<Service > > StreamedUnaryService; typedef Service SplitStreamedService; typedef WithStreamedUnaryMethod_AllocateFragments<WithStreamedUnaryMethod_ReportWorkerExecutionFinished<Service > > StreamedService; }; } // namespace service } // namespace holoscan #endif// GRPC_app_5fdriver_2eproto__INCLUDED

© Copyright 2022-2023, NVIDIA. Last updated on Sep 13, 2023.