/* -*- C++ -*- */
// $Id: Broadcaster.idl 28837 1999-09-21 17:04:51Z schmidt $

#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 r_, 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 r)
    raises (CannotRemove);
  // Unregisters a Receiver.

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