/* -*- C++ -*- */
// $Id: Broadcaster.idl 28360 1999-09-03 03:17:57Z pradeep $

#include "Receiver.idl"

interface Broadcaster
{
  // = TITLE
  //   This interface is to be implemented by the simple chat server.
  //   It broadcasts messages received from one registered client to
  //   all its registered clients.

  exception CannotAdd
    {
      string reason_;
    };

  exception CannotRemove
    {
      string reason_;
    };

  void add (in Receiver receiver_, in string nickname)
    raises (CannotAdd);
  // Registers a Receiver with the chat server.  A registered client
  // must call un_register before it goes away.

  void remove (in Receiver receiver_)
    raises (CannotRemove);
  // Unregisters a Receiver.

  void say (in Receiver receiver_, in string text);
  // Say something to all registered clients.
};
