mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-13 08:01:33 +01:00
export server_listWordsPlayed via jni.
This commit is contained in:
parent
43e8bd7879
commit
dced47e202
2 changed files with 19 additions and 0 deletions
|
@ -1241,6 +1241,23 @@ Java_org_eehouse_android_xw4_jni_XwJNI_server_1endGame
|
|||
XWJNI_END();
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_eehouse_android_xw4_jni_XwJNI_server_1listWordsPlayed
|
||||
( JNIEnv* env, jclass C, jint gamePtr, jint nMoves )
|
||||
{
|
||||
jstring result;
|
||||
XWJNI_START_GLOBALS();
|
||||
XP_ASSERT( !!state->game.server );
|
||||
XWStreamCtxt* stream = and_empty_stream( MPPARM(mpool) globals );
|
||||
server_listWordsPlayed( state->game.server, stream, nMoves );
|
||||
result = streamToJString( MPPARM(mpool) env, stream );
|
||||
(*env)->DeleteLocalRef( env, result );
|
||||
stream_destroy( stream );
|
||||
XWJNI_END();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_eehouse_android_xw4_jni_XwJNI_server_1sendChat
|
||||
( JNIEnv* env, jclass C, jint gamePtr, jstring jmsg )
|
||||
|
|
|
@ -214,6 +214,8 @@ public class XwJNI {
|
|||
public static native void server_initClientConnection( int gamePtr );
|
||||
public static native void server_endGame( int gamePtr );
|
||||
public static native void server_sendChat( int gamePtr, String msg );
|
||||
public static native String server_listWordsPlayed( int gamePtr,
|
||||
int nMoves );
|
||||
|
||||
// hybrid to save work
|
||||
public static native boolean board_server_prefsChanged( int gamePtr,
|
||||
|
|
Loading…
Reference in a new issue