00001 /*************************************************************************** 00002 $RCSfile$ 00003 ------------------- 00004 cvs : $Id: tlv.h 189 2006-06-16 01:30:37Z martin $ 00005 begin : Sun Jun 13 2004 00006 copyright : (C) 2004 by Martin Preuss 00007 email : martin@libchipcard.de 00008 00009 *************************************************************************** 00010 * Please see toplevel file COPYING for license details * 00011 ***************************************************************************/ 00012 00013 00014 #ifndef CHIPCARD_CLIENT_TLV_H 00015 #define CHIPCARD_CLIENT_TLV_H 00016 00017 #include <gwenhywfar/buffer.h> 00018 #include <gwenhywfar/misc.h> 00019 #include <chipcard/chipcard.h> 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 typedef struct LC_TLV LC_TLV; 00026 00027 GWEN_LIST_FUNCTION_LIB_DEFS(LC_TLV, LC_TLV, CHIPCARD_API) 00028 00029 00030 CHIPCARD_API 00031 LC_TLV *LC_TLV_new(); 00032 CHIPCARD_API 00033 void LC_TLV_free(LC_TLV *tlv); 00034 00035 CHIPCARD_API 00036 LC_TLV *LC_TLV_fromBuffer(GWEN_BUFFER *mbuf, int isBerTlv); 00037 00038 CHIPCARD_API 00039 int LC_TLV_IsBerTlv(const LC_TLV *tlv); 00040 CHIPCARD_API 00041 unsigned int LC_TLV_GetTagType(const LC_TLV *tlv); 00042 CHIPCARD_API 00043 unsigned int LC_TLV_GetTagLength(const LC_TLV *tlv); 00044 CHIPCARD_API 00045 const void *LC_TLV_GetTagData(const LC_TLV *tlv); 00046 00047 CHIPCARD_API 00048 int LC_TLV_IsContructed(const LC_TLV *tlv); 00049 CHIPCARD_API 00050 unsigned int LC_TLV_GetClass(const LC_TLV *tlv); 00051 CHIPCARD_API 00052 unsigned int LC_TLV_GetTagSize(const LC_TLV *tlv); 00053 00054 00055 #ifdef __cplusplus 00056 } 00057 #endif 00058 00059 00060 #endif /* CHIPCARD_CLIENT_TLV_H */ 00061