diff --git a/src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as b/src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as index a3ff2b412..2a615825a 100644 --- a/src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as +++ b/src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as @@ -4,17 +4,10 @@ import com.threerings.presents.client.InvocationService_ConfirmListener; public class InvocationMarshaller_ConfirmMarshaller extends InvocationMarshaller_ListenerMarshaller - implements InvocationService_ConfirmListener { public static const REQUEST_PROCESSED :int = 1; - // documetnation inherited from interfacc - public function requestProcessed () :void - { - // TODO: server only? - } - - // documetnation inherited + // documentation inherited override public function dispatchResponse (methodId :int, args :Array) :void { switch (methodId) { diff --git a/src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as b/src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as index a662ebc23..9dced7e1d 100644 --- a/src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as +++ b/src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as @@ -8,11 +8,10 @@ import com.threerings.io.Streamable; import com.threerings.presents.client.InvocationService_InvocationListener; -import com.threerings.presents.dobj.DObjectManager; import com.threerings.presents.dobj.InvocationResponseEvent; public class InvocationMarshaller_ListenerMarshaller - implements Streamable, InvocationService_InvocationListener + implements Streamable { /** The method id used to dispatch a requestFailed response. */ public static const REQUEST_FAILED_RSPID :int = 0; @@ -31,18 +30,6 @@ public class InvocationMarshaller_ListenerMarshaller * This is only valid on the client. */ public var mapStamp :Number; - /** The distributed object manager to use when dispatching proxied - * responses. This is only valid on the server. */ - public var omgr :DObjectManager; - - // documentation inherited from interface - public function requestFailed (cause :String) :void - { -// omgr.postEvent(new InvocationResponseEvent( -// callerOid, requestId, REQUEST_FAILED_RSPID, -// [ cause ])); - } - /** * Called to dispatch an invocation response to our target * listener. @@ -77,10 +64,9 @@ public class InvocationMarshaller_ListenerMarshaller } // documentation inherited from interface Streamable - public function readObject (ins :ObjectInputStream) :void + public final function readObject (ins :ObjectInputStream) :void { - callerOid = ins.readInt(); - requestId = ins.readShort(); + throw new Error(); // abstract: not needed } } } diff --git a/src/as/com/threerings/presents/data/InvocationMarshaller_ResultMarshaller.as b/src/as/com/threerings/presents/data/InvocationMarshaller_ResultMarshaller.as index 3440ad9f3..54909f107 100644 --- a/src/as/com/threerings/presents/data/InvocationMarshaller_ResultMarshaller.as +++ b/src/as/com/threerings/presents/data/InvocationMarshaller_ResultMarshaller.as @@ -4,16 +4,9 @@ import com.threerings.presents.client.InvocationService_ResultListener; public class InvocationMarshaller_ResultMarshaller extends InvocationMarshaller_ListenerMarshaller - implements InvocationService_ResultListener { public static const REQUEST_PROCESSED :int = 1; - // documetnation inherited from interfacc - public function requestProcessed (result :Object) :void - { - // TODO: server only? - } - // documetnation inherited override public function dispatchResponse (methodId :int, args :Array) :void { diff --git a/src/as/com/threerings/presents/data/TimeBaseMarshaller_GotTimeBaseMarshaller.as b/src/as/com/threerings/presents/data/TimeBaseMarshaller_GotTimeBaseMarshaller.as index 12bd60699..72a488d3a 100644 --- a/src/as/com/threerings/presents/data/TimeBaseMarshaller_GotTimeBaseMarshaller.as +++ b/src/as/com/threerings/presents/data/TimeBaseMarshaller_GotTimeBaseMarshaller.as @@ -7,16 +7,9 @@ import com.threerings.presents.dobj.InvocationResponseEvent; // TODO: this will be autogenerated public class TimeBaseMarshaller_GotTimeBaseMarshaller extends InvocationMarshaller_ListenerMarshaller - implements GotTimeBaseListener { public static const GOT_TIME_OID :int = 1; - public function gotTimeOid (arg1 :int) :void - { -// omgr.postEvent(new InvocationResponseEvent( -// callerOid, requestId, GOT_TIME_OID, [ arg1 ])); - } - override public function dispatchResponse (methodId :int, args :Array) :void { switch (methodId) { diff --git a/src/as/com/threerings/presents/net/AuthRequest.as b/src/as/com/threerings/presents/net/AuthRequest.as index 201e5da34..1a49dfeda 100644 --- a/src/as/com/threerings/presents/net/AuthRequest.as +++ b/src/as/com/threerings/presents/net/AuthRequest.as @@ -3,6 +3,8 @@ package com.threerings.presents.net { import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectOutputStream; +import com.threerings.util.StringUtil; + public class AuthRequest extends UpstreamMessage { public function AuthRequest (creds :Credentials, version :String) @@ -16,8 +18,8 @@ public class AuthRequest extends UpstreamMessage var hoursFromUTC :int = Math.abs(minsOffset) / 60; var minsFromUTC :int = Math.abs(minsOffset) % 60; _zone = "GMT" + ((minsOffset < 0) ? "-" : "+") + - ((hoursFromUTC < 10) ? "0" : "") + hoursFromUTC + ":" + - ((minsFromUTC < 10) ? "0" : "") + minsFromUTC; + StringUtil.prepad(String(hoursFromUTC), 2, "0") + ":" + + StringUtil.prepad(String(minsFromUTC), 2, "0"); } // documentation inherited @@ -30,16 +32,6 @@ public class AuthRequest extends UpstreamMessage out.writeField(_zone); } - // documentation inherited - override public function readObject (ins :ObjectInputStream) :void - { - super.readObject(ins); - - _creds = (ins.readObject() as Credentials); - _version = (ins.readField(String) as String); - _zone = (ins.readField(String) as String); - } - protected var _creds :Credentials; protected var _version :String; protected var _zone :String; diff --git a/src/as/com/threerings/presents/net/DownstreamMessage.as b/src/as/com/threerings/presents/net/DownstreamMessage.as index aa0e890cb..e8235f525 100644 --- a/src/as/com/threerings/presents/net/DownstreamMessage.as +++ b/src/as/com/threerings/presents/net/DownstreamMessage.as @@ -13,11 +13,9 @@ public /* abstract */ class DownstreamMessage public var messageId :int = -1; // documentation inherited from interface Streamable - public function writeObject (out :ObjectOutputStream) :void + public final function writeObject (out :ObjectOutputStream) :void { - Log.getLog(this).warning( - "This is client code: Downstream messages shouldn't be written"); - //out.writeShort(messageId); + throw new Error(); // abstract: not needed } // documentation inherited from interface Streamable diff --git a/src/as/com/threerings/presents/net/ForwardEventRequest.as b/src/as/com/threerings/presents/net/ForwardEventRequest.as index 6420a5a4e..33638a138 100644 --- a/src/as/com/threerings/presents/net/ForwardEventRequest.as +++ b/src/as/com/threerings/presents/net/ForwardEventRequest.as @@ -50,11 +50,7 @@ public class ForwardEventRequest extends UpstreamMessage out.writeObject(_event); } - override public function readObject (ins :ObjectInputStream) :void - { - super.readObject(ins); - _event = (ins.readObject() as DEvent); - } + /** readObject omitted */ public function toString () :String { diff --git a/src/as/com/threerings/presents/net/UpstreamMessage.as b/src/as/com/threerings/presents/net/UpstreamMessage.as index a3d75ef01..26d15b623 100644 --- a/src/as/com/threerings/presents/net/UpstreamMessage.as +++ b/src/as/com/threerings/presents/net/UpstreamMessage.as @@ -31,11 +31,9 @@ public /* abstract */ class UpstreamMessage } // documentation inherited from interface Streamable - public function readObject (ins :ObjectInputStream) :void + public final function readObject (ins :ObjectInputStream) :void { - Log.getLog(this).warning( - "This is client code: Upstream messages shouldn't be read"); - //messageId = ins.readShort(); + throw new Error(); // abstract: not needed } /**