LCOV - code coverage report
Current view: top level - gens/test/cpp/util - echo.grpc.pb.cc (source / functions) Hit Total Coverage
Test: tmp.zDYK9MVh93 Lines: 61 90 67.8 %
Date: 2015-10-10 Functions: 23 36 63.9 %

          Line data    Source code
       1             : // Generated by the gRPC protobuf plugin.
       2             : // If you make any local change, they will be lost.
       3             : // source: test/cpp/util/echo.proto
       4             : 
       5             : #include "test/cpp/util/echo.pb.h"
       6             : #include "test/cpp/util/echo.grpc.pb.h"
       7             : 
       8             : #include <grpc++/channel.h>
       9             : #include <grpc++/impl/client_unary_call.h>
      10             : #include <grpc++/impl/rpc_service_method.h>
      11             : #include <grpc++/impl/service_type.h>
      12             : #include <grpc++/support/async_unary_call.h>
      13             : #include <grpc++/support/async_stream.h>
      14             : #include <grpc++/support/sync_stream.h>
      15             : namespace grpc {
      16             : namespace cpp {
      17             : namespace test {
      18             : namespace util {
      19             : 
      20             : static const char* TestService_method_names[] = {
      21             :   "/grpc.cpp.test.util.TestService/Echo",
      22             :   "/grpc.cpp.test.util.TestService/RequestStream",
      23             :   "/grpc.cpp.test.util.TestService/ResponseStream",
      24             :   "/grpc.cpp.test.util.TestService/BidiStream",
      25             :   "/grpc.cpp.test.util.TestService/Unimplemented",
      26             : };
      27             : 
      28         138 : std::unique_ptr< TestService::Stub> TestService::NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options) {
      29         138 :   std::unique_ptr< TestService::Stub> stub(new TestService::Stub(channel));
      30         138 :   return stub;
      31             : }
      32             : 
      33         138 : TestService::Stub::Stub(const std::shared_ptr< ::grpc::Channel>& channel)
      34             :   : channel_(channel), rpcmethod_Echo_(TestService_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
      35             :   , rpcmethod_RequestStream_(TestService_method_names[1], ::grpc::RpcMethod::CLIENT_STREAMING, channel)
      36             :   , rpcmethod_ResponseStream_(TestService_method_names[2], ::grpc::RpcMethod::SERVER_STREAMING, channel)
      37             :   , rpcmethod_BidiStream_(TestService_method_names[3], ::grpc::RpcMethod::BIDI_STREAMING, channel)
      38         138 :   , rpcmethod_Unimplemented_(TestService_method_names[4], ::grpc::RpcMethod::NORMAL_RPC, channel)
      39         138 :   {}
      40             : 
      41      100664 : ::grpc::Status TestService::Stub::Echo(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) {
      42      100664 :   return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_Echo_, context, request, response);
      43             : }
      44             : 
      45          36 : ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>* TestService::Stub::AsyncEchoRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
      46          36 :   return new ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>(channel_.get(), cq, rpcmethod_Echo_, context, request);
      47             : }
      48             : 
      49           8 : ::grpc::ClientWriter< ::grpc::cpp::test::util::EchoRequest>* TestService::Stub::RequestStreamRaw(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response) {
      50           8 :   return new ::grpc::ClientWriter< ::grpc::cpp::test::util::EchoRequest>(channel_.get(), rpcmethod_RequestStream_, context, response);
      51             : }
      52             : 
      53           2 : ::grpc::ClientAsyncWriter< ::grpc::cpp::test::util::EchoRequest>* TestService::Stub::AsyncRequestStreamRaw(::grpc::ClientContext* context, ::grpc::cpp::test::util::EchoResponse* response, ::grpc::CompletionQueue* cq, void* tag) {
      54           2 :   return new ::grpc::ClientAsyncWriter< ::grpc::cpp::test::util::EchoRequest>(channel_.get(), cq, rpcmethod_RequestStream_, context, response, tag);
      55             : }
      56             : 
      57           4 : ::grpc::ClientReader< ::grpc::cpp::test::util::EchoResponse>* TestService::Stub::ResponseStreamRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request) {
      58           4 :   return new ::grpc::ClientReader< ::grpc::cpp::test::util::EchoResponse>(channel_.get(), rpcmethod_ResponseStream_, context, request);
      59             : }
      60             : 
      61           2 : ::grpc::ClientAsyncReader< ::grpc::cpp::test::util::EchoResponse>* TestService::Stub::AsyncResponseStreamRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
      62           2 :   return new ::grpc::ClientAsyncReader< ::grpc::cpp::test::util::EchoResponse>(channel_.get(), cq, rpcmethod_ResponseStream_, context, request, tag);
      63             : }
      64             : 
      65          15 : ::grpc::ClientReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>* TestService::Stub::BidiStreamRaw(::grpc::ClientContext* context) {
      66          15 :   return new ::grpc::ClientReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(channel_.get(), rpcmethod_BidiStream_, context);
      67             : }
      68             : 
      69           2 : ::grpc::ClientAsyncReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>* TestService::Stub::AsyncBidiStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
      70           2 :   return new ::grpc::ClientAsyncReaderWriter< ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(channel_.get(), cq, rpcmethod_BidiStream_, context, tag);
      71             : }
      72             : 
      73           4 : ::grpc::Status TestService::Stub::Unimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) {
      74           4 :   return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_Unimplemented_, context, request, response);
      75             : }
      76             : 
      77           0 : ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>* TestService::Stub::AsyncUnimplementedRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
      78           0 :   return new ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>(channel_.get(), cq, rpcmethod_Unimplemented_, context, request);
      79             : }
      80             : 
      81          26 : TestService::AsyncService::AsyncService() : ::grpc::AsynchronousService(TestService_method_names, 5) {}
      82             : 
      83         396 : TestService::Service::~Service() {
      84         198 :   delete service_;
      85         198 : }
      86             : 
      87           0 : ::grpc::Status TestService::Service::Echo(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::cpp::test::util::EchoResponse* response) {
      88             :   (void) context;
      89             :   (void) request;
      90             :   (void) response;
      91           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
      92             : }
      93             : 
      94          36 : void TestService::AsyncService::RequestEcho(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::cpp::test::util::EchoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      95          36 :   AsynchronousService::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
      96          36 : }
      97             : 
      98           0 : ::grpc::Status TestService::Service::RequestStream(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::cpp::test::util::EchoRequest>* reader, ::grpc::cpp::test::util::EchoResponse* response) {
      99             :   (void) context;
     100             :   (void) reader;
     101             :   (void) response;
     102           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     103             : }
     104             : 
     105           2 : void TestService::AsyncService::RequestRequestStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::cpp::test::util::EchoResponse, ::grpc::cpp::test::util::EchoRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     106           2 :   AsynchronousService::RequestClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
     107           2 : }
     108             : 
     109           0 : ::grpc::Status TestService::Service::ResponseStream(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerWriter< ::grpc::cpp::test::util::EchoResponse>* writer) {
     110             :   (void) context;
     111             :   (void) request;
     112             :   (void) writer;
     113           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     114             : }
     115             : 
     116           2 : void TestService::AsyncService::RequestResponseStream(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncWriter< ::grpc::cpp::test::util::EchoResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     117           2 :   AsynchronousService::RequestServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
     118           2 : }
     119             : 
     120           0 : ::grpc::Status TestService::Service::BidiStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::cpp::test::util::EchoResponse, ::grpc::cpp::test::util::EchoRequest>* stream) {
     121             :   (void) context;
     122             :   (void) stream;
     123           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     124             : }
     125             : 
     126           2 : void TestService::AsyncService::RequestBidiStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::cpp::test::util::EchoResponse, ::grpc::cpp::test::util::EchoRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     127           2 :   AsynchronousService::RequestBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
     128           2 : }
     129             : 
     130           4 : ::grpc::Status TestService::Service::Unimplemented(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::cpp::test::util::EchoResponse* response) {
     131             :   (void) context;
     132             :   (void) request;
     133             :   (void) response;
     134           4 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     135             : }
     136             : 
     137           0 : void TestService::AsyncService::RequestUnimplemented(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::cpp::test::util::EchoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     138           0 :   AsynchronousService::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag);
     139           0 : }
     140             : 
     141         192 : ::grpc::RpcService* TestService::Service::service() {
     142         192 :   if (service_ != nullptr) {
     143           0 :     return service_;
     144             :   }
     145         192 :   service_ = new ::grpc::RpcService();
     146             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     147             :       TestService_method_names[0],
     148             :       ::grpc::RpcMethod::NORMAL_RPC,
     149             :       new ::grpc::RpcMethodHandler< TestService::Service, ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(
     150         192 :           std::mem_fn(&TestService::Service::Echo), this)));
     151             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     152             :       TestService_method_names[1],
     153             :       ::grpc::RpcMethod::CLIENT_STREAMING,
     154             :       new ::grpc::ClientStreamingHandler< TestService::Service, ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(
     155         192 :           std::mem_fn(&TestService::Service::RequestStream), this)));
     156             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     157             :       TestService_method_names[2],
     158             :       ::grpc::RpcMethod::SERVER_STREAMING,
     159             :       new ::grpc::ServerStreamingHandler< TestService::Service, ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(
     160         192 :           std::mem_fn(&TestService::Service::ResponseStream), this)));
     161             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     162             :       TestService_method_names[3],
     163             :       ::grpc::RpcMethod::BIDI_STREAMING,
     164             :       new ::grpc::BidiStreamingHandler< TestService::Service, ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(
     165         192 :           std::mem_fn(&TestService::Service::BidiStream), this)));
     166             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     167             :       TestService_method_names[4],
     168             :       ::grpc::RpcMethod::NORMAL_RPC,
     169             :       new ::grpc::RpcMethodHandler< TestService::Service, ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(
     170         192 :           std::mem_fn(&TestService::Service::Unimplemented), this)));
     171         192 :   return service_;
     172             : }
     173             : 
     174             : 
     175             : static const char* UnimplementedService_method_names[] = {
     176             :   "/grpc.cpp.test.util.UnimplementedService/Unimplemented",
     177             : };
     178             : 
     179           4 : std::unique_ptr< UnimplementedService::Stub> UnimplementedService::NewStub(const std::shared_ptr< ::grpc::Channel>& channel, const ::grpc::StubOptions& options) {
     180           4 :   std::unique_ptr< UnimplementedService::Stub> stub(new UnimplementedService::Stub(channel));
     181           4 :   return stub;
     182             : }
     183             : 
     184           4 : UnimplementedService::Stub::Stub(const std::shared_ptr< ::grpc::Channel>& channel)
     185           4 :   : channel_(channel), rpcmethod_Unimplemented_(UnimplementedService_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
     186           4 :   {}
     187             : 
     188           2 : ::grpc::Status UnimplementedService::Stub::Unimplemented(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::cpp::test::util::EchoResponse* response) {
     189           2 :   return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_Unimplemented_, context, request, response);
     190             : }
     191             : 
     192           2 : ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>* UnimplementedService::Stub::AsyncUnimplementedRaw(::grpc::ClientContext* context, const ::grpc::cpp::test::util::EchoRequest& request, ::grpc::CompletionQueue* cq) {
     193           2 :   return new ::grpc::ClientAsyncResponseReader< ::grpc::cpp::test::util::EchoResponse>(channel_.get(), cq, rpcmethod_Unimplemented_, context, request);
     194             : }
     195             : 
     196           0 : UnimplementedService::AsyncService::AsyncService() : ::grpc::AsynchronousService(UnimplementedService_method_names, 1) {}
     197             : 
     198           0 : UnimplementedService::Service::~Service() {
     199           0 :   delete service_;
     200           0 : }
     201             : 
     202           0 : ::grpc::Status UnimplementedService::Service::Unimplemented(::grpc::ServerContext* context, const ::grpc::cpp::test::util::EchoRequest* request, ::grpc::cpp::test::util::EchoResponse* response) {
     203             :   (void) context;
     204             :   (void) request;
     205             :   (void) response;
     206           0 :   return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
     207             : }
     208             : 
     209           0 : void UnimplementedService::AsyncService::RequestUnimplemented(::grpc::ServerContext* context, ::grpc::cpp::test::util::EchoRequest* request, ::grpc::ServerAsyncResponseWriter< ::grpc::cpp::test::util::EchoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
     210           0 :   AsynchronousService::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
     211           0 : }
     212             : 
     213           0 : ::grpc::RpcService* UnimplementedService::Service::service() {
     214           0 :   if (service_ != nullptr) {
     215           0 :     return service_;
     216             :   }
     217           0 :   service_ = new ::grpc::RpcService();
     218             :   service_->AddMethod(new ::grpc::RpcServiceMethod(
     219             :       UnimplementedService_method_names[0],
     220             :       ::grpc::RpcMethod::NORMAL_RPC,
     221             :       new ::grpc::RpcMethodHandler< UnimplementedService::Service, ::grpc::cpp::test::util::EchoRequest, ::grpc::cpp::test::util::EchoResponse>(
     222           0 :           std::mem_fn(&UnimplementedService::Service::Unimplemented), this)));
     223           0 :   return service_;
     224             : }
     225             : 
     226             : 
     227             : }  // namespace grpc
     228             : }  // namespace cpp
     229             : }  // namespace test
     230             : }  // namespace util
     231             : 

Generated by: LCOV version 1.10