|
libclod
C library for interacting with NBTs, region files, LOD data and other things.
|
#include <region_format.h>
Public Attributes | |
| uint32_t | dead_lock_timeout_ms |
| bool(* | file_manage )(uint8_t **data, size_t *size, const size_t *new_size, void *user) |
| bool(* | file_sync )(size_t size, void *user) |
| void *(* | malloc_func )(size_t size, void *user) |
| void(* | free_func )(void *ptr, void *user) |
| void * | user |
Configuration options for the region format.
Definition at line 67 of file region_format.h.
| uint32_t clod_rfmt_opts::dead_lock_timeout_ms |
The amount of time that must pass with no progress being made before a lock's owner is considered dead. A zero value uses defaults.
Definition at line 70 of file region_format.h.
| bool(* clod_rfmt_opts::file_manage) (uint8_t **data, size_t *size, const size_t *new_size, void *user) |
Method provided by the user that is used to get, query, and truncate the region file. Multiple optional arguments may be provided in the same call.
| [in] | data | (nullable) If non-null, the method shall return a pointer to the complete file contents. |
| [in] | size | (nullable) If non-null, the method shall return the size of the file. |
| [in] | new_size | (nullable) If non-null, the method shall truncate the file to the provided size. |
| [in] | user | The provided user pointer. |
Definition at line 82 of file region_format.h.
| bool(* clod_rfmt_opts::file_sync) (size_t size, void *user) |
Method provided by the user that is used to synchronise the file to disk. This method does not need external synchronisation as it is only called with the protection of the file lock.
| [in] | size | Size of the section of the file from the start to synchronise. |
| [in] | user | The provided user pointer. |
Definition at line 93 of file region_format.h.
| void *(* clod_rfmt_opts::malloc_func) (size_t size, void *user) |
Custom allocation function. Nullable. This is not used for any buffers, this library doesn't buffer anything.
Definition at line 97 of file region_format.h.
| void(* clod_rfmt_opts::free_func) (void *ptr, void *user) |
Custom free function. Nullable.
Definition at line 100 of file region_format.h.
| void* clod_rfmt_opts::user |
User value passed to callbacks.
Definition at line 103 of file region_format.h.