Added broadcast chat mechanism.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1875 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatDirector.java,v 1.36 2002/10/30 01:47:12 ray Exp $
|
||||
// $Id: ChatDirector.java,v 1.37 2002/10/31 23:27:16 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -290,6 +290,23 @@ public class ChatDirector extends BasicDirector
|
||||
speakService.speak(_ctx.getClient(), message, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests to send a site-wide broadcast message.
|
||||
*
|
||||
* @param message the contents of the message.
|
||||
*/
|
||||
public void requestBroadcast (String message)
|
||||
{
|
||||
_cservice.broadcast(
|
||||
_ctx.getClient(), message, new ChatService.InvocationListener () {
|
||||
public void requestFailed (String reason) {
|
||||
displayFeedbackMessage(
|
||||
_bundle, MessageBundle.compose(
|
||||
"m.broadcast_failed", reason));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests that a tell message be delivered to the specified target
|
||||
* user.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatService.java,v 1.9 2002/10/30 01:47:12 ray Exp $
|
||||
// $Id: ChatService.java,v 1.10 2002/10/31 23:27:16 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -45,4 +45,14 @@ public interface ChatService extends InvocationService
|
||||
*/
|
||||
public void tell (Client client, String target, String message,
|
||||
TellListener listener);
|
||||
|
||||
/**
|
||||
* Requests that a message be broadcast to all users in the system.
|
||||
*
|
||||
* @param client a connected, operational client instance.
|
||||
* @param message the contents of the message.
|
||||
* @param listener the reference that will receive a failure response.
|
||||
*/
|
||||
public void broadcast (Client client, String message,
|
||||
InvocationListener listener);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user