Regenerated all of the ActionScript services using the new code generation tool.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4401 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// $Id: ChatService.java 3310 2005-01-24 23:08:21Z mdb $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
@@ -21,49 +21,26 @@
|
||||
|
||||
package com.threerings.crowd.chat.client {
|
||||
|
||||
import com.threerings.util.Name;
|
||||
|
||||
import com.threerings.crowd.chat.client.ChatService;
|
||||
import com.threerings.crowd.chat.client.ChatService_TellListener;
|
||||
import com.threerings.crowd.chat.data.ChatMarshaller_TellMarshaller;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.util.Name;
|
||||
|
||||
/**
|
||||
* The chat services provide a mechanism by which the client can broadcast
|
||||
* chat messages to all clients that are subscribed to a particular place
|
||||
* object or directly to a particular client. These services should not be
|
||||
* used directly, but instead should be accessed via the {@link
|
||||
* ChatDirector}.
|
||||
* An ActionScript version of the Java ChatService interface.
|
||||
*/
|
||||
public interface ChatService extends InvocationService
|
||||
{
|
||||
/**
|
||||
* Requests that a tell message be delivered to the user with username
|
||||
* equal to <code>target</code>.
|
||||
*
|
||||
* @param client a connected, operational client instance.
|
||||
* @param target the username of the user to which the tell message
|
||||
* should be delivered.
|
||||
* @param message the contents of the message.
|
||||
* @param listener the reference that will receive the tell response.
|
||||
*/
|
||||
function tell (
|
||||
client :Client, target :Name, message :String, listener :TellListener)
|
||||
:void;
|
||||
// from Java interface ChatService
|
||||
function away (arg1 :Client, arg2 :String) :void;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
function broadcast (
|
||||
client :Client, message :String, listener :InvocationService_InvocationListener) :void;
|
||||
// from Java interface ChatService
|
||||
function broadcast (arg1 :Client, arg2 :String, arg3 :InvocationService_InvocationListener) :void;
|
||||
|
||||
/**
|
||||
* Sets this client's away message. If the message is null or the
|
||||
* empty string, the away message will be cleared.
|
||||
*/
|
||||
function away (client :Client, message :String) :void;
|
||||
// from Java interface ChatService
|
||||
function tell (arg1 :Client, arg2 :Name, arg3 :String, arg4 :ChatService_TellListener) :void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published
|
||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
package com.threerings.crowd.chat.client {
|
||||
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.chat.client.ChatService;
|
||||
import com.threerings.crowd.chat.client.ChatService_TellListener;
|
||||
import com.threerings.crowd.chat.data.ChatMarshaller_TellMarshaller;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.util.Name;
|
||||
|
||||
/**
|
||||
* An ActionScript version of the Java ChatService_TellListener interface.
|
||||
*/
|
||||
public interface ChatService_TellListener
|
||||
extends InvocationService_InvocationListener
|
||||
{
|
||||
// from Java ChatService_TellListener
|
||||
function tellSucceeded (arg1 :Long, arg2 :String) :void
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// $Id: SpeakService.java 3098 2004-08-27 02:12:55Z mdb $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
@@ -21,26 +21,17 @@
|
||||
|
||||
package com.threerings.crowd.chat.client {
|
||||
|
||||
import com.threerings.crowd.chat.client.SpeakService;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
|
||||
/**
|
||||
* Provides a means by which "speaking" can be allowed among subscribers
|
||||
* of a particular distributed object.
|
||||
* An ActionScript version of the Java SpeakService interface.
|
||||
*/
|
||||
public interface SpeakService extends InvocationService
|
||||
{
|
||||
/**
|
||||
* Issues a request to speak "on" the distributed object via which
|
||||
* this speak service was provided.
|
||||
*
|
||||
* @param message the message to be spoken.
|
||||
* @param mode the "mode" of the message. This is an opaque value that
|
||||
* will be passed back down via the {@link ChatDirector} to the {@link
|
||||
* ChatDisplay} implementations which can interpret it in an
|
||||
* application specific manner. It's useful for differentiating
|
||||
* between regular speech, emotes, etc.
|
||||
*/
|
||||
function speak (client :Client, message :String, mode :int) :void;
|
||||
// from Java interface SpeakService
|
||||
function speak (arg1 :Client, arg2 :String, arg3 :int) :void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.threerings.util.Long;
|
||||
import com.threerings.presents.client.InvocationAdapter;
|
||||
|
||||
public class TellAdapter extends InvocationAdapter
|
||||
implements TellListener
|
||||
implements ChatService_TellListener
|
||||
{
|
||||
public function TellAdapter (failedFunc :Function, successFunc :Function)
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.threerings.crowd.chat.client {
|
||||
|
||||
import com.threerings.util.Long;
|
||||
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener
|
||||
|
||||
public interface TellListener extends InvocationService_InvocationListener
|
||||
{
|
||||
function tellSucceeded (idleTime :Long, awayMessage :String) :void;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// $Id: ChatMarshaller.java 3793 2005-12-21 02:12:57Z ray $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2005 Three Rings Design, Inc., All Rights Reserved
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
@@ -21,14 +21,15 @@
|
||||
|
||||
package com.threerings.crowd.chat.data {
|
||||
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.chat.client.ChatService;
|
||||
import com.threerings.crowd.chat.client.TellListener;
|
||||
import com.threerings.crowd.chat.client.ChatService_TellListener;
|
||||
import com.threerings.crowd.chat.data.ChatMarshaller_TellMarshaller;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||
import com.threerings.util.Name;
|
||||
|
||||
/**
|
||||
@@ -44,33 +45,38 @@ public class ChatMarshaller extends InvocationMarshaller
|
||||
/** The method id used to dispatch {@link #away} requests. */
|
||||
public static const AWAY :int = 1;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface ChatService
|
||||
public function away (arg1 :Client, arg2 :String) :void
|
||||
{
|
||||
sendRequest(arg1, AWAY, [ arg2 ]);
|
||||
sendRequest(arg1, AWAY, [
|
||||
arg2
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch {@link #broadcast} requests. */
|
||||
public static const BROADCAST :int = 2;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface ChatService
|
||||
public function broadcast (arg1 :Client, arg2 :String, arg3 :InvocationService_InvocationListener) :void
|
||||
{
|
||||
var listener3 :InvocationMarshaller_ListenerMarshaller = new InvocationMarshaller_ListenerMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, BROADCAST, [ arg2, listener3 ]);
|
||||
sendRequest(arg1, BROADCAST, [
|
||||
arg2, listener3
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch {@link #tell} requests. */
|
||||
public static const TELL :int = 3;
|
||||
|
||||
// documentation inherited from interface
|
||||
public function tell (arg1 :Client, arg2 :Name, arg3 :String, arg4 :TellListener) :void
|
||||
// from interface ChatService
|
||||
public function tell (arg1 :Client, arg2 :Name, arg3 :String, arg4 :ChatService_TellListener) :void
|
||||
{
|
||||
var listener4 :ChatMarshaller_TellMarshaller = new ChatMarshaller_TellMarshaller();
|
||||
listener4.listener = arg4;
|
||||
sendRequest(arg1, TELL, [ arg2, arg3, listener4 ]);
|
||||
sendRequest(arg1, TELL, [
|
||||
arg2, arg3, listener4
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,56 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published
|
||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
package com.threerings.crowd.chat.data {
|
||||
|
||||
import com.threerings.util.Long;
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.chat.client.ChatService;
|
||||
import com.threerings.crowd.chat.client.ChatService_TellListener;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.util.Name;
|
||||
|
||||
import com.threerings.crowd.chat.client.TellListener;
|
||||
|
||||
public class ChatMarshaller_TellMarshaller extends InvocationMarshaller_ListenerMarshaller
|
||||
/**
|
||||
* Marshalls instances of the ChatService_TellMarshaller interface.
|
||||
*/
|
||||
public class ChatMarshaller_TellMarshaller
|
||||
extends InvocationMarshaller_ListenerMarshaller
|
||||
{
|
||||
/** The method id used to dispatch {@link #tellSucceeded}
|
||||
* responses. */
|
||||
/** The method id used to dispatch {@link #tellSucceeded} responses. */
|
||||
public static const TELL_SUCCEEDED :int = 1;
|
||||
|
||||
// documentation inherited
|
||||
// from InvocationMarshaller_ListenerMarshaller
|
||||
override public function dispatchResponse (methodId :int, args :Array) :void
|
||||
{
|
||||
switch (methodId) {
|
||||
case TELL_SUCCEEDED:
|
||||
(listener as TellListener).tellSucceeded(
|
||||
(listener as ChatService_TellListener).tellSucceeded(
|
||||
(args[0] as Long), (args[1] as String));
|
||||
return;
|
||||
|
||||
default:
|
||||
super.dispatchResponse(methodId, args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2005 Three Rings Design, Inc., All Rights Reserved
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
@@ -21,12 +21,12 @@
|
||||
|
||||
package com.threerings.crowd.chat.data {
|
||||
|
||||
import com.threerings.util.Byte;
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.chat.client.SpeakService;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
|
||||
/**
|
||||
* Provides the implementation of the {@link SpeakService} interface
|
||||
@@ -41,10 +41,12 @@ public class SpeakMarshaller extends InvocationMarshaller
|
||||
/** The method id used to dispatch {@link #speak} requests. */
|
||||
public static const SPEAK :int = 1;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface SpeakService
|
||||
public function speak (arg1 :Client, arg2 :String, arg3 :int) :void
|
||||
{
|
||||
sendRequest(arg1, SPEAK, [ arg2, Byte.valueOf(arg3) ]);
|
||||
sendRequest(arg1, SPEAK, [
|
||||
arg2, Byte.valueOf(arg3)
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user