GRPC C++  1.39.1
Data Structures | Namespaces | Typedefs | Functions
transport_security_common_api.h File Reference
#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/proto/grpc/gcp/transport_security_common.upb.h"

Go to the source code of this file.

Data Structures

struct  _grpc_gcp_RpcProtocolVersions_Version
 
struct  _grpc_gcp_RpcProtocolVersions
 

Namespaces

 grpc_core
 Round Robin Policy.
 
 grpc_core::internal
 

Typedefs

typedef struct _grpc_gcp_RpcProtocolVersions_Version grpc_gcp_rpc_protocol_versions_version
 
typedef struct _grpc_gcp_RpcProtocolVersions grpc_gcp_rpc_protocol_versions
 

Functions

bool grpc_gcp_rpc_protocol_versions_set_max (grpc_gcp_rpc_protocol_versions *versions, uint32_t max_major, uint32_t max_minor)
 This method sets the value for max_rpc_versions field of rpc protocol versions. More...
 
bool grpc_gcp_rpc_protocol_versions_set_min (grpc_gcp_rpc_protocol_versions *versions, uint32_t min_major, uint32_t min_minor)
 This method sets the value for min_rpc_versions field of rpc protocol versions. More...
 
bool grpc_gcp_rpc_protocol_versions_encode (const grpc_gcp_rpc_protocol_versions *versions, grpc_slice *slice)
 This method serializes an rpc protocol version and returns serialized rpc versions in grpc slice. More...
 
bool grpc_gcp_rpc_protocol_versions_encode (const grpc_gcp_RpcProtocolVersions *versions, upb_arena *arena, grpc_slice *slice)
 This method serializes an rpc protocol version and returns serialized rpc versions in grpc slice. More...
 
bool grpc_gcp_rpc_protocol_versions_decode (const grpc_slice &slice, grpc_gcp_rpc_protocol_versions *versions)
 This method de-serializes input in grpc slice form and stores the result in rpc protocol versions. More...
 
void grpc_gcp_rpc_protocol_versions_assign_from_upb (grpc_gcp_rpc_protocol_versions *versions, const grpc_gcp_RpcProtocolVersions *value)
 Assigns value of upb RpcProtocolVersions to grpc_gcp_rpc_protocol_versions. More...
 
void grpc_gcp_RpcProtocolVersions_assign_from_struct (grpc_gcp_RpcProtocolVersions *versions, upb_arena *arena, const grpc_gcp_rpc_protocol_versions *value)
 Assigns value of struct grpc_gcp_rpc_protocol_versions to RpcProtocolVersions. More...
 
bool grpc_gcp_rpc_protocol_versions_copy (const grpc_gcp_rpc_protocol_versions *src, grpc_gcp_rpc_protocol_versions *dst)
 This method performs a deep copy operation on rpc protocol versions instance. More...
 
bool grpc_gcp_rpc_protocol_versions_check (const grpc_gcp_rpc_protocol_versions *local_versions, const grpc_gcp_rpc_protocol_versions *peer_versions, grpc_gcp_rpc_protocol_versions_version *highest_common_version)
 This method performs a version check between local and peer rpc protocol versions. More...
 
int grpc_core::internal::grpc_gcp_rpc_protocol_version_compare (const grpc_gcp_rpc_protocol_versions_version *v1, const grpc_gcp_rpc_protocol_versions_version *v2)
 Exposed for testing only. More...
 

Typedef Documentation

◆ grpc_gcp_rpc_protocol_versions

◆ grpc_gcp_rpc_protocol_versions_version

Function Documentation

◆ grpc_gcp_rpc_protocol_versions_assign_from_upb()

void grpc_gcp_rpc_protocol_versions_assign_from_upb ( grpc_gcp_rpc_protocol_versions versions,
const grpc_gcp_RpcProtocolVersions value 
)

Assigns value of upb RpcProtocolVersions to grpc_gcp_rpc_protocol_versions.

