Boot by Name instead of table position

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@730 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Bruno Garcia
2008-08-15 23:37:46 +00:00
parent e149bbb05b
commit a72c810193
10 changed files with 39 additions and 21 deletions
@@ -23,6 +23,7 @@ package com.threerings.parlor.client {
import com.threerings.util.ArrayUtil;
import com.threerings.util.Log;
import com.threerings.util.Name;
import com.threerings.util.ObserverList;
import com.threerings.util.Util;
@@ -246,15 +247,15 @@ public class TableDirector extends BasicDirector
/**
* Sends a request to boot a player from a table.
*/
public function bootPlayer (tableId :int, bodyId :int) :void
public function bootPlayer (tableId :int, target :Name) :void
{
if (_tlobj == null) {
log.warning("Requesting to boot a player from a table we're not currently in " +
"[tableId=" + tableId + ", target=" + bodyId + "].");
"[tableId=" + tableId + ", target=" + target + "].");
return;
}
_tlobj.getTableService().bootPlayer(_ctx.getClient(), tableId, bodyId, this);
_tlobj.getTableService().bootPlayer(_ctx.getClient(), tableId, target, this);
}
// documentation inherited
@@ -27,6 +27,7 @@ import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.client.InvocationService_InvocationListener;
import com.threerings.presents.client.InvocationService_ResultListener;
import com.threerings.util.Name;
/**
* An ActionScript version of the Java TableService interface.
@@ -34,7 +35,7 @@ import com.threerings.presents.client.InvocationService_ResultListener;
public interface TableService extends InvocationService
{
// from Java interface TableService
function bootPlayer (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void;
function bootPlayer (arg1 :Client, arg2 :int, arg3 :Name, arg4 :InvocationService_InvocationListener) :void;
// from Java interface TableService
function createTable (arg1 :Client, arg2 :TableConfig, arg3 :GameConfig, arg4 :InvocationService_ResultListener) :void;
@@ -30,6 +30,7 @@ import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
import com.threerings.presents.data.InvocationMarshaller_ResultMarshaller;
import com.threerings.util.Integer;
import com.threerings.util.Name;
/**
* Provides the implementation of the <code>TableService</code> interface
@@ -45,12 +46,12 @@ public class TableMarshaller extends InvocationMarshaller
public static const BOOT_PLAYER :int = 1;
// from interface TableService
public function bootPlayer (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void
public function bootPlayer (arg1 :Client, arg2 :int, arg3 :Name, arg4 :InvocationService_InvocationListener) :void
{
var listener4 :InvocationMarshaller_ListenerMarshaller = new InvocationMarshaller_ListenerMarshaller();
listener4.listener = arg4;
sendRequest(arg1, BOOT_PLAYER, [
Integer.valueOf(arg2), Integer.valueOf(arg3), listener4
Integer.valueOf(arg2), arg3, listener4
]);
}