11 #ifndef CTR_IO_INTERFACE_H_ 12 #define CTR_IO_INTERFACE_H_ 31 typedef int (*
ctr_io_interface_read)(
void *io,
void *buffer,
size_t buffer_size, uint64_t position,
size_t count);
112 int ctr_io_read(
void *io,
void *buffer,
size_t buffer_size, uint64_t position,
size_t count);
127 int ctr_io_write(
void *io,
const void *buffer,
size_t buffer_size, uint64_t position);
145 int ctr_io_read_sector(
void *io,
void *buffer,
size_t buffer_size,
size_t sector,
size_t count);
186 #endif//CTR_IO_INTERFACE_H_ size_t ctr_io_sector_size(void *io)
Returns the size of the sectors used by the io interface.
int(* ctr_io_interface_write_sector)(void *io, const void *buffer, size_t buffer_size, size_t sector)
Pointer to an io interface function used to write sectors.
Definition: ctr_io_interface.h:72
int ctr_io_read_sector(void *io, void *buffer, size_t buffer_size, size_t sector, size_t count)
Reads sectors from the given io interface.
int(* ctr_io_interface_read_sector)(void *io, void *buffer, size_t buffer_size, size_t sector, size_t count)
Pointer to an io interface function used to read sectors.
Definition: ctr_io_interface.h:58
int(* ctr_io_interface_read)(void *io, void *buffer, size_t buffer_size, uint64_t position, size_t count)
Pointer to an io interface function used to read.
Definition: ctr_io_interface.h:31
int(* ctr_io_interface_write)(void *io, const void *buffer, size_t buffer_size, uint64_t position)
Pointer to an io interface function used to write.
Definition: ctr_io_interface.h:43
int ctr_io_write(void *io, const void *buffer, size_t buffer_size, uint64_t position)
Writes bytes to the given io interface.
uint64_t ctr_io_disk_size(void *io)
Returns the size of the underlying disk for the given io interface.
Virtual table for io interface dispatching.
Definition: ctr_io_interface.h:89
uint64_t(* ctr_io_interface_disk_size)(void *io)
Pointer to an io interface function used to get the size of the disk.
Definition: ctr_io_interface.h:78
size_t(* ctr_io_interface_sector_size)(void *io)
Pointer to an io interface function used to get the sector size in bytes.
Definition: ctr_io_interface.h:85
int ctr_io_write_sector(void *io, const void *buffer, size_t buffer_size, size_t sector)
Writes sectors from the given io interface.
int ctr_io_read(void *io, void *buffer, size_t buffer_size, uint64_t position, size_t count)
Reads bytes from the given io interface.