Amadis
Candidate Selection Callback (EMVCo Contact Kernel)
Goal
The objective of this Callback is to allow the implemetation of Domestic Candidate Selection Rules to provide the Contact Kernel with the Index of the Candidate to be selected during the Application Final Selection.
This Callback also allows customized Cardholder Application Selection
Enabling the Candidate Selection Callback
The Candidate Selection Callback can be enabled through the following Function from EMVCo/emvco.h:
void emvcoSetApplicationSelectionMethodCallback(tPaymentError (*callback)(tADFList *mutualList, tByte *MLIndex, tBoolean CL));
The Callback have the following signature:
tPaymentError (*callback)(tADFList *mutualList, tByte *MLIndex, tBoolean CL)
Callback Signature
Input Parameter: mutualList
The type of the mutualList parameter is the structure tADFList that can be found in Agnos/selection.h, the content is provided by the EMVCo Contact Kernel to give information about the ADF available in the ICC for Application Final Selection:
typedef struct {
tByte mNumberOfADF;
tADF mList[MAX_SUPPORTED_ADF];
tBoolean mEliminatedADF[MAX_SUPPORTED_ADF];
tBoolean mCardBlocked;
tBoolean mAnyBlockedApplication;
tByte mSelectionIndex;
} tADFList;
Element Name | Type | Description |
---|---|---|
mNumberOfADF | tByte | Number of ADF Entries in mList[] and mEliminatedADF[] |
mList[] | tADF [Array] | ADF Entries, see Agnos/selection.h for more details |
mEliminatedADF[] | tBoolean [Array] | Indicates whether the corresponding ADF Index in mList has been Eliminated or Not from the Candidate List: |
mCardBlocked | tBoolean | Indicates whether the Card is Blocked or not |
mAnyBlockedApplication | tBoolean | Indicates whether at least one ADF has been blocked or not |
mSelectionIndex | tByte | Index of ADF in mList[] selected for Application Final Selection |
Output Parameter: MLIndex
Index of ADF to be Selected for Application Final Selection
The Implementer of this Callback shall set the variable MLIndex to the index of the ADF in mList[] that will be used for Application Final Selection
Input Parameter: CL
This parameter is always set to bFALSE when callback is originating from the EMVCo Contact Kernel (CL = Contactless)
NOTE: The same Callback can be used for Contact and Contactless (see AgnosEP/entrypoint.h for Contactless)
Return Code
The Callback Implementer can return one of the tPaymentError codes (see AgnosMW/paymenterrors.h)
Return Code | Value | Description |
---|---|---|
payNO_ERROR | C000h | Candidate available for Application Final Selection |
payNEW_SELECTION | C001h | Let normal Candidate Selection to take place |
payTRANSACTION_TERMINATED | C00Bh | Critical System Error |
payTRANSACTION_CANCELLED | C00Dh | Cardholder pressed CANCEL during Manual Application Selection |
payNO_MUTUAL_APPLICATION | C00Eh | No more Candidates available for Application Final Selection |
Sample Selection Callback Implementation
Â
Â