dksdk_ffi_c/cls_icallable.h

Functions

DKSDK_FFI_C_EXPORT const dksdk_ffi_uuid get_DKSDK_FFI_C_CLSID_ICallable()

The class identifier for ICallable.

DKSDK_FFI_C_EXPORT int dksdk_ffi_c_cls_icallable_register(struct dksdk_ffi *ffi)

Register the classes for ICallable in the DkSDK registry.

Parameters:

ffi -- [in] The FFI pointer from dksdk_ffi_host_create

DKSDK_FFI_C_EXPORT int dksdk_ffi_c_cls_icallable_unregister(struct dksdk_ffi *ffi)

Unregister the classes for ICallable from the DkSDK registry.

Parameters:

ffi -- [in] The FFI pointer from dksdk_ffi_host_create

DKSDK_FFI_C_EXPORT int dksdk_ffi_c_cls_icallable_call(struct dksdk_ffi *ffi, struct ComObject com_f, struct dksdk_ffi_c_cls_generic_call_ctx *ctx, struct dk_cls_capnp_args *args)

Call a callable object that has been encoded as a ComObject reference.

Parameters:
  • ffi -- [in] The FFI pointer from dksdk_ffi_host_create

  • com_f -- [in] The 2 x 128-bit binary object reference to the function that will be invoked. The com_f Cap n' Proto structure's data pointer will be resolved with capn_resolve before it is read.

  • ctx -- [in] Context for the call, including a message for a return value. The return value is an already initialized Cap n' Proto message. As an optimization the return value message may have one or more of its segments pre-allocated on the stack. Some messages may not let you exceed the capacity of pre-allocated segments; if so, you must return DKSDK_FFI_ERR_INVALID_STATE.

  • args -- [in] Cap n' Proto message whose root structure contains the arguments for the method.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT when ffi, ctx or args are NULL, or when com_f is not a valid ComObject

  • DKSDK_FFI_ERR_INVALID_STATE when there is not enough memory

Variables

static const char *DK_CLSNAME_ICallable = "DkSDK::FFI::C::ICallable"

The fully-qualified class name for ICallable.

static const char *DK_METHNAME_ICallable_dk_call = "dk_call"

The dk_call method of ICallable.