mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
feat: adding additional config base implementations
This commit is contained in:
parent
ad00aeac4a
commit
e784fa79d0
@ -36,6 +36,7 @@ class ExampleInstrumentedTest {
|
||||
val nameFromNative = userProfile.getName()
|
||||
assertEquals(newName, nameFromNative)
|
||||
println("Name received by JNI call: $nameFromNative")
|
||||
assertTrue(userProfile.dirty())
|
||||
userProfile.free()
|
||||
}
|
||||
|
||||
|
@ -51,4 +51,11 @@ JNIEXPORT void JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_UserProfile_free(JNIEnv *env, jobject obj) {
|
||||
auto profile = ptrToProfile(env, obj);
|
||||
delete profile;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_ConfigBase_dirty(JNIEnv *env, jobject thiz) {
|
||||
auto* configBase = ptrToConfigBase(env, thiz);
|
||||
return configBase->is_dirty();
|
||||
}
|
@ -7,9 +7,9 @@ sealed class ConfigBase(protected val /* yucky */ pointer: Long) {
|
||||
System.loadLibrary("session_util")
|
||||
}
|
||||
}
|
||||
external fun dirty(): Boolean
|
||||
}
|
||||
|
||||
|
||||
class UserProfile(pointer: Long): ConfigBase(pointer) {
|
||||
companion object {
|
||||
init {
|
||||
|
Loading…
Reference in New Issue
Block a user