#ifndef NDTSERROR_H
#define NDTSERROR_H

#ifdef __cplusplus
extern "C" {
#endif

#include "NDTSErrorConstants.h"

NDTSERROR_API void CALL_CONV NDTS_InitErrorService() ;
NDTSERROR_API void CALL_CONV NDTS_HandleError(int errorCode) ;
NDTSERROR_API NDTS_Boolean CALL_CONV NDTS_RegisterGetCodeStringFunction(unsigned long sdkIndex, FPNDTS_GetCodeString fpGetCodeString) ;
NDTSERROR_API const char *NDTS_GetCodeString(int errorCode) ;
NDTSERROR_API void CALL_CONV NDTS_GetErrorDetail(int *pCode, const char **ppString) ;
NDTSERROR_API int CALL_CONV NDTS_GetLastError();
NDTSERROR_API NDTS_Boolean CALL_CONV NDTS_DumpErrorLog(const char *pFileName) ;
NDTSERROR_API unsigned long CALL_CONV NDTS_ReturnNumberOfErrorLogLines() ;
NDTSERROR_API NDTS_Boolean CALL_CONV NDTS_GetErrorLogLine(unsigned long lineNumber, char *pMessageBuffer, unsigned long numberOfBytesInMessageBuffer) ;
NDTSERROR_API NDTS_Boolean CALL_CONV NDTS_ClearErrorLog() ;

// Log to c:\log.txt and / or debugger.  LogLine adds a timestamp and terminating \n.
NDTSERROR_API void CALL_CONV NDTS_LogLine(NDTS_LogLevel level, const char *msg, ...);
// Like LogLine but no timestamp or terminating \n
NDTSERROR_API void CALL_CONV NDTS_LogSomeChars(NDTS_LogLevel level, const char *note);
NDTSERROR_API void CALL_CONV NDTS_SetLogLevel(NDTS_LogLevel file, NDTS_LogLevel app, NDTS_LogLevel debugger);
NDTSERROR_API void CALL_CONV NDTS_GetLogLevel(NDTS_LogLevel *pFile, NDTS_LogLevel *pApp, NDTS_LogLevel *pDebugger);


#ifdef __cplusplus
}
#endif

#endif