package talk;

/**
   ITalkView is the interface to the frontend for a single talk
   session.  It is associated with a single ITalkSession, to which it
   sends all input entered by the local user, and from which it
   receives input from the remote user.

   It must be safe to call all of these methods from a thread other
   than the event-dispatching thread.
*/

public interface ITalkView {
  /** Called by an ITalkSession to notify the ITalkView that a
      connection has been established with someone. */
  public void connected(String withWho);

  /** Called by an ITalkSession to notify the ITalkView that a
      connection has been closed */
  public void disconnected();

  /** Called by an ITalkSession to notify the ITalkView that a connect
      attempt failed */
  public void connectFailed(String why);

  /** Display a status message to local user */
  public void displayStatusMessage(String msg);

  /** Display an error message to local user */
  public void displayErrorMessage(String msg);

  /** Display input received from remote client */
  public void displayRemoteInput(String input);

  /** Remote client hit backspace */
  public void displayBackspace();
}
