feat: creating the basic storage code to test creating group in configs and pushing

This commit is contained in:
0x330a
2023-09-07 17:33:24 +10:00
parent 08c06a724c
commit 026f0056b9
7 changed files with 195 additions and 114 deletions

View File

@@ -184,4 +184,21 @@ Java_network_loki_messenger_libsession_1util_GroupInfoConfig_id(JNIEnv *env, job
std::lock_guard guard{util::util_mutex_};
auto group_info = ptrToInfo(env, thiz);
return util::serialize_session_id(env, group_info->id);
}
extern "C"
JNIEXPORT jstring JNICALL
Java_network_loki_messenger_libsession_1util_GroupInfoConfig_getDescription(JNIEnv *env,
jobject thiz) {
std::lock_guard guard{util::util_mutex_};
auto group_info = ptrToInfo(env, thiz);
}
extern "C"
JNIEXPORT void JNICALL
Java_network_loki_messenger_libsession_1util_GroupInfoConfig_setDescription(JNIEnv *env,
jobject thiz,
jstring new_description) {
std::lock_guard guard{util::util_mutex_};
auto group_info = ptrToInfo(env, thiz);
}

View File

@@ -237,7 +237,7 @@ class GroupInfoConfig(pointer: Long): ConfigBase(pointer), Closeable {
external fun getDeleteAttachmentsBefore(): Long?
external fun getDeleteBefore(): Long?
external fun getExpiryTimer(): Long? // TODO: maybe refactor this to new type when disappearing messages merged
external fun getName(): String?
external fun getName(): String
external fun getProfilePic(): UserPic
external fun isDestroyed(): Boolean
external fun setCreated(createdAt: Long)
@@ -245,6 +245,8 @@ class GroupInfoConfig(pointer: Long): ConfigBase(pointer), Closeable {
external fun setDeleteBefore(deleteBefore: Long)
external fun setExpiryTimer(expireSeconds: Long)
external fun setName(newName: String)
external fun getDescription(): String
external fun setDescription(newDescription: String)
external fun setProfilePic(newProfilePic: UserPic)
external fun storageNamespace(): Long
override fun close() {