add getVerifierAddr/Id api

This commit is contained in:
B. Petersen 2023-09-25 23:33:06 +02:00 committed by bjoern
parent a78c24f6f8
commit ed9d0a9462
2 changed files with 17 additions and 0 deletions

View file

@ -1909,6 +1909,21 @@ JNIEXPORT jboolean Java_com_b44t_messenger_DcContact_isVerified(JNIEnv *env, job
} }
JNIEXPORT jstring Java_com_b44t_messenger_DcContact_getVerifierAddr(JNIEnv *env, jobject obj)
{
char* temp = dc_contact_get_verifier_addr(get_dc_contact(env, obj));
jstring ret = JSTRING_NEW(temp);
dc_str_unref(temp);
return ret;
}
JNIEXPORT jint Java_com_b44t_messenger_DcContact_getVerifierId(JNIEnv *env, jobject obj)
{
return dc_contact_get_verifier_id(get_dc_contact(env, obj));
}
/******************************************************************************* /*******************************************************************************
* DcLot * DcLot
******************************************************************************/ ******************************************************************************/

View file

@ -58,6 +58,8 @@ public class DcContact {
public native boolean wasSeenRecently(); public native boolean wasSeenRecently();
public native boolean isBlocked (); public native boolean isBlocked ();
public native boolean isVerified (); public native boolean isVerified ();
public native String getVerifierAddr();
public native int getVerifierId ();
// working with raw c-data // working with raw c-data
private long contactCPtr; // CAVE: the name is referenced in the JNI private long contactCPtr; // CAVE: the name is referenced in the JNI