#include <sys/types.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Classes | |
| struct | ipod_io_struct |
| the internal structure of an ipod_io device More... | |
Typedefs | |
| typedef int(* | ipod_io_read_func )(void *data, size_t maxDataLen, size_t *dataRead, void *userData) |
| Callback to implement reads for a device. | |
| typedef int(* | ipod_io_write_func )(void *data, size_t dataLen, size_t *dataWritten, void *userData) |
| Callback to implement writes to a device. | |
| typedef int(* | ipod_io_tell_func )(size_t *offset, void *userData) |
| The current location of the device mark. | |
| typedef int(* | ipod_io_seek_func )(size_t offset, void *userData) |
| Seeks the device to the given location. | |
| typedef int(* | ipod_io_length_func )(size_t *offset, void *userData) |
| The total amount of data on the device. | |
| typedef ipod_io_struct * | ipod_io |
| opaque reference to the device | |
Functions | |
| int | ipod_io_read (ipod_io io, void *data, size_t maxDataLen, size_t *dataRead) |
| Reads data from a device. | |
| int | ipod_io_write (ipod_io io, void *data, size_t dataLen, size_t *dataWritten) |
| Writes data to a device. | |
| int8_t | ipod_io_getb (ipod_io io) |
| Read a signed byte from the device. | |
| void | ipod_io_putb (ipod_io io, int8_t b) |
| Write a signed byte to the device. | |
| uint8_t | ipod_io_getub (ipod_io io) |
| Read an unsigned byte from the device. | |
| void | ipod_io_putub (ipod_io io, uint8_t b) |
| Write an unsigned byte to the device. | |
| int16_t | ipod_io_getw (ipod_io io) |
| Read a little-endian signed word from the device. | |
| void | ipod_io_putw (ipod_io io, int16_t w) |
| Write a little-endian signed word to the device. | |
| uint16_t | ipod_io_getuw (ipod_io io) |
| Read a little-endian unsigned word from the device. | |
| void | ipod_io_putuw (ipod_io io, uint16_t w) |
| Write a little-endian unsigned word to the device. | |
| int16_t | ipod_io_getw_be (ipod_io io) |
| Read a big-endian signed word from the device. | |
| void | ipod_io_putw_be (ipod_io io, int16_t w) |
| Write a big-endian signed word to the device. | |
| uint16_t | ipod_io_getuw_be (ipod_io io) |
| Read a big-endian unsigned word from the device. | |
| void | ipod_io_putuw_be (ipod_io io, uint16_t w) |
| Write a big-endian unsigned word to the device. | |
| int32_t | ipod_io_getl (ipod_io io) |
| Read a little-endian signed long word from the device. | |
| void | ipod_io_putl (ipod_io io, int32_t l) |
| Write a little-endian signed long word to the device. | |
| uint32_t | ipod_io_getul (ipod_io io) |
| Read a little-endian unsigned long word from the device. | |
| void | ipod_io_putul (ipod_io io, uint32_t l) |
| Write a little-endian unsigned long word to the device. | |
| int32_t | ipod_io_getl_be (ipod_io io) |
| Read a big-endian signed long word from the device. | |
| void | ipod_io_putl_be (ipod_io io, int32_t l) |
| Write a big-endian signed long word to the device. | |
| uint32_t | ipod_io_getul_be (ipod_io io) |
| Read a big-endian unsigned long word from the device. | |
| void | ipod_io_putul_be (ipod_io io, uint32_t l) |
| Write a big-endian unsigned long word to the device. | |
| float | ipod_io_getf (ipod_io io) |
| Read a little-endian single-precision float from the device. | |
| void | ipod_io_putf (ipod_io io, float f) |
| Write a little-endian single-precision float to the device. | |
| uint32_t | ipod_io_get4cc (ipod_io io) |
| Read a 4-character tag from the device. | |
| void | ipod_io_put4cc (ipod_io io, uint32_t l) |
| Write a 4-character tag to the device. | |
| uint32_t | ipod_io_getul3 (ipod_io io) |
| Read a 3-byte little-endian unsigned long word from the device. | |
| void | ipod_io_putul3 (ipod_io io, uint32_t l) |
| Write a 3-byte little-endian unsigned long word to the device. | |
| uint32_t | ipod_io_getul_ss (ipod_io io) |
| Read a synch-safe unsigned long word from the device. | |
| void | ipod_io_seek (ipod_io io, size_t offset) |
| Seek the device. | |
| size_t | ipod_io_tell (ipod_io io) |
| Return the current mark of the device. | |
| size_t | ipod_io_length (ipod_io io) |
| Return the total length of the data in this device. | |
| void | ipod_io_skip (ipod_io io, size_t count) |
| Seek the device relative to the current mark. | |
| void | ipod_io_backpatch (ipod_io io, size_t mark) |
| Backpatch a location in the file to offset to the current mark. | |
| void | ipod_io_get_simple_header (ipod_io io, size_t *h1, size_t *h2) |
| Read a simple ipod data atom header. | |
| size_t | ipod_io_put_simple_header (ipod_io io, uint32_t tag, size_t size) |
| Write a simple ipod data atom header. | |
| size_t | ipod_io_get_list_header (ipod_io io) |
| Read an ipod list atom header. | |
| size_t | ipod_io_put_list_header (ipod_io io, uint32_t tag, size_t size) |
| Write an ipod list atom header. | |
| void | ipod_io_put_zeros (ipod_io io, unsigned int count) |
| Write a ficed number of null bytes. | |
| void | ipod_io_put_pad (ipod_io io, size_t mark, size_t size) |
| Write out padding bytes to reach a particular offset from a particular mark. | |
|
|
The total amount of data on the device.
|
|
|
Callback to implement reads for a device.
|
|
|
Seeks the device to the given location.
|
|
|
The current location of the device mark.
|
|
|
Callback to implement writes to a device.
|
|
||||||||||||
|
Backpatch a location in the file to offset to the current mark.
|
|
|
Read a 4-character tag from the device.
|
|
|
Read an ipod list atom header.
|
|
||||||||||||||||
|
Read a simple ipod data atom header.
|
|
|
Read a signed byte from the device.
|
|
|
Read a little-endian single-precision float from the device.
|
|
|
Read a little-endian signed long word from the device.
|
|
|
Read a big-endian signed long word from the device.
|
|
|
Read an unsigned byte from the device.
|
|
|
Read a little-endian unsigned long word from the device.
|
|
|
Read a 3-byte little-endian unsigned long word from the device.
|
|
|
Read a big-endian unsigned long word from the device.
|
|
|
Read a synch-safe unsigned long word from the device.
|
|
|
Read a little-endian unsigned word from the device.
|
|
|
Read a big-endian unsigned word from the device.
|
|
|
Read a little-endian signed word from the device.
|
|
|
Read a big-endian signed word from the device.
|
|
|
Return the total length of the data in this device.
|
|
||||||||||||
|
Write a 4-character tag to the device.
|
|
||||||||||||||||
|
Write an ipod list atom header.
|
|
||||||||||||||||
|
Write out padding bytes to reach a particular offset from a particular mark.
|
|
||||||||||||||||
|
Write a simple ipod data atom header.
|
|
||||||||||||
|
Write a ficed number of null bytes.
|
|
||||||||||||
|
Write a signed byte to the device.
|
|
||||||||||||
|
Write a little-endian single-precision float to the device.
|
|
||||||||||||
|
Write a little-endian signed long word to the device.
|
|
||||||||||||
|
Write a big-endian signed long word to the device.
|
|
||||||||||||
|
Write an unsigned byte to the device.
|
|
||||||||||||
|
Write a little-endian unsigned long word to the device.
|
|
||||||||||||
|
Write a 3-byte little-endian unsigned long word to the device.
|
|
||||||||||||
|
Write a big-endian unsigned long word to the device.
|
|
||||||||||||
|
Write a little-endian unsigned word to the device.
|
|
||||||||||||
|
Write a big-endian unsigned word to the device.
|
|
||||||||||||
|
Write a little-endian signed word to the device.
|
|
||||||||||||
|
Write a big-endian signed word to the device.
|
|
||||||||||||||||||||
|
Reads data from a device.
|
|
||||||||||||
|
Seek the device.
|
|
||||||||||||
|
Seek the device relative to the current mark.
|
|
|
Return the current mark of the device.
|
|
||||||||||||||||||||
|
Writes data to a device.
|
1.3.9.1