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

t_nfc_ep.h
Go to the documentation of this file.
1 #ifndef T_NFC_EP_H
2 #define T_NFC_EP_H
3
4 /* ***************************** T-NFC Entry Point interface ******************************* */
8 /* ***************************************************************************************** */
9
10 #ifdef T_NFC_EP_EXP_MODE
11 #define T_NFC_EP_MODE KER_EXP_API
12 #else
13 #ifdef T_NFC_EP_INT_MODE
14 #define T_NFC_EP_MODE
15 #else
16 #define T_NFC_EP_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_EP_HANDLE;
33
34 /* ****************************** T_NFC_CALLBACK_CANCEL_TRAN ******************************* */
45 typedef KER_BOOL(KER_API *T_NFC_CALLBACK_CANCEL_TRAN)(KER_VOID* pCallbackHandle);
46
47
48 /* ***************************************************************************************** */
49
50 /* ***************************************************************************************** */
51 /* T-NFC Entry Point library functions: */
52 /* ***************************************************************************************** */
53
54 /* ************************************** t_nfc_epInit ************************************* */
69 T_NFC_EP_MODE KER_RES KER_API t_nfc_epInit(KER_VOID* pConfigID, KER_INT16U usConfigIDLen, T_NFC_EP_HANDLE* ppHandle);
71 #define NAME_FUNC_T_NFC_EP_INIT "t_nfc_epInit"
73 typedef KER_RES (KER_API *FUNC_T_NFC_EP_INIT)(KER_VOID* pConfigID, KER_INT16U usConfigIDLen, T_NFC_EP_HANDLE* ppHandle);
74
75
76 /* ************************************ t_nfc_epDeinit ************************************* */
87 T_NFC_EP_MODE KER_RES KER_API t_nfc_epDeinit(T_NFC_EP_HANDLE pHandle);
89 #define NAME_FUNC_T_NFC_EP_DEINIT "t_nfc_epDeinit"
91 typedef KER_RES(KER_API *FUNC_T_NFC_EP_DEINIT)(T_NFC_EP_HANDLE pHandle);
92
93
94 /* ************************************ t_nfc_epVersion ************************************ */
110 T_NFC_EP_MODE KER_RES KER_API t_nfc_epVersion(T_NFC_EP_HANDLE pHandle, const KER_BYTE* pbtKerID, KER_BYTE btKerIDLen, KER_CHAR* pchVerInfo, KER_INT16U* pusVerInfoLen);
112 #define NAME_FUNC_T_NFC_EP_VERSION "t_nfc_epVersion"
114 typedef KER_RES(KER_API *FUNC_T_NFC_EP_VERSION)(T_NFC_EP_HANDLE pHandle, const KER_BYTE* pbtKerID, KER_BYTE btKerIDLen, KER_CHAR* pchVerInfo, KER_INT16U* pusVerInfoLen);
115
116
117 /* ************************************ t_nfc_epChecksum *********************************** */
134 T_NFC_EP_MODE KER_RES KER_API t_nfc_epChecksum(T_NFC_EP_HANDLE pHandle, const KER_BYTE* pbtKerID, KER_BYTE btKerIDLen, KER_BYTE btCheckSumType, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumSize);
136 #define NAME_FUNC_T_NFC_EP_CHECKSUM "t_nfc_epChecksum"
138 typedef KER_RES(KER_API *FUNC_T_NFC_EP_CHECKSUM)(T_NFC_EP_HANDLE pHandle, const KER_BYTE* pbtKerID, KER_BYTE btKerIDLen, KER_BYTE btCheckSumType, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumSize);
139
140
141 /* ******************************** t_nfc_epRegisterCallback ******************************* */
156 T_NFC_EP_MODE KER_RES KER_API t_nfc_epRegisterCallback(T_NFC_EP_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID* pCallback);
158 #define NAME_FUNC_T_NFC_EP_REGISTERCALLBACK "t_nfc_epRegisterCallback"
160 typedef KER_RES(KER_API *FUNC_T_NFC_EP_REGISTERCALLBACK)(T_NFC_EP_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID* pCallback);
161
162
163 /* ********************************* t_nfc_epPrepareNewTran ******************************** */
182 T_NFC_EP_MODE KER_RES KER_API t_nfc_epPrepareNewTran(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA* pTermTranData, const NFC_OUTCOME** ppOutcome);
184 #define NAME_FUNC_T_NFC_EP_PREP_NEW_TRAN "t_nfc_epPrepareNewTran"
186 typedef KER_RES(KER_API *FUNC_T_NFC_EP_PREP_NEW_TRAN)(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA* pTermTranData, const NFC_OUTCOME** ppOutcome);
187
188
189 /* ************************************* t_nfc_epNewTran *********************************** */
225 T_NFC_EP_MODE KER_RES KER_API t_nfc_epNewTran(T_NFC_EP_HANDLE pHandle, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes,
226 T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID* pCancelCallbackHandle,
227 KER_INT16U* pusCardType, KER_BYTE* pbtUID, KER_INT16U* pusUIDLen, const NFC_OUTCOME** ppOutcome);
229 #define NAME_FUNC_T_NFC_EP_NEW_TRAN "t_nfc_epNewTran"
231 typedef KER_RES(KER_API *FUNC_T_NFC_EP_NEW_TRAN)(T_NFC_EP_HANDLE pHandle, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes,
232 T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID* pCancelCallbackHandle,
233 KER_INT16U* pusCardType, KER_BYTE* pbtUID, KER_INT16U* pusUIDLen, const NFC_OUTCOME** ppOutcome);
234
235
236 /* *********************************** t_nfc_epTranRestart ********************************* */
279 T_NFC_EP_MODE KER_RES KER_API t_nfc_epTranRestart(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_RESTART_DATA* pTermRestartData, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes,
280 T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID* pCancelCallbackHandle,
281 KER_INT16U* pusCardType, KER_BYTE* pbtUID, KER_INT16U* pusUIDLen, const NFC_OUTCOME** ppOutcome);
283 #define NAME_FUNC_T_NFC_EP_TRAN_RESTART "t_nfc_epTranRestart"
285 typedef KER_RES(KER_API *FUNC_T_NFC_EP_TRAN_RESTART)(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_RESTART_DATA* pTermRestartData, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes,
286 T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID* pCancelCallbackHandle,
287 KER_INT16U* pusCardType, KER_BYTE* pbtUID, KER_INT16U* pusUIDLen, const NFC_OUTCOME** ppOutcome);
288
289
290 /* ************************************ t_nfc_epTranRelease ******************************** */
303 T_NFC_EP_MODE KER_RES KER_API t_nfc_epTranRelease(T_NFC_EP_HANDLE pHandle);
305 #define NAME_FUNC_T_NFC_EP_TRAN_RELEASE "t_nfc_epTranRelease"
307 typedef KER_RES(KER_API *FUNC_T_NFC_EP_TRAN_RELEASE)(T_NFC_EP_HANDLE pHandle);
308
309
310 /* ************************************* t_nfc_epGetData *********************************** */
325 T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetData(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE* pbtData, KER_INT16U* pusDataLen);
327 #define NAME_FUNC_T_NFC_EP_GET_DATA "t_nfc_epGetData"
329 typedef KER_RES (KER_API *FUNC_T_NFC_EP_GET_DATA)(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE* pbtData, KER_INT16U* pusDataLen);
330
331
332 /* ********************************** t_nfc_epGetDataByTag ********************************* */
350 T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetDataByTag(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTag, KER_BYTE btTagSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
352 #define NAME_FUNC_T_NFC_EP_GET_DATA_BY_TAG "t_nfc_epGetDataByTag"
354 typedef KER_RES (KER_API *FUNC_T_NFC_EP_GET_DATA_BY_TAG)(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTag, KER_BYTE btTagSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
355
356
357 /* ******************************** t_nfc_epGetDataByTagList ******************************* */
374 T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetDataByTagList(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTagList, KER_INT16U usTagListSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
376 #define NAME_FUNC_T_NFC_EP_GET_DATA_BY_TAG_LIST "t_nfc_epGetDataByTagList"
378 typedef KER_RES (KER_API *FUNC_T_NFC_EP_GET_DATA_BY_TAG_LIST)(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE* pbtTagList, KER_INT16U usTagListSize, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
379
380
381 /* *********************************** t_nfc_epGetDataByID ********************************* */
397 T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetDataByID(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
399 #define NAME_FUNC_T_NFC_EP_GET_DATA_BY_ID "t_nfc_epGetDataByID"
401 typedef KER_RES(KER_API *FUNC_T_NFC_EP_GET_DATA_BY_ID)(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE* pbtData, KER_INT16U* pusDataSize);
402
403 /* ******************************** t_nfc_epGetCustomTagByID ******************************* */
420 T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetCustomTagByID(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE* pbtCustomTag, KER_INT16U* pusCustomTagSize);
422 #define NAME_FUNC_T_NFC_EP_GET_CUST_TAG_BY_ID "t_nfc_epGetCustomTagByID"
424 typedef KER_RES(KER_API *FUNC_T_NFC_EP_GET_CUST_TAG_BY_ID)(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE* pbtCustomTag, KER_INT16U* pusCustomTagSize);
425
426
427 #ifdef __cplusplus
428 }
429 #endif
430
431 /* restore struct alignment */
432 #include <emv_platform_restore_align.h>
433
434 #endif /* T_NFC_EP_H */
emv_platform_restore_align.h
emv_platform_set_align.h
KER_VOID
void KER_VOID
Definition: emv_platform.h:66
KER_BOOL
KER_INT8U KER_BOOL
Definition: emv_platform.h:67
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_epVersion
T_NFC_EP_MODE KER_RES KER_API t_nfc_epVersion(T_NFC_EP_HANDLE pHandle, const KER_BYTE *pbtKerID, KER_BYTE btKerIDLen, KER_CHAR *pchVerInfo, KER_INT16U *pusVerInfoLen)
Entry Point version information.
FUNC_T_NFC_EP_GET_DATA_BY_TAG_LIST
KER_RES(KER_API * FUNC_T_NFC_EP_GET_DATA_BY_TAG_LIST)(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTagList, KER_INT16U usTagListSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ep.h:378
FUNC_T_NFC_EP_TRAN_RESTART
KER_RES(KER_API * FUNC_T_NFC_EP_TRAN_RESTART)(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_RESTART_DATA *pTermRestartData, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes, T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID *pCancelCallbackHandle, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen, const NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ep.h:285
FUNC_T_NFC_EP_GET_DATA
KER_RES(KER_API * FUNC_T_NFC_EP_GET_DATA)(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE *pbtData, KER_INT16U *pusDataLen)
Definition: t_nfc_ep.h:329
t_nfc_epGetDataByTag
T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetDataByTag(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTag, KER_BYTE btTagSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Entry Point transaction data request.
t_nfc_epDeinit
T_NFC_EP_MODE KER_RES KER_API t_nfc_epDeinit(T_NFC_EP_HANDLE pHandle)
Entry Point De-Initialization.
t_nfc_epTranRestart
T_NFC_EP_MODE KER_RES KER_API t_nfc_epTranRestart(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_RESTART_DATA *pTermRestartData, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes, T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID *pCancelCallbackHandle, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen, const NFC_OUTCOME **ppOutcome)
Restarts transaction for issuer update, cv-cvm confirmation, etc...
t_nfc_epGetData
T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetData(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE *pbtData, KER_INT16U *pusDataLen)
Entry Point transaction data request.
T_NFC_CALLBACK_CANCEL_TRAN
KER_BOOL(KER_API * T_NFC_CALLBACK_CANCEL_TRAN)(KER_VOID *pCallbackHandle)
Async check for cancel card polling from outside.
Definition: t_nfc_ep.h:45
FUNC_T_NFC_EP_CHECKSUM
KER_RES(KER_API * FUNC_T_NFC_EP_CHECKSUM)(T_NFC_EP_HANDLE pHandle, const KER_BYTE *pbtKerID, KER_BYTE btKerIDLen, KER_BYTE btCheckSumType, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumSize)
Definition: t_nfc_ep.h:138
FUNC_T_NFC_EP_INIT
KER_RES(KER_API * FUNC_T_NFC_EP_INIT)(KER_VOID *pConfigID, KER_INT16U usConfigIDLen, T_NFC_EP_HANDLE *ppHandle)
Definition: t_nfc_ep.h:73
FUNC_T_NFC_EP_GET_DATA_BY_TAG
KER_RES(KER_API * FUNC_T_NFC_EP_GET_DATA_BY_TAG)(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTag, KER_BYTE btTagSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ep.h:354
t_nfc_epRegisterCallback
T_NFC_EP_MODE KER_RES KER_API t_nfc_epRegisterCallback(T_NFC_EP_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID *pCallback)
Kernel callback registration.
t_nfc_epGetDataByTagList
T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetDataByTagList(T_NFC_EP_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTagList, KER_INT16U usTagListSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Entry Point transaction data request.
FUNC_T_NFC_EP_REGISTERCALLBACK
KER_RES(KER_API * FUNC_T_NFC_EP_REGISTERCALLBACK)(T_NFC_EP_HANDLE pHandle, KER_INT16U usCllbackID, KER_VOID *pCallback)
Definition: t_nfc_ep.h:160
t_nfc_epInit
T_NFC_EP_MODE KER_RES KER_API t_nfc_epInit(KER_VOID *pConfigID, KER_INT16U usConfigIDLen, T_NFC_EP_HANDLE *ppHandle)
Entry Point Initialization.
t_nfc_epGetCustomTagByID
T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetCustomTagByID(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtCustomTag, KER_INT16U *pusCustomTagSize)
Obtain custum tag by ID.
FUNC_T_NFC_EP_TRAN_RELEASE
KER_RES(KER_API * FUNC_T_NFC_EP_TRAN_RELEASE)(T_NFC_EP_HANDLE pHandle)
Definition: t_nfc_ep.h:307
t_nfc_epTranRelease
T_NFC_EP_MODE KER_RES KER_API t_nfc_epTranRelease(T_NFC_EP_HANDLE pHandle)
Releases transaction context.
FUNC_T_NFC_EP_DEINIT
KER_RES(KER_API * FUNC_T_NFC_EP_DEINIT)(T_NFC_EP_HANDLE pHandle)
Definition: t_nfc_ep.h:91
FUNC_T_NFC_EP_PREP_NEW_TRAN
KER_RES(KER_API * FUNC_T_NFC_EP_PREP_NEW_TRAN)(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA *pTermTranData, const NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ep.h:186
t_nfc_epChecksum
T_NFC_EP_MODE KER_RES KER_API t_nfc_epChecksum(T_NFC_EP_HANDLE pHandle, const KER_BYTE *pbtKerID, KER_BYTE btKerIDLen, KER_BYTE btCheckSumType, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumSize)
Kernel checksum calculation.
FUNC_T_NFC_EP_VERSION
KER_RES(KER_API * FUNC_T_NFC_EP_VERSION)(T_NFC_EP_HANDLE pHandle, const KER_BYTE *pbtKerID, KER_BYTE btKerIDLen, KER_CHAR *pchVerInfo, KER_INT16U *pusVerInfoLen)
Definition: t_nfc_ep.h:114
FUNC_T_NFC_EP_NEW_TRAN
KER_RES(KER_API * FUNC_T_NFC_EP_NEW_TRAN)(T_NFC_EP_HANDLE pHandle, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes, T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID *pCancelCallbackHandle, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen, const NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ep.h:231
t_nfc_epGetDataByID
T_NFC_EP_MODE KER_RES KER_API t_nfc_epGetDataByID(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Obtain emv data by ID.
t_nfc_epNewTran
T_NFC_EP_MODE KER_RES KER_API t_nfc_epNewTran(T_NFC_EP_HANDLE pHandle, KER_INT32U ulTimeout, KER_INT16U usExtCardTypes, T_NFC_CALLBACK_CANCEL_TRAN fCancelCallback, KER_VOID *pCancelCallbackHandle, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen, const NFC_OUTCOME **ppOutcome)
Initiates new transaction.
t_nfc_epPrepareNewTran
T_NFC_EP_MODE KER_RES KER_API t_nfc_epPrepareNewTran(T_NFC_EP_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA *pTermTranData, const NFC_OUTCOME **ppOutcome)
Prepares new transaction.
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
FUNC_T_NFC_EP_GET_DATA_BY_ID
KER_RES(KER_API * FUNC_T_NFC_EP_GET_DATA_BY_ID)(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ep.h:401
FUNC_T_NFC_EP_GET_CUST_TAG_BY_ID
KER_RES(KER_API * FUNC_T_NFC_EP_GET_CUST_TAG_BY_ID)(T_NFC_EP_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtCustomTag, KER_INT16U *pusCustomTagSize)
Definition: t_nfc_ep.h:424