AT-NFC 2.1 (win) AT-NFC kernel set

t_nfc_ker.h
Go to the documentation of this file.
1 #ifndef T_NFC_KER_H
2 #define T_NFC_KER_H
3
4 /* ******************************* T-NFC KERNEL interface ********************************** */
8 /* ***************************************************************************************** */
9
10 #ifdef T_NFC_KER_EXP_MODE
11 #define T_NFC_KER_MODE KER_EXP_API
12 #else
13 #ifdef T_NFC_KER_INT_MODE
14 #define T_NFC_KER_MODE
15 #else
16 #define T_NFC_KER_MODE KER_IMP_API
17 #endif
18 #endif
19
20 /* set struct alignment */
21 #include <emv_platform_set_align.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27
28 /* ***************************************************************************************** */
32 typedef KER_VOID* T_NFC_HANDLE;
33 typedef struct tag_T_NFC_CALLBACKS T_NFC_CALLBACKS;
34
35 /* ***************************************************************************************** */
36
37 /* ***************************************************************************************** */
38 /* T-NFC kernel library functions: */
39 /* ***************************************************************************************** */
40
41 /* *************************************** t_nfc_Init ************************************** */
59 T_NFC_KER_MODE KER_RES KER_API t_nfc_Init(KER_INT32U ulRuntimeKernelID, KER_VOID* pCallbackHandle, const T_NFC_CALLBACKS* pCallbacks, const KER_VOID* pConfigID, KER_INT16U usConfigIDLen, T_NFC_HANDLE* ppHandle);
61 #define NAME_FUNC_T_NFC_KERNEL_INIT "t_nfc_Init"
63 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_INIT)(KER_INT32U ulRuntimeKernelID, KER_VOID* pCallbackHandle, const T_NFC_CALLBACKS* pCallbacks, const KER_VOID* pConfigID, KER_INT16U usConfigIDLen, T_NFC_HANDLE* ppHandle);
64
65
66 /* ************************************* t_nfc_Deinit ************************************** */
77 T_NFC_KER_MODE KER_RES KER_API t_nfc_Deinit(T_NFC_HANDLE pHandle);
79 #define NAME_FUNC_T_NFC_KERNEL_DEINIT "t_nfc_Deinit"
81 typedef KER_RES(KER_API *FUNC_T_NFC_KERNEL_DEINIT)(T_NFC_HANDLE pHandle);
82
83
84 /* ********************************* t_nfc_RegisterCallback ******************************** */
98 T_NFC_KER_MODE KER_RES KER_API t_nfc_RegisterCallback(T_NFC_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID* pCallback);
100 #define NAME_FUNC_T_NFC_KERNEL_REGISTERCALLBACK "t_nfc_RegisterCallback"
102 typedef KER_RES(KER_API *FUNC_T_NFC_KERNEL_REGISTERCALLBACK)(T_NFC_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID* pCallback);
103
104
105 /* ************************************* t_nfc_Version ************************************* */
119 T_NFC_KER_MODE KER_RES KER_API t_nfc_Version(T_NFC_HANDLE pHandle, KER_CHAR* pchVerInfo, KER_INT16U* pusVerInfoLen);
121 #define NAME_FUNC_T_NFC_KERNEL_VERSION "t_nfc_Version"
123 typedef KER_RES(KER_API *FUNC_T_NFC_KERNEL_VERSION)(T_NFC_HANDLE pHandle, KER_CHAR* pchVerInfo, KER_INT16U* pusVerInfoLen);
124
125
126 /* ********************************** Kernel Checksum Types ******************************** */
129 #define T_NFC_CHECKSUM_KERNEL 0x00
130 #define T_NFC_CHECKSUM_CONFIG 0x01
131 #define T_NFC_CHECKSUM_FULL_CONFIG 0x02
133 /* ************************************* t_nfc_Checksum ************************************ */
148 T_NFC_KER_MODE KER_RES KER_API t_nfc_Checksum(T_NFC_HANDLE pHandle, KER_BYTE btCheckSumType, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumSize);
150 #define NAME_FUNC_T_NFC_KERNEL_CHECKSUM "t_nfc_Checksum"
152 typedef KER_RES(KER_API *FUNC_T_NFC_KERNEL_CHECKSUM)(T_NFC_HANDLE pHandle, KER_BYTE btCheckSumType, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumSize);
153
154
155 /* ********************************* t_nfc_TranPreprocessing ******************************* */
169 T_NFC_KER_MODE KER_RES KER_API t_nfc_TranPreprocessing(T_NFC_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA* pTermTranData, const NFC_EP_PRE_DATA* pEpPRE);
171 #define NAME_FUNC_T_NFC_KERNEL_TRAN_PREPROCESS "t_nfc_TranPreprocessing"
173 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_TRAN_PREPROCESS)(T_NFC_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA* pTermTranData, const NFC_EP_PRE_DATA* pEpPRE);
174
175
176 /* **************************************** t_nfc_TranStart *************************************** */
192 T_NFC_KER_MODE KER_RES KER_API t_nfc_TranStart(T_NFC_HANDLE pHandle, const NFC_EP_PRE_DATA* pEpPRE, const NFC_EP_PPSE_DATA* pEpPPSE, const NFC_EP_TRAN_DATA* pEpTranData, NFC_OUTCOME** ppOutcome);
194 #define NAME_FUNC_T_NFC_KERNEL_TRAN_START "t_nfc_TranStart"
196 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_TRAN_START)(T_NFC_HANDLE pHandle, const NFC_EP_PRE_DATA* pEpPRE, const NFC_EP_PPSE_DATA* pEpPPSE, const NFC_EP_TRAN_DATA* pEpTranData, NFC_OUTCOME** ppOutcome);
197
198
199 /* *********************************** t_nfc_TranIssUpdate ********************************* */
214 T_NFC_KER_MODE KER_RES KER_API t_nfc_TranIssUpdate(T_NFC_HANDLE pHandle, const NFC_EP_RESTART_DATA* pEpRestartData, const NFC_EXT_TERM_RESTART_DATA* pTermRestartData, NFC_OUTCOME** ppOutcome);
216 #define NAME_FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE "t_nfc_TranIssUpdate"
218 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE)(T_NFC_HANDLE pHandle, const NFC_EP_RESTART_DATA* pEpRestartData, const NFC_EXT_TERM_RESTART_DATA* pTermRestartData, NFC_OUTCOME** ppOutcome);
219
220
221 /* ************************************ t_nfc_TranRelease ********************************** */
233 T_NFC_KER_MODE KER_RES KER_API t_nfc_TranRelease(T_NFC_HANDLE pHandle);
235 #define NAME_FUNC_T_NFC_KERNEL_TRAN_RELEASE "t_nfc_TranRelease"
237 typedef KER_RES(KER_API *FUNC_T_NFC_KERNEL_TRAN_RELEASE)(T_NFC_HANDLE pHandle);
238
239
240 /* ************************************** t_nfc_GetData ************************************ */
255 T_NFC_KER_MODE KER_RES KER_API t_nfc_GetData(T_NFC_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE* pbtData, KER_INT16U* pusDataLen);
257 #define NAME_FUNC_T_NFC_KERNEL_GET_DATA "t_nfc_GetData"
259 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_GET_DATA)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE* pbtData, KER_INT16U* pusDataLen);
260
261
262 /* *********************************** t_nfc_GetDataByTag ********************************** */
265 #define T_NFC_KER_GET_OPT_CUST 0x0001
266 #define T_NFC_KER_GET_OPT_SKIP_STD_PROC 0x0002
285 T_NFC_KER_MODE KER_RES KER_API t_nfc_GetDataByTag(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTag, KER_BYTE btTagSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
287 #define NAME_FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG "t_nfc_GetDataByTag"
289 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTag, KER_BYTE btTagSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
290
291
292 /* ********************************* t_nfc_GetDataByTagList ******************************** */
309 T_NFC_KER_MODE KER_RES KER_API t_nfc_GetDataByTagList(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTagList, KER_INT16U usTagListSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
311 #define NAME_FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST "t_nfc_GetDataByTagList"
313 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTagList, KER_INT16U usTagListSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
314
315 /* *********************************** t_nfc_GetDataByID *********************************** */
332 T_NFC_KER_MODE KER_RES KER_API t_nfc_GetDataByID(T_NFC_HANDLE pHandle, KER_INT16U usID, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
334 #define NAME_FUNC_T_NFC_KERNEL_GET_DATA_BY_ID "t_nfc_GetDataByID"
336 typedef KER_RES (KER_API *FUNC_T_NFC_KERNEL_GET_DATA_BY_ID)(T_NFC_HANDLE pHandle, KER_INT16U usID, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
337
338 #ifdef __cplusplus
339 }
340 #endif
341
342 /* restore struct alignment */
343 #include <emv_platform_restore_align.h>
344
345 #endif /* T_NFC_KER_H */
emv_platform_restore_align.h
emv_platform_set_align.h
KER_VOID
void KER_VOID
Definition: emv_platform.h:66
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_RES
KER_INT16U KER_RES
Definition: emv_platform.h:68
KER_INT32U
unsigned int KER_INT32U
Definition: emv_platform.h:63
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
KER_CHAR
char KER_CHAR
Definition: emv_platform.h:65
t_nfc_Version
T_NFC_KER_MODE KER_RES KER_API t_nfc_Version(T_NFC_HANDLE pHandle, KER_CHAR *pchVerInfo, KER_INT16U *pusVerInfoLen)
Kernel version information.
t_nfc_TranRelease
T_NFC_KER_MODE KER_RES KER_API t_nfc_TranRelease(T_NFC_HANDLE pHandle)
Kernel Transaction completion (free resuorces)
FUNC_T_NFC_KERNEL_GET_DATA_BY_ID
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA_BY_ID)(T_NFC_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ker.h:336
t_nfc_GetDataByTag
T_NFC_KER_MODE KER_RES KER_API t_nfc_GetDataByTag(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTag, KER_BYTE btTagSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Kernel transaction data request.
FUNC_T_NFC_KERNEL_TRAN_PREPROCESS
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_PREPROCESS)(T_NFC_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA *pTermTranData, const NFC_EP_PRE_DATA *pEpPRE)
Definition: t_nfc_ker.h:173
t_nfc_GetDataByID
T_NFC_KER_MODE KER_RES KER_API t_nfc_GetDataByID(T_NFC_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Kernel data request by ID.
FUNC_T_NFC_KERNEL_INIT
KER_RES(KER_API * FUNC_T_NFC_KERNEL_INIT)(KER_INT32U ulRuntimeKernelID, KER_VOID *pCallbackHandle, const T_NFC_CALLBACKS *pCallbacks, const KER_VOID *pConfigID, KER_INT16U usConfigIDLen, T_NFC_HANDLE *ppHandle)
Definition: t_nfc_ker.h:63
t_nfc_GetData
T_NFC_KER_MODE KER_RES KER_API t_nfc_GetData(T_NFC_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE *pbtData, KER_INT16U *pusDataLen)
Kernel transaction data request.
t_nfc_RegisterCallback
T_NFC_KER_MODE KER_RES KER_API t_nfc_RegisterCallback(T_NFC_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID *pCallback)
Kernel callback registration.
t_nfc_Init
T_NFC_KER_MODE KER_RES KER_API t_nfc_Init(KER_INT32U ulRuntimeKernelID, KER_VOID *pCallbackHandle, const T_NFC_CALLBACKS *pCallbacks, const KER_VOID *pConfigID, KER_INT16U usConfigIDLen, T_NFC_HANDLE *ppHandle)
Kernel Initialization.
FUNC_T_NFC_KERNEL_TRAN_RELEASE
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_RELEASE)(T_NFC_HANDLE pHandle)
Definition: t_nfc_ker.h:237
FUNC_T_NFC_KERNEL_DEINIT
KER_RES(KER_API * FUNC_T_NFC_KERNEL_DEINIT)(T_NFC_HANDLE pHandle)
Definition: t_nfc_ker.h:81
FUNC_T_NFC_KERNEL_REGISTERCALLBACK
KER_RES(KER_API * FUNC_T_NFC_KERNEL_REGISTERCALLBACK)(T_NFC_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID *pCallback)
Definition: t_nfc_ker.h:102
FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTag, KER_BYTE btTagSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ker.h:289
t_nfc_Deinit
T_NFC_KER_MODE KER_RES KER_API t_nfc_Deinit(T_NFC_HANDLE pHandle)
Kernel De-Initialization.
t_nfc_GetDataByTagList
T_NFC_KER_MODE KER_RES KER_API t_nfc_GetDataByTagList(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTagList, KER_INT16U usTagListSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Kernel transaction data request.
t_nfc_Checksum
T_NFC_KER_MODE KER_RES KER_API t_nfc_Checksum(T_NFC_HANDLE pHandle, KER_BYTE btCheckSumType, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumSize)
Kernel checksum calculation.
t_nfc_TranStart
T_NFC_KER_MODE KER_RES KER_API t_nfc_TranStart(T_NFC_HANDLE pHandle, const NFC_EP_PRE_DATA *pEpPRE, const NFC_EP_PPSE_DATA *pEpPPSE, const NFC_EP_TRAN_DATA *pEpTranData, NFC_OUTCOME **ppOutcome)
Start new transaction by Kernel.
FUNC_T_NFC_KERNEL_CHECKSUM
KER_RES(KER_API * FUNC_T_NFC_KERNEL_CHECKSUM)(T_NFC_HANDLE pHandle, KER_BYTE btCheckSumType, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumSize)
Definition: t_nfc_ker.h:152
t_nfc_TranPreprocessing
T_NFC_KER_MODE KER_RES KER_API t_nfc_TranPreprocessing(T_NFC_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA *pTermTranData, const NFC_EP_PRE_DATA *pEpPRE)
Makes transaction preprocessing by Kernel (optional)
FUNC_T_NFC_KERNEL_GET_DATA
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE *pbtData, KER_INT16U *pusDataLen)
Definition: t_nfc_ker.h:259
FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE)(T_NFC_HANDLE pHandle, const NFC_EP_RESTART_DATA *pEpRestartData, const NFC_EXT_TERM_RESTART_DATA *pTermRestartData, NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ker.h:218
FUNC_T_NFC_KERNEL_VERSION
KER_RES(KER_API * FUNC_T_NFC_KERNEL_VERSION)(T_NFC_HANDLE pHandle, KER_CHAR *pchVerInfo, KER_INT16U *pusVerInfoLen)
Definition: t_nfc_ker.h:123
FUNC_T_NFC_KERNEL_TRAN_START
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_START)(T_NFC_HANDLE pHandle, const NFC_EP_PRE_DATA *pEpPRE, const NFC_EP_PPSE_DATA *pEpPPSE, const NFC_EP_TRAN_DATA *pEpTranData, NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ker.h:196
t_nfc_TranIssUpdate
T_NFC_KER_MODE KER_RES KER_API t_nfc_TranIssUpdate(T_NFC_HANDLE pHandle, const NFC_EP_RESTART_DATA *pEpRestartData, const NFC_EXT_TERM_RESTART_DATA *pTermRestartData, NFC_OUTCOME **ppOutcome)
Issuer data (obtained by auth request) processing.
FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTagList, KER_INT16U usTagListSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ker.h:313
tag_NFC_EP_PPSE_DATA
EP PPSE Card data used for certain combination.
Definition: nfc_ep_data.h:153
tag_NFC_EP_PRE_DATA
EP preprocessing data version 1.
Definition: nfc_ep_data.h:92
tag_NFC_EP_RESTART_DATA
EP Transaction restart data.
Definition: nfc_ep_data.h:287
tag_NFC_EP_TRAN_DATA
EP Transaction data.
Definition: nfc_ep_data.h:221
tag_NFC_EXT_TERM_RESTART_DATA
Terminal transaction restart data.
Definition: nfc_ext_data.h:144
tag_NFC_EXT_TERM_TRAN_DATA
Terminal transaction data structure.
Definition: nfc_ext_data.h:83
tag_NFC_OUTCOME
Outcome User Interface struct definition, version 0.
Definition: nfc_outcome.h:350
tag_T_NFC_CALLBACKS
Struct to handle all callbacks.
Definition: t_nfc_ker_clb.h:1308