lime
Lime is a C++ library implementing Open Whisper System Signal protocol
|
Classes | |
struct | responseHolder |
Holds a stateful function pointer to be called to process the X3DH server response Encapsulate the function pointer in an object to pass its pointer to the java side as it cannot manage stateful function pointers. More... | |
Macros | |
#define | METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name) |
Functions | |
static void | jbyteArray2uin8_tVector (jni::JNIEnv &env, const jni::Array< jni::jbyte > &in, std::shared_ptr< std::vector< uint8_t >> &out) |
static lime::PeerDeviceStatus | j2cPeerDeviceStatus (jni::jint peerStatus) |
convert an int mapped java enumerated peerDevice Status into a c++ one More... | |
static jni::jint | c2jPeerDeviceStatus (lime::PeerDeviceStatus peerStatus) |
convert a c++ enumerated peerDevice Status into a integer one More... | |
static jni::jint | c2jCallbackReturn (lime::CallbackReturn status) |
convert a c++ enumerated CallbackReturn into a integer one More... | |
static lime::EncryptionPolicy | j2cEncryptionPolicy (jni::jint encryptionPolicy) |
convert a int mapped java enumerated encryptionPolicy into a c++ one More... | |
static lime::CurveId | j2cCurveId (jni::jint curveId) |
convert a int mapped java enumerated curveId into a c++ one More... | |
JNIEXPORT jint JNICALL | JNI_OnLoad (JavaVM *vm, void *) |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
#define METHOD | ( | MethodPtr, | |
name | |||
) | jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name) |
|
static |
convert a c++ enumerated CallbackReturn into a integer one
mapping in java is : SUCCESS(0) FAIL(1)
[in] | status | the c++ enumerated peer Device Status |
|
static |
convert a c++ enumerated peerDevice Status into a integer one
mapping in java is : UNTRUSTED(0) TRUSTED(1) UNSAFE(2) FAIL(3) UNKNOWN(4)
[in] | peerStatus | the c++ enumerated peer Device Status |
|
static |
convert a int mapped java enumerated curveId into a c++ one
mapping is : C25519(1) C448(2)
[in] | curveId | The java mapped integer to a curveId enum |
|
static |
convert a int mapped java enumerated encryptionPolicy into a c++ one
mapping is : DRMESSAGE(0) CIPHERMESSAGE(1) OPTIMIZEUPLOADSIZE(2) OPTIMIZEGLOBALBANDWIDTH(3)
[in] | encryptionPolicy | The java mapped integer to an encryption policy enum |
|
static |
convert an int mapped java enumerated peerDevice Status into a c++ one
mapping is : UNTRUSTED(0) TRUSTED(1) UNSAFE(2) FAIL(3) UNKNOWN(4)
[in] | peerStatus | The java mapped integer to a curveId enum |
|
static |
JNIEXPORT jint JNICALL JNI_OnLoad | ( | JavaVM * | vm, |
void * | |||
) |
< a unique pointer to the actual lime manager
< a global reference to the java postToX3DH object. TODO: unclear if EnvIgnoringDeleter is not a better fit here.
Constructor unlike the native lime manager constructor, this one get only one argument has cpp closure cannot be passed easily to java
[in] | db_access | the database access path |
process response from X3DH server This function is bind to a java PostToX3DH object process_response method It :