Regenerated more actionscript service business.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@103 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// $Id: SceneService.java 3099 2004-08-27 02:21:06Z mdb $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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
|
||||
@@ -21,30 +21,22 @@
|
||||
|
||||
package com.threerings.whirled.client {
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.whirled.client.SceneService;
|
||||
import com.threerings.whirled.client.SceneService_SceneMoveListener;
|
||||
import com.threerings.whirled.data.SceneMarshaller_SceneMoveMarshaller;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
|
||||
/**
|
||||
* The scene service class provides the client interface to the scene
|
||||
* related invocation services (e.g. moving from scene to scene).
|
||||
* An ActionScript version of the Java SceneService interface.
|
||||
*/
|
||||
public interface SceneService extends InvocationService
|
||||
{
|
||||
/**
|
||||
* Requests that that this client's body be moved to the specified
|
||||
* scene.
|
||||
*
|
||||
* @param sceneId the scene id to which we want to move.
|
||||
* @param version the version number of the scene object that we have
|
||||
* in our local repository.
|
||||
*/
|
||||
function moveTo (
|
||||
client :Client, sceneId :int, version :int,
|
||||
listener :SceneService_SceneMoveListener) :void;
|
||||
// from Java interface SceneService
|
||||
function moveTo (arg1 :Client, arg2 :int, arg3 :int, arg4 :SceneService_SceneMoveListener) :void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,50 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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.whirled.client {
|
||||
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
|
||||
import com.threerings.io.TypedArray;
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.whirled.client.SceneService;
|
||||
import com.threerings.whirled.client.SceneService_SceneMoveListener;
|
||||
import com.threerings.whirled.data.SceneMarshaller_SceneMoveMarshaller;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
|
||||
/**
|
||||
* Used to communicate the response to a {@link #moveTo} request.
|
||||
* An ActionScript version of the Java SceneService_SceneMoveListener interface.
|
||||
*/
|
||||
public interface SceneService_SceneMoveListener
|
||||
extends InvocationService_InvocationListener
|
||||
{
|
||||
/**
|
||||
* Indicates that a move succeeded.
|
||||
*
|
||||
* @param placeId the place object id of the newly occupied scene.
|
||||
* @param config metadata related to the newly occupied scene.
|
||||
*/
|
||||
function moveSucceeded (placeId :int, config :PlaceConfig) :void;
|
||||
// from Java SceneService_SceneMoveListener
|
||||
function moveSucceeded (arg1 :int, arg2 :PlaceConfig) :void
|
||||
|
||||
/**
|
||||
* Indicates that a move succeeded and that the client's cached
|
||||
* scene information should be updated with the supplied data.
|
||||
*
|
||||
* @param placeId the place object id of the newly occupied scene.
|
||||
* @param config metadata related to the newly occupied scene.
|
||||
* @param updates updates that must be applied to the client's
|
||||
* copy of a scene model to bring it up to date.
|
||||
*/
|
||||
function moveSucceededWithUpdates (
|
||||
placeId :int, config :PlaceConfig,
|
||||
updates :TypedArray /*of SceneUpdate*/) :void;
|
||||
// from Java SceneService_SceneMoveListener
|
||||
function moveSucceededWithScene (arg1 :int, arg2 :PlaceConfig, arg3 :SceneModel) :void
|
||||
|
||||
/**
|
||||
* Indicates that a move succeeded and that the client's cached
|
||||
* scene information should be updated with the supplied data.
|
||||
*
|
||||
* @param placeId the place object id of the newly occupied scene.
|
||||
* @param config metadata related to the newly occupied scene.
|
||||
* @param model a fresh copy of the most recent scene data for the
|
||||
* newly occupied scene.
|
||||
*/
|
||||
function moveSucceededWithScene (
|
||||
placeId :int, config :PlaceConfig, model :SceneModel) :void;
|
||||
// from Java SceneService_SceneMoveListener
|
||||
function moveSucceededWithUpdates (arg1 :int, arg2 :PlaceConfig, arg3 :Array) :void
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// $Id: SceneMarshaller.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
|
||||
// http://www.threerings.net/code/narya/
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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
|
||||
@@ -21,12 +21,17 @@
|
||||
|
||||
package com.threerings.whirled.data {
|
||||
|
||||
import com.threerings.util.Integer;
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.whirled.client.SceneService;
|
||||
import com.threerings.whirled.client.SceneService_SceneMoveListener;
|
||||
import com.threerings.whirled.data.SceneMarshaller_SceneMoveMarshaller;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
|
||||
/**
|
||||
* Provides the implementation of the {@link SceneService} interface
|
||||
@@ -41,13 +46,14 @@ public class SceneMarshaller extends InvocationMarshaller
|
||||
/** The method id used to dispatch {@link #moveTo} requests. */
|
||||
public static const MOVE_TO :int = 1;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface SceneService
|
||||
public function moveTo (arg1 :Client, arg2 :int, arg3 :int, arg4 :SceneService_SceneMoveListener) :void
|
||||
{
|
||||
var listener4 :SceneMarshaller_SceneMoveMarshaller = new SceneMarshaller_SceneMoveMarshaller();
|
||||
listener4.listener = arg4;
|
||||
sendRequest(arg1, MOVE_TO, [ new Integer(arg2), new Integer(arg3), listener4 ]);
|
||||
sendRequest(arg1, MOVE_TO, [
|
||||
Integer.valueOf(arg2), Integer.valueOf(arg3), listener4
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +1,74 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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.whirled.data {
|
||||
|
||||
import com.threerings.util.Integer;
|
||||
|
||||
import com.threerings.io.TypedArray;
|
||||
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
|
||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.whirled.client.SceneService;
|
||||
import com.threerings.whirled.client.SceneService_SceneMoveListener;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
|
||||
public class SceneMarshaller_SceneMoveMarshaller extends InvocationMarshaller_ListenerMarshaller
|
||||
/**
|
||||
* Marshalls instances of the SceneService_SceneMoveMarshaller interface.
|
||||
*/
|
||||
public class SceneMarshaller_SceneMoveMarshaller
|
||||
extends InvocationMarshaller_ListenerMarshaller
|
||||
{
|
||||
/** The method id used to dispatch {@link #moveSucceeded}
|
||||
* responses. */
|
||||
/** The method id used to dispatch {@link #moveSucceeded} responses. */
|
||||
public static const MOVE_SUCCEEDED :int = 1;
|
||||
|
||||
/** The method id used to dispatch {@link #moveSucceededWithScene}
|
||||
* responses. */
|
||||
/** The method id used to dispatch {@link #moveSucceededWithScene} responses. */
|
||||
public static const MOVE_SUCCEEDED_WITH_SCENE :int = 2;
|
||||
|
||||
/** The method id used to dispatch {@link #moveSucceededWithUpdates}
|
||||
* responses. */
|
||||
/** The method id used to dispatch {@link #moveSucceededWithUpdates} responses. */
|
||||
public static const MOVE_SUCCEEDED_WITH_UPDATES :int = 3;
|
||||
|
||||
// documentation inherited
|
||||
// from InvocationMarshaller_ListenerMarshaller
|
||||
override public function dispatchResponse (methodId :int, args :Array) :void
|
||||
{
|
||||
switch (methodId) {
|
||||
case MOVE_SUCCEEDED:
|
||||
(listener as SceneService_SceneMoveListener).moveSucceeded(
|
||||
(args[0] as Integer).value, args[1] as PlaceConfig);
|
||||
(args[0] as Integer).value, (args[1] as PlaceConfig));
|
||||
return;
|
||||
|
||||
case MOVE_SUCCEEDED_WITH_SCENE:
|
||||
(listener as SceneService_SceneMoveListener).moveSucceededWithScene(
|
||||
(args[0] as Integer).value, args[1] as PlaceConfig, args[2] as SceneModel);
|
||||
(args[0] as Integer).value, (args[1] as PlaceConfig), (args[2] as SceneModel));
|
||||
return;
|
||||
|
||||
case MOVE_SUCCEEDED_WITH_UPDATES:
|
||||
(listener as SceneService_SceneMoveListener).moveSucceededWithUpdates(
|
||||
(args[0] as Integer).value, args[1] as PlaceConfig, args[2] as TypedArray);
|
||||
(args[0] as Integer).value, (args[1] as PlaceConfig), (args[2] as Array));
|
||||
return;
|
||||
|
||||
default:
|
||||
super.dispatchResponse(methodId, args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// $Id: SpotService.java 3363 2005-02-22 18:54:48Z mdb $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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
|
||||
@@ -24,64 +24,28 @@ package com.threerings.whirled.spot.client {
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.client.InvocationService_ConfirmListener;
|
||||
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ConfirmMarshaller;
|
||||
import com.threerings.whirled.client.SceneService_SceneMoveListener;
|
||||
import com.threerings.whirled.data.SceneMarshaller_SceneMoveMarshaller;
|
||||
import com.threerings.whirled.spot.client.SpotService;
|
||||
import com.threerings.whirled.spot.data.Location;
|
||||
|
||||
/**
|
||||
* Defines the mechanism by which the client can request to move around
|
||||
* within a scene and between scenes (taking exit and entry locations into
|
||||
* account). These services should not be used directly, but instead
|
||||
* should be accessed via the {@link SpotSceneDirector}.
|
||||
* An ActionScript version of the Java SpotService interface.
|
||||
*/
|
||||
public interface SpotService extends InvocationService
|
||||
{
|
||||
/**
|
||||
* Requests to traverse the specified portal.
|
||||
*
|
||||
* @param sceneId the player's current scene which is used to sanity
|
||||
* check things when the request actually arrives.
|
||||
* @param portalId the portal to be traversed.
|
||||
* @param destSceneVer the version of the destination scene data that
|
||||
* the client has in its local repository.
|
||||
*/
|
||||
function traversePortal (
|
||||
client :Client, sceneId :int, portalId :int, destSceneVer :int,
|
||||
listener :SceneService_SceneMoveListener) :void;
|
||||
// from Java interface SpotService
|
||||
function changeLocation (arg1 :Client, arg2 :int, arg3 :Location, arg4 :InvocationService_ConfirmListener) :void;
|
||||
|
||||
/**
|
||||
* Requests that this client's body be made to move to the specified
|
||||
* location. The user will be removed from any cluster from which they
|
||||
* are an occupant.
|
||||
*
|
||||
* @param sceneId the id of the scene in which to change location.
|
||||
* @param loc the location to which to move.
|
||||
*/
|
||||
function changeLocation (
|
||||
client :Client, sceneId :int, loc :Location,
|
||||
listener :InvocationService_ConfirmListener) :void;
|
||||
// from Java interface SpotService
|
||||
function clusterSpeak (arg1 :Client, arg2 :String, arg3 :int) :void;
|
||||
|
||||
/**
|
||||
* Requests that this client start or join the specified cluster. They
|
||||
* will be relocated appropriately by the scene manager.
|
||||
*
|
||||
* @param friendOid the bodyOid of another user or the oid of an
|
||||
* existing cluster; the calling user will be made to join the cluster
|
||||
* or target user's cluster, or create a cluster with the target user
|
||||
* if they are not already in one.
|
||||
*/
|
||||
function joinCluster (
|
||||
client :Client, friendOid :int,
|
||||
listener :InvocationService_ConfirmListener) :void;
|
||||
// from Java interface SpotService
|
||||
function joinCluster (arg1 :Client, arg2 :int, arg3 :InvocationService_ConfirmListener) :void;
|
||||
|
||||
/**
|
||||
* Requests that the supplied message be delivered to listeners in the
|
||||
* cluster to which the specified location belongs.
|
||||
*
|
||||
* @param message the text of the message to be spoken.
|
||||
* @param mode an associated mode constant that can be used to
|
||||
* identify different kinds of "speech" (emote, thought bubble, etc.).
|
||||
*/
|
||||
function clusterSpeak (client :Client, message :String, mode :int) :void;
|
||||
// from Java interface SpotService
|
||||
function traversePortal (arg1 :Client, arg2 :int, arg3 :int, arg4 :int, arg5 :SceneService_SceneMoveListener) :void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2005 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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
|
||||
@@ -21,16 +21,13 @@
|
||||
|
||||
package com.threerings.whirled.spot.data {
|
||||
|
||||
import com.threerings.util.Byte;
|
||||
import com.threerings.util.Integer;
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.client.InvocationService_ConfirmListener;
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ConfirmMarshaller;
|
||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||
import com.threerings.whirled.client.SceneService;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.whirled.client.SceneService_SceneMoveListener;
|
||||
import com.threerings.whirled.data.SceneMarshaller_SceneMoveMarshaller;
|
||||
import com.threerings.whirled.spot.client.SpotService;
|
||||
@@ -49,52 +46,51 @@ public class SpotMarshaller extends InvocationMarshaller
|
||||
/** The method id used to dispatch {@link #changeLocation} requests. */
|
||||
public static const CHANGE_LOCATION :int = 1;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface SpotService
|
||||
public function changeLocation (arg1 :Client, arg2 :int, arg3 :Location, arg4 :InvocationService_ConfirmListener) :void
|
||||
{
|
||||
var listener4 :InvocationMarshaller_ConfirmMarshaller = new InvocationMarshaller_ConfirmMarshaller();
|
||||
listener4.listener = arg4;
|
||||
sendRequest(arg1, CHANGE_LOCATION, [
|
||||
new Integer(arg2), arg3, listener4
|
||||
Integer.valueOf(arg2), arg3, listener4
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch {@link #clusterSpeak} requests. */
|
||||
public static const CLUSTER_SPEAK :int = 2;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface SpotService
|
||||
public function clusterSpeak (arg1 :Client, arg2 :String, arg3 :int) :void
|
||||
{
|
||||
sendRequest(arg1, CLUSTER_SPEAK, [
|
||||
arg2, new Byte(arg3)
|
||||
arg2, Byte.valueOf(arg3)
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch {@link #joinCluster} requests. */
|
||||
public static const JOIN_CLUSTER :int = 3;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface SpotService
|
||||
public function joinCluster (arg1 :Client, arg2 :int, arg3 :InvocationService_ConfirmListener) :void
|
||||
{
|
||||
var listener3 :InvocationMarshaller_ConfirmMarshaller = new InvocationMarshaller_ConfirmMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, JOIN_CLUSTER, [
|
||||
new Integer(arg2), listener3
|
||||
Integer.valueOf(arg2), listener3
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch {@link #traversePortal} requests. */
|
||||
public static const TRAVERSE_PORTAL :int = 4;
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface SpotService
|
||||
public function traversePortal (arg1 :Client, arg2 :int, arg3 :int, arg4 :int, arg5 :SceneService_SceneMoveListener) :void
|
||||
{
|
||||
var listener5 :SceneMarshaller_SceneMoveMarshaller = new SceneMarshaller_SceneMoveMarshaller();
|
||||
listener5.listener = arg5;
|
||||
sendRequest(arg1, TRAVERSE_PORTAL, [
|
||||
new Integer(arg2), new Integer(arg3), new Integer(arg4), listener5
|
||||
Integer.valueOf(arg2), Integer.valueOf(arg3), Integer.valueOf(arg4), listener5
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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.whirled.zone.client {
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
import com.threerings.whirled.zone.client.ZoneService;
|
||||
import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
|
||||
import com.threerings.whirled.zone.data.ZoneMarshaller_ZoneMoveMarshaller;
|
||||
import com.threerings.whirled.zone.data.ZoneSummary;
|
||||
|
||||
/**
|
||||
* An ActionScript version of the Java ZoneService interface.
|
||||
*/
|
||||
public interface ZoneService extends InvocationService
|
||||
{
|
||||
// from Java interface ZoneService
|
||||
function moveTo (arg1 :Client, arg2 :int, arg3 :int, arg4 :int, arg5 :ZoneService_ZoneMoveListener) :void;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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.whirled.zone.client {
|
||||
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.InvocationService_InvocationListener;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
import com.threerings.whirled.zone.client.ZoneService;
|
||||
import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
|
||||
import com.threerings.whirled.zone.data.ZoneMarshaller_ZoneMoveMarshaller;
|
||||
import com.threerings.whirled.zone.data.ZoneSummary;
|
||||
|
||||
/**
|
||||
* An ActionScript version of the Java ZoneService_ZoneMoveListener interface.
|
||||
*/
|
||||
public interface ZoneService_ZoneMoveListener
|
||||
extends InvocationService_InvocationListener
|
||||
{
|
||||
// from Java ZoneService_ZoneMoveListener
|
||||
function moveSucceeded (arg1 :int, arg2 :PlaceConfig, arg3 :ZoneSummary) :void
|
||||
|
||||
// from Java ZoneService_ZoneMoveListener
|
||||
function moveSucceededWithScene (arg1 :int, arg2 :PlaceConfig, arg3 :ZoneSummary, arg4 :SceneModel) :void
|
||||
|
||||
// from Java ZoneService_ZoneMoveListener
|
||||
function moveSucceededWithUpdates (arg1 :int, arg2 :PlaceConfig, arg3 :ZoneSummary, arg4 :Array) :void
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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.whirled.zone.data {
|
||||
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
import com.threerings.whirled.zone.client.ZoneService;
|
||||
import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
|
||||
import com.threerings.whirled.zone.data.ZoneMarshaller_ZoneMoveMarshaller;
|
||||
import com.threerings.whirled.zone.data.ZoneSummary;
|
||||
|
||||
/**
|
||||
* Provides the implementation of the {@link ZoneService} interface
|
||||
* that marshalls the arguments and delivers the request to the provider
|
||||
* on the server. Also provides an implementation of the response listener
|
||||
* interfaces that marshall the response arguments and deliver them back
|
||||
* to the requesting client.
|
||||
*/
|
||||
public class ZoneMarshaller extends InvocationMarshaller
|
||||
implements ZoneService
|
||||
{
|
||||
/** The method id used to dispatch {@link #moveTo} requests. */
|
||||
public static const MOVE_TO :int = 1;
|
||||
|
||||
// from interface ZoneService
|
||||
public function moveTo (arg1 :Client, arg2 :int, arg3 :int, arg4 :int, arg5 :ZoneService_ZoneMoveListener) :void
|
||||
{
|
||||
var listener5 :ZoneMarshaller_ZoneMoveMarshaller = new ZoneMarshaller_ZoneMoveMarshaller();
|
||||
listener5.listener = arg5;
|
||||
sendRequest(arg1, MOVE_TO, [
|
||||
Integer.valueOf(arg2), Integer.valueOf(arg3), Integer.valueOf(arg4), listener5
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Vilya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/vilya/
|
||||
//
|
||||
// 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.whirled.zone.data {
|
||||
|
||||
import com.threerings.util.*; // for Float, Integer, etc.
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.data.SceneUpdate;
|
||||
import com.threerings.whirled.zone.client.ZoneService;
|
||||
import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
|
||||
import com.threerings.whirled.zone.data.ZoneSummary;
|
||||
|
||||
/**
|
||||
* Marshalls instances of the ZoneService_ZoneMoveMarshaller interface.
|
||||
*/
|
||||
public class ZoneMarshaller_ZoneMoveMarshaller
|
||||
extends InvocationMarshaller_ListenerMarshaller
|
||||
{
|
||||
/** The method id used to dispatch {@link #moveSucceeded} responses. */
|
||||
public static const MOVE_SUCCEEDED :int = 1;
|
||||
|
||||
/** The method id used to dispatch {@link #moveSucceededWithScene} responses. */
|
||||
public static const MOVE_SUCCEEDED_WITH_SCENE :int = 2;
|
||||
|
||||
/** The method id used to dispatch {@link #moveSucceededWithUpdates} responses. */
|
||||
public static const MOVE_SUCCEEDED_WITH_UPDATES :int = 3;
|
||||
|
||||
// from InvocationMarshaller_ListenerMarshaller
|
||||
override public function dispatchResponse (methodId :int, args :Array) :void
|
||||
{
|
||||
switch (methodId) {
|
||||
case MOVE_SUCCEEDED:
|
||||
(listener as ZoneService_ZoneMoveListener).moveSucceeded(
|
||||
(args[0] as Integer).value, (args[1] as PlaceConfig), (args[2] as ZoneSummary));
|
||||
return;
|
||||
|
||||
case MOVE_SUCCEEDED_WITH_SCENE:
|
||||
(listener as ZoneService_ZoneMoveListener).moveSucceededWithScene(
|
||||
(args[0] as Integer).value, (args[1] as PlaceConfig), (args[2] as ZoneSummary), (args[3] as SceneModel));
|
||||
return;
|
||||
|
||||
case MOVE_SUCCEEDED_WITH_UPDATES:
|
||||
(listener as ZoneService_ZoneMoveListener).moveSucceededWithUpdates(
|
||||
(args[0] as Integer).value, (args[1] as PlaceConfig), (args[2] as ZoneSummary), (args[3] as Array));
|
||||
return;
|
||||
|
||||
default:
|
||||
super.dispatchResponse(methodId, args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user