aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp30
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.h5
2 files changed, 16 insertions, 19 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp
index 0e51940..3e5dbe1 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp
+++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp
@@ -36,21 +36,6 @@ OlmUtility* initializeUtilityMemory()
return utilityPtr;
}
-JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(getOlmLibVersionJni)(JNIEnv* env, jobject thiz)
-{
- uint8_t majorVer=0, minorVer=0, patchVer=0;
- jstring returnValueStr=0;
- char buff[150];
-
- olm_get_library_version(&majorVer, &minorVer, &patchVer);
- LOGD("## getOlmLibVersionJni(): Major=%d Minor=%d Patch=%d", majorVer, minorVer, patchVer);
-
- snprintf(buff, sizeof(buff), "%d.%d.%d", majorVer, minorVer, patchVer);
- returnValueStr = env->NewStringUTF((const char*)buff);
-
- return returnValueStr;
-}
-
JNIEXPORT jlong OLM_UTILITY_FUNC_DEF(initUtilityJni)(JNIEnv *env, jobject thiz)
{
OlmUtility* utilityPtr = NULL;
@@ -245,4 +230,19 @@ JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(sha256Jni)(JNIEnv *env, jobject thiz, jst
}
return sha256RetValue;
+}
+
+JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(getOlmLibVersionJni)(JNIEnv* env, jobject thiz)
+{
+ uint8_t majorVer=0, minorVer=0, patchVer=0;
+ jstring returnValueStr=0;
+ char buff[150];
+
+ olm_get_library_version(&majorVer, &minorVer, &patchVer);
+ LOGD("## getOlmLibVersionJni(): Major=%d Minor=%d Patch=%d", majorVer, minorVer, patchVer);
+
+ snprintf(buff, sizeof(buff), "%d.%d.%d", majorVer, minorVer, patchVer);
+ returnValueStr = env->NewStringUTF((const char*)buff);
+
+ return returnValueStr;
} \ No newline at end of file
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.h b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.h
index b807c6d..691bcf9 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.h
+++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.h
@@ -27,13 +27,10 @@
extern "C" {
#endif
JNIEXPORT jlong OLM_UTILITY_FUNC_DEF(initUtilityJni)(JNIEnv *env, jobject thiz);
-
-JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(getOlmLibVersionJni)(JNIEnv *env, jobject thiz);
-
JNIEXPORT void OLM_UTILITY_FUNC_DEF(releaseUtilityJni)(JNIEnv *env, jobject thiz);
JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(verifyEd25519SignatureJni)(JNIEnv *env, jobject thiz, jstring aSignature, jstring aKey, jstring aMessage);
JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(sha256Jni)(JNIEnv *env, jobject thiz, jstring aMessageToHash);
-
+JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(getOlmLibVersionJni)(JNIEnv *env, jobject thiz);
#ifdef __cplusplus
}
#endif