#ifndef __NEPPOSDLL_H__
#define __NEPPOSDLL_H__

#ifdef WINDOWS
	#include <windows.h>
	#ifdef BUILD_DLL
		#define DLL_EXPORT __declspec(dllexport)
	#else
		#define DLL_EXPORT __declspec(dllimport)
	#endif
#else
	#define APIENTRY
	#define DLL_EXPORT __attribute__((visibility("default")))
#endif


#ifdef __cplusplus
extern "C"
{
#endif

DLL_EXPORT int    APIENTRY InitNepLib(const char* eftAdress);
DLL_EXPORT int    APIENTRY CloseNepLib();
DLL_EXPORT int    APIENTRY GetEftComNumber();

DLL_EXPORT char*  APIENTRY CreateNepMessage();
DLL_EXPORT int    APIENTRY SetNepField(const char* message, const char* fieldName, const char* fieldValue );
DLL_EXPORT char*  APIENTRY GetNepField(const char* message, const char* fieldName);
DLL_EXPORT char*  APIENTRY GetRepeatableNepField(const char* message, const char* fieldName, const int index);
DLL_EXPORT char*  APIENTRY GetNepFieldNameAt(const char* message, const int index);
DLL_EXPORT int    APIENTRY FreeNepMessage(const char* message);

DLL_EXPORT int    APIENTRY SendNepMessage(const char* message);
DLL_EXPORT int    APIENTRY ReceiveNepMessage(const char* message, const unsigned int timeoutMS);

// Simplified
DLL_EXPORT int    APIENTRY doTransaction(const char* eftAddress,
                                        const char* type,
                                        const char* amount,
                                        const char* currencyCode,
                                        const char* posNumber,
                                        const char* merchantTransactionId,
                                        const char* eftNumber);

DLL_EXPORT int    APIENTRY doTransactionExt(const char* eftAddress,
                                            const char* type,
                                            const char* amount,
                                            const char* currencyCode,
                                            const char* posNumber,
                                            const char* merchantTransactionId,
                                            const char* eftNumber,
                                            const char* merchantPrivateData,
                                            const char* meanOfPayment,
                                            const char* serviceLabel,
                                            const char* posCapabilities,
                                            const char* subMessageType,
                                            const char* ruf1,
                                            const char* ruf2,
                                            const char* ruf3);

DLL_EXPORT int    APIENTRY doLogin(const char* eftAddress,
                                  const char* user,
                                  const char* password,
                                  const char* url,
                                  const char* merchantCode,
                                  const char* posNumber);

DLL_EXPORT int    APIENTRY doPing(const char* eftAddress);

DLL_EXPORT int    APIENTRY setLogPath(const char* logPath);
DLL_EXPORT int    APIENTRY setLogLevel(const int logLevel);
DLL_EXPORT int    APIENTRY setLogFileSize(const unsigned int fileSize);
DLL_EXPORT int    APIENTRY setLogFileCount(const unsigned int fileCount);

#ifdef __cplusplus
}
#endif


#endif // _NEPPOSDLL_H__
