package chat;

/**
 * \interface Chatroom
 * Provides a chatroom model.
 */
public interface Chatroom {	
	/**
	 * post the message of a chatter
	 * \param msg message
	 * \param c chatter who sends the message
	 * \warning if c is not connected, we send a debug message and don't send the message into the room
	 * \todo may be a good idea to throw an exception in case the sender is not in the chatroom
	 */
	public void post(String msg, Chatter c);
	
	/**
	 * disconnect the chatter c from the chatroom ; if the chatter is not connected, we don't do anything
	 * \todo may be a good a idea to throw an exception in case the chatter is not connected
	 * \param c chatter to disconnect
	 */
	public void quit(Chatter c);
	
	/**
	 * add the chatter c to the chatroom ; if the chatter is already connected, we don't do anything
	 * \todo may be a good idea to throw an exception in case the chatter is already connected
	 * \param c chatter to add to the chatroom
	 */
	public void join(Chatter c);
	
	/**
	 * \return the topic of the chatroom
	 */
	public String getTopic();
}