◆ grpc_gcp_rpc_protocol_versions_check()

bool grpc_gcp_rpc_protocol_versions_check ( const grpc_gcp_rpc_protocol_versions local_versions,
const grpc_gcp_rpc_protocol_versions peer_versions,
grpc_gcp_rpc_protocol_versions_version highest_common_version 
)

This method performs a version check between local and peer rpc protocol versions.

  • local_versions: local rpc protocol versions instance.
  • peer_versions: peer rpc protocol versions instance.
  • highest_common_version: an output parameter that will store the highest common rpc protocol version both parties agreed on.

The method returns true if the check passes which means both parties agreed on a common rpc protocol to use, and false otherwise.

◆ grpc_gcp_rpc_protocol_versions_copy()

bool grpc_gcp_rpc_protocol_versions_copy ( const grpc_gcp_rpc_protocol_versions src,
grpc_gcp_rpc_protocol_versions dst 
)

This method performs a deep copy operation on rpc protocol versions instance.

  • src: rpc protocol versions instance that needs to be copied.
  • dst: rpc protocol versions instance that stores the copied result.

The method returns true on success and false otherwise.

◆ grpc_gcp_rpc_protocol_versions_decode()

bool grpc_gcp_rpc_protocol_versions_decode ( const grpc_slice slice,
grpc_gcp_rpc_protocol_versions versions 
)

This method de-serializes input in grpc slice form and stores the result in rpc protocol versions.

  • slice: a data stream containing a serialized rpc protocol version.
  • versions: an rpc protocol version instance used to hold de-serialized result.

The method returns true on success and false otherwise.

◆ grpc_gcp_rpc_protocol_versions_encode() [1/2]

bool grpc_gcp_rpc_protocol_versions_encode ( const grpc_gcp_rpc_protocol_versions versions,
grpc_slice slice 
)

This method serializes an rpc protocol version and returns serialized rpc versions in grpc slice.

  • versions: an rpc protocol versions instance.
  • slice: grpc slice where the serialized result will be written.

The method returns true on success and false otherwise.

◆ grpc_gcp_rpc_protocol_versions_encode() [2/2]

bool grpc_gcp_rpc_protocol_versions_encode ( const grpc_gcp_RpcProtocolVersions versions,
upb_arena *  arena,
grpc_slice slice 
)

This method serializes an rpc protocol version and returns serialized rpc versions in grpc slice.

  • versions: an rpc protocol versions instance.
  • arena: upb arena.
  • slice: grpc slice where the serialized result will be written.

The method returns true on success and false otherwise.

◆ grpc_gcp_rpc_protocol_versions_set_max()

bool grpc_gcp_rpc_protocol_versions_set_max ( grpc_gcp_rpc_protocol_versions versions,
uint32_t  max_major,
uint32_t  max_minor 
)

This method sets the value for max_rpc_versions field of rpc protocol versions.

  • versions: an rpc protocol version instance.
  • max_major: a major version of maximum supported RPC version.
  • max_minor: a minor version of maximum supported RPC version.

The method returns true on success and false otherwise.

◆ grpc_gcp_rpc_protocol_versions_set_min()

bool grpc_gcp_rpc_protocol_versions_set_min ( grpc_gcp_rpc_protocol_versions versions,
uint32_t  min_major,
uint32_t  min_minor 
)

This method sets the value for min_rpc_versions field of rpc protocol versions.

  • versions: an rpc protocol version instance.
  • min_major: a major version of minimum supported RPC version.
  • min_minor: a minor version of minimum supported RPC version.

The method returns true on success and false otherwise.

◆ grpc_gcp_RpcProtocolVersions_assign_from_struct()

void grpc_gcp_RpcProtocolVersions_assign_from_struct ( grpc_gcp_RpcProtocolVersions versions,
upb_arena *  arena,
const grpc_gcp_rpc_protocol_versions value 
)

Assigns value of struct grpc_gcp_rpc_protocol_versions to RpcProtocolVersions.