mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-21 01:28:47 +00:00
feat: add config base free instead of user profile
This commit is contained in:
@@ -33,6 +33,12 @@ Java_network_loki_messenger_libsession_1util_ConfigBase_push(JNIEnv *env, jobjec
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_ConfigBase_free(JNIEnv *env, jobject thiz) {
|
||||
auto config = ptrToConfigBase(env, thiz);
|
||||
delete config;
|
||||
}
|
||||
|
||||
JNIEXPORT jbyteArray JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_ConfigBase_dump(JNIEnv *env, jobject thiz) {
|
||||
auto config = ptrToConfigBase(env, thiz);
|
||||
|
@@ -54,12 +54,6 @@ Java_network_loki_messenger_libsession_1util_UserProfile_getName(JNIEnv *env, jo
|
||||
return returnString;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_UserProfile_free(JNIEnv *env, jobject thiz) {
|
||||
auto profile = ptrToProfile(env, thiz);
|
||||
delete profile;
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_UserProfile_getPic(JNIEnv *env, jobject thiz) {
|
||||
auto profile = ptrToProfile(env, thiz);
|
||||
|
@@ -23,6 +23,14 @@ sealed class ConfigBase(protected val /* yucky */ pointer: Long) {
|
||||
|
||||
// Singular merge
|
||||
external fun merge(toMerge: ByteArray): Int
|
||||
|
||||
external fun free()
|
||||
|
||||
@Override
|
||||
fun finalize() {
|
||||
free()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Contacts(pointer: Long) : ConfigBase(pointer) {
|
||||
@@ -53,7 +61,6 @@ class UserProfile(pointer: Long) : ConfigBase(pointer) {
|
||||
|
||||
external fun setName(newName: String)
|
||||
external fun getName(): String?
|
||||
external fun free()
|
||||
external fun getPic(): UserPic?
|
||||
external fun setPic(userPic: UserPic)
|
||||
}
|
Reference in New Issue
Block a user