More bits and hackery (and a hand-generated TimeBaseMarshaller, so that I
can get fully logged in). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3904 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.threerings.presents.data {
|
||||
|
||||
import com.threerings.presents.client.GotTimeBaseListener;
|
||||
|
||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||
|
||||
// TODO: this will be autogenerated
|
||||
public class GotTimeBaseMarshaller extends 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 ]));
|
||||
}
|
||||
|
||||
public override function dispatchResponse (methodId :int, args :Array) :void
|
||||
{
|
||||
switch (methodId) {
|
||||
case GOT_TIME_OID:
|
||||
(listener as GotTimeBaseListener).gotTimeOid(args[0] as int);
|
||||
return;
|
||||
|
||||
default:
|
||||
super.dispatchResponse(methodId, args);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ package com.threerings.presents.data {
|
||||
|
||||
import com.threerings.util.ClassUtil;
|
||||
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.io.Streamable;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ListenerMarshaller
|
||||
implements Streamable, InvocationListener
|
||||
{
|
||||
/** The method id used to dispatch a requestFailed response. */
|
||||
public const REQUEST_FAILED_RSPID :int = 0;
|
||||
public static const REQUEST_FAILED_RSPID :int = 0;
|
||||
|
||||
/** The oid of the invocation service requester. */
|
||||
public var callerOid :int;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.threerings.presents.data {
|
||||
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.GotTimeBaseListener;
|
||||
import com.threerings.presents.client.TimeBaseService;
|
||||
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
|
||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||
|
||||
// TODO
|
||||
// This will be auto-generated soon from the service definition
|
||||
public class TimeBaseMarshaller extends InvocationMarshaller
|
||||
implements TimeBaseService
|
||||
{
|
||||
public static const GET_TIME_OID :int = 1;
|
||||
|
||||
public function getTimeOid (
|
||||
arg1 :Client, arg2 :String, arg3 :GotTimeBaseListener) :void
|
||||
{
|
||||
var listener3 :GotTimeBaseMarshaller = new GotTimeBaseMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, GET_TIME_OID, [arg2, listener3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user