Guardtime KSI c SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Typedefs | Functions
types_base.h File Reference
#include <stdint.h>
#include "list.h"

Go to the source code of this file.

Macros

#define KSI_DEFINE_FN_FROM_TLV(typ)
 
#define KSI_DEFINE_FN_TO_TLV(typ)
 
#define KSI_DEFINE_REF(typ)
 
#define KSI_DEFINE_OBJECT_PARSE(typ)
 
#define KSI_DEFINE_OBJECT_SERIALIZE(typ)
 
#define KSI_DEFINE_WRITE_BYTES(typ)
 
#define KSI_uint64_t   uint64_t
 
#define KSI_DEFINE_GET_CTX(type)   KSI_CTX *type##_getCtx(const type *o);
 

Typedefs

typedef int(* KSI_LoggerCallback )(void *logCtx, int level, const char *message)
 
typedef struct KSI_CTX_st KSI_CTX
 
typedef struct KSI_TLV_st KSI_TLV
 
typedef struct KSI_ERR_st KSI_ERR
 
typedef struct KSI_Integer_st KSI_Integer
 
typedef struct KSI_OctetString_st KSI_OctetString
 
typedef struct KSI_Utf8String_st KSI_Utf8String
 
typedef KSI_Utf8String KSI_Utf8StringNZ
 

Functions

void KSI_Integer_free (KSI_Integer *o)
 
char * KSI_Integer_toDateString (const KSI_Integer *o, char *buf, size_t buf_len)
 
KSI_uint64_t KSI_Integer_getUInt64 (const KSI_Integer *o)
 
int KSI_Integer_new (KSI_CTX *ctx, KSI_uint64_t value, KSI_Integer **o)
 
int KSI_Integer_equals (const KSI_Integer *a, const KSI_Integer *b)
 
int KSI_Integer_compare (const KSI_Integer *a, const KSI_Integer *b)
 
int KSI_Integer_equalsUInt (const KSI_Integer *o, KSI_uint64_t i)
 
KSI_IntegerKSI_Integer_ref (KSI_Integer *o)
 
int KSI_Integer_fromTlv (KSI_TLV *tlv, KSI_Integer **o)
 
int KSI_Integer_toTlv (KSI_CTX *ctx, const KSI_Integer *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
void KSI_OctetString_free (KSI_OctetString *t)
 
int KSI_OctetString_new (KSI_CTX *ctx, const unsigned char *data, size_t data_len, KSI_OctetString **t)
 
int KSI_OctetString_extract (const KSI_OctetString *t, const unsigned char **data, size_t *data_len)
 
int KSI_OctetString_equals (const KSI_OctetString *left, const KSI_OctetString *right)
 
KSI_OctetStringKSI_OctetString_ref (KSI_OctetString *o)
 
int KSI_OctetString_fromTlv (KSI_TLV *tlv, KSI_OctetString **o)
 
int KSI_OctetString_toTlv (KSI_CTX *ctx, const KSI_OctetString *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
char * KSI_OctetString_toString (const KSI_OctetString *id, char separator, char *buf, size_t buf_len)
 
void KSI_Utf8String_free (KSI_Utf8String *t)
 
int KSI_Utf8String_new (KSI_CTX *ctx, const char *str, size_t len, KSI_Utf8String **t)
 
size_t KSI_Utf8String_size (const KSI_Utf8String *t)
 
const char * KSI_Utf8String_cstr (const KSI_Utf8String *o)
 
KSI_Utf8StringKSI_Utf8String_ref (KSI_Utf8String *o)
 
int KSI_Utf8String_fromTlv (KSI_TLV *tlv, KSI_Utf8String **o)
 
int KSI_Utf8String_toTlv (KSI_CTX *ctx, const KSI_Utf8String *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
int KSI_Utf8StringNZ_fromTlv (KSI_TLV *tlv, KSI_Utf8String **o)
 
int KSI_Utf8StringNZ_toTlv (KSI_CTX *ctx, const KSI_Utf8String *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
int KSI_OctetString_LegacyId_getUtf8String (const KSI_OctetString *id, KSI_Utf8String **str)
 

Macro Definition Documentation

#define KSI_DEFINE_FN_FROM_TLV (   typ)
Value:
\
int typ##_fromTlv(KSI_TLV *tlv, typ **o);
struct KSI_TLV_st KSI_TLV
Definition: types_base.h:129
#define KSI_DEFINE_FN_TO_TLV (   typ)
Value:
\
int typ##_toTlv(KSI_CTX *ctx, const typ *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv);
struct KSI_CTX_st KSI_CTX
Definition: types_base.h:124
struct KSI_TLV_st KSI_TLV
Definition: types_base.h:129
#define KSI_DEFINE_OBJECT_PARSE (   typ)
Value:
\
int typ##_parse(KSI_CTX *ctx, const unsigned char *raw, size_t len, typ **t);
struct KSI_CTX_st KSI_CTX
Definition: types_base.h:124
#define KSI_DEFINE_OBJECT_SERIALIZE (   typ)
Value:
\
int typ##_serialize(const typ *t, unsigned char **raw, size_t *len);
#define KSI_DEFINE_REF (   typ)
Value:
\
typ *typ##_ref(typ *o)
#define KSI_DEFINE_WRITE_BYTES (   typ)
Value:
\
int typ##_writeBytes(typ *o, unsigned char *buf, size_t buf_size, size_t *buf_len, int opt)