30 #define KSI_DEFINE_FN_FROM_TLV(typ) \
39 int typ##_fromTlv(KSI_TLV *tlv, typ **o);
41 #define KSI_DEFINE_FN_TO_TLV(typ) \
53 int typ##_toTlv(KSI_CTX *ctx, const typ *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv);
56 #define KSI_DEFINE_REF(typ) \
63 typ *typ##_ref(typ *o)
65 #define KSI_DEFINE_OBJECT_PARSE(typ) \
75 int typ##_parse(KSI_CTX *ctx, const unsigned char *raw, size_t len, typ **t);
77 #define KSI_DEFINE_OBJECT_SERIALIZE(typ) \
87 int typ##_serialize(const typ *t, unsigned char **raw, size_t *len);
89 #define KSI_DEFINE_WRITE_BYTES(typ) \
99 int typ##_writeBytes(typ *o, unsigned char *buf, size_t buf_size, size_t *buf_len, int opt)
105 #define KSI_uint64_t uint64_t
106 #define KSI_DEFINE_GET_CTX(type) KSI_CTX *type##_getCtx(const type *o);
#define KSI_uint64_t
Definition: types_base.h:105
int KSI_Integer_new(KSI_CTX *ctx, KSI_uint64_t value, KSI_Integer **o)
#define KSI_DEFINE_FN_TO_TLV(typ)
Definition: types_base.h:41
struct KSI_Integer_st KSI_Integer
Definition: types_base.h:140
int(* KSI_LoggerCallback)(void *logCtx, int level, const char *message)
Definition: types_base.h:115
char * KSI_Integer_toDateString(const KSI_Integer *o, char *buf, size_t buf_len)
int KSI_OctetString_equals(const KSI_OctetString *left, const KSI_OctetString *right)
#define KSI_DEFINE_FN_FROM_TLV(typ)
Definition: types_base.h:30
const char * KSI_Utf8String_cstr(const KSI_Utf8String *o)
int KSI_Integer_equals(const KSI_Integer *a, const KSI_Integer *b)
void KSI_Integer_free(KSI_Integer *o)
#define KSI_DEFINE_REF(typ)
Definition: types_base.h:56
KSI_uint64_t KSI_Integer_getUInt64(const KSI_Integer *o)
int KSI_Utf8StringNZ_toTlv(KSI_CTX *ctx, const KSI_Utf8String *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
struct KSI_OctetString_st KSI_OctetString
Definition: types_base.h:145
void KSI_Utf8String_free(KSI_Utf8String *t)
int KSI_Utf8String_new(KSI_CTX *ctx, const char *str, size_t len, KSI_Utf8String **t)
int KSI_Integer_compare(const KSI_Integer *a, const KSI_Integer *b)
int KSI_OctetString_extract(const KSI_OctetString *t, const unsigned char **data, size_t *data_len)
size_t KSI_Utf8String_size(const KSI_Utf8String *t)
struct KSI_CTX_st KSI_CTX
Definition: types_base.h:124
void KSI_OctetString_free(KSI_OctetString *t)
struct KSI_TLV_st KSI_TLV
Definition: types_base.h:129
struct KSI_ERR_st KSI_ERR
Definition: types_base.h:134
int KSI_Integer_equalsUInt(const KSI_Integer *o, KSI_uint64_t i)
KSI_Utf8String KSI_Utf8StringNZ
Definition: types_base.h:155
struct KSI_Utf8String_st KSI_Utf8String
Definition: types_base.h:150
char * KSI_OctetString_toString(const KSI_OctetString *id, char separator, char *buf, size_t buf_len)
int KSI_OctetString_LegacyId_getUtf8String(const KSI_OctetString *id, KSI_Utf8String **str)
int KSI_OctetString_new(KSI_CTX *ctx, const unsigned char *data, size_t data_len, KSI_OctetString **t)
int KSI_Utf8StringNZ_fromTlv(KSI_TLV *tlv, KSI_Utf8String **o)