Built motion from commit 44377920.|2.6.11
[motion2.git] / legacy-libs / grpc / deps / grpc / src / core / ext / filters / client_channel / client_channel.h
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  *
17  */
18
19 #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H
20 #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H
21
22 #include <grpc/support/port_platform.h>
23
24 #include "src/core/ext/filters/client_channel/client_channel_channelz.h"
25 #include "src/core/ext/filters/client_channel/client_channel_factory.h"
26 #include "src/core/ext/filters/client_channel/resolver.h"
27 #include "src/core/lib/channel/channel_stack.h"
28
29 extern grpc_core::TraceFlag grpc_client_channel_trace;
30
31 // Channel arg key for server URI string.
32 #define GRPC_ARG_SERVER_URI "grpc.server_uri"
33
34 /* A client channel is a channel that begins disconnected, and can connect
35    to some endpoint on demand. If that endpoint disconnects, it will be
36    connected to again later.
37
38    Calls on a disconnected client channel are queued until a connection is
39    established. */
40
41 extern const grpc_channel_filter grpc_client_channel_filter;
42
43 grpc_connectivity_state grpc_client_channel_check_connectivity_state(
44     grpc_channel_element* elem, int try_to_connect);
45
46 int grpc_client_channel_num_external_connectivity_watchers(
47     grpc_channel_element* elem);
48
49 void grpc_client_channel_watch_connectivity_state(
50     grpc_channel_element* elem, grpc_polling_entity pollent,
51     grpc_connectivity_state* state, grpc_closure* on_complete,
52     grpc_closure* watcher_timer_init);
53
54 /* Debug helper: pull the subchannel call from a call stack element */
55 grpc_core::RefCountedPtr<grpc_core::SubchannelCall>
56 grpc_client_channel_get_subchannel_call(grpc_call_element* elem);
57
58 #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */