Skip to content

Commit

Permalink
sync JNI code
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Nov 13, 2024
1 parent 9832198 commit 249b2d6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions jni-c-toxcore/jni-c-toxcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -6461,6 +6461,32 @@ Java_com_zoffcc_applications_trifa_MainActivity_tox_1group_1leave(JNIEnv *env, j
#endif
}

JNIEXPORT jint JNICALL
Java_com_zoffcc_applications_trifa_MainActivity_tox_1group_1disconnect(JNIEnv *env, jobject thiz,
jlong group_number)
{
#ifndef HAVE_TOX_NGC
return (jint)-99;
#else
if(tox_global == NULL)
{
return (jint)-99;
}

Tox_Err_Group_Disconnect error;
bool res = tox_group_disconnect(tox_global, (uint32_t)group_number, &error);

if(res == false)
{
return (jint)-1;
}
else
{
return (jint)0;
}
#endif
}

JNIEXPORT jint JNICALL
Java_com_zoffcc_applications_trifa_MainActivity_tox_1group_1self_1set_1name(JNIEnv *env, jobject thiz,
jlong group_number, jstring name)
Expand Down

0 comments on commit 249b2d6

Please sign in to comment.