...
Code Block | ||
---|---|---|
| ||
#ifndef _OLA_H_ #define _OLA_H_ #ifdef __cplusplus extern "C" { #endif //--------------------------------------------------------- // Includes //--------------------------------------------------------- #include "ola_tags_dictionary.h" /// Generic Public Key configuration API #include "ola_emv.h" /// Generic EMV API #include "ola_publickey.h" /// Generic Public Key configuration API #include "ola_contactless.h" /// Generic Contacless Processing API #include "ola_contact.h" /// Generic Contact Processing API //--------------------------------------------------------- // Definitions //--------------------------------------------------------- typedef void (*logf_function)(char* str); //--------------------------------------------------------- // Primitives //--------------------------------------------------------- /// Version of the OLA API /// No compatiblity guarantees are made between different versions #define OLA_API_VERSION "2.1.1" /** * @brief Get the current version of the OLA Api * @return Pointer to a string representation of the API version */ const char *ola_get_api_version(void); /** * @brief Get the current version of the OLA Implementation * @return Pointer to a string representation of the API implementation */ const char *ola_get_implementation_version(void); /** * @brief Initialize OLA implementation. Need to include xxx_ola_adapter.h to interface to proprietary_data's type * @return OLA error */ tOLAError ola_initialize_implementation(const uint8_t *tlv, uint16_t tlvLength); /** * @brief Set a trace function */ void ola_set_trace_function(logf_function fct); #ifdef __cplusplus } #endif #endif |
ola_emv.h
Code Block | ||
---|---|---|
| ||
// NAME....... ola_emv.h
// PURPOSE.... Level 2 Abstraction Layer for EMV primitives
// to be used by the external world (Level 3 application)
// PROJECT.... Arkos Payment Solution
// REFERENCES. --
//
//
// Copyright 2005-2019 - 9164-4187 QUEBEC INC (AMADIS), All Rights Reserved
//
#ifndef OLA_EMV_H
#define OLA_EMV_H
//---------------------------------------------------------
// Includes
//---------------------------------------------------------
#include <stdint.h>
//---------------------------------------------------------
// Definitions
//---------------------------------------------------------
typedef enum
{
OLA_OK,
OLA_CARD_MUTE,
OLA_CARD_BLOCKED,
OLA_MAX_REACHED,
OLA_NO_CANDIDATE,
OLA_CONTACT_NEW_SELECTION,
OLA_CONTACT_SELECTION_ERROR,
OLA_CONDITIONS_NOT_SATISFIED,
OLA_ACCEPTED,
OLA_NOT_ACCEPTED,
OLA_OFFLINE_ACCEPTED,
OLA_OFFLINE_DECLINED,
OLA_GO_ONLINE,
OLA_DECLINED,
OLA_MISSING_DATA,
OLA_PINPAD_ERROR,
OLA_PARAM_ERROR,
OLA_NOT_IMPLEMENTED,
OLA_ERROR,
OLA_CARD_ERROR,
OLA_CANCEL,
OLA_PUBLIC_KEY_OK,
OLA_PUBLIC_KEY_MISSING,
OLA_PUBLIC_KEY_MAX_REACHED,
OLA_PUBLIC_KEY_END,
OLA_PUBLIC_KEY_NOT_IMPLEMENTED,
OLA_PUBLIC_KEY_ERROR
} tOLAError;
//---------------------------------------------------------
// Primitives
//---------------------------------------------------------
// Set a tag in L2 stack
// Input parameter:
// tag
// value
// length
// Return
// OLA_EMV_OK
// OLA_EMV_PARAM_ERROR
tOLAError ola_emv_set_tag(
uint32_t tag,
uint8_t *value,
uint16_t length
);
// Get a tag from L2 stack
// Input parameter:
// tag
// Output parameter:
// value : buffer to copy the value of the tag
// length : the length of the value
// Return
// OLA_EMV_OK
// OLA_EMV_MISSING_DATA: the tag is not present
// OLA_EMV_PARAM_ERROR
tOLAError ola_emv_get_tag(
uint32_t tag,
uint8_t *value,
uint16_t *length
);
#endif /* OLA_EMV_H */
|