1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef YYXXCOMMSDK_TOOL_KIT_H
- #define YYXXCOMMSDK_TOOL_KIT_H
- #include <jni.h>
- #include <string>
- #include "external/json/json.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- class ToolKit{
- public:
- static jbyteArray GetJbyteArray(JNIEnv *Env, const char *src);
- static jstring GetJString(JNIEnv *env, const char *src);
- static std::string JString2String(JNIEnv *env, jstring src);
- static std::string GetGameCode(JNIEnv *env,jobject context);
- static std::string GetSpCode(JNIEnv *env, jobject context);
- static std::string GetClientVersion(JNIEnv *env, jobject context);
- static std::string GetPackageName(JNIEnv *env, jobject context);
- static std::string GetDeviceSoftwareVersion();
- static std::string GetDeviceModel();
- static std::string GetAndroidDeviceId(JNIEnv *env, jobject context);
- static jstring RsaEncrypt(JNIEnv *env,const char *data);
- static std::string ToJsonString(const Json::Value &root);
- static Json::Value ToJsonObject(const std::string &json);
- static std::string GetJsonSortSignature(const Json::Value &root);
- static std::string GenerateRandString(int len);
- };
- #ifdef __cplusplus
- }
- #endif
- #endif
|