mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add missing get-contact-id function
This commit is contained in:
+7
-1
@@ -18,7 +18,7 @@
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
||||
// Purpose: The C part of the Java<->C Wrapper, see also DcContext.java
|
||||
|
||||
@@ -1186,6 +1186,12 @@ JNIEXPORT void Java_com_b44t_messenger_DcContact_unrefContactCPtr(JNIEnv *env, j
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_DcContact_getId(JNIEnv *env, jobject obj)
|
||||
{
|
||||
return dc_contact_get_id(get_dc_contact(env, obj));
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jstring Java_com_b44t_messenger_DcContact_getName(JNIEnv *env, jobject obj)
|
||||
{
|
||||
const char* temp = dc_contact_get_name(get_dc_contact(env, obj));
|
||||
|
||||
@@ -25,8 +25,8 @@ package com.b44t.messenger;
|
||||
|
||||
public class DcContact {
|
||||
|
||||
public final static int DC_CONTACT_ID_SELF = 1;
|
||||
public final static int DC_CONTACT_ID_DEVICE = 2;
|
||||
public final static int DC_CONTACT_ID_SELF = 1;
|
||||
public final static int DC_CONTACT_ID_DEVICE = 2;
|
||||
public final static int DC_CONTACT_ID_LAST_SPECIAL = 9;
|
||||
|
||||
public DcContact(long contactCPtr) {
|
||||
@@ -39,15 +39,16 @@ public class DcContact {
|
||||
contactCPtr = 0;
|
||||
}
|
||||
|
||||
public native String getName();
|
||||
public native String getDisplayName();
|
||||
public native String getFirstName();
|
||||
public native String getAddr();
|
||||
public native String getNameNAddr();
|
||||
public native boolean isBlocked();
|
||||
public native boolean isVerified();
|
||||
public native int getId ();
|
||||
public native String getName ();
|
||||
public native String getDisplayName ();
|
||||
public native String getFirstName ();
|
||||
public native String getAddr ();
|
||||
public native String getNameNAddr ();
|
||||
public native boolean isBlocked ();
|
||||
public native boolean isVerified ();
|
||||
|
||||
// working with raw c-data
|
||||
private long contactCPtr; // CAVE: the name is referenced in the JNI
|
||||
private native void unrefContactCPtr();
|
||||
private long contactCPtr; // CAVE: the name is referenced in the JNI
|
||||
private native void unrefContactCPtr ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user