mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-18 02:53:14 +00:00
feat: update request responses and their appropriate processing
This commit is contained in:
@@ -91,4 +91,23 @@ 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();
|
||||
}
|
||||
extern "C"
|
||||
JNIEXPORT jclass JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_ConfigBase_00024Companion_kindFor(JNIEnv *env,
|
||||
jobject thiz,
|
||||
jint config_namespace) {
|
||||
auto user_class = env->FindClass("network/loki/messenger/libsession_util/UserProfile");
|
||||
auto contact_class = env->FindClass("network/loki/messenger/libsession_util/Contacts");
|
||||
auto convo_volatile_class = env->FindClass("network/loki/messenger/libsession_util/ConversationVolatileConfig");
|
||||
switch (config_namespace) {
|
||||
case (int)session::config::Namespace::UserProfile:
|
||||
return user_class;
|
||||
case (int)session::config::Namespace::Contacts:
|
||||
return contact_class;
|
||||
case (int)session::config::Namespace::ConvoInfoVolatile:
|
||||
return convo_volatile_class;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
@@ -11,6 +11,7 @@ sealed class ConfigBase(protected val /* yucky */ pointer: Long) {
|
||||
init {
|
||||
System.loadLibrary("session_util")
|
||||
}
|
||||
external fun kindFor(configNamespace: Int): Class<ConfigBase>
|
||||
}
|
||||
|
||||
external fun dirty(): Boolean
|
||||
|
Reference in New Issue
Block a user