#ifndef _CSHCOMPILER_H_
#define _CSHCOMPILER_H_
#ifdef _WIN32
#define DLL_API extern "C" _declspec(dllexport)
#else
#define DLL_API extern "C"
#endif

typedef void(*CSHLogCallBack)(const char* sourceId,const char* msg,void* userData);



//C端入口保证dataJson,eventConditon,partCondition,trueResult,falseResult必须是window保证GBK编码，linux保证UTF8编码
DLL_API const char* CshGetTokenList(const char* intPutJson, const char* eventConditon, const char* partCondition, const char* trueResult, const char* falseResult, int* outSize);
//C端入口保证intPutJson必须是window保证GBK编码 ，linux保证UTF8编码
DLL_API const char* CshCompile(const char* intPutJson, bool* ret, int* outSize);


DLL_API void CshSetLogout(const char* logCtx, CSHLogCallBack logCB, void* userData);
DLL_API const char* CshGetErr(int* outSize);
DLL_API const char* CshGetVersion(int* outSize);
DLL_API void FreeCshData(void* buffer);
DLL_API void FreeCshSHCompile();

#endif