aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorpedroGitt <pedro.contreiras@amdocs.com>2016-10-25 18:13:44 +0200
committerpedroGitt <pedro.contreiras@amdocs.com>2016-10-25 18:13:44 +0200
commitf3d4789b588bfc8af2135c2b2caafbc7d76d4feb (patch)
treec4aa73b32e62bc298cad4a09397b64104911362a /java
parent1af282fb3793bd56d6a6a5c60e9f6914c6df643e (diff)
Renaming:
- generateOneTimeKeys => generateOneTimeKeysJni - maxOneTimeKeys => maxOneTimeKeysJni
Diffstat (limited to 'java')
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.cpp16
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.cpp b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.cpp
index c68e390..07446b0 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.cpp
+++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.cpp
@@ -199,7 +199,7 @@ JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(identityKeysJni)(JNIEnv *env, jobject
* Get the maximum number of "one time keys" the account can store.
*
**/
-JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(maxOneTimeKeys)(JNIEnv *env, jobject thiz)
+JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(maxOneTimeKeysJni)(JNIEnv *env, jobject thiz)
{
OlmAccount* accountPtr = NULL;
size_t maxKeys = -1;
@@ -222,7 +222,7 @@ JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(maxOneTimeKeys)(JNIEnv *env, jobject thiz)
* @param aNumberOfKeys number of keys to generate
* @return ERROR_CODE_OK if operation succeed, ERROR_CODE_KO otherwise
**/
-JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(generateOneTimeKeys)(JNIEnv *env, jobject thiz, jint aNumberOfKeys)
+JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(generateOneTimeKeysJni)(JNIEnv *env, jobject thiz, jint aNumberOfKeys)
{
OlmAccount *accountPtr = NULL;
uint8_t *randomBufferPtr = NULL;
@@ -233,30 +233,30 @@ JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(generateOneTimeKeys)(JNIEnv *env, jobject th
if(NULL == (accountPtr = (OlmAccount*)getAccountInstanceId(env,thiz)))
{
- LOGE("## generateOneTimeKeys(): failure - invalid Account ptr");
+ LOGE("## generateOneTimeKeysJni(): failure - invalid Account ptr");
}
else
{ // keys memory allocation
randomLength = olm_account_generate_one_time_keys_random_length(accountPtr, (size_t)aNumberOfKeys);
- LOGD("## generateOneTimeKeys(): randomLength=%lu", static_cast<long unsigned int>(randomLength));
+ LOGD("## generateOneTimeKeysJni(): randomLength=%lu", static_cast<long unsigned int>(randomLength));
if((0!=randomLength) && !setRandomInBuffer(&randomBufferPtr, randomLength))
{
- LOGE("## generateOneTimeKeys(): failure - random buffer init");
+ LOGE("## generateOneTimeKeysJni(): failure - random buffer init");
}
else
{
- LOGD("## generateOneTimeKeys(): accountPtr =%p aNumberOfKeys=%d",accountPtr, aNumberOfKeys);
+ LOGD("## generateOneTimeKeysJni(): accountPtr =%p aNumberOfKeys=%d",accountPtr, aNumberOfKeys);
// retrieve key pairs in keysBytesPtr
result = olm_account_generate_one_time_keys(accountPtr, (size_t)aNumberOfKeys, (void*)randomBufferPtr, randomLength);
if(result == olm_error()) {
- LOGE("## generateOneTimeKeys(): failure - error generating one time keys Msg=%s",(const char *)olm_account_last_error(accountPtr));
+ LOGE("## generateOneTimeKeysJni(): failure - error generating one time keys Msg=%s",(const char *)olm_account_last_error(accountPtr));
}
else
{
retCode = ERROR_CODE_OK;
- LOGD("## generateOneTimeKeys(): success - result=%lu", static_cast<long unsigned int>(result));
+ LOGD("## generateOneTimeKeysJni(): success - result=%lu", static_cast<long unsigned int>(result));
}
}
}
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.h b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.h
index 1c8fb96..2aa5f93 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.h
+++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_account.h
@@ -39,8 +39,8 @@ JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(identityKeysJni)(JNIEnv *env, jobject
// one time keys
JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(oneTimeKeysJni)(JNIEnv *env, jobject thiz);
-JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(maxOneTimeKeys)(JNIEnv *env, jobject thiz);
-JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(generateOneTimeKeys)(JNIEnv *env, jobject thiz, jint aNumberOfKeys);
+JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(maxOneTimeKeysJni)(JNIEnv *env, jobject thiz);
+JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(generateOneTimeKeysJni)(JNIEnv *env, jobject thiz, jint aNumberOfKeys);
JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(removeOneTimeKeysForSessionJni)(JNIEnv *env, jobject thiz, jlong aNativeOlmSessionId);
JNIEXPORT jint OLM_ACCOUNT_FUNC_DEF(markOneTimeKeysAsPublishedJni)(JNIEnv *env, jobject thiz);