|
vgl 1.0.0
Virtual Globe Library: API reference
|
#include <vgl/foundation.h>
Public Attributes | |
| uint32_t | version |
| uint32_t | reserved |
| void * | user_data |
| void(* | read )(void *user_data, vgl_io_request *request, const vgl_io_read *read) |
| void(* | cancel )(void *user_data, vgl_io_request *request) |
| void(* | destroy )(void *user_data) |
Host I/O (design document, section 7.5). The library never opens files or connections itself: it asks the host to read byte ranges, and the host completes each request with vgl_io_request_complete, from any thread, immediately or later.
| uint32_t vgl_io_interface::version |
VGL_IO_INTERFACE_VERSION
| uint32_t vgl_io_interface::reserved |
| void* vgl_io_interface::user_data |
| void(* vgl_io_interface::read) (void *user_data, vgl_io_request *request, const vgl_io_read *read) |
Starts a read. The host completes the request exactly once, also when it cannot start the read. read describes the work and is valid until the request is completed.
Thread safety: calling thread, inside the context's functions.
| void(* vgl_io_interface::cancel) (void *user_data, vgl_io_request *request) |
Optional. Asks the host to give up a read the library no longer needs. The host must still complete the request, normally or with VGL_RESULT_CANCELLED.
Thread safety: calling thread, inside the context's functions.
| void(* vgl_io_interface::destroy) (void *user_data) |
Optional. Called once, while the context is destroyed. Requests may still be outstanding; the host must complete them, now or later (docs/c-api.md, section 12).
Thread safety: calling thread, inside vgl_context_destroy.