Moved remaining client.*Codes classes into their respective data packages

as they are intended to represent codes shared between the client and the
server.  Made correspondingly necessary changes throughout.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1240 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-04-15 16:28:05 +00:00
parent f6fedf5bdf
commit a97e9db978
31 changed files with 71 additions and 59 deletions
@@ -0,0 +1,108 @@
//
// $Id: ParlorCodes.java,v 1.1 2002/04/15 16:28:02 shaper Exp $
package com.threerings.parlor.data;
import com.threerings.presents.data.InvocationCodes;
/**
* Contains codes used by the parlor invocation services.
*/
public interface ParlorCodes extends InvocationCodes
{
/** The module name for the parlor services. */
public static final String MODULE_NAME = "parlor";
/** The message identifier for a game ready notification. This is
* mapped by the invocation services to a call to {@link
* ParlorDirector#handleGameReadyNotification}. */
public static final String GAME_READY_NOTIFICATION = "GameReady";
/** The message identifier for an invitation creation request or
* notification. The notification is mapped by the invocation services
* to a call to {@link ParlorDirector#handleInviteNotification}. */
public static final String INVITE_ID = "Invite";
/** The response identifier for an accepted invite request. This is
* mapped by the invocation services to a call to {@link
* ParlorDirector#handleInviteReceived}. */
public static final String INVITE_RECEIVED_RESPONSE = "InviteReceived";
/** The response identifier for a rejceted invite request. This is
* mapped by the invocation services to a call to {@link
* ParlorDirector#handleInviteFailed}. */
public static final String INVITE_FAILED_RESPONSE = "InviteFailed";
/** The message identifier for an invitation cancellation request or
* notification. The notification is mapped by the invocation services
* to a call to {@link
* ParlorDirector#handleCancelInviteNotification}. */
public static final String CANCEL_INVITE_ID = "CancelInvite";
/** The message identifier for an invitation response request or
* notification. The notification is mapped by the invocation services
* to a call to {@link
* ParlorDirector#handleRespondInviteNotification}. */
public static final String RESPOND_INVITE_ID = "RespondInvite";
/** The response code for an accepted invitation. */
public static final int INVITATION_ACCEPTED = 0;
/** The response code for a refused invitation. */
public static final int INVITATION_REFUSED = 1;
/** The response code for a countered invitation. */
public static final int INVITATION_COUNTERED = 2;
/** An error code explaining that an invitation was rejected because
* the invited user was not online at the time the invitation was
* received. */
public static final String INVITEE_NOT_ONLINE = "m.invitee_not_online";
/** The message identifier for a create table request. */
public static final String CREATE_TABLE_REQUEST = "CreateTable";
/** The response identifier for a table created response. This is
* mapped by the invocation services to a call to {@link
* TableDirector#handleTableCreated}. */
public static final String TABLE_CREATED_RESPONSE = "TableCreated";
/** The response identifier for a create failed response. This is
* mapped by the invocation services to a call to {@link
* TableDirector#handleCreateFailed}. */
public static final String CREATE_FAILED_RESPONSE = "CreateFailed";
/** The message identifier for a join table request. */
public static final String JOIN_TABLE_REQUEST = "JoinTable";
/** The response identifier for a join failed response. This is mapped
* by the invocation services to a call to {@link
* TableDirector#handleJoinFailed}. */
public static final String JOIN_FAILED_RESPONSE = "JoinFailed";
/** The message identifier for a leave table request. */
public static final String LEAVE_TABLE_REQUEST = "LeaveTable";
/** The response identifier for a leave failed response. This is
* mapped by the invocation services to a call to {@link
* TableDirector#handleLeaveFailed}. */
public static final String LEAVE_FAILED_RESPONSE = "LeaveFailed";
/** An error code returned when a user requests to join a table that
* doesn't exist. */
public static final String NO_SUCH_TABLE = "m.no_such_table";
/** An error code returned when a user requests to join a table at a
* position that is not valid. */
public static final String INVALID_TABLE_POSITION =
"m.invalid_table_position";
/** An error code returned when a user requests to join a table in a
* position that is already occupied. */
public static final String TABLE_POSITION_OCCUPIED =
"m.table_position_occupied";
/** An error code returned when a user requests to leave a table that
* they were not sitting at in the first place. */
public static final String NOT_AT_TABLE = "m.not_at_table";
}
@@ -1,5 +1,5 @@
//
// $Id: Table.java,v 1.8 2002/03/18 23:21:26 mdb Exp $
// $Id: Table.java,v 1.9 2002/04/15 16:28:02 shaper Exp $
package com.threerings.parlor.data;
@@ -12,7 +12,7 @@ import com.samskivert.util.StringUtil;
import com.threerings.presents.dobj.DSet;
import com.threerings.presents.io.ValueMarshaller;
import com.threerings.parlor.client.ParlorCodes;
import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig;
/**