2014-02-13 22:08:26 -08:00
|
|
|
from .capnp.includes.capnp_cpp cimport Maybe, DynamicStruct, Request, PyPromise, VoidPromise, PyPromiseArray, RemotePromise, DynamicCapability, InterfaceSchema, EnumSchema, StructSchema, DynamicValue, Capability, RpcSystem, MessageBuilder, MessageReader, TwoPartyVatNetwork, PyRestorer, AnyPointer, DynamicStruct_Builder, WaitScope, AsyncIoContext, StringPtr, TaskSet
|
2013-12-08 17:27:59 -08:00
|
|
|
|
2014-01-15 22:43:19 -08:00
|
|
|
from .capnp.includes.schema_cpp cimport ByteArray
|
|
|
|
|
2013-12-08 17:27:59 -08:00
|
|
|
from non_circular cimport reraise_kj_exception
|
|
|
|
|
|
|
|
from cpython.ref cimport PyObject
|
|
|
|
|
2013-12-08 17:43:08 -08:00
|
|
|
cdef extern from "../helpers/fixMaybe.h":
|
2013-12-08 17:27:59 -08:00
|
|
|
EnumSchema.Enumerant fixMaybe(Maybe[EnumSchema.Enumerant]) except +reraise_kj_exception
|
2014-02-13 19:24:06 -08:00
|
|
|
StructSchema.Field fixMaybe(Maybe[StructSchema.Field]) except +reraise_kj_exception
|
2013-12-08 17:27:59 -08:00
|
|
|
|
2013-12-08 17:43:08 -08:00
|
|
|
cdef extern from "../helpers/capabilityHelper.h":
|
2013-12-08 17:27:59 -08:00
|
|
|
# PyPromise evalLater(EventLoop &, PyObject * func)
|
|
|
|
# PyPromise there(EventLoop & loop, PyPromise & promise, PyObject * func, PyObject * error_func)
|
|
|
|
PyPromise then(PyPromise & promise, PyObject * func, PyObject * error_func)
|
2013-12-10 22:57:21 -08:00
|
|
|
PyPromise then(RemotePromise & promise, PyObject * func, PyObject * error_func)
|
2013-12-08 17:27:59 -08:00
|
|
|
PyPromise then(VoidPromise & promise, PyObject * func, PyObject * error_func)
|
2013-12-10 22:57:21 -08:00
|
|
|
PyPromise then(PyPromiseArray & promise)
|
2013-12-08 17:27:59 -08:00
|
|
|
DynamicCapability.Client new_client(InterfaceSchema&, PyObject *)
|
|
|
|
DynamicValue.Reader new_server(InterfaceSchema&, PyObject *)
|
|
|
|
Capability.Client server_to_client(InterfaceSchema&, PyObject *)
|
|
|
|
PyPromise convert_to_pypromise(RemotePromise&)
|
2013-12-10 22:57:21 -08:00
|
|
|
PyPromise convert_to_pypromise(VoidPromise&)
|
|
|
|
VoidPromise convert_to_voidpromise(PyPromise&)
|
2013-12-08 17:27:59 -08:00
|
|
|
|
2013-12-08 17:43:08 -08:00
|
|
|
cdef extern from "../helpers/rpcHelper.h":
|
2013-12-08 17:27:59 -08:00
|
|
|
Capability.Client restoreHelper(RpcSystem&, MessageBuilder&)
|
|
|
|
Capability.Client restoreHelper(RpcSystem&, MessageReader&)
|
2013-12-09 19:18:54 -08:00
|
|
|
Capability.Client restoreHelper(RpcSystem&, AnyPointer.Reader&)
|
|
|
|
Capability.Client restoreHelper(RpcSystem&, AnyPointer.Builder&)
|
2013-12-08 17:27:59 -08:00
|
|
|
RpcSystem makeRpcClientWithRestorer(TwoPartyVatNetwork&, PyRestorer&)
|
2014-02-13 22:08:26 -08:00
|
|
|
PyPromise connectServer(TaskSet &, PyRestorer &, AsyncIoContext *, StringPtr)
|
2014-01-15 22:43:19 -08:00
|
|
|
|
|
|
|
cdef extern from "../helpers/serialize.h":
|
2014-02-13 22:08:26 -08:00
|
|
|
ByteArray messageToPackedBytes(MessageBuilder &)
|
|
|
|
|
|
|
|
cdef extern from "../helpers/asyncHelper.h":
|
|
|
|
void waitNeverDone(WaitScope&)
|