# ParlorReceiver (vilya 1.3 API)
Date: 2011-04-06

## com.threerings.parlor.client
Interface ParlorReceiver

All Superinterfaces:
  com.threerings.presents.client.InvocationReceiver

All Known Implementing Classes:
  ParlorDirector

    public interface ParlorReceiver

extends com.threerings.presents.client.InvocationReceiver

Defines, for the parlor services, a set of notifications delivered asynchronously by the server to the client. These are handled by the `ParlorDirector`.

Nested Class Summary

Nested classes/interfaces inherited from interface com.threerings.presents.client.InvocationReceiver
`com.threerings.presents.client.InvocationReceiver.Registration`

Method Summary
`void` `gameIsReady(int gameOid)` Dispatched to the client when a game in which they are a participant is ready for play.
`void` `receivedInvite(int remoteId, com.threerings.util.Name inviter, GameConfig config)` Called by the invocation services when another user has invited us to play a game.
`void` `receivedInviteCancellation(int remoteId)` Called by the invocation services when an outstanding invitation has been cancelled by the inviting user.
`void` `receivedInviteResponse(int remoteId, int code, Object arg)` Called by the invocation services when another user has responded to our invitation by either accepting, refusing or countering it.

Method Detail

### gameIsReady

    void gameIsReady(int gameOid)

  Dispatched to the client when a game in which they are a participant is ready for play. The client will then enter the game room which will trigger the loading of the appropriate game UI code and generally get things started.

  Parameters:
    `gameOid` - the object id of the game object.

### receivedInvite

    void receivedInvite(int remoteId,
                        com.threerings.util.Name inviter,
                        GameConfig config)

  Called by the invocation services when another user has invited us to play a game.

  Parameters:
    `remoteId` - the unique indentifier for this invitation (used when countering or responding).
    `inviter` - the username of the inviting user.
    `config` - the configuration information for the game to which we've been invited.

### receivedInviteResponse

    void receivedInviteResponse(int remoteId,
                                int code,
                                Object arg)

  Called by the invocation services when another user has responded to our invitation by either accepting, refusing or countering it.

  Parameters:
    `remoteId` - the indentifier for the invitation on question.
    `code` - the response code, either `ParlorCodes.INVITATION_ACCEPTED` or `ParlorCodes.INVITATION_REFUSED` or `ParlorCodes.INVITATION_COUNTERED`.
    `arg` - in the case of a refused invitation, a string containing a message provided by the invited user explaining the reason for refusal (the empty string if no explanation was provided). In the case of a countered invitation, a new game config object with the modified game configuration.

### receivedInviteCancellation

    void receivedInviteCancellation(int remoteId)

  Called by the invocation services when an outstanding invitation has been cancelled by the inviting user.

  Parameters:
    `remoteId` - the indentifier of the cancelled invitation.

Copyright © 2011. All Rights Reserved.