Change how the actionscript services are generated, so that the

client is not required.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5905 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-08-13 06:17:57 +00:00
parent fe3d89132d
commit 20f3c6add6
3 changed files with 9 additions and 7 deletions
@@ -235,11 +235,12 @@ public abstract class InvocationTask extends Task
if (buf.length() > 0) {
buf.append(", ");
}
String index = String.valueOf(skipFirst ? ii : (ii+1));
String arg;
if (_ilistener.isAssignableFrom(args[ii])) {
arg = GenUtil.boxASArgument(args[ii], "listener" + (ii+1));
arg = GenUtil.boxASArgument(args[ii], "listener" + index);
} else {
arg = GenUtil.boxASArgument(args[ii], "arg" + (ii+1));
arg = GenUtil.boxASArgument(args[ii], "arg" + index);
}
buf.append(arg);
}
@@ -22,13 +22,14 @@ public class ${name}Marshaller extends InvocationMarshaller
public static const $m.code :int = $velocityCount;
// from interface ${name}Service
public function $m.method.name ($m.getASArgList(false)) :void
public function $m.method.name ($m.getASArgList(true)) :void
{
#foreach ($la in $m.listenerArgs)
var listener$la.index :$la.actionScriptMarshaller = new ${la.actionScriptMarshaller}();
listener${la.index}.listener = arg$la.index;
#set ($argIdx = $la.index - 1)
var listener$argIdx :$la.actionScriptMarshaller = new ${la.actionScriptMarshaller}();
listener${argIdx}.listener = arg$argIdx;
#end
sendRequest(arg1, $m.code, [
sendRequest($m.code, [
$m.getASWrappedArgList(true)
]);
}
@@ -14,7 +14,7 @@ public interface ${name}Service extends InvocationService
#end
// from Java interface ${name}Service
function $m.method.name ($m.getASArgList(false)) :void;
function $m.method.name ($m.getASArgList(true)) :void;
#end
}
}