refactor: config database changes, new protos, adding in support for config base namespace queries

This commit is contained in:
0x330a
2023-01-18 15:51:29 +11:00
parent 00fe77af8a
commit 8bea5e73e6
8 changed files with 1261 additions and 163 deletions

View File

@@ -85,4 +85,10 @@ Java_network_loki_messenger_libsession_1util_ConfigBase_merge___3B(JNIEnv *env,
return conf->merge(configs);
}
#pragma clang diagnostic pop
}
extern "C"
JNIEXPORT jint JNICALL
Java_network_loki_messenger_libsession_1util_ConfigBase_configNamespace(JNIEnv *env, jobject thiz) {
auto conf = ptrToConfigBase(env, thiz);
return (std::int16_t) conf->storage_namespace();
}

View File

@@ -21,6 +21,8 @@ sealed class ConfigBase(protected val /* yucky */ pointer: Long) {
external fun confirmPushed(seqNo: Long)
external fun merge(toMerge: Array<ByteArray>): Int
external fun configNamespace(): Int
// Singular merge
external fun merge(toMerge: ByteArray): Int