From 5b37850773a31be8f12d88db2a0667e80f015e72 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sun, 16 Dec 2001 21:02:57 +0000 Subject: [PATCH] Added support for receiving chat notifications from multiple objects. This will probably need to be enhanced so that we can differentiate between notifications from different objects on the client and render them differently. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@804 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../crowd/chat/client/ChatDirector.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index 8abe98b2b..71808fb59 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -1,5 +1,5 @@ // -// $Id: ChatDirector.java,v 1.12 2001/10/18 23:55:24 mdb Exp $ +// $Id: ChatDirector.java,v 1.13 2001/12/16 21:02:57 mdb Exp $ package com.threerings.crowd.chat; @@ -111,6 +111,25 @@ public class ChatDirector return ChatService.tell(_ctx.getClient(), target, message, this); } + /** + * Adds an additional object via which chat messages may arrive. The + * chat director assumes the caller will be managing the subscription + * to this object and will remain subscribed to it for as long as it + * remains in effect as an auxilliary chat source. + */ + public void addAuxilliarySource (DObject source) + { + source.addListener(this); + } + + /** + * Removes a previously added auxilliary chat source. + */ + public void removeAuxilliarySource (DObject source) + { + source.removeListener(this); + } + // documentation inherited public boolean locationMayChange (int placeId) {