Craig Tiller | 9162466 | 2015-06-25 16:31:02 -0700 | [diff] [blame] | 1 | /* |
| 2 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 3 | * Copyright 2015 gRPC authors. |
Craig Tiller | 9162466 | 2015-06-25 16:31:02 -0700 | [diff] [blame] | 4 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
Craig Tiller | 9162466 | 2015-06-25 16:31:02 -0700 | [diff] [blame] | 8 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Craig Tiller | 9162466 | 2015-06-25 16:31:02 -0700 | [diff] [blame] | 10 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
Craig Tiller | 9162466 | 2015-06-25 16:31:02 -0700 | [diff] [blame] | 16 | * |
| 17 | */ |
| 18 | |
Craig Tiller | 9eb0fde | 2017-03-31 16:59:30 -0700 | [diff] [blame] | 19 | #include "src/core/ext/filters/client_channel/connector.h" |
Craig Tiller | 9162466 | 2015-06-25 16:31:02 -0700 | [diff] [blame] | 20 | |
Craig Tiller | 5de79ee | 2016-01-25 08:16:02 -0800 | [diff] [blame] | 21 | grpc_connector* grpc_connector_ref(grpc_connector* connector) { |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 22 | connector->vtable->ref(connector); |
Craig Tiller | 7391f13 | 2016-01-22 06:39:54 -0800 | [diff] [blame] | 23 | return connector; |
Craig Tiller | f7afa1f | 2015-06-26 09:02:20 -0700 | [diff] [blame] | 24 | } |
| 25 | |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 26 | void grpc_connector_unref(grpc_exec_ctx* exec_ctx, grpc_connector* connector) { |
| 27 | connector->vtable->unref(exec_ctx, connector); |
Craig Tiller | f7afa1f | 2015-06-26 09:02:20 -0700 | [diff] [blame] | 28 | } |
| 29 | |
Craig Tiller | a82950e | 2015-09-22 12:33:20 -0700 | [diff] [blame] | 30 | void grpc_connector_connect(grpc_exec_ctx* exec_ctx, grpc_connector* connector, |
| 31 | const grpc_connect_in_args* in_args, |
| 32 | grpc_connect_out_args* out_args, |
| 33 | grpc_closure* notify) { |
| 34 | connector->vtable->connect(exec_ctx, connector, in_args, out_args, notify); |
Craig Tiller | f7afa1f | 2015-06-26 09:02:20 -0700 | [diff] [blame] | 35 | } |
Craig Tiller | 131f6ed | 2015-09-15 08:20:20 -0700 | [diff] [blame] | 36 | |
Craig Tiller | cda759d | 2017-01-27 11:37:37 -0800 | [diff] [blame] | 37 | void grpc_connector_shutdown(grpc_exec_ctx* exec_ctx, grpc_connector* connector, |
| 38 | grpc_error* why) { |
| 39 | connector->vtable->shutdown(exec_ctx, connector, why); |
Craig Tiller | 131f6ed | 2015-09-15 08:20:20 -0700 | [diff] [blame] | 40 | } |