dksdk_ffi_c/schema.h

Functions

static inline int dksdk_ffi_uuid_at_capn_list8(capn_list8 l8, size_t idx, dksdk_ffi_uuid *uuid)

Gets the dksdk_ffi_uuid element in an array of dksdk_ffi_uuid which has been encoded as capn_list8 (a Cap n' Proto @Data blob).

Parameters:
  • l8 -- [in] The Cap n' Proto @Data blob

  • idx -- [in] The zero-based index of the dksdk_ffi_uuid element

  • uuid -- [out] The address of a struct dksdk_ffi_uuid that, if successful, will have its contents changed to the UUID element.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT if the uuid is NULL or the idx is out of range

  • DKSDK_FFI_ERR_INVALID_STATE if could not read the number of bytes in a UUID

static inline ComObject_ptr dksdk_ffi_c_write_ComObject(struct capn_segment *seg, const struct dksdk_ffi_c_schema_ComObject_parts parts)

Create CAPN_LIST (aka.

CAPN_DATA) for the OID and IID and return its pointer.

static inline int dksdk_ffi_c_read_ComObject_parts(capn_ptr ptr, struct dksdk_ffi_c_schema_ComObject_parts *parts)

Read the ComObject from the ComObject pointer.

Parameters:
  • ptr -- [in] The ComObject pointer

  • parts -- [out] The address of a struct dksdk_ffi_c_schema_ComObject_parts that, if successful, will have its contents changed to the new object's OID and IID.

static inline int dksdk_ffi_c_read_oid_iid_cls_closure_data(capn_ptr ptr, struct dksdk_ffi_c_cls_closure_data *closure_data)

Read OID + IID concatenated generic closure data from the ComObject pointer.

Parameters:
  • ptr -- [in] The ComObject pointer

  • closure_data -- [out] The address of a struct dksdk_ffi_c_cls_closure_data that, if successful, will have its contents changed to the new object's OID and IID.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT if closure_data is NULL

  • DKSDK_FFI_ERR_INVALID_STATE if the length of the Cap n' Proto Data blob is not exactly the length of an OID plus the length of an IID.

static inline int dksdk_ffi_c_read_oid_iid_cls_self_data(capn_ptr ptr, struct dksdk_ffi_c_cls_self_data *self_data)

Read OID + IID concatenated generic self data from the ComObject pointer.

Parameters:
  • ptr -- [in] The ComObject pointer

  • self_data -- [out] The address of a struct dksdk_ffi_c_cls_self_data that, if successful, will have its contents changed to the new object's OID and IID.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT if self_data is NULL

  • DKSDK_FFI_ERR_INVALID_STATE if the length of the Cap n' Proto Data blob is not exactly the length of an OID plus the length of an IID.

static inline int dksdk_ffi_c_GenericReturn_newObject_to_ComObject_parts(const struct GenericReturn *genericReturn, struct dksdk_ffi_c_schema_ComObject_parts *parts)

Converts a GenericReturn of type NewObject into a UUID.

Parameters:
  • genericReturn -- [in] The GenericReturn

  • parts -- [out] The address of a struct dksdk_ffi_c_schema_ComObject_parts that, if successful, will have its contents changed to the new object's OID and IID.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT if genericReturn or parts are NULL, or if genericReturn is not a NewObject.

static inline int dksdk_ffi_c_GenericReturn_newObject_to_oid_iid_cls_closure_data(const struct GenericReturn *genericReturn, struct dksdk_ffi_c_cls_closure_data *closure_data)

Converts a GenericReturn of type NewObject into closure data.

Parameters:
  • genericReturn -- [in] The GenericReturn

  • closure_data -- [out] The address of a struct dksdk_ffi_c_cls_closure_data that, if successful, will have its contents changed to the concatentation of the new object's OID and IID.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT if genericReturn or closure_data are NULL, or if genericReturn is not a NewObject.

  • DKSDK_FFI_ERR_INVALID_STATE if the length of the GenericReturn NewObject Data blob is not exactly the length of an OID plus the length of an IID.

static inline int dksdk_ffi_c_GenericReturn_newObject_to_oid_iid_cls_self_data(const struct GenericReturn *genericReturn, struct dksdk_ffi_c_cls_self_data *self_data)

Converts a GenericReturn of type NewObject into self data.

Parameters:
  • genericReturn -- [in] The GenericReturn

  • self_data -- [out] The address of a struct dksdk_ffi_c_cls_self_data that, if successful, will have its contents changed to the concatentation of the new object's OID and IID.

Returns:

  • DKSDK_FFI_OK on success

  • DKSDK_FFI_ERR_INVALID_ARGUMENT if genericReturn or self_data are NULL, or if genericReturn is not a NewObject.

  • DKSDK_FFI_ERR_INVALID_STATE if the length of the GenericReturn NewObject Data blob is not exactly the length of an OID plus the length of an IID.

struct dksdk_ffi_c_schema_ComObject_parts
#include <schema.h>

The OID and IID parts of a ComObject.

Public Members

dksdk_ffi_uuid oid
dksdk_ffi_uuid iid