tag16.h
Go to the documentation of this file.
/***************************************************************************
begin : Sun Jun 13 2004
copyright : (C) 2023 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef GWENHYWFAR_PARSER_TAG16_H
#define GWENHYWFAR_PARSER_TAG16_H
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/misc.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct GWEN_TAG16 GWEN_TAG16;
GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_TAG16, GWEN_Tag16, GWENHYWFAR_API)
GWENHYWFAR_API GWEN_TAG16 *GWEN_Tag16_new(void);
GWENHYWFAR_API GWEN_TAG16 *GWEN_Tag16_newNoCopy(unsigned int tagType, unsigned int tagLength, const uint8_t *tagData);
GWENHYWFAR_API GWEN_TAG16 *GWEN_Tag16_newCopy(unsigned int tagType, unsigned int tagLength, const uint8_t *tagData);
GWENHYWFAR_API void GWEN_Tag16_free(GWEN_TAG16 *tag);
GWENHYWFAR_API void GWEN_Tag16_WriteTagToBuffer(unsigned int tagType, const uint8_t *s, int size, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_WriteStringTagToBuffer(unsigned int tagType, const char *s, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_WriteUint8TagToBuffer(unsigned int tagType, uint8_t data, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_WriteUint16TagToBuffer(unsigned int tagType, uint16_t data, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_WriteUint32TagToBuffer(unsigned int tagType, uint32_t data, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_WriteUint64TagToBuffer(unsigned int tagType, uint64_t data, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_WriteDoubleTagToBuffer(unsigned int tagType, double data, GWEN_BUFFER *buf);
GWENHYWFAR_API void GWEN_Tag16_DirectlyToBuffer(unsigned int tagType,
const char *p,
int size,
GWEN_BUFFER *buf);
GWENHYWFAR_API GWEN_TAG16 *GWEN_Tag16_fromBuffer(GWEN_BUFFER *mbuf, int isBerTlv);
GWENHYWFAR_API GWEN_TAG16 *GWEN_Tag16_fromBuffer2(const uint8_t *p, uint32_t l, int doCopy);
GWENHYWFAR_API unsigned int GWEN_Tag16_GetTagType(const GWEN_TAG16 *tag);
GWENHYWFAR_API unsigned int GWEN_Tag16_GetTagLength(const GWEN_TAG16 *tag);
GWENHYWFAR_API const void *GWEN_Tag16_GetTagData(const GWEN_TAG16 *tag);
GWENHYWFAR_API uint8_t GWEN_Tag16_GetTagDataAsUint8(const GWEN_TAG16 *tag, uint8_t defaultValue);
GWENHYWFAR_API uint16_t GWEN_Tag16_GetTagDataAsUint16(const GWEN_TAG16 *tag, uint16_t defaultValue);
GWENHYWFAR_API uint32_t GWEN_Tag16_GetTagDataAsUint32(const GWEN_TAG16 *tag, uint32_t defaultValue);
GWENHYWFAR_API uint64_t GWEN_Tag16_GetTagDataAsUint64(const GWEN_TAG16 *tag, uint64_t defaultValue);
GWENHYWFAR_API char *GWEN_Tag16_GetTagDataAsNewString(const GWEN_TAG16 *tag, const char *defaultValue);
GWENHYWFAR_API double GWEN_Tag16_GetTagDataAsDouble(const GWEN_TAG16 *tag, double defaultValue);
GWENHYWFAR_API unsigned int GWEN_Tag16_GetTagSize(const GWEN_TAG16 *tag);
GWENHYWFAR_API GWEN_TAG16_LIST *GWEN_Tag16_List_fromBuffer(const uint8_t *p, uint32_t l, int doCopy);
GWENHYWFAR_API const GWEN_TAG16 *GWEN_Tag16_List_FindFirstByTagType(const GWEN_TAG16_LIST *tagList, unsigned int tagType);
GWENHYWFAR_API const GWEN_TAG16 *GWEN_Tag16_List_FindNextByTagType(const GWEN_TAG16 *tag, unsigned int tagType);
GWENHYWFAR_API int GWEN_Tag16_StartTagInBuffer(unsigned int tagType, GWEN_BUFFER *buf);
GWENHYWFAR_API int GWEN_Tag16_EndTagInBuffer(int startPos, GWEN_BUFFER *buf);
#ifdef __cplusplus
}
#endif
#endif /* GWENHYWFAR_PARSER_TAG16_H */
buffer.h
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
GWEN_LIST_FUNCTION_LIB_DEFS
#define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list1.h:349
misc.h
GWEN_TAG16_LIST
Definition listdoc.h:7788
GWEN_Tag16_List_FindNextByTagType
GWENHYWFAR_API const GWEN_TAG16 * GWEN_Tag16_List_FindNextByTagType(const GWEN_TAG16 *tag, unsigned int tagType)
GWEN_Tag16_WriteUint16TagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteUint16TagToBuffer(unsigned int tagType, uint16_t data, GWEN_BUFFER *buf)
GWEN_Tag16_GetTagDataAsNewString
GWENHYWFAR_API char * GWEN_Tag16_GetTagDataAsNewString(const GWEN_TAG16 *tag, const char *defaultValue)
GWEN_Tag16_GetTagLength
GWENHYWFAR_API unsigned int GWEN_Tag16_GetTagLength(const GWEN_TAG16 *tag)
GWEN_Tag16_GetTagDataAsUint64
GWENHYWFAR_API uint64_t GWEN_Tag16_GetTagDataAsUint64(const GWEN_TAG16 *tag, uint64_t defaultValue)
GWEN_Tag16_List_fromBuffer
GWENHYWFAR_API GWEN_TAG16_LIST * GWEN_Tag16_List_fromBuffer(const uint8_t *p, uint32_t l, int doCopy)
GWEN_Tag16_List_FindFirstByTagType
GWENHYWFAR_API const GWEN_TAG16 * GWEN_Tag16_List_FindFirstByTagType(const GWEN_TAG16_LIST *tagList, unsigned int tagType)
GWEN_Tag16_WriteTagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteTagToBuffer(unsigned int tagType, const uint8_t *s, int size, GWEN_BUFFER *buf)
GWEN_Tag16_GetTagType
GWENHYWFAR_API unsigned int GWEN_Tag16_GetTagType(const GWEN_TAG16 *tag)
GWEN_Tag16_GetTagSize
GWENHYWFAR_API unsigned int GWEN_Tag16_GetTagSize(const GWEN_TAG16 *tag)
GWEN_Tag16_GetTagDataAsUint16
GWENHYWFAR_API uint16_t GWEN_Tag16_GetTagDataAsUint16(const GWEN_TAG16 *tag, uint16_t defaultValue)
GWEN_Tag16_WriteStringTagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteStringTagToBuffer(unsigned int tagType, const char *s, GWEN_BUFFER *buf)
GWEN_Tag16_GetTagDataAsUint32
GWENHYWFAR_API uint32_t GWEN_Tag16_GetTagDataAsUint32(const GWEN_TAG16 *tag, uint32_t defaultValue)
GWEN_Tag16_fromBuffer
GWENHYWFAR_API GWEN_TAG16 * GWEN_Tag16_fromBuffer(GWEN_BUFFER *mbuf, int isBerTlv)
GWEN_Tag16_fromBuffer2
GWENHYWFAR_API GWEN_TAG16 * GWEN_Tag16_fromBuffer2(const uint8_t *p, uint32_t l, int doCopy)
GWEN_Tag16_GetTagDataAsUint8
GWENHYWFAR_API uint8_t GWEN_Tag16_GetTagDataAsUint8(const GWEN_TAG16 *tag, uint8_t defaultValue)
GWEN_Tag16_newNoCopy
GWENHYWFAR_API GWEN_TAG16 * GWEN_Tag16_newNoCopy(unsigned int tagType, unsigned int tagLength, const uint8_t *tagData)
GWEN_Tag16_StartTagInBuffer
GWENHYWFAR_API int GWEN_Tag16_StartTagInBuffer(unsigned int tagType, GWEN_BUFFER *buf)
GWEN_Tag16_GetTagDataAsDouble
GWENHYWFAR_API double GWEN_Tag16_GetTagDataAsDouble(const GWEN_TAG16 *tag, double defaultValue)
GWEN_Tag16_DirectlyToBuffer
GWENHYWFAR_API void GWEN_Tag16_DirectlyToBuffer(unsigned int tagType, const char *p, int size, GWEN_BUFFER *buf)
GWEN_Tag16_WriteUint64TagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteUint64TagToBuffer(unsigned int tagType, uint64_t data, GWEN_BUFFER *buf)
GWEN_Tag16_new
GWENHYWFAR_API GWEN_TAG16 * GWEN_Tag16_new(void)
GWEN_TAG16
struct GWEN_TAG16 GWEN_TAG16
Definition tag16.h:35
GWEN_Tag16_WriteUint8TagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteUint8TagToBuffer(unsigned int tagType, uint8_t data, GWEN_BUFFER *buf)
GWEN_Tag16_newCopy
GWENHYWFAR_API GWEN_TAG16 * GWEN_Tag16_newCopy(unsigned int tagType, unsigned int tagLength, const uint8_t *tagData)
GWEN_Tag16_WriteUint32TagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteUint32TagToBuffer(unsigned int tagType, uint32_t data, GWEN_BUFFER *buf)
GWEN_Tag16_EndTagInBuffer
GWENHYWFAR_API int GWEN_Tag16_EndTagInBuffer(int startPos, GWEN_BUFFER *buf)
GWEN_Tag16_GetTagData
GWENHYWFAR_API const void * GWEN_Tag16_GetTagData(const GWEN_TAG16 *tag)
GWEN_Tag16_WriteDoubleTagToBuffer
GWENHYWFAR_API void GWEN_Tag16_WriteDoubleTagToBuffer(unsigned int tagType, double data, GWEN_BUFFER *buf)
GWEN_Tag16_free
GWENHYWFAR_API void GWEN_Tag16_free(GWEN_TAG16 *tag)