LYSDK.h 951 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #ifdef LY_SDK_EXPORTS
  3. #define LY_SDK_API __declspec(dllexport)
  4. #else
  5. #define LY_SDK_API __declspec(dllimport)
  6. #endif
  7. #include <iostream>
  8. typedef bool(*LYSDKCallBack)(wchar_t* in_param);
  9. /**
  10. * @brief LYSDKLogin 函数
  11. * @param in_param 参数1 json字符串,包括mchId(商户Id),appid,key;
  12. * @return 返回说明 :
  13. -1 if already init
  14. 0 if success,
  15. 20 if already login
  16. 40 authorize failed
  17. */
  18. extern "C" LY_SDK_API int LYSDKLogin(wchar_t* in_param, LYSDKCallBack callback, bool isAutoLogin = false);
  19. /**
  20. * @brief LYSDKLogout 函数
  21. * @return 返回说明 :
  22. 0 if success,
  23. 10 if SDKInit did not be called
  24. */
  25. extern "C" LY_SDK_API int LYSDKLogout();
  26. /**
  27. * @brief LYSDKGetToken 函数
  28. * @return 返回说明 :
  29. 0 if success,
  30. 10 if SDKInit did not be called
  31. 50 if not login
  32. */
  33. extern "C" LY_SDK_API int LYSDKGetToken();
  34. /**
  35. * @brief LYSDKGetLoginStatus 函数
  36. * @return 返回说明 :
  37. 0 if not login
  38. 1 if login,
  39. */
  40. extern "C" LY_SDK_API int LYSDKGetLoginStatus();