19 #ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H
20 #define GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H
51 const grpc_arg* to_add,
size_t num_to_add);
101 const char* name,
bool default_value);
103 template <
typename T>
int grpc_channel_arg_get_integer(const grpc_arg *arg, const grpc_integer_options options)
Returns the value of arg, subject to the constraints in options.
T * grpc_channel_args_find_pointer(const grpc_channel_args *args, const char *name)
Definition: channel_args.h:104
char * grpc_channel_args_string(const grpc_channel_args *args)
grpc_channel_args * grpc_channel_args_union(const grpc_channel_args *a, const grpc_channel_args *b)
Perform the union of a and b, prioritizing a entries.
const grpc_arg * grpc_channel_args_find(const grpc_channel_args *args, const char *name)
Returns the value of argument name from args, or NULL if not found.
struct grpc_integer_options grpc_integer_options
grpc_arg grpc_channel_arg_pointer_create(char *name, void *value, const grpc_arg_pointer_vtable *vtable)
int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b)
grpc_arg grpc_channel_arg_string_create(char *name, char *value)
char * grpc_channel_args_find_string(const grpc_channel_args *args, const char *name)
Similar to the above, but needs to find the arg from args by the name first.
grpc_channel_args *(* grpc_channel_args_client_channel_creation_mutator)(const char *target, grpc_channel_args *old_args, grpc_channel_stack_type type)
Definition: channel_args.h:122
grpc_channel_args * grpc_channel_args_normalize(const grpc_channel_args *src)
Copy the arguments in src into a new instance, stably sorting keys.
grpc_channel_args * grpc_channel_args_copy_and_remove(const grpc_channel_args *src, const char **to_remove, size_t num_to_remove)
Copies the arguments in src except for those whose keys are in to_remove.
int grpc_channel_args_find_integer(const grpc_channel_args *args, const char *name, const grpc_integer_options options)
Similar to the above, but needs to find the arg from args by the name first.
char * grpc_channel_arg_get_string(const grpc_arg *arg)
Returns the value of arg if arg is of type GRPC_ARG_STRING.
bool grpc_channel_args_find_bool(const grpc_channel_args *args, const char *name, bool default_value)
Similar to the above, but needs to find the arg from args by the name first.
grpc_arg grpc_channel_arg_integer_create(char *name, int value)
grpc_channel_args_client_channel_creation_mutator grpc_channel_args_get_client_channel_creation_mutator()
void grpc_channel_args_set_client_channel_creation_mutator(grpc_channel_args_client_channel_creation_mutator cb)
bool grpc_channel_args_want_minimal_stack(const grpc_channel_args *args)
grpc_channel_args * grpc_channel_args_copy_and_add(const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add)
Copy the arguments in src and append to_add.
void grpc_channel_args_destroy(grpc_channel_args *a)
Destroy arguments created by grpc_channel_args_copy.
bool grpc_channel_arg_get_bool(const grpc_arg *arg, bool default_value)
If arg is of type GRPC_ARG_INTEGER, returns true if it's non-zero.
grpc_channel_args * grpc_channel_args_copy(const grpc_channel_args *src)
Copy the arguments in src into a new instance.
grpc_channel_args * grpc_channel_args_copy_and_add_and_remove(const grpc_channel_args *src, const char **to_remove, size_t num_to_remove, const grpc_arg *to_add, size_t num_to_add)
Copies the arguments from src except for those whose keys are in to_remove and appends the arguments ...
grpc_channel_stack_type
Definition: channel_stack_type.h:26
@ GRPC_ARG_POINTER
Definition: grpc_types.h:82
void * p
Definition: grpc_types.h:110
Definition: grpc_types.h:85
A single argument...
Definition: grpc_types.h:103
union grpc_arg::grpc_arg_value value
grpc_arg_type type
Definition: grpc_types.h:104
An array of arguments that can be passed around.
Definition: grpc_types.h:132
Definition: channel_args.h:72
int default_value
Definition: channel_args.h:73
int max_value
Definition: channel_args.h:75
int min_value
Definition: channel_args.h:74
struct grpc_arg::grpc_arg_value::grpc_arg_pointer pointer