Skip to main content

Crate rustorb_ffi

Crate rustorb_ffi 

Source
Expand description

Stable extern "C" ABI layer over the rustorb core.

The C++ binding (cpp/include/rustorb) and the Java binding (through the FFM API) are built on this crate; the Python binding uses PyO3 directly instead. The functions are declared, with the rules every caller follows (handles, errors, strings, the lifetime of streams), in include/rustorb/rustorb.h.

  • orb: ORB_init and the ORB operations.
  • object: object references, and invocations whose arguments and results the caller writes and reads in callbacks.
  • stream: the CDR streams the callbacks get. Their errors are sticky, so generated code does not check every call.
  • owned: input streams the caller owns after the call that made them (replies, the bytes a callback writes, the value of an any), for the portable streams of the Java mapping.
  • servant: servants implemented by the caller through a table of callbacks, and the replies they write.
  • poa: the POA, its manager and PortableServer::Current.
  • manager: servant managers and adapter activators implemented by the caller through tables of callbacks.
  • any: TypeCodes, and anys whose values the caller puts in and takes out through the same streams.
  • dynany: DynamicAny, its values going in and out as anys.
  • value: valuetypes on the streams (sharing, chunks, truncation), their TypeCodes and the registry of valuetypes the core reads.
  • pi: Portable Interceptors and IOP::Codec.
  • dii: the DII (rorb_request) and the DSI (rorb_server_request), their values going in and out as anys.

Modules§

any
rorb_typecode and rorb_any: TypeCodes and anys.
dii
The DII and the DSI (rorb_request, rorb_server_request) on the core’s DiiRequest and ServerRequest (docs/dii-dsi.md).
dynany
rorb_dynany: the core’s DynAny for the C++ and Java bindings.
local
Values of Exception::local (RORB_ADAPTER_ALREADY_EXISTS, …).
manager
Servant managers (ServantActivator, ServantLocator) and adapter activators implemented by the caller through a table of callbacks.
object
Object references (rorb_object is a boxed ObjectRef) and invocations.
orb
CORBA::ORB: rorb_orb is a boxed Orb.
owned
Input streams the caller owns, valid until rorb_in_release: the reply of rorb_object_invoke_stream, what a callback writes (rorb_in_new) and the value of an any (rorb_any_input). They are the streams of the portable stubs and of the streams Java’s create_input_stream returns.
pi
Portable Interceptors and IOP::Codec (docs/portable-interceptors.md).
poa
The POA (rorb_poa is a boxed Poa), its manager (rorb_poa_manager, a boxed PoaManager) and PortableServer::Current.
policy
ORB::create_policy, ORB::register_initial_reference and the policy overrides of object references, the calling thread and the ORB. Policies cross the ABI as a type and a value (PolicyValue::raw_value).
servant
Servants implemented in C (rorb_servant is a boxed Arc<FfiServant>) and the replies they write.
stream
rorb_out and rorb_in: the CDR streams given to callbacks.
value
Valuetypes on the rorb_out and rorb_in streams.

Structs§

Bytes
rorb_bytes.
Exception
rorb_exception.

Constants§

ABI_VERSION
The version of the ABI in the header (RORB_ABI_VERSION).
CALLBACK_FAILED
A callback failed and keeps its own error.
LOCAL_EXCEPTION
An exception of a local interface, named by Exception::local.
OK
Success.
SYSTEM_EXCEPTION
A system exception, in the Exception.
USER_EXCEPTION
A user exception, taken by the caller’s callback.

Functions§

rorb_abi_version
rorb_bytes_free⚠
rorb_exception_clear⚠

Type Aliases§

Status
rorb_status.