generate client methods and add streaming
This commit is contained in:
parent
218529deae
commit
59977b53fe
13 changed files with 848 additions and 63 deletions
|
@ -1607,6 +1607,8 @@ private:
|
||||||
spaces(indent), " public Client(java.util.concurrent.CompletableFuture<org.capnproto.ClientHook> promise) {\n",
|
spaces(indent), " public Client(java.util.concurrent.CompletableFuture<org.capnproto.ClientHook> promise) {\n",
|
||||||
spaces(indent), " super(promise);\n",
|
spaces(indent), " super(promise);\n",
|
||||||
spaces(indent), " }\n",
|
spaces(indent), " }\n",
|
||||||
|
spaces(indent), "\n",
|
||||||
|
KJ_MAP(m, methods) { return kj::mv(m.clientDefs); },
|
||||||
spaces(indent), " }\n",
|
spaces(indent), " }\n",
|
||||||
spaces(indent), " public static abstract class Server extends org.capnproto.Capability.Server {\n",
|
spaces(indent), " public static abstract class Server extends org.capnproto.Capability.Server {\n",
|
||||||
spaces(indent), " protected org.capnproto.DispatchCallResult dispatchCall(\n",
|
spaces(indent), " protected org.capnproto.DispatchCallResult dispatchCall(\n",
|
||||||
|
@ -1627,7 +1629,7 @@ private:
|
||||||
spaces(indent), " org.capnproto.Capability.Server.internalUnimplemented(\"", name, "\", 0x", hexId, "L, methodId));\n",
|
spaces(indent), " org.capnproto.Capability.Server.internalUnimplemented(\"", name, "\", 0x", hexId, "L, methodId));\n",
|
||||||
spaces(indent), " }\n",
|
spaces(indent), " }\n",
|
||||||
spaces(indent), " }\n\n",
|
spaces(indent), " }\n\n",
|
||||||
KJ_MAP(m, methods) { return kj::mv(m.sourceDefs); },
|
KJ_MAP(m, methods) { return kj::mv(m.serverDefs); },
|
||||||
spaces(indent), " }\n",
|
spaces(indent), " }\n",
|
||||||
spaces(indent), "\n",
|
spaces(indent), "\n",
|
||||||
KJ_MAP(n, nestedTypeDecls) { return kj::mv(n); },
|
KJ_MAP(n, nestedTypeDecls) { return kj::mv(n); },
|
||||||
|
@ -1640,17 +1642,18 @@ private:
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
|
|
||||||
struct MethodText {
|
struct MethodText {
|
||||||
kj::StringTree sourceDefs;
|
kj::StringTree clientDefs;
|
||||||
|
kj::StringTree serverDefs;
|
||||||
kj::StringTree dispatchCase;
|
kj::StringTree dispatchCase;
|
||||||
};
|
};
|
||||||
|
|
||||||
MethodText makeMethodText(kj::StringPtr interfaceName, InterfaceSchema::Method method) {
|
MethodText makeMethodText(kj::StringPtr interfaceName, InterfaceSchema::Method method) {
|
||||||
auto proto = method.getProto();
|
auto proto = method.getProto();
|
||||||
auto name = proto.getName();
|
auto methodName = proto.getName();
|
||||||
auto titleCase = toTitleCase(name);
|
auto titleCase = toTitleCase(methodName);
|
||||||
auto paramSchema = method.getParamType();
|
auto paramSchema = method.getParamType();
|
||||||
auto resultSchema = method.getResultType();
|
auto resultSchema = method.getResultType();
|
||||||
auto identifierName = safeIdentifier(name);
|
auto identifierName = safeIdentifier(methodName);
|
||||||
|
|
||||||
auto paramProto = paramSchema.getProto();
|
auto paramProto = paramSchema.getProto();
|
||||||
auto resultProto = resultSchema.getProto();
|
auto resultProto = resultSchema.getProto();
|
||||||
|
@ -1710,42 +1713,62 @@ private:
|
||||||
if (paramProto.getScopeId() == 0) {
|
if (paramProto.getScopeId() == 0) {
|
||||||
paramType = kj::str(javaFullName(paramSchema, method));
|
paramType = kj::str(javaFullName(paramSchema, method));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resultProto.getScopeId() == 0) {
|
if (resultProto.getScopeId() == 0) {
|
||||||
paramType = kj::str(javaFullName(resultSchema, method));
|
paramType = kj::str(javaFullName(resultSchema, method));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kj::String paramFactory = kj::str(shortParamType, ".factory");
|
||||||
|
kj::String resultFactory = kj::str(shortResultType, ".factory");
|
||||||
|
|
||||||
auto interfaceProto = method.getContainingInterface().getProto();
|
auto interfaceProto = method.getContainingInterface().getProto();
|
||||||
uint64_t interfaceId = interfaceProto.getId();
|
uint64_t interfaceId = interfaceProto.getId();
|
||||||
auto interfaceIdHex = kj::hex(interfaceId);
|
auto interfaceIdHex = kj::hex(interfaceId);
|
||||||
uint16_t methodId = method.getIndex();
|
uint16_t methodId = method.getIndex();
|
||||||
|
|
||||||
auto requestMethodImpl = kj::strTree(
|
if (isStreaming) {
|
||||||
isStreaming ? kj::strTree("org.capnproto.StreamingRequest<", paramType, ">")
|
|
||||||
: kj::strTree("org.capnproto.Request<", paramType, ", ", resultType, ">"),
|
|
||||||
name, "Request() {\n",
|
|
||||||
isStreaming
|
|
||||||
? kj::strTree(" return newStreamingCall<", paramType, ">(\n")
|
|
||||||
: kj::strTree(" return newCall<", paramType, ", ", resultType, ">(\n"),
|
|
||||||
" 0x", interfaceIdHex, "L, ", methodId, ");\n"
|
|
||||||
"}\n");
|
|
||||||
|
|
||||||
return MethodText {
|
return MethodText {
|
||||||
|
kj::strTree(
|
||||||
|
" public org.capnproto.StreamingRequest<", shortParamType, ".Builder> ", methodName, "Request() {\n",
|
||||||
|
" return newStreamingCall(", paramFactory, ", 0x", interfaceIdHex, "L, (short)", methodId, ");\n"
|
||||||
|
" }\n"),
|
||||||
|
|
||||||
kj::strTree(
|
kj::strTree(
|
||||||
" protected java.util.concurrent.CompletableFuture<?> ", identifierName, "(org.capnproto.CallContext<", titleCase, "Params.Reader, ", titleCase, "Results.Builder> context) {\n"
|
" protected java.util.concurrent.CompletableFuture<?> ", identifierName, "(org.capnproto.StreamingCallContext<", shortParamType, ".Reader> context) {\n"
|
||||||
" return org.capnproto.Capability.Server.internalUnimplemented(\n"
|
" return org.capnproto.Capability.Server.internalUnimplemented(\n"
|
||||||
" \"", interfaceProto.getDisplayName(), "\", \"", name, "\",\n"
|
" \"", interfaceProto.getDisplayName(), "\", \"", methodName, "\",\n"
|
||||||
" 0x", interfaceIdHex, "L, (short)", methodId, ");\n"
|
" 0x", interfaceIdHex, "L, (short)", methodId, ");\n"
|
||||||
" }\n\n"),
|
" }\n\n"),
|
||||||
|
|
||||||
kj::strTree(
|
kj::strTree(
|
||||||
" case ", methodId, ":\n",
|
" case ", methodId, ":\n",
|
||||||
" return org.capnproto.Capability.Server.",
|
" return org.capnproto.Capability.Server.streamResult(\n",
|
||||||
isStreaming ? "streamResult" : "result", "(\n",
|
" this.", identifierName, "(org.capnproto.Capability.Server.internalGetTypedStreamingContext(\n"
|
||||||
" this.", identifierName, "(org.capnproto.Capability.Server.typedContext(\n"
|
" ", paramFactory, ", context)));\n")
|
||||||
" ", genericParamType, ".factory,\n",
|
|
||||||
" ", genericResultType, ".factory, context)));\n")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return MethodText {
|
||||||
|
|
||||||
|
kj::strTree(
|
||||||
|
" public org.capnproto.Request<", shortParamType, ".Builder, ", shortResultType, ".Reader> ", methodName, "Request() {\n",
|
||||||
|
" return newCall(", paramFactory, ", ", resultFactory, ", 0x", interfaceIdHex, "L, (short)", methodId, ");\n"
|
||||||
|
" }\n"),
|
||||||
|
|
||||||
|
kj::strTree(
|
||||||
|
" protected java.util.concurrent.CompletableFuture<?> ", identifierName, "(org.capnproto.CallContext<", shortParamType, ".Reader, ", shortResultType, ".Builder> context) {\n"
|
||||||
|
" return org.capnproto.Capability.Server.internalUnimplemented(\n"
|
||||||
|
" \"", interfaceProto.getDisplayName(), "\", \"", methodName, "\",\n"
|
||||||
|
" 0x", interfaceIdHex, "L, (short)", methodId, ");\n"
|
||||||
|
" }\n\n"),
|
||||||
|
|
||||||
|
kj::strTree(
|
||||||
|
" case ", methodId, ":\n",
|
||||||
|
" return org.capnproto.Capability.Server.result (\n",
|
||||||
|
" this.", identifierName, "(org.capnproto.Capability.Server.internalGetTypedContext(\n"
|
||||||
|
" ", paramFactory, ", ", resultFactory, ", context)));\n")
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
|
|
|
@ -4,9 +4,9 @@ import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class CallContext<Params, Results> {
|
public class CallContext<Params, Results> {
|
||||||
|
|
||||||
final CallContextHook hook;
|
|
||||||
private final FromPointerReader<Params> params;
|
private final FromPointerReader<Params> params;
|
||||||
private final FromPointerBuilder<Results> results;
|
private final FromPointerBuilder<Results> results;
|
||||||
|
final CallContextHook hook;
|
||||||
|
|
||||||
public CallContext(FromPointerReader<Params> params,
|
public CallContext(FromPointerReader<Params> params,
|
||||||
FromPointerBuilder<Results> results,
|
FromPointerBuilder<Results> results,
|
||||||
|
|
|
@ -82,7 +82,13 @@ public final class Capability {
|
||||||
FromPointerReader<U> reader,
|
FromPointerReader<U> reader,
|
||||||
long interfaceId, short methodId) {
|
long interfaceId, short methodId) {
|
||||||
var request = hook.newCall(interfaceId, methodId);
|
var request = hook.newCall(interfaceId, methodId);
|
||||||
return new Request<T, U> (builder, reader, request.params, request.hook);
|
return new Request<> (builder, reader, request.params, request.hook);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected <T> StreamingRequest<T> newStreamingCall(FromPointerBuilder<T> builder,
|
||||||
|
long interfaceId, short methodId) {
|
||||||
|
var request = hook.newCall(interfaceId, methodId);
|
||||||
|
return new StreamingRequest<> (builder, request.params, request.hook);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,13 +189,19 @@ public final class Capability {
|
||||||
return new Client(this.hook);
|
return new Client(this.hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static <Params, Results> CallContext<Params, Results> typedContext(
|
protected static <Params, Results> CallContext<Params, Results> internalGetTypedContext(
|
||||||
FromPointerReader<Params> paramsFactory,
|
FromPointerReader<Params> paramsFactory,
|
||||||
FromPointerBuilder<Results> resultsFactory,
|
FromPointerBuilder<Results> resultsFactory,
|
||||||
CallContext<AnyPointer.Reader, AnyPointer.Builder> typeless) {
|
CallContext<AnyPointer.Reader, AnyPointer.Builder> typeless) {
|
||||||
return new CallContext<>(paramsFactory, resultsFactory, typeless.hook);
|
return new CallContext<>(paramsFactory, resultsFactory, typeless.hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static <Params> StreamingCallContext<Params> internalGetTypedStreamingContext(
|
||||||
|
FromPointerReader<Params> paramsFactory,
|
||||||
|
CallContext<AnyPointer.Reader, AnyPointer.Builder> typeless) {
|
||||||
|
return new StreamingCallContext<>(paramsFactory, typeless.hook);
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract DispatchCallResult dispatchCall(
|
protected abstract DispatchCallResult dispatchCall(
|
||||||
long interfaceId, short methodId,
|
long interfaceId, short methodId,
|
||||||
CallContext<AnyPointer.Reader, AnyPointer.Builder> context);
|
CallContext<AnyPointer.Reader, AnyPointer.Builder> context);
|
||||||
|
@ -258,6 +270,13 @@ public final class Capability {
|
||||||
return new RemotePromise<AnyPointer.Reader>(promise, promiseAndPipeline.pipeline);
|
return new RemotePromise<AnyPointer.Reader>(promise, promiseAndPipeline.pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<?> sendStreaming() {
|
||||||
|
// We don't do any special handling of streaming in RequestHook for local requests, because
|
||||||
|
// there is no latency to compensate for between the client and server in this case.
|
||||||
|
return send().ignoreResult();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getBrand() {
|
public Object getBrand() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -16,6 +16,11 @@ class RemotePromise<Results> {
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CompletableFuture<?> ignoreResult() {
|
||||||
|
return this.response.thenCompose(
|
||||||
|
result -> CompletableFuture.completedFuture(null));
|
||||||
|
}
|
||||||
|
|
||||||
public PipelineHook getHook() {
|
public PipelineHook getHook() {
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,8 @@ public class Request<Params, Results> {
|
||||||
CompletableFuture<Results> send() {
|
CompletableFuture<Results> send() {
|
||||||
var typelessPromise = hook.send();
|
var typelessPromise = hook.send();
|
||||||
hook = null; // prevent reuse
|
hook = null; // prevent reuse
|
||||||
return typelessPromise.getResponse().thenApply(response -> {
|
return typelessPromise.getResponse().thenApply(
|
||||||
return response.getAs(resultsReader);
|
response -> response.getAs(resultsReader));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static <T, U> Request<T, U> newBrokenRequest(Throwable exc) {
|
static <T, U> Request<T, U> newBrokenRequest(Throwable exc) {
|
||||||
|
@ -39,6 +38,11 @@ public class Request<Params, Results> {
|
||||||
return new RemotePromise<>(CompletableFuture.failedFuture(exc), null);
|
return new RemotePromise<>(CompletableFuture.failedFuture(exc), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompletableFuture<?> sendStreaming() {
|
||||||
|
return CompletableFuture.failedFuture(exc);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getBrand() {
|
public Object getBrand() {
|
||||||
return null;
|
return null;
|
||||||
|
@ -59,4 +63,3 @@ public class Request<Params, Results> {
|
||||||
return new Request<>(params, results, typeless.params(), typeless.hook);
|
return new Request<>(params, results, typeless.params(), typeless.hook);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package org.capnproto;
|
package org.capnproto;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
interface RequestHook {
|
interface RequestHook {
|
||||||
RemotePromise<AnyPointer.Reader> send();
|
RemotePromise<AnyPointer.Reader> send();
|
||||||
|
CompletableFuture<?> sendStreaming();
|
||||||
Object getBrand();
|
Object getBrand();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.capnproto;
|
||||||
|
|
||||||
|
public class StreamingCallContext<Params> {
|
||||||
|
|
||||||
|
private final FromPointerReader<Params> params;
|
||||||
|
final CallContextHook hook;
|
||||||
|
|
||||||
|
public StreamingCallContext(FromPointerReader<Params> params,
|
||||||
|
CallContextHook hook) {
|
||||||
|
this.params = params;
|
||||||
|
this.hook = hook;
|
||||||
|
}
|
||||||
|
}
|
25
runtime/src/main/java/org/capnproto/StreamingRequest.java
Normal file
25
runtime/src/main/java/org/capnproto/StreamingRequest.java
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
package org.capnproto;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
public class StreamingRequest<Params> {
|
||||||
|
|
||||||
|
private final FromPointerBuilder<Params> paramsBuilder;
|
||||||
|
AnyPointer.Builder params;
|
||||||
|
RequestHook hook;
|
||||||
|
|
||||||
|
StreamingRequest(FromPointerBuilder<Params> paramsBuilder,
|
||||||
|
AnyPointer.Builder params, RequestHook hook) {
|
||||||
|
this.paramsBuilder = paramsBuilder;
|
||||||
|
this.params = params;
|
||||||
|
this.hook = hook;
|
||||||
|
}
|
||||||
|
|
||||||
|
CompletableFuture<?> send() {
|
||||||
|
var promise = hook.sendStreaming();
|
||||||
|
hook = null; // prevent reuse
|
||||||
|
return promise;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.capnproto;
|
package org.capnproto;
|
||||||
|
|
||||||
import org.capnproto.demo.Demo;
|
import org.capnproto.demo.Demo;
|
||||||
import org.capnproto.demo.DemoFoo;
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -44,9 +43,9 @@ class TestCap0 {
|
||||||
DispatchCallResult dispatchCallInternal(short methodId, CallContext<AnyPointer.Reader, AnyPointer.Builder> ctx) {
|
DispatchCallResult dispatchCallInternal(short methodId, CallContext<AnyPointer.Reader, AnyPointer.Builder> ctx) {
|
||||||
switch (methodId) {
|
switch (methodId) {
|
||||||
case 0:
|
case 0:
|
||||||
return result(testMethod0(typedContext(Demo.TestParams0.factory, Demo.TestResults0.factory, ctx)));
|
return result(testMethod0(internalGetTypedContext(Demo.TestParams0.factory, Demo.TestResults0.factory, ctx)));
|
||||||
case 1:
|
case 1:
|
||||||
return result(testMethod1(typedContext(Demo.TestParams1.factory, Demo.TestResults1.factory, ctx)));
|
return result(testMethod1(internalGetTypedContext(Demo.TestParams1.factory, Demo.TestResults1.factory, ctx)));
|
||||||
default:
|
default:
|
||||||
return result(internalUnimplemented(Demo.class.getName(), 0xa27d3c231c7b9202L, methodId));
|
return result(internalUnimplemented(Demo.class.getName(), 0xa27d3c231c7b9202L, methodId));
|
||||||
}
|
}
|
||||||
|
@ -194,10 +193,6 @@ public class TwoPartyTest {
|
||||||
Assert.assertFalse(cap1.isNull());
|
Assert.assertFalse(cap1.isNull());
|
||||||
var cap2 = results.getResult2();
|
var cap2 = results.getResult2();
|
||||||
Assert.assertFalse(cap2.isNull());
|
Assert.assertFalse(cap2.isNull());
|
||||||
|
|
||||||
var cap3 = results.getResult2().getAs(Demo.Iface0.factory);
|
|
||||||
Assert.assertFalse(cap2.isNull());
|
|
||||||
//Assert.assertFalse(cap2.hook.isError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -328,6 +328,13 @@ public final class Demo {
|
||||||
public Client(java.util.concurrent.CompletableFuture<org.capnproto.ClientHook> promise) {
|
public Client(java.util.concurrent.CompletableFuture<org.capnproto.ClientHook> promise) {
|
||||||
super(promise);
|
super(promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public org.capnproto.Request<Method0Params.Builder, Method0Results.Reader> method0Request() {
|
||||||
|
return newCall(Method0Params.factory, Method0Results.factory, 0xac6d126c2fac16ebL, (short)0);
|
||||||
|
}
|
||||||
|
public org.capnproto.StreamingRequest<Method1Params.Builder> method1Request() {
|
||||||
|
return newStreamingCall(Method1Params.factory, 0xac6d126c2fac16ebL, (short)1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static abstract class Server extends org.capnproto.Capability.Server {
|
public static abstract class Server extends org.capnproto.Capability.Server {
|
||||||
protected org.capnproto.DispatchCallResult dispatchCall(
|
protected org.capnproto.DispatchCallResult dispatchCall(
|
||||||
|
@ -342,14 +349,154 @@ public final class Demo {
|
||||||
|
|
||||||
protected org.capnproto.DispatchCallResult dispatchCallInternal(short methodId, org.capnproto.CallContext<org.capnproto.AnyPointer.Reader, org.capnproto.AnyPointer.Builder> context) {
|
protected org.capnproto.DispatchCallResult dispatchCallInternal(short methodId, org.capnproto.CallContext<org.capnproto.AnyPointer.Reader, org.capnproto.AnyPointer.Builder> context) {
|
||||||
switch (methodId) {
|
switch (methodId) {
|
||||||
|
case 0:
|
||||||
|
return org.capnproto.Capability.Server.result (
|
||||||
|
this.method0(org.capnproto.Capability.Server.internalGetTypedContext(
|
||||||
|
Method0Params.factory, Method0Results.factory, context)));
|
||||||
|
case 1:
|
||||||
|
return org.capnproto.Capability.Server.streamResult(
|
||||||
|
this.method1(org.capnproto.Capability.Server.internalGetTypedStreamingContext(
|
||||||
|
Method1Params.factory, context)));
|
||||||
default:
|
default:
|
||||||
return org.capnproto.Capability.Server.result(
|
return org.capnproto.Capability.Server.result(
|
||||||
org.capnproto.Capability.Server.internalUnimplemented("Iface0", 0xac6d126c2fac16ebL, methodId));
|
org.capnproto.Capability.Server.internalUnimplemented("Iface0", 0xac6d126c2fac16ebL, methodId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected java.util.concurrent.CompletableFuture<?> method0(org.capnproto.CallContext<Method0Params.Reader, Method0Results.Builder> context) {
|
||||||
|
return org.capnproto.Capability.Server.internalUnimplemented(
|
||||||
|
"runtime/src/test/java/org/capnproto/demo/demo.capnp:Iface0", "method0",
|
||||||
|
0xac6d126c2fac16ebL, (short)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected java.util.concurrent.CompletableFuture<?> method1(org.capnproto.StreamingCallContext<Method1Params.Reader> context) {
|
||||||
|
return org.capnproto.Capability.Server.internalUnimplemented(
|
||||||
|
"runtime/src/test/java/org/capnproto/demo/demo.capnp:Iface0", "method1",
|
||||||
|
0xac6d126c2fac16ebL, (short)1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Method0Params {
|
||||||
|
public static final org.capnproto.StructSize STRUCT_SIZE = new org.capnproto.StructSize((short)0,(short)0);
|
||||||
|
public static final class Factory extends org.capnproto.StructFactory<Builder, Reader> {
|
||||||
|
public Factory() {
|
||||||
|
}
|
||||||
|
public final Reader constructReader(org.capnproto.SegmentReader segment, int data,int pointers, int dataSize, short pointerCount, int nestingLimit) {
|
||||||
|
return new Reader(segment,data,pointers,dataSize,pointerCount,nestingLimit);
|
||||||
|
}
|
||||||
|
public final Builder constructBuilder(org.capnproto.SegmentBuilder segment, int data,int pointers, int dataSize, short pointerCount) {
|
||||||
|
return new Builder(segment, data, pointers, dataSize, pointerCount);
|
||||||
|
}
|
||||||
|
public final org.capnproto.StructSize structSize() {
|
||||||
|
return Iface0.Method0Params.STRUCT_SIZE;
|
||||||
|
}
|
||||||
|
public final Reader asReader(Builder builder) {
|
||||||
|
return builder.asReader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final Factory factory = new Factory();
|
||||||
|
public static final org.capnproto.StructList.Factory<Builder,Reader> listFactory =
|
||||||
|
new org.capnproto.StructList.Factory<Builder, Reader>(factory);
|
||||||
|
public static final class Builder extends org.capnproto.StructBuilder {
|
||||||
|
Builder(org.capnproto.SegmentBuilder segment, int data, int pointers,int dataSize, short pointerCount){
|
||||||
|
super(segment, data, pointers, dataSize, pointerCount);
|
||||||
|
}
|
||||||
|
public final Reader asReader() {
|
||||||
|
return new Reader(segment, data, pointers, dataSize, pointerCount, 0x7fffffff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class Reader extends org.capnproto.StructReader {
|
||||||
|
Reader(org.capnproto.SegmentReader segment, int data, int pointers,int dataSize, short pointerCount, int nestingLimit){
|
||||||
|
super(segment, data, pointers, dataSize, pointerCount, nestingLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class Method0Results {
|
||||||
|
public static final org.capnproto.StructSize STRUCT_SIZE = new org.capnproto.StructSize((short)0,(short)0);
|
||||||
|
public static final class Factory extends org.capnproto.StructFactory<Builder, Reader> {
|
||||||
|
public Factory() {
|
||||||
|
}
|
||||||
|
public final Reader constructReader(org.capnproto.SegmentReader segment, int data,int pointers, int dataSize, short pointerCount, int nestingLimit) {
|
||||||
|
return new Reader(segment,data,pointers,dataSize,pointerCount,nestingLimit);
|
||||||
|
}
|
||||||
|
public final Builder constructBuilder(org.capnproto.SegmentBuilder segment, int data,int pointers, int dataSize, short pointerCount) {
|
||||||
|
return new Builder(segment, data, pointers, dataSize, pointerCount);
|
||||||
|
}
|
||||||
|
public final org.capnproto.StructSize structSize() {
|
||||||
|
return Iface0.Method0Results.STRUCT_SIZE;
|
||||||
|
}
|
||||||
|
public final Reader asReader(Builder builder) {
|
||||||
|
return builder.asReader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final Factory factory = new Factory();
|
||||||
|
public static final org.capnproto.StructList.Factory<Builder,Reader> listFactory =
|
||||||
|
new org.capnproto.StructList.Factory<Builder, Reader>(factory);
|
||||||
|
public static final class Builder extends org.capnproto.StructBuilder {
|
||||||
|
Builder(org.capnproto.SegmentBuilder segment, int data, int pointers,int dataSize, short pointerCount){
|
||||||
|
super(segment, data, pointers, dataSize, pointerCount);
|
||||||
|
}
|
||||||
|
public final Reader asReader() {
|
||||||
|
return new Reader(segment, data, pointers, dataSize, pointerCount, 0x7fffffff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class Reader extends org.capnproto.StructReader {
|
||||||
|
Reader(org.capnproto.SegmentReader segment, int data, int pointers,int dataSize, short pointerCount, int nestingLimit){
|
||||||
|
super(segment, data, pointers, dataSize, pointerCount, nestingLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class Method1Params {
|
||||||
|
public static final org.capnproto.StructSize STRUCT_SIZE = new org.capnproto.StructSize((short)0,(short)0);
|
||||||
|
public static final class Factory extends org.capnproto.StructFactory<Builder, Reader> {
|
||||||
|
public Factory() {
|
||||||
|
}
|
||||||
|
public final Reader constructReader(org.capnproto.SegmentReader segment, int data,int pointers, int dataSize, short pointerCount, int nestingLimit) {
|
||||||
|
return new Reader(segment,data,pointers,dataSize,pointerCount,nestingLimit);
|
||||||
|
}
|
||||||
|
public final Builder constructBuilder(org.capnproto.SegmentBuilder segment, int data,int pointers, int dataSize, short pointerCount) {
|
||||||
|
return new Builder(segment, data, pointers, dataSize, pointerCount);
|
||||||
|
}
|
||||||
|
public final org.capnproto.StructSize structSize() {
|
||||||
|
return Iface0.Method1Params.STRUCT_SIZE;
|
||||||
|
}
|
||||||
|
public final Reader asReader(Builder builder) {
|
||||||
|
return builder.asReader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final Factory factory = new Factory();
|
||||||
|
public static final org.capnproto.StructList.Factory<Builder,Reader> listFactory =
|
||||||
|
new org.capnproto.StructList.Factory<Builder, Reader>(factory);
|
||||||
|
public static final class Builder extends org.capnproto.StructBuilder {
|
||||||
|
Builder(org.capnproto.SegmentBuilder segment, int data, int pointers,int dataSize, short pointerCount){
|
||||||
|
super(segment, data, pointers, dataSize, pointerCount);
|
||||||
|
}
|
||||||
|
public final Reader asReader() {
|
||||||
|
return new Reader(segment, data, pointers, dataSize, pointerCount, 0x7fffffff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class Reader extends org.capnproto.StructReader {
|
||||||
|
Reader(org.capnproto.SegmentReader segment, int data, int pointers,int dataSize, short pointerCount, int nestingLimit){
|
||||||
|
super(segment, data, pointers, dataSize, pointerCount, nestingLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,6 +590,13 @@ public final class Demo {
|
||||||
public Client(java.util.concurrent.CompletableFuture<org.capnproto.ClientHook> promise) {
|
public Client(java.util.concurrent.CompletableFuture<org.capnproto.ClientHook> promise) {
|
||||||
super(promise);
|
super(promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public org.capnproto.Request<Method0Params.Builder, Method0Results.Reader> method0Request() {
|
||||||
|
return newCall(Method0Params.factory, Method0Results.factory, 0xd52dcf38c9f6f7c0L, (short)0);
|
||||||
|
}
|
||||||
|
public org.capnproto.Request<Method1Params.Builder, Method1Results.Reader> method1Request() {
|
||||||
|
return newCall(Method1Params.factory, Method1Results.factory, 0xd52dcf38c9f6f7c0L, (short)1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static abstract class Server extends org.capnproto.Capability.Server {
|
public static abstract class Server extends org.capnproto.Capability.Server {
|
||||||
protected org.capnproto.DispatchCallResult dispatchCall(
|
protected org.capnproto.DispatchCallResult dispatchCall(
|
||||||
|
@ -458,15 +612,13 @@ public final class Demo {
|
||||||
protected org.capnproto.DispatchCallResult dispatchCallInternal(short methodId, org.capnproto.CallContext<org.capnproto.AnyPointer.Reader, org.capnproto.AnyPointer.Builder> context) {
|
protected org.capnproto.DispatchCallResult dispatchCallInternal(short methodId, org.capnproto.CallContext<org.capnproto.AnyPointer.Reader, org.capnproto.AnyPointer.Builder> context) {
|
||||||
switch (methodId) {
|
switch (methodId) {
|
||||||
case 0:
|
case 0:
|
||||||
return org.capnproto.Capability.Server.result(
|
return org.capnproto.Capability.Server.result (
|
||||||
this.method0(org.capnproto.Capability.Server.typedContext(
|
this.method0(org.capnproto.Capability.Server.internalGetTypedContext(
|
||||||
Method0Params.factory,
|
Method0Params.factory, Method0Results.factory, context)));
|
||||||
Method0Results.factory, context)));
|
|
||||||
case 1:
|
case 1:
|
||||||
return org.capnproto.Capability.Server.result(
|
return org.capnproto.Capability.Server.result (
|
||||||
this.method1(org.capnproto.Capability.Server.typedContext(
|
this.method1(org.capnproto.Capability.Server.internalGetTypedContext(
|
||||||
Method1Params.factory,
|
Method1Params.factory, Method1Results.factory, context)));
|
||||||
Method1Results.factory, context)));
|
|
||||||
default:
|
default:
|
||||||
return org.capnproto.Capability.Server.result(
|
return org.capnproto.Capability.Server.result(
|
||||||
org.capnproto.Capability.Server.internalUnimplemented("Iface1", 0xd52dcf38c9f6f7c0L, methodId));
|
org.capnproto.Capability.Server.internalUnimplemented("Iface1", 0xd52dcf38c9f6f7c0L, methodId));
|
||||||
|
@ -1008,8 +1160,8 @@ public static final org.capnproto.SegmentReader b_ac6d126c2fac16eb =
|
||||||
"\u0015\u0000\u0000\u0000\u00da\u0001\u0000\u0000" +
|
"\u0015\u0000\u0000\u0000\u00da\u0001\u0000\u0000" +
|
||||||
"\u0031\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
"\u0031\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
||||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
"\u002d\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
"\u002d\u0000\u0000\u0000\u0087\u0000\u0000\u0000" +
|
||||||
"\u002d\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
"\u007d\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
||||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
"\u0072\u0075\u006e\u0074\u0069\u006d\u0065\u002f" +
|
"\u0072\u0075\u006e\u0074\u0069\u006d\u0065\u002f" +
|
||||||
"\u0073\u0072\u0063\u002f\u0074\u0065\u0073\u0074" +
|
"\u0073\u0072\u0063\u002f\u0074\u0065\u0073\u0074" +
|
||||||
|
@ -1020,8 +1172,100 @@ public static final org.capnproto.SegmentReader b_ac6d126c2fac16eb =
|
||||||
"\u0070\u006e\u0070\u003a\u0049\u0066\u0061\u0063" +
|
"\u0070\u006e\u0070\u003a\u0049\u0066\u0061\u0063" +
|
||||||
"\u0065\u0030\u0000\u0000\u0000\u0000\u0000\u0000" +
|
"\u0065\u0030\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
"\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000" +
|
"\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000" +
|
||||||
"\u0000\u0000\u0000\u0000\u0003\u0000\u0005\u0000" +
|
"\u0008\u0000\u0000\u0000\u0003\u0000\u0005\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u004b\u0029\u0076\u00aa\u00ed\u0077\u008d\u00bc" +
|
||||||
|
"\u003e\u0067\u0084\u00a6\u004a\u00e2\u0044\u00f7" +
|
||||||
|
"\u0031\u0000\u0000\u0000\u0042\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0025\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
||||||
|
"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0024\u00f3\u0034\u00d2\u0078\u005b\u00c2\u00c8" +
|
||||||
|
"\u006e\u00b1\u00c0\u0077\u0033\u009a\u005f\u0099" +
|
||||||
|
"\u0019\u0000\u0000\u0000\u0042\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\r\u0000\u0000\u0000\u0007\u0000\u0000\u0000" +
|
||||||
|
"\u006d\u0065\u0074\u0068\u006f\u0064\u0030\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0000" +
|
||||||
|
"\u006d\u0065\u0074\u0068\u006f\u0064\u0031\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0000" +
|
||||||
"\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000" + "");
|
"\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000" + "");
|
||||||
|
public static final org.capnproto.SegmentReader b_bc8d77edaa76294b =
|
||||||
|
org.capnproto.GeneratedClassSupport.decodeRawBytes(
|
||||||
|
"\u0000\u0000\u0000\u0000\u0005\u0000\u0006\u0000" +
|
||||||
|
"\u004b\u0029\u0076\u00aa\u00ed\u0077\u008d\u00bc" +
|
||||||
|
"\u003b\u0000\u0000\u0000\u0001\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0007\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0015\u0000\u0000\u0000\u0052\u0002\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0072\u0075\u006e\u0074\u0069\u006d\u0065\u002f" +
|
||||||
|
"\u0073\u0072\u0063\u002f\u0074\u0065\u0073\u0074" +
|
||||||
|
"\u002f\u006a\u0061\u0076\u0061\u002f\u006f\u0072" +
|
||||||
|
"\u0067\u002f\u0063\u0061\u0070\u006e\u0070\u0072" +
|
||||||
|
"\u006f\u0074\u006f\u002f\u0064\u0065\u006d\u006f" +
|
||||||
|
"\u002f\u0064\u0065\u006d\u006f\u002e\u0063\u0061" +
|
||||||
|
"\u0070\u006e\u0070\u003a\u0049\u0066\u0061\u0063" +
|
||||||
|
"\u0065\u0030\u002e\u006d\u0065\u0074\u0068\u006f" +
|
||||||
|
"\u0064\u0030\u0024\u0050\u0061\u0072\u0061\u006d" +
|
||||||
|
"\u0073\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + "");
|
||||||
|
public static final org.capnproto.SegmentReader b_f744e24aa684673e =
|
||||||
|
org.capnproto.GeneratedClassSupport.decodeRawBytes(
|
||||||
|
"\u0000\u0000\u0000\u0000\u0005\u0000\u0006\u0000" +
|
||||||
|
"\u003e\u0067\u0084\u00a6\u004a\u00e2\u0044\u00f7" +
|
||||||
|
"\u003b\u0000\u0000\u0000\u0001\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0007\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0015\u0000\u0000\u0000\u005a\u0002\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0072\u0075\u006e\u0074\u0069\u006d\u0065\u002f" +
|
||||||
|
"\u0073\u0072\u0063\u002f\u0074\u0065\u0073\u0074" +
|
||||||
|
"\u002f\u006a\u0061\u0076\u0061\u002f\u006f\u0072" +
|
||||||
|
"\u0067\u002f\u0063\u0061\u0070\u006e\u0070\u0072" +
|
||||||
|
"\u006f\u0074\u006f\u002f\u0064\u0065\u006d\u006f" +
|
||||||
|
"\u002f\u0064\u0065\u006d\u006f\u002e\u0063\u0061" +
|
||||||
|
"\u0070\u006e\u0070\u003a\u0049\u0066\u0061\u0063" +
|
||||||
|
"\u0065\u0030\u002e\u006d\u0065\u0074\u0068\u006f" +
|
||||||
|
"\u0064\u0030\u0024\u0052\u0065\u0073\u0075\u006c" +
|
||||||
|
"\u0074\u0073\u0000\u0000\u0000\u0000\u0000\u0000" + "");
|
||||||
|
public static final org.capnproto.SegmentReader b_c8c25b78d234f324 =
|
||||||
|
org.capnproto.GeneratedClassSupport.decodeRawBytes(
|
||||||
|
"\u0000\u0000\u0000\u0000\u0005\u0000\u0006\u0000" +
|
||||||
|
"\u0024\u00f3\u0034\u00d2\u0078\u005b\u00c2\u00c8" +
|
||||||
|
"\u003b\u0000\u0000\u0000\u0001\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0007\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0015\u0000\u0000\u0000\u0052\u0002\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
|
||||||
|
"\u0072\u0075\u006e\u0074\u0069\u006d\u0065\u002f" +
|
||||||
|
"\u0073\u0072\u0063\u002f\u0074\u0065\u0073\u0074" +
|
||||||
|
"\u002f\u006a\u0061\u0076\u0061\u002f\u006f\u0072" +
|
||||||
|
"\u0067\u002f\u0063\u0061\u0070\u006e\u0070\u0072" +
|
||||||
|
"\u006f\u0074\u006f\u002f\u0064\u0065\u006d\u006f" +
|
||||||
|
"\u002f\u0064\u0065\u006d\u006f\u002e\u0063\u0061" +
|
||||||
|
"\u0070\u006e\u0070\u003a\u0049\u0066\u0061\u0063" +
|
||||||
|
"\u0065\u0030\u002e\u006d\u0065\u0074\u0068\u006f" +
|
||||||
|
"\u0064\u0031\u0024\u0050\u0061\u0072\u0061\u006d" +
|
||||||
|
"\u0073\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + "");
|
||||||
public static final org.capnproto.SegmentReader b_a9395663e97ca3af =
|
public static final org.capnproto.SegmentReader b_a9395663e97ca3af =
|
||||||
org.capnproto.GeneratedClassSupport.decodeRawBytes(
|
org.capnproto.GeneratedClassSupport.decodeRawBytes(
|
||||||
"\u0000\u0000\u0000\u0000\u0005\u0000\u0006\u0000" +
|
"\u0000\u0000\u0000\u0000\u0005\u0000\u0006\u0000" +
|
||||||
|
|
|
@ -27,6 +27,8 @@ struct Struct0 {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Iface0 {
|
interface Iface0 {
|
||||||
|
method0 @0 ();
|
||||||
|
method1 @1 () -> stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Struct2 {
|
struct Struct2 {
|
||||||
|
|
|
@ -277,7 +277,7 @@ const ::capnp::_::RawSchema s_b1af51b6aef0e7bc = {
|
||||||
0, 1, i_b1af51b6aef0e7bc, nullptr, nullptr, { &s_b1af51b6aef0e7bc, nullptr, nullptr, 0, 0, nullptr }
|
0, 1, i_b1af51b6aef0e7bc, nullptr, nullptr, { &s_b1af51b6aef0e7bc, nullptr, nullptr, 0, 0, nullptr }
|
||||||
};
|
};
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
static const ::capnp::_::AlignedData<23> b_ac6d126c2fac16eb = {
|
static const ::capnp::_::AlignedData<43> b_ac6d126c2fac16eb = {
|
||||||
{ 0, 0, 0, 0, 5, 0, 6, 0,
|
{ 0, 0, 0, 0, 5, 0, 6, 0,
|
||||||
235, 22, 172, 47, 108, 18, 109, 172,
|
235, 22, 172, 47, 108, 18, 109, 172,
|
||||||
52, 0, 0, 0, 3, 0, 0, 0,
|
52, 0, 0, 0, 3, 0, 0, 0,
|
||||||
|
@ -287,8 +287,8 @@ static const ::capnp::_::AlignedData<23> b_ac6d126c2fac16eb = {
|
||||||
21, 0, 0, 0, 218, 1, 0, 0,
|
21, 0, 0, 0, 218, 1, 0, 0,
|
||||||
49, 0, 0, 0, 7, 0, 0, 0,
|
49, 0, 0, 0, 7, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
45, 0, 0, 0, 7, 0, 0, 0,
|
45, 0, 0, 0, 135, 0, 0, 0,
|
||||||
45, 0, 0, 0, 7, 0, 0, 0,
|
125, 0, 0, 0, 7, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
114, 117, 110, 116, 105, 109, 101, 47,
|
114, 117, 110, 116, 105, 109, 101, 47,
|
||||||
115, 114, 99, 47, 116, 101, 115, 116,
|
115, 114, 99, 47, 116, 101, 115, 116,
|
||||||
|
@ -299,14 +299,134 @@ static const ::capnp::_::AlignedData<23> b_ac6d126c2fac16eb = {
|
||||||
112, 110, 112, 58, 73, 102, 97, 99,
|
112, 110, 112, 58, 73, 102, 97, 99,
|
||||||
101, 48, 0, 0, 0, 0, 0, 0,
|
101, 48, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 1, 0, 1, 0,
|
0, 0, 0, 0, 1, 0, 1, 0,
|
||||||
0, 0, 0, 0, 3, 0, 5, 0,
|
8, 0, 0, 0, 3, 0, 5, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
75, 41, 118, 170, 237, 119, 141, 188,
|
||||||
|
62, 103, 132, 166, 74, 226, 68, 247,
|
||||||
|
49, 0, 0, 0, 66, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
37, 0, 0, 0, 7, 0, 0, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
36, 243, 52, 210, 120, 91, 194, 200,
|
||||||
|
110, 177, 192, 119, 51, 154, 95, 153,
|
||||||
|
25, 0, 0, 0, 66, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
13, 0, 0, 0, 7, 0, 0, 0,
|
||||||
|
109, 101, 116, 104, 111, 100, 48, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 1, 0,
|
||||||
|
109, 101, 116, 104, 111, 100, 49, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 1, 0,
|
||||||
0, 0, 0, 0, 1, 0, 1, 0, }
|
0, 0, 0, 0, 1, 0, 1, 0, }
|
||||||
};
|
};
|
||||||
::capnp::word const* const bp_ac6d126c2fac16eb = b_ac6d126c2fac16eb.words;
|
::capnp::word const* const bp_ac6d126c2fac16eb = b_ac6d126c2fac16eb.words;
|
||||||
#if !CAPNP_LITE
|
#if !CAPNP_LITE
|
||||||
|
static const ::capnp::_::RawSchema* const d_ac6d126c2fac16eb[] = {
|
||||||
|
&s_995f9a3377c0b16e,
|
||||||
|
&s_bc8d77edaa76294b,
|
||||||
|
&s_c8c25b78d234f324,
|
||||||
|
&s_f744e24aa684673e,
|
||||||
|
};
|
||||||
|
static const uint16_t m_ac6d126c2fac16eb[] = {0, 1};
|
||||||
const ::capnp::_::RawSchema s_ac6d126c2fac16eb = {
|
const ::capnp::_::RawSchema s_ac6d126c2fac16eb = {
|
||||||
0xac6d126c2fac16eb, b_ac6d126c2fac16eb.words, 23, nullptr, nullptr,
|
0xac6d126c2fac16eb, b_ac6d126c2fac16eb.words, 43, d_ac6d126c2fac16eb, m_ac6d126c2fac16eb,
|
||||||
0, 0, nullptr, nullptr, nullptr, { &s_ac6d126c2fac16eb, nullptr, nullptr, 0, 0, nullptr }
|
4, 2, nullptr, nullptr, nullptr, { &s_ac6d126c2fac16eb, nullptr, nullptr, 0, 0, nullptr }
|
||||||
|
};
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
static const ::capnp::_::AlignedData<22> b_bc8d77edaa76294b = {
|
||||||
|
{ 0, 0, 0, 0, 5, 0, 6, 0,
|
||||||
|
75, 41, 118, 170, 237, 119, 141, 188,
|
||||||
|
59, 0, 0, 0, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 7, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
21, 0, 0, 0, 82, 2, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
114, 117, 110, 116, 105, 109, 101, 47,
|
||||||
|
115, 114, 99, 47, 116, 101, 115, 116,
|
||||||
|
47, 106, 97, 118, 97, 47, 111, 114,
|
||||||
|
103, 47, 99, 97, 112, 110, 112, 114,
|
||||||
|
111, 116, 111, 47, 100, 101, 109, 111,
|
||||||
|
47, 100, 101, 109, 111, 46, 99, 97,
|
||||||
|
112, 110, 112, 58, 73, 102, 97, 99,
|
||||||
|
101, 48, 46, 109, 101, 116, 104, 111,
|
||||||
|
100, 48, 36, 80, 97, 114, 97, 109,
|
||||||
|
115, 0, 0, 0, 0, 0, 0, 0, }
|
||||||
|
};
|
||||||
|
::capnp::word const* const bp_bc8d77edaa76294b = b_bc8d77edaa76294b.words;
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
const ::capnp::_::RawSchema s_bc8d77edaa76294b = {
|
||||||
|
0xbc8d77edaa76294b, b_bc8d77edaa76294b.words, 22, nullptr, nullptr,
|
||||||
|
0, 0, nullptr, nullptr, nullptr, { &s_bc8d77edaa76294b, nullptr, nullptr, 0, 0, nullptr }
|
||||||
|
};
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
static const ::capnp::_::AlignedData<22> b_f744e24aa684673e = {
|
||||||
|
{ 0, 0, 0, 0, 5, 0, 6, 0,
|
||||||
|
62, 103, 132, 166, 74, 226, 68, 247,
|
||||||
|
59, 0, 0, 0, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 7, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
21, 0, 0, 0, 90, 2, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
114, 117, 110, 116, 105, 109, 101, 47,
|
||||||
|
115, 114, 99, 47, 116, 101, 115, 116,
|
||||||
|
47, 106, 97, 118, 97, 47, 111, 114,
|
||||||
|
103, 47, 99, 97, 112, 110, 112, 114,
|
||||||
|
111, 116, 111, 47, 100, 101, 109, 111,
|
||||||
|
47, 100, 101, 109, 111, 46, 99, 97,
|
||||||
|
112, 110, 112, 58, 73, 102, 97, 99,
|
||||||
|
101, 48, 46, 109, 101, 116, 104, 111,
|
||||||
|
100, 48, 36, 82, 101, 115, 117, 108,
|
||||||
|
116, 115, 0, 0, 0, 0, 0, 0, }
|
||||||
|
};
|
||||||
|
::capnp::word const* const bp_f744e24aa684673e = b_f744e24aa684673e.words;
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
const ::capnp::_::RawSchema s_f744e24aa684673e = {
|
||||||
|
0xf744e24aa684673e, b_f744e24aa684673e.words, 22, nullptr, nullptr,
|
||||||
|
0, 0, nullptr, nullptr, nullptr, { &s_f744e24aa684673e, nullptr, nullptr, 0, 0, nullptr }
|
||||||
|
};
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
static const ::capnp::_::AlignedData<22> b_c8c25b78d234f324 = {
|
||||||
|
{ 0, 0, 0, 0, 5, 0, 6, 0,
|
||||||
|
36, 243, 52, 210, 120, 91, 194, 200,
|
||||||
|
59, 0, 0, 0, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 7, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
21, 0, 0, 0, 82, 2, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
114, 117, 110, 116, 105, 109, 101, 47,
|
||||||
|
115, 114, 99, 47, 116, 101, 115, 116,
|
||||||
|
47, 106, 97, 118, 97, 47, 111, 114,
|
||||||
|
103, 47, 99, 97, 112, 110, 112, 114,
|
||||||
|
111, 116, 111, 47, 100, 101, 109, 111,
|
||||||
|
47, 100, 101, 109, 111, 46, 99, 97,
|
||||||
|
112, 110, 112, 58, 73, 102, 97, 99,
|
||||||
|
101, 48, 46, 109, 101, 116, 104, 111,
|
||||||
|
100, 49, 36, 80, 97, 114, 97, 109,
|
||||||
|
115, 0, 0, 0, 0, 0, 0, 0, }
|
||||||
|
};
|
||||||
|
::capnp::word const* const bp_c8c25b78d234f324 = b_c8c25b78d234f324.words;
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
const ::capnp::_::RawSchema s_c8c25b78d234f324 = {
|
||||||
|
0xc8c25b78d234f324, b_c8c25b78d234f324.words, 22, nullptr, nullptr,
|
||||||
|
0, 0, nullptr, nullptr, nullptr, { &s_c8c25b78d234f324, nullptr, nullptr, 0, 0, nullptr }
|
||||||
};
|
};
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
static const ::capnp::_::AlignedData<52> b_a9395663e97ca3af = {
|
static const ::capnp::_::AlignedData<52> b_a9395663e97ca3af = {
|
||||||
|
@ -730,6 +850,26 @@ constexpr ::capnp::_::RawSchema const* Struct0::_capnpPrivate::schema;
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
#if !CAPNP_LITE
|
#if !CAPNP_LITE
|
||||||
|
::capnp::Request< ::Iface0::Method0Params, ::Iface0::Method0Results>
|
||||||
|
Iface0::Client::method0Request(::kj::Maybe< ::capnp::MessageSize> sizeHint) {
|
||||||
|
return newCall< ::Iface0::Method0Params, ::Iface0::Method0Results>(
|
||||||
|
0xac6d126c2fac16ebull, 0, sizeHint);
|
||||||
|
}
|
||||||
|
::kj::Promise<void> Iface0::Server::method0(Method0Context) {
|
||||||
|
return ::capnp::Capability::Server::internalUnimplemented(
|
||||||
|
"runtime/src/test/java/org/capnproto/demo/demo.capnp:Iface0", "method0",
|
||||||
|
0xac6d126c2fac16ebull, 0);
|
||||||
|
}
|
||||||
|
::capnp::StreamingRequest< ::Iface0::Method1Params>
|
||||||
|
Iface0::Client::method1Request(::kj::Maybe< ::capnp::MessageSize> sizeHint) {
|
||||||
|
return newStreamingCall< ::Iface0::Method1Params>(
|
||||||
|
0xac6d126c2fac16ebull, 1, sizeHint);
|
||||||
|
}
|
||||||
|
::kj::Promise<void> Iface0::Server::method1(Method1Context) {
|
||||||
|
return ::capnp::Capability::Server::internalUnimplemented(
|
||||||
|
"runtime/src/test/java/org/capnproto/demo/demo.capnp:Iface0", "method1",
|
||||||
|
0xac6d126c2fac16ebull, 1);
|
||||||
|
}
|
||||||
::capnp::Capability::Server::DispatchCallResult Iface0::Server::dispatchCall(
|
::capnp::Capability::Server::DispatchCallResult Iface0::Server::dispatchCall(
|
||||||
uint64_t interfaceId, uint16_t methodId,
|
uint64_t interfaceId, uint16_t methodId,
|
||||||
::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) {
|
::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) {
|
||||||
|
@ -744,6 +884,20 @@ constexpr ::capnp::_::RawSchema const* Struct0::_capnpPrivate::schema;
|
||||||
uint16_t methodId,
|
uint16_t methodId,
|
||||||
::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) {
|
::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) {
|
||||||
switch (methodId) {
|
switch (methodId) {
|
||||||
|
case 0:
|
||||||
|
return {
|
||||||
|
method0(::capnp::Capability::Server::internalGetTypedContext<
|
||||||
|
::Iface0::Method0Params, ::Iface0::Method0Results>(context)),
|
||||||
|
false
|
||||||
|
};
|
||||||
|
case 1:
|
||||||
|
return {
|
||||||
|
kj::evalNow([&]() {
|
||||||
|
return method1(::capnp::Capability::Server::internalGetTypedStreamingContext<
|
||||||
|
::Iface0::Method1Params>(context));
|
||||||
|
}),
|
||||||
|
true
|
||||||
|
};
|
||||||
default:
|
default:
|
||||||
(void)context;
|
(void)context;
|
||||||
return ::capnp::Capability::Server::internalUnimplemented(
|
return ::capnp::Capability::Server::internalUnimplemented(
|
||||||
|
@ -759,6 +913,30 @@ constexpr ::capnp::Kind Iface0::_capnpPrivate::kind;
|
||||||
constexpr ::capnp::_::RawSchema const* Iface0::_capnpPrivate::schema;
|
constexpr ::capnp::_::RawSchema const* Iface0::_capnpPrivate::schema;
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
// Iface0::Method0Params
|
||||||
|
constexpr uint16_t Iface0::Method0Params::_capnpPrivate::dataWordSize;
|
||||||
|
constexpr uint16_t Iface0::Method0Params::_capnpPrivate::pointerCount;
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
constexpr ::capnp::Kind Iface0::Method0Params::_capnpPrivate::kind;
|
||||||
|
constexpr ::capnp::_::RawSchema const* Iface0::Method0Params::_capnpPrivate::schema;
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
// Iface0::Method0Results
|
||||||
|
constexpr uint16_t Iface0::Method0Results::_capnpPrivate::dataWordSize;
|
||||||
|
constexpr uint16_t Iface0::Method0Results::_capnpPrivate::pointerCount;
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
constexpr ::capnp::Kind Iface0::Method0Results::_capnpPrivate::kind;
|
||||||
|
constexpr ::capnp::_::RawSchema const* Iface0::Method0Results::_capnpPrivate::schema;
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
// Iface0::Method1Params
|
||||||
|
constexpr uint16_t Iface0::Method1Params::_capnpPrivate::dataWordSize;
|
||||||
|
constexpr uint16_t Iface0::Method1Params::_capnpPrivate::pointerCount;
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
constexpr ::capnp::Kind Iface0::Method1Params::_capnpPrivate::kind;
|
||||||
|
constexpr ::capnp::_::RawSchema const* Iface0::Method1Params::_capnpPrivate::schema;
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
// Struct2
|
// Struct2
|
||||||
constexpr uint16_t Struct2::_capnpPrivate::dataWordSize;
|
constexpr uint16_t Struct2::_capnpPrivate::dataWordSize;
|
||||||
constexpr uint16_t Struct2::_capnpPrivate::pointerCount;
|
constexpr uint16_t Struct2::_capnpPrivate::pointerCount;
|
||||||
|
|
|
@ -23,6 +23,9 @@ CAPNP_DECLARE_SCHEMA(b20f33e412339049);
|
||||||
CAPNP_DECLARE_SCHEMA(d1342392ab536963);
|
CAPNP_DECLARE_SCHEMA(d1342392ab536963);
|
||||||
CAPNP_DECLARE_SCHEMA(b1af51b6aef0e7bc);
|
CAPNP_DECLARE_SCHEMA(b1af51b6aef0e7bc);
|
||||||
CAPNP_DECLARE_SCHEMA(ac6d126c2fac16eb);
|
CAPNP_DECLARE_SCHEMA(ac6d126c2fac16eb);
|
||||||
|
CAPNP_DECLARE_SCHEMA(bc8d77edaa76294b);
|
||||||
|
CAPNP_DECLARE_SCHEMA(f744e24aa684673e);
|
||||||
|
CAPNP_DECLARE_SCHEMA(c8c25b78d234f324);
|
||||||
CAPNP_DECLARE_SCHEMA(a9395663e97ca3af);
|
CAPNP_DECLARE_SCHEMA(a9395663e97ca3af);
|
||||||
CAPNP_DECLARE_SCHEMA(d52dcf38c9f6f7c0);
|
CAPNP_DECLARE_SCHEMA(d52dcf38c9f6f7c0);
|
||||||
CAPNP_DECLARE_SCHEMA(800ca862fbfddd38);
|
CAPNP_DECLARE_SCHEMA(800ca862fbfddd38);
|
||||||
|
@ -118,6 +121,9 @@ struct Iface0 {
|
||||||
class Server;
|
class Server;
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
struct Method0Params;
|
||||||
|
struct Method0Results;
|
||||||
|
struct Method1Params;
|
||||||
|
|
||||||
#if !CAPNP_LITE
|
#if !CAPNP_LITE
|
||||||
struct _capnpPrivate {
|
struct _capnpPrivate {
|
||||||
|
@ -127,6 +133,51 @@ struct Iface0 {
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Iface0::Method0Params {
|
||||||
|
Method0Params() = delete;
|
||||||
|
|
||||||
|
class Reader;
|
||||||
|
class Builder;
|
||||||
|
class Pipeline;
|
||||||
|
|
||||||
|
struct _capnpPrivate {
|
||||||
|
CAPNP_DECLARE_STRUCT_HEADER(bc8d77edaa76294b, 0, 0)
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Iface0::Method0Results {
|
||||||
|
Method0Results() = delete;
|
||||||
|
|
||||||
|
class Reader;
|
||||||
|
class Builder;
|
||||||
|
class Pipeline;
|
||||||
|
|
||||||
|
struct _capnpPrivate {
|
||||||
|
CAPNP_DECLARE_STRUCT_HEADER(f744e24aa684673e, 0, 0)
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Iface0::Method1Params {
|
||||||
|
Method1Params() = delete;
|
||||||
|
|
||||||
|
class Reader;
|
||||||
|
class Builder;
|
||||||
|
class Pipeline;
|
||||||
|
|
||||||
|
struct _capnpPrivate {
|
||||||
|
CAPNP_DECLARE_STRUCT_HEADER(c8c25b78d234f324, 0, 0)
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
struct Struct2 {
|
struct Struct2 {
|
||||||
Struct2() = delete;
|
Struct2() = delete;
|
||||||
|
|
||||||
|
@ -658,6 +709,10 @@ public:
|
||||||
Client& operator=(Client& other);
|
Client& operator=(Client& other);
|
||||||
Client& operator=(Client&& other);
|
Client& operator=(Client&& other);
|
||||||
|
|
||||||
|
::capnp::Request< ::Iface0::Method0Params, ::Iface0::Method0Results> method0Request(
|
||||||
|
::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr);
|
||||||
|
::capnp::StreamingRequest< ::Iface0::Method1Params> method1Request(
|
||||||
|
::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Client() = default;
|
Client() = default;
|
||||||
|
@ -674,6 +729,13 @@ public:
|
||||||
override;
|
override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
typedef ::Iface0::Method0Params Method0Params;
|
||||||
|
typedef ::Iface0::Method0Results Method0Results;
|
||||||
|
typedef ::capnp::CallContext<Method0Params, Method0Results> Method0Context;
|
||||||
|
virtual ::kj::Promise<void> method0(Method0Context context);
|
||||||
|
typedef ::Iface0::Method1Params Method1Params;
|
||||||
|
typedef ::capnp::StreamingCallContext<Method1Params> Method1Context;
|
||||||
|
virtual ::kj::Promise<void> method1(Method1Context context);
|
||||||
|
|
||||||
inline ::Iface0::Client thisCap() {
|
inline ::Iface0::Client thisCap() {
|
||||||
return ::capnp::Capability::Server::thisCap()
|
return ::capnp::Capability::Server::thisCap()
|
||||||
|
@ -686,6 +748,219 @@ protected:
|
||||||
};
|
};
|
||||||
#endif // !CAPNP_LITE
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
class Iface0::Method0Params::Reader {
|
||||||
|
public:
|
||||||
|
typedef Method0Params Reads;
|
||||||
|
|
||||||
|
Reader() = default;
|
||||||
|
inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
|
||||||
|
|
||||||
|
inline ::capnp::MessageSize totalSize() const {
|
||||||
|
return _reader.totalSize().asPublic();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
inline ::kj::StringTree toString() const {
|
||||||
|
return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
|
||||||
|
}
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::_::StructReader _reader;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::_::PointerHelpers;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::List;
|
||||||
|
friend class ::capnp::MessageBuilder;
|
||||||
|
friend class ::capnp::Orphanage;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Iface0::Method0Params::Builder {
|
||||||
|
public:
|
||||||
|
typedef Method0Params Builds;
|
||||||
|
|
||||||
|
Builder() = delete; // Deleted to discourage incorrect usage.
|
||||||
|
// You can explicitly initialize to nullptr instead.
|
||||||
|
inline Builder(decltype(nullptr)) {}
|
||||||
|
inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
|
||||||
|
inline operator Reader() const { return Reader(_builder.asReader()); }
|
||||||
|
inline Reader asReader() const { return *this; }
|
||||||
|
|
||||||
|
inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
inline ::kj::StringTree toString() const { return asReader().toString(); }
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::_::StructBuilder _builder;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
friend class ::capnp::Orphanage;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::_::PointerHelpers;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
class Iface0::Method0Params::Pipeline {
|
||||||
|
public:
|
||||||
|
typedef Method0Params Pipelines;
|
||||||
|
|
||||||
|
inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
|
||||||
|
inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
|
||||||
|
: _typeless(kj::mv(typeless)) {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::AnyPointer::Pipeline _typeless;
|
||||||
|
friend class ::capnp::PipelineHook;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
};
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
class Iface0::Method0Results::Reader {
|
||||||
|
public:
|
||||||
|
typedef Method0Results Reads;
|
||||||
|
|
||||||
|
Reader() = default;
|
||||||
|
inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
|
||||||
|
|
||||||
|
inline ::capnp::MessageSize totalSize() const {
|
||||||
|
return _reader.totalSize().asPublic();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
inline ::kj::StringTree toString() const {
|
||||||
|
return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
|
||||||
|
}
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::_::StructReader _reader;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::_::PointerHelpers;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::List;
|
||||||
|
friend class ::capnp::MessageBuilder;
|
||||||
|
friend class ::capnp::Orphanage;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Iface0::Method0Results::Builder {
|
||||||
|
public:
|
||||||
|
typedef Method0Results Builds;
|
||||||
|
|
||||||
|
Builder() = delete; // Deleted to discourage incorrect usage.
|
||||||
|
// You can explicitly initialize to nullptr instead.
|
||||||
|
inline Builder(decltype(nullptr)) {}
|
||||||
|
inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
|
||||||
|
inline operator Reader() const { return Reader(_builder.asReader()); }
|
||||||
|
inline Reader asReader() const { return *this; }
|
||||||
|
|
||||||
|
inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
inline ::kj::StringTree toString() const { return asReader().toString(); }
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::_::StructBuilder _builder;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
friend class ::capnp::Orphanage;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::_::PointerHelpers;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
class Iface0::Method0Results::Pipeline {
|
||||||
|
public:
|
||||||
|
typedef Method0Results Pipelines;
|
||||||
|
|
||||||
|
inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
|
||||||
|
inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
|
||||||
|
: _typeless(kj::mv(typeless)) {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::AnyPointer::Pipeline _typeless;
|
||||||
|
friend class ::capnp::PipelineHook;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
};
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
class Iface0::Method1Params::Reader {
|
||||||
|
public:
|
||||||
|
typedef Method1Params Reads;
|
||||||
|
|
||||||
|
Reader() = default;
|
||||||
|
inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
|
||||||
|
|
||||||
|
inline ::capnp::MessageSize totalSize() const {
|
||||||
|
return _reader.totalSize().asPublic();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
inline ::kj::StringTree toString() const {
|
||||||
|
return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
|
||||||
|
}
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::_::StructReader _reader;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::_::PointerHelpers;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::List;
|
||||||
|
friend class ::capnp::MessageBuilder;
|
||||||
|
friend class ::capnp::Orphanage;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Iface0::Method1Params::Builder {
|
||||||
|
public:
|
||||||
|
typedef Method1Params Builds;
|
||||||
|
|
||||||
|
Builder() = delete; // Deleted to discourage incorrect usage.
|
||||||
|
// You can explicitly initialize to nullptr instead.
|
||||||
|
inline Builder(decltype(nullptr)) {}
|
||||||
|
inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
|
||||||
|
inline operator Reader() const { return Reader(_builder.asReader()); }
|
||||||
|
inline Reader asReader() const { return *this; }
|
||||||
|
|
||||||
|
inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
inline ::kj::StringTree toString() const { return asReader().toString(); }
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::_::StructBuilder _builder;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
friend class ::capnp::Orphanage;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::_::PointerHelpers;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !CAPNP_LITE
|
||||||
|
class Iface0::Method1Params::Pipeline {
|
||||||
|
public:
|
||||||
|
typedef Method1Params Pipelines;
|
||||||
|
|
||||||
|
inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
|
||||||
|
inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
|
||||||
|
: _typeless(kj::mv(typeless)) {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
::capnp::AnyPointer::Pipeline _typeless;
|
||||||
|
friend class ::capnp::PipelineHook;
|
||||||
|
template <typename, ::capnp::Kind>
|
||||||
|
friend struct ::capnp::ToDynamic_;
|
||||||
|
};
|
||||||
|
#endif // !CAPNP_LITE
|
||||||
|
|
||||||
class Struct2::Reader {
|
class Struct2::Reader {
|
||||||
public:
|
public:
|
||||||
typedef Struct2 Reads;
|
typedef Struct2 Reads;
|
||||||
|
|
Loading…
Reference in a new issue