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

t_nfc_ker_clb.h
Go to the documentation of this file.
1 #ifndef T_NFC_KER_CLB_H
2 #define T_NFC_KER_CLB_H
3
4 /* *************************** T-NFC KERNEL callback interface ***************************** */
8 /* ***************************************************************************************** */
9
10 #include <t_nfc_user_clb.h>
11
12 /* set struct alignment */
13 #include <emv_platform_set_align.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 /* ************************************** Callback API ************************************* */
20 #define CLB_API KER_API
21 /* *********************************** Callback comtext ************************************ */
22 #define T_NFC_CLB_CTX_SINGLE_PARAM KER_INT32U ulRuntimeKernelID, KER_VOID* pCallbackHandle
23 #define T_NFC_CLB_CTX_PARAM KER_INT32U ulRuntimeKernelID, KER_VOID* pCallbackHandle,
24
25 /* ***************************************************************************************** */
29 typedef struct tag_T_NFC_CALLBACKS T_NFC_CALLBACKS;
30
31 /* ******************************** callback storing function ******************************* */
45 KER_RES nfcRegisterCallback(T_NFC_CALLBACKS* pCallbacks, KER_INT16U usCllbackID, KER_VOID* pCallback);
46
47
48 /* *************************** T_NFC_CALLBACK_GET_READER_TYPE ****************************** */
51 #define NUM_T_NFC_CALLBACK_GET_READER_TYPE 1
62 typedef KER_BOOL (CLB_API* T_NFC_CALLBACK_GET_READER_TYPE)(T_NFC_CLB_CTX_PARAM KER_CHAR* data, KER_BYTE* dlen);
63
64
65 /* ***************************** T_NFC_CALLBACK_CARD_SENDCAPDU ***************************** */
68 #define NUM_T_NFC_CALLBACK_CARD_SENDCAPDU 2
84 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CARD_SENDCAPDU)(T_NFC_CLB_CTX_PARAM KER_BYTE btCase, KER_BYTE btCls, KER_BYTE btIns, KER_BYTE btP1, KER_BYTE btP2,
85 KER_INT16U usLc, const KER_BYTE* pbtDataIn, KER_INT16U usLe);
86
87
88 /* **************************** T_NFC_CALLBACK_CARD_RECEIVERAPDU *************************** */
91 #define NUM_T_NFC_CALLBACK_CARD_RECEIVERAPDU 3
92
110 typedef KER_RES (CLB_API *T_NFC_CALLBACK_CARD_RECEIVERAPDU)(T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_BYTE* pbtDataOut, KER_INT16U* pusDataOutLength, KER_INT16U usDataOutMaxLength,
111 KER_INT16U* pusSW1SW2, KER_INT32U *pulExecutionTime);
112
113
114 /* ******************************** T_NFC_CALLBACK_FIELD_OFF ******************************* */
117 #define NUM_T_NFC_CALLBACK_FIELD_OFF 4
124 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_FIELD_OFF)(T_NFC_CLB_CTX_SINGLE_PARAM);
125
126
127 /* ******************************** T_NFC_CALLBACK_CARD_POLL ******************************* */
130 #define NUM_T_NFC_CALLBACK_CARD_POLL 5
156 typedef KER_RES (CLB_API *T_NFC_CALLBACK_CARD_POLL)(T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout, KER_INT16U* pusCardType, KER_BYTE* pbtUID, KER_INT16U* pusUIDLen);
157
158
159 /* ****************************** T_NFC_CALLBACK_CARD_GETINFO ****************************** */
162 #define NUM_T_NFC_CALLBACK_CARD_GETINFO 6
181 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CARD_GETINFO)(T_NFC_CLB_CTX_PARAM KER_INT16U* pusCardType, KER_BYTE* pbtUID, KER_INT16U* pusUIDLen);
182
183
184 /* ************************ T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE ************************** */
187 #define NUM_T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE 7
198 typedef KER_RES (CLB_API *T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE)(T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout);
199
200 /* ************************* T_NFC_CALLBACK_RESET_OPERATION_FIELD ************************** */
203 #define NUM_T_NFC_CALLBACK_RESET_OPERATION_FIELD 8
211 typedef KER_BOOL (CLB_API* T_NFC_CALLBACK_RESET_OPERATION_FIELD)(T_NFC_CLB_CTX_SINGLE_PARAM);
212
213 /* ********************* T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER *************************** */
216 #define NUM_T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER 9
227 typedef KER_BOOL (CLB_API* T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER)(T_NFC_CLB_CTX_PARAM KER_CHAR* data, KER_BYTE* dlen);
228
229
230 /* **************************** T_NFC_CALLBACK_TRACE_SET_MODE ****************************** */
233 #define NUM_T_NFC_CALLBACK_TRACE_SET_MODE 11
234
235 #define T_NFC_CALLBACK_TRACE_SET_MODE_STD 0
236 #define T_NFC_CALLBACK_TRACE_SET_MODE_SENS 1
237
246 /* ***************************************************************************************** */
247 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_TRACE_SET_MODE)(T_NFC_CLB_CTX_PARAM KER_BYTE btTraceMode);
248
249
250 /* **************************** T_NFC_CALLBACK_TRACE_GET_MODE ****************************** */
253 #define NUM_T_NFC_CALLBACK_TRACE_GET_MODE 12
260 /* ***************************************************************************************** */
261 typedef KER_BYTE (CLB_API *T_NFC_CALLBACK_TRACE_GET_MODE)(T_NFC_CLB_CTX_SINGLE_PARAM);
262
263
264 /* ***************************** T_NFC_CALLBACK_TRACE_STRING ******************************* */
267 #define NUM_T_NFC_CALLBACK_TRACE_STRING 13
276 /* ***************************************************************************************** */
277 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_TRACE_STRING)(T_NFC_CLB_CTX_PARAM const KER_CHAR* pchString);
278
279
280 /* ***************************** T_NFC_CALLBACK_TRACE_BUFFER ******************************* */
283 #define NUM_T_NFC_CALLBACK_TRACE_BUFFER 14
293 /* ***************************************************************************************** */
294 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_TRACE_BUFFER)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtDataBuffer, KER_INT16U usDataBufferSize);
295
296
297 /* ****************************** T_NFC_CALLBACK_TRACE_TIME ******************************** */
300 #define NUM_T_NFC_CALLBACK_TRACE_TIME 15
308 /* ***************************************************************************************** */
309 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_TRACE_TIME)(T_NFC_CLB_CTX_SINGLE_PARAM);
310
311
312 /* ****************************** T_NFC_CALLBACK_TRACE_ERROR ******************************* */
315 #define NUM_T_NFC_CALLBACK_TRACE_ERROR 16
326 /* ***************************************************************************************** */
327 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_TRACE_ERROR)(T_NFC_CLB_CTX_PARAM KER_INT16U usTraceLevel, KER_RES resErrCode, const KER_CHAR* pchErrorText);
328
329
330 /* ****************************** T_NFC_CALLBACK_KEEP_TRACE_TIME ******************************** */
333 #define NUM_T_NFC_CALLBACK_KEEP_TRACE_TIME 17
343 /* ***************************************************************************************** */
344 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_KEEP_TRACE_TIME)(T_NFC_CLB_CTX_PARAM KER_BYTE* pbtTimeBuffer, KER_INT16U* pusTimeBufferSize);
345
346
347 /* ****************************** T_NFC_CALLBACK_TRACE_FLUSH ******************************* */
350 #define NUM_T_NFC_CALLBACK_TRACE_FLUSH 18
357 /* ***************************************************************************************** */
358 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_TRACE_FLUSH)(T_NFC_CLB_CTX_SINGLE_PARAM);
359
360
361 /* ******************************** T_NFC_CALLBACK_MEM_CMP ********************************* */
364 #define NUM_T_NFC_CALLBACK_MEM_CMP 21
376 /* ***************************************************************************************** */
377 typedef KER_INT32S (CLB_API *T_NFC_CALLBACK_MEM_CMP)(T_NFC_CLB_CTX_PARAM const KER_VOID* pvBuffer1, const KER_VOID* pvBuffer2, KER_INT16U usCount);
378
379
380 /* ******************************** T_NFC_CALLBACK_MEM_SET ********************************* */
383 #define NUM_T_NFC_CALLBACK_MEM_SET 22
394 /* ***************************************************************************************** */
395 typedef KER_VOID* (CLB_API *T_NFC_CALLBACK_MEM_SET)(T_NFC_CLB_CTX_PARAM KER_VOID* pvDestBuffer, KER_INT16U usDestBufferSize, KER_BYTE btValue, KER_INT16U usCount);
396
397
398 /* ******************************** T_NFC_CALLBACK_MEM_CPY ********************************* */
401 #define NUM_T_NFC_CALLBACK_MEM_CPY 23
412 /* ***************************************************************************************** */
413 typedef KER_INT16U (CLB_API *T_NFC_CALLBACK_MEM_CPY)(T_NFC_CLB_CTX_PARAM KER_VOID* pvDestBuffer, KER_INT16U usDestBufferSize, const KER_VOID* pvSourceBuffer, KER_INT16U usSourceBufferSize);
414
415
416 /* ******************************* T_NFC_CALLBACK_MEM_MOVE ********************************* */
419 #define NUM_T_NFC_CALLBACK_MEM_MOVE 24
431 /* ***************************************************************************************** */
432 typedef KER_VOID* (CLB_API *T_NFC_CALLBACK_MEM_MOVE)(T_NFC_CLB_CTX_PARAM KER_VOID* pvDestBuffer, KER_INT16U usDestBufferSize, KER_VOID* pvSourceBuffer, KER_INT16U usSourceBufferSize);
433
434
435 /* ******************************** T_NFC_CALLBACK_MEM_ADD ********************************* */
438 #define NUM_T_NFC_CALLBACK_MEM_ADD 25
450 /* ***************************************************************************************** */
451 typedef KER_INT16U (CLB_API *T_NFC_CALLBACK_MEM_ADD)(T_NFC_CLB_CTX_PARAM KER_VOID* pvDestBuffer, KER_INT16U usDestBufferSize, KER_INT16U usDestBufferOffset, const KER_VOID* pvSourceBuffer, KER_INT16U usSourceBufferSize);
452
453
454 /* ****************************** T_NFC_CALLBACK_MEM_SPRINTF ******************************* */
457 #define NUM_T_NFC_CALLBACK_MEM_SPRINTF 26
467 /* ***************************************************************************************** */
468 typedef KER_INT16U (KER_CDECL *T_NFC_CALLBACK_MEM_SPRINTF)(T_NFC_CLB_CTX_PARAM KER_CHAR* pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR* pchFormat, ...);
469
470
471 /* ****************************** T_NFC_CALLBACK_MEM_VSPRINTF ****************************** */
474 #define NUM_T_NFC_CALLBACK_MEM_VSPRINTF 27
485 /* ***************************************************************************************** */
486 typedef KER_INT16U (KER_CDECL *T_NFC_CALLBACK_MEM_VSPRINTF)(T_NFC_CLB_CTX_PARAM KER_CHAR* pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR* pchFormat, va_list _ArgList);
487
488
489 /* ******************************* T_NFC_CALLBACK_MEM_ALLOC ******************************** */
492 #define NUM_T_NFC_CALLBACK_MEM_ALLOC 28
502 /* ***************************************************************************************** */
503 typedef KER_VOID* (CLB_API *T_NFC_CALLBACK_MEM_ALLOC)(T_NFC_CLB_CTX_PARAM KER_INT16U usBufferSize);
504
505
506 /* ***************************** T_NFC_CALLBACK_MEM_RELEASE_EX ***************************** */
509 #define NUM_T_NFC_CALLBACK_MEM_RELEASE_EX 29
519 /* ***************************************************************************************** */
520 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_MEM_RELEASE_EX)(T_NFC_CLB_CTX_PARAM KER_VOID* pBuffer, KER_INT16U usBufferSize);
521
522
523 /* ************************** T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID ************************** */
526 #define NUM_T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID 31
527
550 /* ***************************************************************************************** */
551 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtAID, KER_INT16U usAIDLen, const KER_TLV* pTranDataList, const KER_TLV* pTranContextList, KER_INT16U usID, KER_BYTE* pbtValue, KER_INT16U* pusValueLen, KER_INT16U usMaxLen);
552
553
554 /* ************************* T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID ************************* */
557 #define NUM_T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID 32
573 /* ***************************************************************************************** */
574 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID)(T_NFC_CLB_CTX_PARAM KER_INT16U usID, KER_BYTE* pbtValue, KER_INT16U* pusValueLen, KER_INT16U usMaxLen);
575
576
577 /* ************************* T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG ************************* */
580 #define NUM_T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG 33
593 /* ***************************************************************************************** */
594 typedef KER_INT16U(CLB_API *T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtTag, KER_INT16U usTagLen);
595
596
597 /* **************************** T_NFC_CALLBACK_CFG_IS_TRAN_CASH **************************** */
600 #define NUM_T_NFC_CALLBACK_CFG_IS_TRAN_CASH 34
611 /* ***************************************************************************************** */
612 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_IS_TRAN_CASH)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType);
613
614
615 /* **************************** T_NFC_CALLBACK_CFG_IS_TRAN_SALE **************************** */
618 #define NUM_T_NFC_CALLBACK_CFG_IS_TRAN_SALE 35
629 /* ***************************************************************************************** */
630 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_IS_TRAN_SALE)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType);
631
632
633 /* ************************** T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK ************************** */
636 #define NUM_T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK 36
647 /* ***************************************************************************************** */
648 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType);
649
650
651 /* ************************** T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH ************************** */
654 #define NUM_T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH 37
665 /* ***************************************************************************************** */
666 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType);
667
668
669 /* *************************** T_NFC_CALLBACK_CFG_IS_TRAN_REFUND *************************** */
672 #define NUM_T_NFC_CALLBACK_CFG_IS_TRAN_REFUND 38
683 /* ***************************************************************************************** */
684 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_IS_TRAN_REFUND)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType);
685
686
687 /* ************************* T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE ************************* */
690 #define NUM_T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE 39
702 /* ***************************************************************************************** */
703 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtARC, KER_INT16U usARCLen);
704
705 /* ************************** T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID ************************** */
708 #define NUM_T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID 40
709
724 /* ***************************************************************************************** */
725 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID)(T_NFC_CLB_CTX_PARAM KER_INT16U usID, const KER_BYTE* pbtValue, KER_INT16U usValueLen);
726
727
728 /* *************************** T_NFC_CALLBACK_CFG_GET_EP_CONFIG **************************** */
731 #define NUM_T_NFC_CALLBACK_CFG_GET_EP_CONFIG 41
747 typedef KER_BOOL (CLB_API* T_NFC_CALLBACK_CFG_GET_EP_CONFIG)(T_NFC_CLB_CTX_PARAM const KER_TLV* pTranData, HAL_CONFIG_NFC_COMB** ppCombList);
748
749
750 /* ************************* T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID ************************** */
753 #define NUM_T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID 42
777 typedef KER_BOOL (CLB_API* T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pAID, KER_INT16U usAIDLen, KER_BYTE* pbtKernelID, KER_BYTE* pbtKernelIDLen, KER_BYTE btMaxLen);
778
779
780 /* ************************** T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID ************************** */
783 #define NUM_T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID 43
797 typedef KER_BOOL (CLB_API* T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID)(T_NFC_CLB_CTX_PARAM const KER_BYTE* p61, KER_INT16U us61Len, KER_BYTE* pbtKernelID, KER_BYTE* pbtKernelIDLen, KER_BYTE btMaxLen);
798
799
800 /* **************************** T_NFC_CALLBACK_CV_CHECK_CVM_COND *************************** */
803 #define NUM_T_NFC_CALLBACK_CV_CHECK_CVM_COND 51
813 /* ***************************************************************************************** */
814 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CV_CHECK_CVM_COND)(T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE btCondition);
815
816
817 /* ****************************** T_NFC_CALLBACK_CV_APPLY_CVM ****************************** */
820 #define NUM_T_NFC_CALLBACK_CV_APPLY_CVM 52
821
822 #define T_NFC_CVM_RES_OK 0x00
823 #define T_NFC_CVM_RES_UNSUPP 0x01
824 #define T_NFC_CVM_RES_UNREC 0x02
825 #define T_NFC_CVM_RES_FAIL 0x03
841 /* ***************************************************************************************** */
842 typedef KER_BYTE(CLB_API *T_NFC_CALLBACK_CV_APPLY_CVM)(T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE* pbtRes, KER_BYTE* pbtOutcomeCVM, KER_BYTE* pbtTVR, KER_BYTE btTVRLen);
843
844
845 /* *************************** T_NFC_CALLBACK_DEX_DATAFROMKERNEL *************************** */
848 #define NUM_T_NFC_CALLBACK_DEX_DATAFROMKERNEL 61
858 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_DEX_DATAFROMKERNEL)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtKernelData, KER_INT16U usKernelDataLen);
859
860
861 /* **************************T_NFC_CALLBACK_DEX_DATAFROMTERMINAL *************************** */
864 #define NUM_T_NFC_CALLBACK_DEX_DATAFROMTERMINAL 62
870 #define T_NFC_DE_RES_OK 0x0000
871 #define T_NFC_DE_RES_TIMEOUT 0x0001
872 #define T_NFC_DE_RES_NO_DATA 0x0002
873 #define T_NFC_DE_RES_FAIL 0x0003
890 typedef KER_RES (CLB_API *T_NFC_CALLBACK_DEX_DATAFROMTERMINAL)(T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID* pParam, KER_BYTE** ppbtTerminalData, KER_INT16U* pusTerminalDataLen);
891
892
893 /* **************************** T_NFC_CALLBACK_DEX_FREERESULT_EX *************************** */
896 #define NUM_T_NFC_CALLBACK_DEX_FREERESULT_EX 63
906 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_DEX_FREERESULT_EX)(T_NFC_CLB_CTX_PARAM KER_BYTE* pbtData, KER_INT16U usDataLen);
907
908
909 /* ******************************* T_NFC_CALLBACK_CRYPT_HASH ******************************* */
912 #define NUM_T_NFC_CALLBACK_CRYPT_HASH 71
913
914 #define T_NFC_CALLBACK_CRYPT_HASH_ALG_TC_HASH 0
915 #define T_NFC_CALLBACK_CRYPT_HASH_ALG_SHA1 1
931 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_HASH)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID* pExtra, const KER_BYTE* pbtDataBuffer, KER_INT16U usDataBufferLen, KER_BYTE* pbtHash, KER_INT16U* pusHashLen, KER_INT16U usHashSize);
932
933
934 /* ***************************** T_NFC_CALLBACK_CRYPT_HASH_INIT **************************** */
937 #define NUM_T_NFC_CALLBACK_CRYPT_HASH_INIT 72
948 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_HASH_INIT)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID* pExtra, KER_VOID** ppHashHandle);
949
950
951 /* **************************** T_NFC_CALLBACK_CRYPT_HASH_UPDATE *************************** */
954 #define NUM_T_NFC_CALLBACK_CRYPT_HASH_UPDATE 73
966 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_HASH_UPDATE)(T_NFC_CLB_CTX_PARAM KER_VOID* pHashHandle, KER_BYTE btAlg, const KER_BYTE* pbtDataBuffer, KER_INT16U usDataBufferLen);
967
968
969 /* *************************** T_NFC_CALLBACK_CRYPT_HASH_COMPLETE ************************** */
972 #define NUM_T_NFC_CALLBACK_CRYPT_HASH_COMPLETE 74
985 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_HASH_COMPLETE)(T_NFC_CLB_CTX_PARAM KER_VOID* pHashHandle, KER_BYTE btAlg, KER_BYTE* pbtHash, KER_INT16U* pusHashLen, KER_INT16U usHashSize);
986
987
988 /* *************************** T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER ************************** */
991 #define NUM_T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER 75
1001 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER)(T_NFC_CLB_CTX_PARAM KER_INT16U usUnpredNumLen, KER_BYTE* pbtUnpredNum);
1002
1003
1004 /* ****************************** T_NFC_CALLBACK_CRYPT_SET_AC ****************************** */
1007 #define NUM_T_NFC_CALLBACK_CRYPT_SET_AC 76
1019 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_SET_AC)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtAc, KER_INT16U usAcLen);
1020
1021
1022 /* ***************************** T_NFC_CALLBACK_CRYPT_GET_CA_PK **************************** */
1025 #define NUM_T_NFC_CALLBACK_CRYPT_GET_CA_PK 77
1026 typedef struct tag_HAL_CRYPT_PK HAL_CRYPT_PK;
1041 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_GET_CA_PK)(T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE* pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, HAL_CRYPT_PK* pCA_PK);
1042
1043
1044 /* **************************** T_NFC_CALLBACK_CRYPT_MSG_RECOVERY ************************** */
1047 #define NUM_T_NFC_CALLBACK_CRYPT_MSG_RECOVERY 78
1048
1049 #define T_NFC_CALLBACK_CRYPT_REC_ALG_RSA_EMV 1
1070 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_MSG_RECOVERY)(T_NFC_CLB_CTX_PARAM const KER_BYTE* pbtPK, KER_INT16U usPKLen, const KER_BYTE* pbtExp, KER_INT16U usExpLen, KER_BYTE btAlg,
1071 const KER_BYTE* pbtMsg, KER_INT16U usMsgLen, KER_BYTE* pbtResult, KER_INT16U* pusResultLen, KER_INT16U usMaxLen);
1072
1073
1074 /* ************************** T_NFC_CALLBACK_CRYPT_CERT_REVOCATION ************************* */
1077 #define NUM_T_NFC_CALLBACK_CRYPT_CERT_REVOCATION 79
1078
1079 #define T_NFC_CALLBACK_CRYPT_CERT_INFO_VER 0
1081 typedef struct tag_HAL_CRYPT_CERT_INFO HAL_CRYPT_CERT_INFO;
1082
1097 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_CERT_REVOCATION)(T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE* pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, const HAL_CRYPT_CERT_INFO* pCert);
1098
1099
1100 /* ***************************** T_NFC_CALLBACK_CRYPT_ENCRYPT ****************************** */
1103 #define NUM_T_NFC_CALLBACK_CRYPT_ENCRYPT 80
1104
1105 #define T_NFC_CALLBACK_CRYPT_ALG_DES 0x00
1106 #define T_NFC_CALLBACK_CRYPT_ALG_AES 0x10
1107 #define T_NFC_CALLBACK_CRYPT_ALG_NA 0xFF
1127 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_ENCRYPT)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE* pbtKey, KER_INT16U usKeyLen, const KER_BYTE* pbtIV, KER_INT16U usIVLen, const KER_BYTE* pbtData, KER_INT16U usDataLen, KER_BYTE* pbtResult, KER_INT16U* pusResultLen, KER_INT16U usMaxLen);
1128
1129
1130 /* ***************************** T_NFC_CALLBACK_CRYPT_DECRYPT ****************************** */
1133 #define NUM_T_NFC_CALLBACK_CRYPT_DECRYPT 81
1134
1153 typedef KER_BOOL (CLB_API *T_NFC_CALLBACK_CRYPT_DECRYPT)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE* pbtKey, KER_INT16U usKeyLen, const KER_BYTE* pbtIV, KER_INT16U usIVLen, const KER_BYTE* pbtData, KER_INT16U usDataLen, KER_BYTE* pbtResult, KER_INT16U* pusResultLen, KER_INT16U usMaxLen);
1154
1155
1156 /* **************************** T_NFC_CALLBACK_INIT_CHECKSUM_EX **************************** */
1159 #define NUM_T_NFC_CALLBACK_INIT_CHECKSUM_EX 91
1173 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_INIT_CHECKSUM_EX)(T_NFC_CLB_CTX_PARAM KER_BYTE btType, const KER_CHAR* pchKernelModuleList, KER_INT16U usKernelModuleListLen, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumLen, KER_INT16U usMaxSize);
1174
1175
1176 /* *********************** T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST *********************** */
1179 #define NUM_T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST 101
1191 typedef KER_INT16U(CLB_API* T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST)(T_NFC_CLB_CTX_PARAM KER_INT32U ulDelayTime, const NFC_OUTCOME_UI* pUI);
1192
1193
1194 /* *********************** T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST ************************* */
1197 #define NUM_T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST 102
1209 typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST)(T_NFC_CLB_CTX_PARAM KER_INT16U usRequestID);
1210
1211
1212 /* ******************************* T_NFC_CALLBACK_SYS_SLEEP ******************************** */
1215 #define NUM_T_NFC_CALLBACK_SYS_SLEEP 111
1221 typedef KER_VOID(CLB_API *T_NFC_CALLBACK_SYS_SLEEP)(T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout);
1222
1223
1224 /* ******************** T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP ********************** */
1227 #define NUM_T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP 112
1233 typedef KER_INT32U(CLB_API *T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP)(T_NFC_CLB_CTX_SINGLE_PARAM);
1234
1235 /* ************************** T_NFC_CALLBACK_SYS_GET_DATE_TIME ***************************** */
1238 #define NUM_T_NFC_CALLBACK_SYS_GET_DATE_TIME 113
1247 typedef KER_BYTE (CLB_API *T_NFC_CALLBACK_SYS_GET_DATE_TIME)(T_NFC_CLB_CTX_PARAM KER_BYTE* pbtDateTimeBuffer, KER_BYTE btDateTimeBufferLen);
1248
1249 /* ************************ T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME *************************** */
1252 #define NUM_T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME 114
1261 typedef KER_BYTE(CLB_API *T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME)(T_NFC_CLB_CTX_PARAM KER_BYTE* pbtDateTimeBuffer, KER_BYTE btDateTimeBufferLen);
1262
1263 /* ******************************** T_NFC_CALLBACK_NOTIFY ********************************** */
1266 #define NUM_T_NFC_CALLBACK_NOTIFY 121
1267
1278 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_NOTIFY)(T_NFC_CLB_CTX_PARAM KER_INT16U usNotifyType, const KER_VOID* pNotifyData, KER_INT16U usNotifyDataLen);
1279
1280 /* ***************************** T_NFC_CALLBACK_ONLINE_CHECK ******************************* */
1283 #define NUM_T_NFC_CALLBACK_ONLINE_CHECK 122
1284
1291 typedef KER_BOOL(CLB_API *T_NFC_CALLBACK_ONLINE_CHECK)(T_NFC_CLB_CTX_SINGLE_PARAM);
1292
1293
1294 /* ************************************ LEGACY CALLBACKS *********************************** */
1295
1296
1297
1298 /* ************************************ T_NFC_CALLBACKS ************************************ */
1302 #define T_NFC_CALLBACKS_VER_00 0x00
1303 #define T_NFC_CALLBACKS_VER T_NFC_CALLBACKS_VER_00
1307 typedef struct tag_T_NFC_CALLBACKS
1308 {
1309 KER_INT16U usSize;
1310 KER_BYTE btVer;
1311
1312 T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER hal_nfcl1_get_reader_serial_number;
1313 T_NFC_CALLBACK_CARD_POLL hal_nfcl1_card_poll;
1314 T_NFC_CALLBACK_CARD_GETINFO hal_nfcl1_get_card_info;
1315 T_NFC_CALLBACK_FIELD_OFF hal_nfcl1_field_off;
1316 T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE hal_nfcl1_card_removal_procedure;
1317 T_NFC_CALLBACK_RESET_OPERATION_FIELD hal_nfcl1_reset_operation_field;
1318 T_NFC_CALLBACK_GET_READER_TYPE hal_nfcl1_get_reader_type;
1319 T_NFC_CALLBACK_CARD_SENDCAPDU hal_nfcl1_send_c_apdu;
1320 T_NFC_CALLBACK_CARD_RECEIVERAPDU hal_nfcl1_recv_r_apdu;
1321
1322 T_NFC_CALLBACK_TRACE_SET_MODE hal_set_trace_mode;
1323 T_NFC_CALLBACK_TRACE_GET_MODE hal_get_trace_mode;
1324 T_NFC_CALLBACK_TRACE_STRING hal_trace_string;
1325 T_NFC_CALLBACK_TRACE_BUFFER hal_trace_buffer;
1326 T_NFC_CALLBACK_TRACE_TIME hal_trace_time;
1327 T_NFC_CALLBACK_KEEP_TRACE_TIME hal_keep_trace_time;
1328 T_NFC_CALLBACK_TRACE_FLUSH hal_trace_flush;
1329 T_NFC_CALLBACK_TRACE_ERROR hal_error;
1330
1331 T_NFC_CALLBACK_MEM_CMP hal_mem_cmp;
1332 T_NFC_CALLBACK_MEM_SET hal_mem_set;
1333 T_NFC_CALLBACK_MEM_CPY hal_mem_cpy;
1334 T_NFC_CALLBACK_MEM_MOVE hal_mem_move;
1335 T_NFC_CALLBACK_MEM_ADD hal_mem_add;
1336 T_NFC_CALLBACK_MEM_SPRINTF hal_sprintf;
1337 T_NFC_CALLBACK_MEM_VSPRINTF hal_vsprintf;
1338 T_NFC_CALLBACK_MEM_ALLOC hal_alloc_mem;
1339 T_NFC_CALLBACK_MEM_RELEASE_EX hal_release_mem_ex;
1340
1341 T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID hal_cfg_nfc_get_tran_config_by_id;
1342 T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID hal_cfg_get_custom_tag_by_id;
1343 T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG hal_cfg_get_id_by_custom_tag;
1344 T_NFC_CALLBACK_CFG_IS_TRAN_CASH hal_cfg_get_is_tran_cash;
1345 T_NFC_CALLBACK_CFG_IS_TRAN_SALE hal_cfg_get_is_tran_sale;
1346 T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK hal_cfg_get_is_tran_cashback;
1347 T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH hal_cfg_get_is_tran_manual_cash;
1348 T_NFC_CALLBACK_CFG_IS_TRAN_REFUND hal_cfg_get_is_tran_refund;
1349 T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE hal_cfg_get_is_approved_online;
1350 T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID hal_cfg_set_config_by_id;
1351 T_NFC_CALLBACK_CFG_GET_EP_CONFIG hal_cfg_get_nfc_ep_config;
1352 T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID hal_cfg_get_nfc_default_kernel_id;
1353 T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID hal_cfg_get_nfc_custom_kernel_id;
1354
1355 T_NFC_CALLBACK_CV_CHECK_CVM_COND hal_nfc_cv_check_cvm_condition;
1356 T_NFC_CALLBACK_CV_APPLY_CVM hal_nfc_cv_apply_cvm;
1357
1358 T_NFC_CALLBACK_DEX_DATAFROMKERNEL hal_nfc_de_set_data_from_kernel;
1359 T_NFC_CALLBACK_DEX_DATAFROMTERMINAL hal_nfc_de_get_data_from_terminal;
1360 T_NFC_CALLBACK_DEX_FREERESULT_EX hal_nfc_de_release_ex;
1361
1362 T_NFC_CALLBACK_CRYPT_HASH hal_crypt_calc_hash;
1363 T_NFC_CALLBACK_CRYPT_HASH_INIT hal_crypt_calc_hash_init;
1364 T_NFC_CALLBACK_CRYPT_HASH_UPDATE hal_crypt_calc_hash_update;
1365 T_NFC_CALLBACK_CRYPT_HASH_COMPLETE hal_crypt_calc_hash_complete;
1366 T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER hal_crypt_unpredict_num_calc;
1367 T_NFC_CALLBACK_CRYPT_SET_AC hal_crypt_unpredict_num_set_ac;
1368 T_NFC_CALLBACK_CRYPT_GET_CA_PK hal_crypt_get_ca_pk;
1369 T_NFC_CALLBACK_CRYPT_MSG_RECOVERY hal_crypt_msg_recovery;
1370 T_NFC_CALLBACK_CRYPT_CERT_REVOCATION hal_crypt_check_cert_revocation;
1371 T_NFC_CALLBACK_CRYPT_ENCRYPT hal_crypt_encrypt;
1372 T_NFC_CALLBACK_CRYPT_DECRYPT hal_crypt_decrypt;
1373
1374 T_NFC_CALLBACK_INIT_CHECKSUM_EX hal_calc_checksum_ex;
1375
1376 T_NFC_CALLBACK_SYS_GET_DATE_TIME hal_sys_get_date_time;
1377 T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME hal_sys_get_utc_date_time;
1378 T_NFC_CALLBACK_SYS_SLEEP hal_sys_sleep;
1379 T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP hal_sys_get_100microsec_time_stamp;
1380
1381 T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST hal_nfc_ui_schedule_change_request;
1382 T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST hal_nfc_ui_cancel_change_request;
1383
1384 T_NFC_CALLBACK_NOTIFY hal_notify;
1385 T_NFC_CALLBACK_ONLINE_CHECK hal_online_check;
1386
1387 KER_VOID* user_handle;
1388 T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL user_de_data_from_kernel;
1389 T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL user_de_data_from_terminal;
1390 T_NFC_USER_CALLBACK_DE_DATA_RELEASE user_de_data_release;
1391 T_NFC_USER_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST user_ui_schedule_change_request;
1392 T_NFC_USER_CALLBACK_UI_CANCEL_CHANGE_REQUEST user_ui_cancel_change_request;
1393 T_NFC_USER_CALLBACK_ONLINE_CHECK user_online_check;
1394 }T_NFC_CALLBACKS;
1395
1396 #ifdef __cplusplus
1397 }
1398 #endif
1399
1400 /* restore struct alignment */
1401 #include <emv_platform_restore_align.h>
1402
1403 #endif /* T_NFC_KER_CLB_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
KER_INT32S
signed int KER_INT32S
Definition: emv_platform.h:64
T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST
KER_INT16U(CLB_API * T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST)(T_NFC_CLB_CTX_PARAM KER_INT32U ulDelayTime, const NFC_OUTCOME_UI *pUI)
Schedule async change User Interface request.
Definition: t_nfc_ker_clb.h:1191
T_NFC_USER_CALLBACK_UI_CANCEL_CHANGE_REQUEST
KER_BOOL(KER_API * T_NFC_USER_CALLBACK_UI_CANCEL_CHANGE_REQUEST)(KER_VOID *pCallbackHandle, KER_INT16U usRequestID)
Cancel prev. scheduled async change User Interface request.
Definition: t_nfc_user_clb.h:144
T_NFC_USER_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST
KER_INT16U(KER_API * T_NFC_USER_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST)(KER_VOID *pCallbackHandle, KER_INT32U ulDelayTime, const NFC_OUTCOME_UI *pUI)
Schedule async change User Interface request.
Definition: t_nfc_user_clb.h:125
T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST
KER_BOOL(CLB_API * T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST)(T_NFC_CLB_CTX_PARAM KER_INT16U usRequestID)
Cancel prev. scheduled async change User Interface request.
Definition: t_nfc_ker_clb.h:1209
T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME
KER_BYTE(CLB_API * T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME)(T_NFC_CLB_CTX_PARAM KER_BYTE *pbtDateTimeBuffer, KER_BYTE btDateTimeBufferLen)
Provides terminal UTC date & time for Kernel.
Definition: t_nfc_ker_clb.h:1261
T_NFC_CALLBACK_SYS_GET_DATE_TIME
KER_BYTE(CLB_API * T_NFC_CALLBACK_SYS_GET_DATE_TIME)(T_NFC_CLB_CTX_PARAM KER_BYTE *pbtDateTimeBuffer, KER_BYTE btDateTimeBufferLen)
Provides local terminal date & time for Kernel.
Definition: t_nfc_ker_clb.h:1247
T_NFC_CALLBACK_FIELD_OFF
KER_BOOL(CLB_API * T_NFC_CALLBACK_FIELD_OFF)(T_NFC_CLB_CTX_SINGLE_PARAM)
PCD field off request.
Definition: t_nfc_ker_clb.h:124
T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE
KER_RES(CLB_API * T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE)(T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout)
Performs EMV L1 card removal procedure Callback called by Entry Point only.
Definition: t_nfc_ker_clb.h:198
T_NFC_CALLBACK_CRYPT_ENCRYPT
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_ENCRYPT)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE *pbtKey, KER_INT16U usKeyLen, const KER_BYTE *pbtIV, KER_INT16U usIVLen, const KER_BYTE *pbtData, KER_INT16U usDataLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)
Performs encryption.
Definition: t_nfc_ker_clb.h:1127
T_NFC_CALLBACK_MEM_MOVE
KER_VOID *(CLB_API * T_NFC_CALLBACK_MEM_MOVE)(T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
Copy one memory buffer to another (event if buffer overlaped)
Definition: t_nfc_ker_clb.h:432
T_NFC_CALLBACKS
struct tag_T_NFC_CALLBACKS T_NFC_CALLBACKS
Struct to handle all callbacks.
Definition: t_nfc_ker_clb.h:29
T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
Check transaction type (9C) for cashback.
Definition: t_nfc_ker_clb.h:666
T_NFC_CALLBACK_CRYPT_CERT_REVOCATION
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_CERT_REVOCATION)(T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE *pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, const HAL_CRYPT_CERT_INFO *pCert)
Get CA PK by index from repositoty.
Definition: t_nfc_ker_clb.h:1097
T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG
KER_INT16U(CLB_API * T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtTag, KER_INT16U usTagLen)
Remapp custom tag to configuration ID.
Definition: t_nfc_ker_clb.h:594
T_NFC_CALLBACK_RESET_OPERATION_FIELD
KER_BOOL(CLB_API * T_NFC_CALLBACK_RESET_OPERATION_FIELD)(T_NFC_CLB_CTX_SINGLE_PARAM)
Reset operation field Callback called by Entry Point only.
Definition: t_nfc_ker_clb.h:211
T_NFC_CALLBACK_SYS_SLEEP
KER_VOID(CLB_API * T_NFC_CALLBACK_SYS_SLEEP)(T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout)
Sleeps for specified timeout.
Definition: t_nfc_ker_clb.h:1221
T_NFC_CALLBACK_NOTIFY
KER_BOOL(CLB_API * T_NFC_CALLBACK_NOTIFY)(T_NFC_CLB_CTX_PARAM KER_INT16U usNotifyType, const KER_VOID *pNotifyData, KER_INT16U usNotifyDataLen)
Notifies HAL about some specific event.
Definition: t_nfc_ker_clb.h:1278
T_NFC_CALLBACK_CRYPT_HASH
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID *pExtra, const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferLen, KER_BYTE *pbtHash, KER_INT16U *pusHashLen, KER_INT16U usHashSize)
Calculates hash for data buffer provided.
Definition: t_nfc_ker_clb.h:931
T_NFC_CALLBACK_MEM_ADD
KER_INT16U(CLB_API * T_NFC_CALLBACK_MEM_ADD)(T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_INT16U usDestBufferOffset, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
Add memory buffer to existing buffer with offset.
Definition: t_nfc_ker_clb.h:451
T_NFC_CALLBACK_DEX_DATAFROMTERMINAL
KER_RES(CLB_API * T_NFC_CALLBACK_DEX_DATAFROMTERMINAL)(T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID *pParam, KER_BYTE **ppbtTerminalData, KER_INT16U *pusTerminalDataLen)
Data exchange callback.
Definition: t_nfc_ker_clb.h:890
T_NFC_CALLBACK_CRYPT_HASH_UPDATE
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH_UPDATE)(T_NFC_CLB_CTX_PARAM KER_VOID *pHashHandle, KER_BYTE btAlg, const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferLen)
Passes data for hash calculation (can be executed several times)
Definition: t_nfc_ker_clb.h:966
T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtARC, KER_INT16U usARCLen)
Check online result by ARC.
Definition: t_nfc_ker_clb.h:703
T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER)(T_NFC_CLB_CTX_PARAM KER_INT16U usUnpredNumLen, KER_BYTE *pbtUnpredNum)
Calculates unpredictable number.
Definition: t_nfc_ker_clb.h:1001
T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID
KER_BOOL(CLB_API * T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID)(T_NFC_CLB_CTX_PARAM const KER_BYTE *p61, KER_INT16U us61Len, KER_BYTE *pbtKernelID, KER_BYTE *pbtKernelIDLen, KER_BYTE btMaxLen)
Provides custom mapping between Directory Entry and Requested Kernel ID Optional callback called by E...
Definition: t_nfc_ker_clb.h:797
T_NFC_CALLBACK_MEM_SET
KER_VOID *(CLB_API * T_NFC_CALLBACK_MEM_SET)(T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_BYTE btValue, KER_INT16U usCount)
Reset memory buffer with specified value.
Definition: t_nfc_ker_clb.h:395
T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER
KER_BOOL(CLB_API * T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER)(T_NFC_CLB_CTX_PARAM KER_CHAR *data, KER_BYTE *dlen)
Get serial number of the IFD Optional Callback.
Definition: t_nfc_ker_clb.h:227
T_NFC_CALLBACK_CFG_IS_TRAN_REFUND
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_REFUND)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
Check transaction type (9C) for cashback.
Definition: t_nfc_ker_clb.h:684
T_NFC_CALLBACK_CRYPT_HASH_COMPLETE
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH_COMPLETE)(T_NFC_CLB_CTX_PARAM KER_VOID *pHashHandle, KER_BYTE btAlg, KER_BYTE *pbtHash, KER_INT16U *pusHashLen, KER_INT16U usHashSize)
Calculates hash on prev. provided data.
Definition: t_nfc_ker_clb.h:985
T_NFC_CALLBACK_TRACE_SET_MODE
KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_SET_MODE)(T_NFC_CLB_CTX_PARAM KER_BYTE btTraceMode)
Set trace mode.
Definition: t_nfc_ker_clb.h:247
T_NFC_CALLBACK_CARD_SENDCAPDU
KER_BOOL(CLB_API * T_NFC_CALLBACK_CARD_SENDCAPDU)(T_NFC_CLB_CTX_PARAM KER_BYTE btCase, KER_BYTE btCls, KER_BYTE btIns, KER_BYTE btP1, KER_BYTE btP2, KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe)
Send APDU requset to card.
Definition: t_nfc_ker_clb.h:84
T_NFC_CALLBACK_DEX_FREERESULT_EX
KER_BOOL(CLB_API * T_NFC_CALLBACK_DEX_FREERESULT_EX)(T_NFC_CLB_CTX_PARAM KER_BYTE *pbtData, KER_INT16U usDataLen)
Data exchange callback.
Definition: t_nfc_ker_clb.h:906
T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID)(T_NFC_CLB_CTX_PARAM KER_INT16U usID, const KER_BYTE *pbtValue, KER_INT16U usValueLen)
Keeps trerminal params in "scratch pad".
Definition: t_nfc_ker_clb.h:725
T_NFC_CALLBACK_MEM_ALLOC
KER_VOID *(CLB_API * T_NFC_CALLBACK_MEM_ALLOC)(T_NFC_CLB_CTX_PARAM KER_INT16U usBufferSize)
allocate memory buffer
Definition: t_nfc_ker_clb.h:503
T_NFC_CALLBACK_TRACE_ERROR
KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_ERROR)(T_NFC_CLB_CTX_PARAM KER_INT16U usTraceLevel, KER_RES resErrCode, const KER_CHAR *pchErrorText)
Trace error to system error journal.
Definition: t_nfc_ker_clb.h:327
T_NFC_CALLBACK_INIT_CHECKSUM_EX
KER_BOOL(CLB_API * T_NFC_CALLBACK_INIT_CHECKSUM_EX)(T_NFC_CLB_CTX_PARAM KER_BYTE btType, const KER_CHAR *pchKernelModuleList, KER_INT16U usKernelModuleListLen, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumLen, KER_INT16U usMaxSize)
Pass checksums to the kernel.
Definition: t_nfc_ker_clb.h:1173
T_NFC_CALLBACK_ONLINE_CHECK
KER_BOOL(CLB_API * T_NFC_CALLBACK_ONLINE_CHECK)(T_NFC_CLB_CTX_SINGLE_PARAM)
Checks HAL for unable to go online condition (for AmEx C-4).
Definition: t_nfc_ker_clb.h:1291
T_NFC_CALLBACK_MEM_SPRINTF
KER_INT16U(KER_CDECL * T_NFC_CALLBACK_MEM_SPRINTF)(T_NFC_CLB_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat,...)
sprintf_s analog
Definition: t_nfc_ker_clb.h:468
T_NFC_CALLBACK_MEM_RELEASE_EX
KER_BOOL(CLB_API * T_NFC_CALLBACK_MEM_RELEASE_EX)(T_NFC_CLB_CTX_PARAM KER_VOID *pBuffer, KER_INT16U usBufferSize)
release previously allocated memory buffer
Definition: t_nfc_ker_clb.h:520
T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, const KER_TLV *pTranDataList, const KER_TLV *pTranContextList, KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
Provide terminal configuration specific for AID-Transaction data combination which have no emv tag as...
Definition: t_nfc_ker_clb.h:551
T_NFC_CALLBACK_MEM_CPY
KER_INT16U(CLB_API * T_NFC_CALLBACK_MEM_CPY)(T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
Copy one memory buffer to another.
Definition: t_nfc_ker_clb.h:413
T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP
KER_INT32U(CLB_API * T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP)(T_NFC_CLB_CTX_SINGLE_PARAM)
Provides terminal timestamp for Kernel (in 100 microsec resolution)
Definition: t_nfc_ker_clb.h:1233
T_NFC_CALLBACK_CRYPT_HASH_INIT
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH_INIT)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID *pExtra, KER_VOID **ppHashHandle)
Initiates hash calculation.
Definition: t_nfc_ker_clb.h:948
T_NFC_CALLBACK_CFG_IS_TRAN_SALE
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_SALE)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
Check transaction type (9C) for goods and services.
Definition: t_nfc_ker_clb.h:630
T_NFC_CALLBACK_CFG_GET_EP_CONFIG
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_GET_EP_CONFIG)(T_NFC_CLB_CTX_PARAM const KER_TLV *pTranData, HAL_CONFIG_NFC_COMB **ppCombList)
Provides configuration (common / combination / tran related for EP This callback called by Entry Poin...
Definition: t_nfc_ker_clb.h:747
T_NFC_CALLBACK_CFG_IS_TRAN_CASH
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_CASH)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
Check transaction type (9C) for cash tran (cash or cash disbursement at POS)
Definition: t_nfc_ker_clb.h:612
T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID)(T_NFC_CLB_CTX_PARAM KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
Remapp terminal configuration id to custom tag.
Definition: t_nfc_ker_clb.h:574
T_NFC_CALLBACK_CARD_GETINFO
KER_BOOL(CLB_API * T_NFC_CALLBACK_CARD_GETINFO)(T_NFC_CLB_CTX_PARAM KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen)
Callback returns info for last activated card.
Definition: t_nfc_ker_clb.h:181
T_NFC_CALLBACK_TRACE_GET_MODE
KER_BYTE(CLB_API * T_NFC_CALLBACK_TRACE_GET_MODE)(T_NFC_CLB_CTX_SINGLE_PARAM)
Get trace mode.
Definition: t_nfc_ker_clb.h:261
T_NFC_CALLBACK_CV_CHECK_CVM_COND
KER_BOOL(CLB_API * T_NFC_CALLBACK_CV_CHECK_CVM_COND)(T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE btCondition)
Check if non standard cvm condition met.
Definition: t_nfc_ker_clb.h:814
T_NFC_CALLBACK_CARD_POLL
KER_RES(CLB_API * T_NFC_CALLBACK_CARD_POLL)(T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen)
PCD field on and card polling during specified timeout.
Definition: t_nfc_ker_clb.h:156
T_NFC_CALLBACK_GET_READER_TYPE
KER_BOOL(CLB_API * T_NFC_CALLBACK_GET_READER_TYPE)(T_NFC_CLB_CTX_PARAM KER_CHAR *data, KER_BYTE *dlen)
Get IFD type for IFD related config Optional Callback.
Definition: t_nfc_ker_clb.h:62
T_NFC_CALLBACK_DEX_DATAFROMKERNEL
KER_BOOL(CLB_API * T_NFC_CALLBACK_DEX_DATAFROMKERNEL)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtKernelData, KER_INT16U usKernelDataLen)
Data exchange callback.
Definition: t_nfc_ker_clb.h:858
T_NFC_CALLBACK_TRACE_STRING
KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_STRING)(T_NFC_CLB_CTX_PARAM const KER_CHAR *pchString)
Trace povided nul-term string.
Definition: t_nfc_ker_clb.h:277
T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID
KER_BOOL(CLB_API * T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pAID, KER_INT16U usAIDLen, KER_BYTE *pbtKernelID, KER_BYTE *pbtKernelIDLen, KER_BYTE btMaxLen)
Provides default AID - Kernel ID mapping Optional callback called by Entry Point only.
Definition: t_nfc_ker_clb.h:777
T_NFC_CALLBACK_TRACE_TIME
KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_TIME)(T_NFC_CLB_CTX_SINGLE_PARAM)
Trace timestamp.
Definition: t_nfc_ker_clb.h:309
T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK
KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK)(T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
Check transaction type (9C) for cashback.
Definition: t_nfc_ker_clb.h:648
T_NFC_CALLBACK_KEEP_TRACE_TIME
KER_BOOL(CLB_API * T_NFC_CALLBACK_KEEP_TRACE_TIME)(T_NFC_CLB_CTX_PARAM KER_BYTE *pbtTimeBuffer, KER_INT16U *pusTimeBufferSize)
Keep trace timestamp.
Definition: t_nfc_ker_clb.h:344
T_NFC_CALLBACK_CARD_RECEIVERAPDU
KER_RES(CLB_API * T_NFC_CALLBACK_CARD_RECEIVERAPDU)(T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_BYTE *pbtDataOut, KER_INT16U *pusDataOutLength, KER_INT16U usDataOutMaxLength, KER_INT16U *pusSW1SW2, KER_INT32U *pulExecutionTime)
Obtain APDU response from card.
Definition: t_nfc_ker_clb.h:110
T_NFC_CALLBACK_MEM_CMP
KER_INT32S(CLB_API * T_NFC_CALLBACK_MEM_CMP)(T_NFC_CLB_CTX_PARAM const KER_VOID *pvBuffer1, const KER_VOID *pvBuffer2, KER_INT16U usCount)
Compare memory buffers.
Definition: t_nfc_ker_clb.h:377
T_NFC_CALLBACK_TRACE_FLUSH
KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_FLUSH)(T_NFC_CLB_CTX_SINGLE_PARAM)
Flush trace to tracefile (optional)
Definition: t_nfc_ker_clb.h:358
T_NFC_CALLBACK_CRYPT_MSG_RECOVERY
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_MSG_RECOVERY)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtPK, KER_INT16U usPKLen, const KER_BYTE *pbtExp, KER_INT16U usExpLen, KER_BYTE btAlg, const KER_BYTE *pbtMsg, KER_INT16U usMsgLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)
Message recovery according to EMV Book 2, Appendix A2.1.
Definition: t_nfc_ker_clb.h:1070
T_NFC_CALLBACK_CRYPT_GET_CA_PK
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_GET_CA_PK)(T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE *pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, HAL_CRYPT_PK *pCA_PK)
Get CA PK by index from repositoty.
Definition: t_nfc_ker_clb.h:1041
T_NFC_CALLBACK_TRACE_BUFFER
KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_BUFFER)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferSize)
Trace povided data buffer.
Definition: t_nfc_ker_clb.h:294
T_NFC_CALLBACK_CRYPT_DECRYPT
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_DECRYPT)(T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE *pbtKey, KER_INT16U usKeyLen, const KER_BYTE *pbtIV, KER_INT16U usIVLen, const KER_BYTE *pbtData, KER_INT16U usDataLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)
Performs decryption.
Definition: t_nfc_ker_clb.h:1153
T_NFC_CALLBACK_CV_APPLY_CVM
KER_BYTE(CLB_API * T_NFC_CALLBACK_CV_APPLY_CVM)(T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE *pbtRes, KER_BYTE *pbtOutcomeCVM, KER_BYTE *pbtTVR, KER_BYTE btTVRLen)
Apply non standard cvm.
Definition: t_nfc_ker_clb.h:842
nfcRegisterCallback
KER_RES nfcRegisterCallback(T_NFC_CALLBACKS *pCallbacks, KER_INT16U usCllbackID, KER_VOID *pCallback)
HAL callback registration.
T_NFC_CALLBACK_MEM_VSPRINTF
KER_INT16U(KER_CDECL * T_NFC_CALLBACK_MEM_VSPRINTF)(T_NFC_CLB_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat, va_list _ArgList)
sprintf_s analog
Definition: t_nfc_ker_clb.h:486
T_NFC_CALLBACK_CRYPT_SET_AC
KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_SET_AC)(T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtAc, KER_INT16U usAcLen)
Updates unpredictable (random) number calculator with last AC (9F26) value (only if it was obtained f...
Definition: t_nfc_ker_clb.h:1019
T_NFC_USER_CALLBACK_DE_DATA_RELEASE
KER_BOOL(KER_API * T_NFC_USER_CALLBACK_DE_DATA_RELEASE)(KER_VOID *pCallbackHandle, KER_BYTE *pbtData, KER_INT16U usDataLen)
Callback type for data exchange.
Definition: t_nfc_user_clb.h:106
T_NFC_USER_CALLBACK_ONLINE_CHECK
KER_BOOL(KER_API * T_NFC_USER_CALLBACK_ONLINE_CHECK)(KER_VOID *pCallbackHandle)
Checks for unable to go online condition (for AmEx C-4).
Definition: t_nfc_user_clb.h:160
T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL
KER_INT16U(KER_API * T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL)(KER_VOID *pCallbackHandle, KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID *pParam, KER_BYTE **ppbtData, KER_INT16U *pusDataLen)
Callback type for data exchange.
Definition: t_nfc_user_clb.h:85
T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL
KER_BOOL(KER_API * T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL)(KER_VOID *pCallbackHandle, const KER_BYTE *pbtData, KER_INT16U usDataLen)
Callback type for data exchange to pass card/kernel data to terminal.
Definition: t_nfc_user_clb.h:48
tag_HAL_CONFIG_NFC_COMB
NFC combination configuration data.
Definition: hal_nfc_config.h:57
tag_HAL_CRYPT_CERT_INFO
Check certificate revocation cert info structure.
Definition: hal_crypt.h:276
tag_HAL_CRYPT_PK
Get PK info structure.
Definition: hal_crypt.h:204
tag_HAL_CRYPT_PK::usExpLen
KER_INT16U usExpLen
Definition: hal_crypt.h:219
tag_HAL_CRYPT_PK::usPKLen
KER_INT16U usPKLen
Definition: hal_crypt.h:227
tag_KER_TLV
TLV container structure.
Definition: emv_data.h:63
tag_NFC_OUTCOME_UI
Outcome User Interface struct definition, version 0.
Definition: nfc_outcome.h:152
tag_T_NFC_CALLBACKS
Struct to handle all callbacks.
Definition: t_nfc_ker_clb.h:1308
t_nfc_user_clb.h