aboutsummaryrefslogtreecommitdiff
path: root/java/android/OlmLibSdk/olm-sdk
diff options
context:
space:
mode:
authorylecollen <ylecollen@amdocs.com>2016-12-21 16:31:56 +0100
committerylecollen <ylecollen@amdocs.com>2016-12-21 16:31:56 +0100
commite6d634f9dbbdebfa548e23a8631241acfb286526 (patch)
tree50249d5c577e2e3dd6d2139d315f5bbd2e0cb103 /java/android/OlmLibSdk/olm-sdk
parent2e77e3957945b52f92e4b72a8be90202ef7b7d69 (diff)
move getOlmLibVersionJni to the bottom
Diffstat (limited to 'java/android/OlmLibSdk/olm-sdk')
-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