Loading...
Searching...
No Matches
Data Structures | Macros | Functions
as_cdt_ctx.h File Reference
#include <aerospike/as_cdt_order.h>
#include <aerospike/as_vector.h>
#include <aerospike/as_val.h>
+ Include dependency graph for as_cdt_ctx.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as_cdt_ctx
 
struct  as_cdt_ctx_item
 

Macros

#define AS_CDT_CTX_VALUE   0x2
 

Functions

AS_EXTERN uint32_t as_cdt_ctx_base64_capacity (const as_cdt_ctx *ctx)
 
AS_EXTERN uint32_t as_cdt_ctx_byte_capacity (const as_cdt_ctx *ctx)
 
AS_EXTERN bool as_cdt_ctx_from_base64 (as_cdt_ctx *ctx, const char *base64)
 
AS_EXTERN bool as_cdt_ctx_from_bytes (as_cdt_ctx *ctx, const uint8_t *bytes, uint32_t size)
 
AS_EXTERN bool as_cdt_ctx_to_base64 (const as_cdt_ctx *ctx, char *base64, uint32_t capacity)
 
AS_EXTERN uint32_t as_cdt_ctx_to_bytes (const as_cdt_ctx *ctx, uint8_t *bytes, uint32_t capacity)
 

Macro Definition Documentation

◆ AS_CDT_CTX_VALUE

#define AS_CDT_CTX_VALUE   0x2

Definition at line 47 of file as_cdt_ctx.h.

Function Documentation

◆ as_cdt_ctx_base64_capacity()

AS_EXTERN uint32_t as_cdt_ctx_base64_capacity ( const as_cdt_ctx * ctx)

Return estimated base64 encoded size of ctx. Return zero on error.

◆ as_cdt_ctx_byte_capacity()

AS_EXTERN uint32_t as_cdt_ctx_byte_capacity ( const as_cdt_ctx * ctx)

Return exact serialized size of ctx. Return zero on error.

◆ as_cdt_ctx_from_base64()

AS_EXTERN bool as_cdt_ctx_from_base64 ( as_cdt_ctx * ctx,
const char * base64 )

Deserialize base64 encoded string to ctx.

Parameters
ctxTarget CDT context.
base64Source base64 encoded string.
Returns
true on success, false on error.

◆ as_cdt_ctx_from_bytes()

AS_EXTERN bool as_cdt_ctx_from_bytes ( as_cdt_ctx * ctx,
const uint8_t * bytes,
uint32_t size )

Deserialize bytes to ctx.

Parameters
ctxTarget CDT context.
bytesSource byte array.
sizeLength of source byte array.
Returns
true on success, false on error.

◆ as_cdt_ctx_to_base64()

AS_EXTERN bool as_cdt_ctx_to_base64 ( const as_cdt_ctx * ctx,
char * base64,
uint32_t capacity )

Serialize ctx to base64 encoded string. Use as_cdt_ctx_base64_capacity() to determine required string capacity.

Parameters
ctxSource CDT context.
base64Target base64 encoded null terminated string which must be allocated before calling this function.
capacityMax size of base64 encoded string.
Returns
true on success, false on error.

◆ as_cdt_ctx_to_bytes()

AS_EXTERN uint32_t as_cdt_ctx_to_bytes ( const as_cdt_ctx * ctx,
uint8_t * bytes,
uint32_t capacity )

Serialize ctx to bytes. Use as_cdt_ctx_byte_capacity() to determine required bytes capacity.

Parameters
ctxSource CDT context.
bytesTarget bytes array which must be allocated before calling this function.
capacityMax size of bytes array.
Returns
Length of serialized bytes on success or zero on error.