mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
add seed and fetch it in jni
This commit is contained in:
parent
22f7a42c1d
commit
82876bda06
2 changed files with 5 additions and 2 deletions
|
@ -998,18 +998,20 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
|
|||
|
||||
if ( !!state->game.comms ) {
|
||||
CommsAddrRec addr;
|
||||
comms_getAddr( state->game.comms, &addr );
|
||||
CommsCtxt* comms = state->game.comms;
|
||||
comms_getAddr( comms, &addr );
|
||||
intToJenumField( env, jsummary, addr.conType, "conType",
|
||||
"org/eehouse/android/xw4/jni/"
|
||||
"CommsAddrRec$CommsConnType" );
|
||||
if ( COMMS_CONN_RELAY == addr.conType ) {
|
||||
XP_UCHAR buf[128];
|
||||
XP_U16 len = VSIZE(buf);
|
||||
if ( comms_getRelayID( state->game.comms, buf, &len ) ) {
|
||||
if ( comms_getRelayID( comms, buf, &len ) ) {
|
||||
buf[len] = '\0';
|
||||
setString( env, jsummary, "relayID", buf );
|
||||
}
|
||||
setString( env, jsummary, "roomName", addr.u.ip_relay.invite );
|
||||
setInt( env, jsummary, "seed", comms_getChannelSeed( comms ) );
|
||||
} else if ( COMMS_CONN_SMS == addr.conType ) {
|
||||
setString( env, jsummary, "smsPhone", addr.u.sms.phone );
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public class GameSummary {
|
|||
// relay-related fields
|
||||
public String roomName;
|
||||
public String relayID;
|
||||
public int seed;
|
||||
public boolean msgsPending;
|
||||
|
||||
public boolean inNetworkGame()
|
||||
|
|
Loading…
Reference in a new issue