aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/connectivity_state.h
diff options
context:
space:
mode:
authorGravatar Michael Lumish <mlumish@google.com>2015-12-15 11:43:05 -0800
committerGravatar Michael Lumish <mlumish@google.com>2015-12-15 11:43:05 -0800
commitda61668122b63fc18d64231dede700139234bc75 (patch)
tree3b6fef704fd0e3670c0aa308dd6c24704c4f8c94 /src/core/transport/connectivity_state.h
parent960870549a31a354b63823319640a628a2fd1767 (diff)
parent5c8c3e78a5b2cd6fb8504b48bac7b7f030cce787 (diff)
Merge pull request #4454 from grpc/master
Re-cutting the 0.12 release from master.
Diffstat (limited to 'src/core/transport/connectivity_state.h')
-rw-r--r--src/core/transport/connectivity_state.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/transport/connectivity_state.h b/src/core/transport/connectivity_state.h
index 119b1c1554..a4eb6652e5 100644
--- a/src/core/transport/connectivity_state.h
+++ b/src/core/transport/connectivity_state.h
@@ -57,6 +57,8 @@ typedef struct {
extern int grpc_connectivity_state_trace;
+const char *grpc_connectivity_state_name(grpc_connectivity_state state);
+
void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker,
grpc_connectivity_state init_state,
const char *name);
@@ -73,16 +75,11 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx,
grpc_connectivity_state grpc_connectivity_state_check(
grpc_connectivity_state_tracker *tracker);
-/** Return 1 if the channel should start connecting, 0 otherwise */
+/** Return 1 if the channel should start connecting, 0 otherwise.
+ If current==NULL cancel notify if it is already queued (success==0 in that
+ case) */
int grpc_connectivity_state_notify_on_state_change(
grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker,
grpc_connectivity_state *current, grpc_closure *notify);
-/** Remove \a subscribed_notify from the list of closures to be called on a
- * state change if present, returning 1. Otherwise, nothing is done and return
- * 0. */
-int grpc_connectivity_state_change_unsubscribe(
- grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker,
- grpc_closure *subscribed_notify);
-
#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H */