mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-24 07:58:34 +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;
|
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
|
JNIEXPORT jstring JNICALL
|
||||||
Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getStats
|
Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getStats
|
||||||
( JNIEnv* env, jclass C, jint gamePtr )
|
( JNIEnv* env, jclass C, jint gamePtr )
|
||||||
|
|
|
@ -338,6 +338,7 @@ public class XwJNI {
|
||||||
public static native void comms_transportFailed( int gamePtr,
|
public static native void comms_transportFailed( int gamePtr,
|
||||||
CommsConnType failed );
|
CommsConnType failed );
|
||||||
public static native boolean comms_isConnected( int gamePtr );
|
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 );
|
public static native String comms_getStats( int gamePtr );
|
||||||
|
|
||||||
// Dicts
|
// Dicts
|
||||||
|
|
Loading…
Add table
Reference in a new issue