Progress on chat support.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@155 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// $Id: ChatDisplay.java,v 1.1 2001/08/02 23:46:47 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.party.chat;
|
||||
|
||||
/**
|
||||
* A chat display provides a means by which chat messages can be
|
||||
* displayed. The chat display will be notified when chat messages of
|
||||
* various sorts have been received by the client.
|
||||
*/
|
||||
public interface ChatDisplay
|
||||
{
|
||||
/**
|
||||
* Called to display a speak message. A speak message is one that is
|
||||
* broadcast to all occupants of a particular place. A speak message
|
||||
* originated by this client will result in a subsequent call to this
|
||||
* method after the speak message is accepted by the server and
|
||||
* broadcast to everyone in the place.
|
||||
*
|
||||
* @param speaker the username of the speaker.
|
||||
* @param message the text of the message.
|
||||
*/
|
||||
public void displaySpeakMessage (String speaker, String message);
|
||||
|
||||
/**
|
||||
* Called to display a tell message. A tell message is one that is
|
||||
* delivered directly from one user to another regardless of their
|
||||
* location in the system.
|
||||
*
|
||||
* @param speaker the username of the speaker.
|
||||
* @param message the text of the message.
|
||||
*/
|
||||
public void displayTellMessage (String speaker, String message);
|
||||
|
||||
/**
|
||||
* Called in response to a chat request (either speak or tell) that
|
||||
* originated on this client. The request id supplied will match the
|
||||
* one returned when the request was generated and the status will
|
||||
* either indicate success (by being equal to
|
||||
* <code>Codes.SUCCESS</code>) or failure (in which case it will
|
||||
* contain a message failure code which can be converted into a
|
||||
* displayable string).
|
||||
*
|
||||
* <p> A chat display should track outstanding chat requests so that
|
||||
* it can properly handle the response when it arrives.
|
||||
*
|
||||
* @param reqid the request id of the request that resulted in this
|
||||
* response.
|
||||
* @param status the message code indicating whether the chat request
|
||||
* was successful or not.
|
||||
*
|
||||
* @see ChatManager#requestSpeak
|
||||
* @see ChatManager#requestTell
|
||||
*/
|
||||
public void handleResponse (int reqid, String status);
|
||||
}
|
||||
Reference in New Issue
Block a user