Struct in ldk_asset_source.h

LDKAssetSourcePackage

typedef struct LDKAssetSourcePackage LDKAssetSourcePackage;

LDKAssetSourceOrigin

typedef enum LDKAssetSourceOrigin{
  LDK_ASSET_SOURCE_ORIGIN_NONE=0,
  LDK_ASSET_SOURCE_ORIGIN_PACKAGE,
  LDK_ASSET_SOURCE_ORIGIN_FILESYSTEM,
}LDKAssetSourceOrigin;
Function in ldk_asset_source.h

ldk_asset_path_set

Set the asset path.

LDK_API bool ldk_asset_path_set(
 LDKAssetPath *out_path,
 const char *path
);

Parameters

LDKAssetPath *out_path
Receives the resulting path.
const char *path
Path identifying the file or resource.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_asset_source.h

ldk_asset_source_initialize

Initialize the asset source.

LDK_API bool ldk_asset_source_initialize(
 LDKAssetSource *source,
 const char *runtree_path
);

Parameters

LDKAssetSource *source
Source object or source data for this operation.
const char *runtree_path
Path of the runtree.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_asset_source.h

ldk_asset_source_runtree_set

Set the asset source runtree.

LDK_API bool ldk_asset_source_runtree_set(
 LDKAssetSource *source,
 const char *runtree_path
);

Parameters

LDKAssetSource *source
Source object or source data for this operation.
const char *runtree_path
Path of the runtree.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_asset_source.h

ldk_asset_source_package_open

Attach a BOX package as an asset source.

LDK_API LDKAssetSourcePackage * ldk_asset_source_package_open(
 LDKAssetSource *source,
 const char *path
);

Parameters

LDKAssetSource *source
Source object or source data for this operation.
const char *path
Path identifying the file or resource.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_asset_source.h

ldk_asset_source_package_path_get

Get the asset source package path.

LDK_API const XFSPath * ldk_asset_source_package_path_get(
 const LDKAssetSource *source,
 const LDKPackage *package
);

Parameters

const LDKAssetSource *source
Source object or source data for this operation.
const LDKPackage *package
Opened package used by this operation.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_asset_source.h

ldk_asset_source_find

Find an asset by logical path in the source configuration.

LDK_API bool ldk_asset_source_find(
 const LDKAssetSource *source,
 const char *path,
 LDKAssetSourceFile *out_file
);

Parameters

const LDKAssetSource *source
Source object or source data for this operation.
const char *path
Path identifying the file or resource.
LDKAssetSourceFile *out_file
Receives the resulting file.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_asset_source.h

ldk_asset_source_file_read_at

Read bytes from an asset source file at the given offset.

LDK_API bool ldk_asset_source_file_read_at(
 const LDKAssetSourceFile *file,
 u64 offset,
 void *out_data,
 u64 size,
 u64 *out_read
);

Parameters

const LDKAssetSourceFile *file
File used by this operation.
u64 offset
Byte offset into the resource or entry.
void *out_data
Destination buffer for the resulting data.
u64 size
Size of the data or region, in bytes where applicable.
u64 *out_read
Receives the number of bytes actually read.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_asset_source.h

ldk_asset_source_file_read_at_async

Begin asynchronous reading from an asset file at an offset.

LDK_API LDKAsyncRead ldk_asset_source_file_read_at_async(
 const LDKAssetSourceFile *file,
 u64 offset,
 void *out_data,
 u64 size,
 u64 *out_read
);

Parameters

const LDKAssetSourceFile *file
File used by this operation.
u64 offset
Byte offset into the resource or entry.
void *out_data
Destination buffer for the resulting data.
u64 size
Size of the data or region, in bytes where applicable.
u64 *out_read
Receives the number of bytes actually read.

Returns

The requested value.

Function in ldk_asset_source.h

ldk_asset_source_file_read_async

Begin asynchronous reading of an asset file.

LDK_API LDKAsyncRead ldk_asset_source_file_read_async(
 const LDKAssetSourceFile *file,
 void *out_data,
 u64 out_size
);

Parameters

const LDKAssetSourceFile *file
File used by this operation.
void *out_data
Destination buffer for the resulting data.
u64 out_size
Receives or specifies the byte size of the output buffer, as defined by the operation.

Returns

The requested value.

Function in ldk_asset_source.h

ldk_asset_source_file_read

Read the asset source file.

LDK_API bool ldk_asset_source_file_read(
 const LDKAssetSourceFile *file,
 void *out_data,
 u64 out_size
);

Parameters

const LDKAssetSourceFile *file
File used by this operation.
void *out_data
Destination buffer for the resulting data.
u64 out_size
Receives or specifies the byte size of the output buffer, as defined by the operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_asset_source.h

ldk_asset_source_file_write

Write the asset source file.

LDK_API bool ldk_asset_source_file_write(
 const LDKAssetSource *source,
 const char *path,
 const void *data,
 u64 size
);

Parameters

const LDKAssetSource *source
Source object or source data for this operation.
const char *path
Path identifying the file or resource.
const void *data
Source data or system-owned context for this operation.
u64 size
Size of the data or region, in bytes where applicable.

Returns

True if the operation succeeds; false otherwise.