Moved UserIdentifier to data.

We'll be using it on the client as well, because I'm going to have
to finally pay down some code debt (and do something actually
useful for the creators): expose memberIds to the whirled screen-game api.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@815 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2009-04-20 23:02:10 +00:00
parent c38b709b6a
commit d873854578
3 changed files with 30 additions and 12 deletions
@@ -0,0 +1,14 @@
//
// $Id$
package com.threerings.parlor.game.data;
import com.threerings.crowd.data.BodyObject;
public interface UserIdentifier
{
/**
* Returns the id of the specified user, or 0 if they're not valid.
*/
int getUserId (BodyObject bodyObj);
}
@@ -51,6 +51,7 @@ import com.threerings.parlor.game.data.GameAI;
import com.threerings.parlor.game.data.GameCodes;
import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.game.data.UserIdentifier;
import com.threerings.parlor.server.ParlorSender;
import com.threerings.parlor.server.PlayManager;
@@ -66,18 +67,6 @@ import static com.threerings.parlor.Log.log;
public class GameManager extends PlaceManager
implements ParlorCodes, GameCodes, PlayManager
{
/**
* An interface for identifying users. A larger system using the Parlor game services can
* enable user identification by passing a UserIdentifier to
* {@link GameManager#setUserIdentifier}.
*/
public interface UserIdentifier
{
/** Returns the persistent user id for the specified player, or 0 if they're not a valid
* user, or a guest, or something like that (for whom we'll track no persistent data). */
public int getUserId (BodyObject bodyObj);
}
/**
* Configures a means by which the Parlor game services can map users to a persistent user id
* for things like per-game cookies and ratings.