1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #ifdef LY_SDK_EXPORTS
- #define LY_SDK_API __declspec(dllexport)
- #else
- #define LY_SDK_API __declspec(dllimport)
- #endif
- #include <iostream>
- typedef bool(*LYSDKCallBack)(wchar_t* in_param);
- /**
- * @brief LYSDKLogin 函数
- * @param in_param 参数1 json字符串,包括mchId(商户Id),appid,key;
- * @return 返回说明 :
- -1 if already init
- 0 if success,
- 20 if already login
- 40 authorize failed
- */
- extern "C" LY_SDK_API int LYSDKLogin(wchar_t* in_param, LYSDKCallBack callback, bool isAutoLogin = false);
- /**
- * @brief LYSDKLogout 函数
- * @return 返回说明 :
- 0 if success,
- 10 if SDKInit did not be called
- */
- extern "C" LY_SDK_API int LYSDKLogout();
- /**
- * @brief LYSDKGetToken 函数
- * @return 返回说明 :
- 0 if success,
- 10 if SDKInit did not be called
- 50 if not login
- */
- extern "C" LY_SDK_API int LYSDKGetToken();
- /**
- * @brief LYSDKGetLoginStatus 函数
- * @return 返回说明 :
- 0 if not login
- 1 if login,
- */
- extern "C" LY_SDK_API int LYSDKGetLoginStatus();
|