2016-10-13 10:33:43 +02:00
|
|
|
/*
|
2017-01-10 11:40:57 +01:00
|
|
|
* Copyright 2017 OpenMarket Ltd
|
|
|
|
* Copyright 2017 Vector Creations Ltd
|
2016-10-13 10:33:43 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2019-02-15 23:13:07 +01:00
|
|
|
#ifndef _OLMACCOUNT_H
|
|
|
|
#define _OLMACCOUNT_H
|
2016-10-05 18:25:09 +02:00
|
|
|
|
|
|
|
#include "olm_jni.h"
|
2016-10-13 19:21:01 +02:00
|
|
|
#include "olm/olm.h"
|
2016-10-05 18:25:09 +02:00
|
|
|
|
2016-10-11 15:53:49 +02:00
|
|
|
#define OLM_ACCOUNT_FUNC_DEF(func_name) FUNC_DEF(OlmAccount,func_name)
|
|
|
|
#define OLM_MANAGER_FUNC_DEF(func_name) FUNC_DEF(OlmManager,func_name)
|
|
|
|
|
2016-10-05 18:25:09 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// account creation/destruction
|
2016-10-13 10:27:24 +02:00
|
|
|
JNIEXPORT void OLM_ACCOUNT_FUNC_DEF(releaseAccountJni)(JNIEnv *env, jobject thiz);
|
2016-10-20 17:42:57 +02:00
|
|
|
JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(createNewAccountJni)(JNIEnv *env, jobject thiz);
|
2016-10-05 18:25:09 +02:00
|
|
|
|
|
|
|
// identity keys
|
2016-10-13 10:27:24 +02:00
|
|
|
JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(identityKeysJni)(JNIEnv *env, jobject thiz);
|
2016-10-05 18:25:09 +02:00
|
|
|
|
|
|
|
// one time keys
|
2016-10-13 10:27:24 +02:00
|
|
|
JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(oneTimeKeysJni)(JNIEnv *env, jobject thiz);
|
2016-10-25 18:13:44 +02:00
|
|
|
JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(maxOneTimeKeysJni)(JNIEnv *env, jobject thiz);
|
2017-01-04 11:46:37 +01:00
|
|
|
JNIEXPORT void OLM_ACCOUNT_FUNC_DEF(generateOneTimeKeysJni)(JNIEnv *env, jobject thiz, jint aNumberOfKeys);
|
2017-01-10 11:40:57 +01:00
|
|
|
JNIEXPORT void OLM_ACCOUNT_FUNC_DEF(removeOneTimeKeysJni)(JNIEnv *env, jobject thiz, jlong aNativeOlmSessionId);
|
2017-01-04 11:46:37 +01:00
|
|
|
JNIEXPORT void OLM_ACCOUNT_FUNC_DEF(markOneTimeKeysAsPublishedJni)(JNIEnv *env, jobject thiz);
|
2016-10-05 18:25:09 +02:00
|
|
|
|
|
|
|
// signing
|
2017-01-03 16:12:20 +01:00
|
|
|
JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(signMessageJni)(JNIEnv *env, jobject thiz, jbyteArray aMessage);
|
2016-10-05 18:25:09 +02:00
|
|
|
|
2016-10-20 17:42:57 +02:00
|
|
|
// serialization
|
2017-01-04 11:46:37 +01:00
|
|
|
JNIEXPORT jbyteArray OLM_ACCOUNT_FUNC_DEF(serializeJni)(JNIEnv *env, jobject thiz, jbyteArray aKeyBuffer);
|
2017-01-10 11:40:57 +01:00
|
|
|
JNIEXPORT jlong OLM_ACCOUNT_FUNC_DEF(deserializeJni)(JNIEnv *env, jobject thiz, jbyteArray aSerializedDataBuffer, jbyteArray aKeyBuffer);
|
2016-10-20 17:42:57 +02:00
|
|
|
|
2016-10-05 18:25:09 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|