Skip to main content

Application Development Kit (Version 4.8)


sdiprotocol.h

Last updated: 02-Oct-2025
Go to the documentation of this file.
    1      6 #ifndef _SDIPROTOCOL_H_    7 #define _SDIPROTOCOL_H_    8      9 #ifdef __cplusplus   10 extern "C" {   11 #endif   12     16 #define SDI_PROTOCOL_ERR_IO             -1    17 #define SDI_PROTOCOL_ERR_CONCURRENT_USE -2    18 #define SDI_PROTOCOL_ERR_CONNECT        -3    19 #define SDI_PROTOCOL_ERR_OVERFLOW       -4    20 #define SDI_PROTOCOL_ERR_PARAM          -5    21 #define SDI_PROTOCOL_ERR_OTHER          -6    22 #define SDI_PROTOCOL_ERR_NO_RECEIVE     -7    23     26     30 #define SDI_PROTOCOL_INIT_OPT_TRACE_EMV_CBK           0x01    31 #define SDI_PROTOCOL_INIT_OPT_TRACE_SYSLOG            0x02    32 #define SDI_PROTOCOL_INIT_OPT_TRACE_ADK_LOG           0x04    33     35     36   /*****************************************************************************   37   * SDI_ProtocolInit   38   *****************************************************************************/   60   int SDI_ProtocolInit(unsigned options, const char *settings);   61     62   /*****************************************************************************   63   * SDI_Send   64   *****************************************************************************/   74   int SDI_Send(const unsigned char *data, int dataLength);   75     76   /*****************************************************************************   77   * SDI_Receive   78   *****************************************************************************/   88   int SDI_Receive(unsigned char *responseBuffer, int responseBufferSize);   89     90   /*****************************************************************************   91   * SDI_SendReceive   92   *****************************************************************************/  104   int SDI_SendReceive(const unsigned char *data, int dataLength, unsigned char *responseBuffer, int responseBufferSize);  105    115   unsigned char* SDI_GetStoredResponse(unsigned *dataLen);  116    117   /*****************************************************************************  118   * SDI_Disconnect  119   *****************************************************************************/  127   int SDI_Disconnect(void);  128    130   typedef void (*SDI_DATA_AVAILABLE_CALLBACK_TYPE)(void *context);  131    132   /*****************************************************************************  133   * SDI_SetDataAvailableCallback  134   *****************************************************************************/  142   int SDI_SetDataAvailableCallback(SDI_DATA_AVAILABLE_CALLBACK_TYPE cb, void *context);  143    151   typedef void (*SDI_CALLBACK_TYPE)(unsigned char *dataIn, unsigned short sizeIn, unsigned char *dataOut, unsigned short *sizeOut, void *context);  152    153   /***************************************************************************************  154   * SDI_SetSdiCallback  155   ****************************************************************************************/  161   int SDI_SetSdiCallback(SDI_CALLBACK_TYPE cb, void *context);  162    168   typedef void (*CARD_DETECTED_CALLBACK_TYPE)(unsigned char *dataIn, unsigned short sizeIn, void *context);  169    170   /***************************************************************************************  171   * SDI_SetCardDetectedCallback  172   ****************************************************************************************/  178   int SDI_SetCardDetectedCallback(CARD_DETECTED_CALLBACK_TYPE cb, void *context);  179    180   /***************************************************************************************  181    * SDI_SendSysAbort  182    ****************************************************************************************/  188   void SDI_SendSysAbort(void);  189    190   /***************************************************************************************  191    * SDI_SendExternalButton  192    ****************************************************************************************/  197   void SDI_SendExternalButton(void);  198    202   typedef void (*EOF_DETECTED_CALLBACK_TYPE)(void *context);  203    204   /***************************************************************************************  205   * SDI_SetEOFDetectedCallback  206   ****************************************************************************************/  213   int SDI_SetEOFDetectedCallback(EOF_DETECTED_CALLBACK_TYPE cb, void *context);  214    215   /***************************************************************************************  216    * SDI_SetLoggingCallback  217    ****************************************************************************************/  225   int SDI_SetLoggingCallback(void (*cb)(const char*, void*), void* context);  226    227    228 #ifdef __cplusplus  229 }  230 #endif  231    232 #endif // _SDIPROTOCOL_H_

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo