1 // Copyright 2021 gRPC authors.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 #ifndef TEST_CORE_TRANSPORT_BINDER_END2END_ECHO_SERVICE_H
16 #define TEST_CORE_TRANSPORT_BINDER_END2END_ECHO_SERVICE_H
18 #include "absl/strings/string_view.h"
20 #include "test/core/transport/binder/end2end/echo.grpc.pb.h"
22 namespace grpc_binder {
23 namespace end2end_testing {
25 // TODO(waynetu): Replace this with TestServiceImpl declared in
26 // test/cpp/end2end/test_service_impl.h
27 class EchoServer final : public EchoService::Service {
29 static const absl::string_view kCancelledText;
30 static const absl::string_view kTimeoutText;
32 grpc::Status EchoUnaryCall(grpc::ServerContext* context,
33 const EchoRequest* request,
34 EchoResponse* response) override;
36 static const size_t kServerStreamingCounts;
38 grpc::Status EchoServerStreamingCall(
39 grpc::ServerContext* context, const EchoRequest* request,
40 grpc::ServerWriter<EchoResponse>* writer) override;
41 grpc::Status EchoClientStreamingCall(grpc::ServerContext* context,
42 grpc::ServerReader<EchoRequest>* reader,
43 EchoResponse* response) override;
44 grpc::Status EchoBiDirStreamingCall(
45 grpc::ServerContext* context,
46 grpc::ServerReaderWriter<EchoResponse, EchoRequest>* stream) override;
49 } // namespace end2end_testing
50 } // namespace grpc_binder
52 #endif // TEST_CORE_TRANSPORT_BINDER_END2END_ECHO_SERVICE_H_