GRPC Core  0.10.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Functions
metadata.h File Reference
#include <grpc/support/slice.h>
#include <grpc/support/useful.h>

Go to the source code of this file.

Data Structures

struct  grpc_mdstr
 
struct  grpc_mdelem
 

Macros

#define GRPC_MDSTR_REF(s)   grpc_mdstr_ref((s))
 
#define GRPC_MDSTR_UNREF(s)   grpc_mdstr_unref((s))
 
#define GRPC_MDELEM_REF(s)   grpc_mdelem_ref((s))
 
#define GRPC_MDELEM_UNREF(s)   grpc_mdelem_unref((s))
 
#define GRPC_MDCTX_LOCKED_MDELEM_UNREF(ctx, elem)   grpc_mdctx_locked_mdelem_unref((ctx), (elem))
 
#define GRPC_MDSTR_KV_HASH(k_hash, v_hash)   (GPR_ROTL((k_hash), 2) ^ (v_hash))
 

Typedefs

typedef struct grpc_mdctx grpc_mdctx
 
typedef struct grpc_mdstr grpc_mdstr
 
typedef struct grpc_mdelem grpc_mdelem
 

Functions

grpc_mdctxgrpc_mdctx_create (void)
 
grpc_mdctxgrpc_mdctx_create_with_seed (gpr_uint32 seed)
 
void grpc_mdctx_ref (grpc_mdctx *mdctx)
 
void grpc_mdctx_unref (grpc_mdctx *mdctx)
 
size_t grpc_mdctx_get_mdtab_capacity_test_only (grpc_mdctx *mdctx)
 
size_t grpc_mdctx_get_mdtab_count_test_only (grpc_mdctx *mdctx)
 
size_t grpc_mdctx_get_mdtab_free_test_only (grpc_mdctx *mdctx)
 
grpc_mdstrgrpc_mdstr_from_string (grpc_mdctx *ctx, const char *str, int perform_key_canonicalization)
 
grpc_mdstrgrpc_mdstr_from_slice (grpc_mdctx *ctx, gpr_slice slice)
 
grpc_mdstrgrpc_mdstr_from_buffer (grpc_mdctx *ctx, const gpr_uint8 *str, size_t length)
 
gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed (grpc_mdstr *str)
 
grpc_mdelemgrpc_mdelem_from_metadata_strings (grpc_mdctx *ctx, grpc_mdstr *key, grpc_mdstr *value)
 
grpc_mdelemgrpc_mdelem_from_strings (grpc_mdctx *ctx, const char *key, const char *value)
 
grpc_mdelemgrpc_mdelem_from_slices (grpc_mdctx *ctx, gpr_slice key, gpr_slice value)
 
grpc_mdelemgrpc_mdelem_from_string_and_buffer (grpc_mdctx *ctx, const char *key, const gpr_uint8 *value, size_t value_length, int canonicalize_key)
 
void * grpc_mdelem_get_user_data (grpc_mdelem *md, void(*if_destroy_func)(void *))
 
void grpc_mdelem_set_user_data (grpc_mdelem *md, void(*destroy_func)(void *), void *user_data)
 
grpc_mdstrgrpc_mdstr_ref (grpc_mdstr *s)
 
void grpc_mdstr_unref (grpc_mdstr *s)
 
grpc_mdelemgrpc_mdelem_ref (grpc_mdelem *md)
 
void grpc_mdelem_unref (grpc_mdelem *md)
 
const char * grpc_mdstr_as_c_string (grpc_mdstr *s)
 
int grpc_mdstr_is_legal_header (grpc_mdstr *s)
 
int grpc_mdstr_is_bin_suffixed (grpc_mdstr *s)
 
void grpc_mdctx_lock (grpc_mdctx *ctx)
 
void grpc_mdctx_locked_mdelem_unref (grpc_mdctx *ctx, grpc_mdelem *elem)
 
void grpc_mdctx_unlock (grpc_mdctx *ctx)
 

Macro Definition Documentation

#define GRPC_MDCTX_LOCKED_MDELEM_UNREF (   ctx,
  elem 
)    grpc_mdctx_locked_mdelem_unref((ctx), (elem))
#define GRPC_MDELEM_REF (   s)    grpc_mdelem_ref((s))
#define GRPC_MDELEM_UNREF (   s)    grpc_mdelem_unref((s))
#define GRPC_MDSTR_KV_HASH (   k_hash,
  v_hash 
)    (GPR_ROTL((k_hash), 2) ^ (v_hash))
#define GRPC_MDSTR_REF (   s)    grpc_mdstr_ref((s))
#define GRPC_MDSTR_UNREF (   s)    grpc_mdstr_unref((s))

Typedef Documentation

typedef struct grpc_mdctx grpc_mdctx
typedef struct grpc_mdelem grpc_mdelem
typedef struct grpc_mdstr grpc_mdstr

Function Documentation

grpc_mdctx* grpc_mdctx_create ( void  )
grpc_mdctx* grpc_mdctx_create_with_seed ( gpr_uint32  seed)
size_t grpc_mdctx_get_mdtab_capacity_test_only ( grpc_mdctx mdctx)
size_t grpc_mdctx_get_mdtab_count_test_only ( grpc_mdctx mdctx)
size_t grpc_mdctx_get_mdtab_free_test_only ( grpc_mdctx mdctx)
void grpc_mdctx_lock ( grpc_mdctx ctx)
void grpc_mdctx_locked_mdelem_unref ( grpc_mdctx ctx,
grpc_mdelem elem 
)
void grpc_mdctx_ref ( grpc_mdctx mdctx)
void grpc_mdctx_unlock ( grpc_mdctx ctx)
void grpc_mdctx_unref ( grpc_mdctx mdctx)
grpc_mdelem* grpc_mdelem_from_metadata_strings ( grpc_mdctx ctx,
grpc_mdstr key,
grpc_mdstr value 
)
grpc_mdelem* grpc_mdelem_from_slices ( grpc_mdctx ctx,
gpr_slice  key,
gpr_slice  value 
)
grpc_mdelem* grpc_mdelem_from_string_and_buffer ( grpc_mdctx ctx,
const char *  key,
const gpr_uint8 value,
size_t  value_length,
int  canonicalize_key 
)
grpc_mdelem* grpc_mdelem_from_strings ( grpc_mdctx ctx,
const char *  key,
const char *  value 
)
void* grpc_mdelem_get_user_data ( grpc_mdelem md,
void(*)(void *)  if_destroy_func 
)
grpc_mdelem* grpc_mdelem_ref ( grpc_mdelem md)
void grpc_mdelem_set_user_data ( grpc_mdelem md,
void(*)(void *)  destroy_func,
void *  user_data 
)
void grpc_mdelem_unref ( grpc_mdelem md)
gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed ( grpc_mdstr str)
const char* grpc_mdstr_as_c_string ( grpc_mdstr s)
grpc_mdstr* grpc_mdstr_from_buffer ( grpc_mdctx ctx,
const gpr_uint8 str,
size_t  length 
)
grpc_mdstr* grpc_mdstr_from_slice ( grpc_mdctx ctx,
gpr_slice  slice 
)
grpc_mdstr* grpc_mdstr_from_string ( grpc_mdctx ctx,
const char *  str,
int  perform_key_canonicalization 
)
int grpc_mdstr_is_bin_suffixed ( grpc_mdstr s)
int grpc_mdstr_is_legal_header ( grpc_mdstr s)
grpc_mdstr* grpc_mdstr_ref ( grpc_mdstr s)
void grpc_mdstr_unref ( grpc_mdstr s)