mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
export comms_formatRelayID via jni.
This commit is contained in:
parent
d6651a0404
commit
587f3b7630
2 changed files with 20 additions and 0 deletions
|
@ -1817,6 +1817,25 @@ Java_org_eehouse_android_xw4_jni_XwJNI_comms_1isConnected
|
|||
return result;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_eehouse_android_xw4_jni_XwJNI_comms_1formatRelayID
|
||||
( JNIEnv* env, jclass C, jint gamePtr, jint indx )
|
||||
{
|
||||
jstring result = NULL;
|
||||
XWJNI_START_GLOBALS();
|
||||
|
||||
XP_UCHAR buf[64];
|
||||
XP_U16 len = sizeof(buf);
|
||||
if ( comms_formatRelayID( state->game.comms, indx, buf, &len ) ) {
|
||||
XP_ASSERT( len < sizeof(buf) );
|
||||
LOG_RETURNF( "%s", buf );
|
||||
result = (*env)->NewStringUTF( env, buf );
|
||||
}
|
||||
|
||||
XWJNI_END();
|
||||
return result;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getStats
|
||||
( JNIEnv* env, jclass C, jint gamePtr )
|
||||
|
|
|
@ -338,6 +338,7 @@ public class XwJNI {
|
|||
public static native void comms_transportFailed( int gamePtr,
|
||||
CommsConnType failed );
|
||||
public static native boolean comms_isConnected( int gamePtr );
|
||||
public static native String comms_formatRelayID( int gamePtr, int indx );
|
||||
public static native String comms_getStats( int gamePtr );
|
||||
|
||||
// Dicts
|
||||
|
|
Loading…
Reference in a new issue