#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <algorithm>
#include <iosfwd>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include "absl/meta/type_traits.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "absl/types/variant.h"
#include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h>
#include "src/core/lib/avl/avl.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/surface/channel_stack_type.h"
#define GRPC_INTERNAL_ARG_EVENT_ENGINE …
namespace grpc_core {
template <typename T, typename Ignored = void >
struct ChannelArgTypeTraits;
namespace channel_args_detail {
inline int PointerCompare(void* a_ptr, const grpc_arg_pointer_vtable* a_vtable,
void* b_ptr,
const grpc_arg_pointer_vtable* b_vtable) { … }
RefType;
}
ChannelArgTypeTraits<T, absl::enable_if_t<std::is_base_of<RefCounted<channel_args_detail::RefType<T>>, channel_args_detail::RefType<T>>::value || std::is_base_of<RefCounted<channel_args_detail::RefType<T>, NonPolymorphicRefCount>, channel_args_detail::RefType<T>>::value || std::is_base_of<DualRefCounted<channel_args_detail::RefType<T>>, channel_args_detail::RefType<T>>::value, void>>;
template <typename T>
struct is_shared_ptr : std::false_type { … };
is_shared_ptr<std::shared_ptr<T>>;
ChannelArgTypeTraits<T, absl::enable_if_t<is_shared_ptr<T>::value, void>>;
ChannelArgTypeTraits<T, absl::void_t<typename T::RawPointerChannelArgTag>>;
template <typename T>
struct WrapInSharedPtr
: std::integral_constant<
bool, std::is_base_of<std::enable_shared_from_this<T>, T>::value> { … };
template <>
struct WrapInSharedPtr<grpc_event_engine::experimental::EventEngine>
: std::true_type { … };
template <typename T, typename Ignored = void >
struct GetObjectImpl;
GetObjectImpl<T, absl::enable_if_t<WrapInSharedPtr<T>::value, void>>;
GetObjectImpl<T, absl::enable_if_t<!WrapInSharedPtr<T>::value, void>>;
template <typename T>
struct ChannelArgNameTraits { … };
ChannelArgNameTraits<std::shared_ptr<T>>;
template <>
struct ChannelArgNameTraits<grpc_event_engine::experimental::EventEngine> { … };
class ChannelArgs { … };
std::ostream& operator<<(std::ostream& out, const ChannelArgs& args);
}
grpc_channel_args* grpc_channel_args_copy(const grpc_channel_args* src);
grpc_channel_args* grpc_channel_args_normalize(const grpc_channel_args* src);
grpc_channel_args* grpc_channel_args_copy_and_add(const grpc_channel_args* src,
const grpc_arg* to_add,
size_t num_to_add);
grpc_channel_args* grpc_channel_args_copy_and_remove(
const grpc_channel_args* src, const char** to_remove, size_t num_to_remove);
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);
grpc_channel_args* grpc_channel_args_union(const grpc_channel_args* a,
const grpc_channel_args* b);
void grpc_channel_args_destroy(grpc_channel_args* a);
inline void grpc_channel_args_destroy(const grpc_channel_args* a) { … }
int grpc_channel_args_compare(const grpc_channel_args* a,
const grpc_channel_args* b);
const grpc_arg* grpc_channel_args_find(const grpc_channel_args* args,
const char* name);
bool grpc_channel_args_want_minimal_stack(const grpc_channel_args* args);
grpc_integer_options;
int grpc_channel_arg_get_integer(const grpc_arg* arg,
const grpc_integer_options options);
int grpc_channel_args_find_integer(const grpc_channel_args* args,
const char* name,
const grpc_integer_options options);
char* grpc_channel_arg_get_string(const grpc_arg* arg);
char* grpc_channel_args_find_string(const grpc_channel_args* args,
const char* name);
bool grpc_channel_arg_get_bool(const grpc_arg* arg, bool default_value);
bool grpc_channel_args_find_bool(const grpc_channel_args* args,
const char* name, bool default_value);
template <typename T>
T* grpc_channel_args_find_pointer(const grpc_channel_args* args,
const char* name) { … }
grpc_arg grpc_channel_arg_string_create(char* name, char* value);
grpc_arg grpc_channel_arg_integer_create(char* name, int value);
grpc_arg grpc_channel_arg_pointer_create(char* name, void* value,
const grpc_arg_pointer_vtable* vtable);
std::string grpc_channel_args_string(const grpc_channel_args* args);
namespace grpc_core {
ChannelArgs ChannelArgsBuiltinPrecondition(const grpc_channel_args* src);
}
grpc_channel_args_client_channel_creation_mutator;
void grpc_channel_args_set_client_channel_creation_mutator(
grpc_channel_args_client_channel_creation_mutator cb);
grpc_channel_args_client_channel_creation_mutator
grpc_channel_args_get_client_channel_creation_mutator();
#endif