diff --git a/src/as/com/threerings/parlor/game/data/UserIdentifier.as b/src/as/com/threerings/parlor/game/data/UserIdentifier.as new file mode 100644 index 00000000..4fdbd664 --- /dev/null +++ b/src/as/com/threerings/parlor/game/data/UserIdentifier.as @@ -0,0 +1,15 @@ +// +// $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. + */ + function getUserId (bodyObj :BodyObject) :int; +} +} diff --git a/src/java/com/threerings/parlor/game/data/UserIdentifier.java b/src/java/com/threerings/parlor/game/data/UserIdentifier.java new file mode 100644 index 00000000..087a8837 --- /dev/null +++ b/src/java/com/threerings/parlor/game/data/UserIdentifier.java @@ -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); +} diff --git a/src/java/com/threerings/parlor/game/server/GameManager.java b/src/java/com/threerings/parlor/game/server/GameManager.java index 2d6a4f4b..7eca126e 100644 --- a/src/java/com/threerings/parlor/game/server/GameManager.java +++ b/src/java/com/threerings/parlor/game/server/GameManager.java @@ -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.