Main Page | Class List | File List | Class Members | File Members

ipod_io_memory.h File Reference

An implementation of an ipod_io device that reads and writes to a memory block. More...

#include <ipod/ipod_io.h>

Go to the source code of this file.

Functions

int ipod_io_memory_read (void *data, size_t maxDataLen, size_t *dataRead, void *userData)
 Read data from this device.
int ipod_io_memory_write (void *data, size_t dataLen, size_t *dataWritten, void *userData)
 Write data to this device.
int ipod_io_memory_tell (size_t *offset, void *userData)
 The current location of the device mark.
int ipod_io_memory_seek (size_t offset, void *userData)
 Seeks the device to the given location.
int ipod_io_memory_length (size_t *offset, void *userData)
 The total amount of data of the device.
ipod_io ipod_io_memory_new (void)
 Create a new device into memory, typically for writing.
ipod_io ipod_io_memory_new_from_memory (char *data, size_t dataLen)
 Create a new device for an existing block of memory, typically for reading.
void ipod_io_memory_free (ipod_io io)
 Free the ipod_io device, and free the memory if created by ipod_io_memory_new().
size_t ipod_io_memory_size (ipod_io io)
 The amount of memeory currently begin used for the device.
char * ipod_io_memory_data (ipod_io io)
 The memory block used by this device.


Detailed Description

An implementation of an ipod_io device that reads and writes to a memory block.


Function Documentation

char* ipod_io_memory_data ipod_io  io  ) 
 

The memory block used by this device.

Parameters:
io the ipod_io device
Returns:
a pointer to the block of memory

void ipod_io_memory_free ipod_io  io  ) 
 

Free the ipod_io device, and free the memory if created by ipod_io_memory_new().

Parameters:
io the ipod_io device to free

int ipod_io_memory_length size_t *  offset,
void *  userData
 

The total amount of data of the device.

Parameters:
offset a pointer to a loctio nin which to store the length of the data stream
userData an opaque structure containing information about this device
Returns:
0 for success -1 for failure

ipod_io ipod_io_memory_new void   ) 
 

Create a new device into memory, typically for writing.

Returns:
a new ipod_io device

ipod_io ipod_io_memory_new_from_memory char *  data,
size_t  dataLen
 

Create a new device for an existing block of memory, typically for reading.

Parameters:
data a pointer to a block of memory
dataLen the total size of the block of memory
Returns:
a new ipod_io device

int ipod_io_memory_read void *  data,
size_t  maxDataLen,
size_t *  dataRead,
void *  userData
 

Read data from this device.

Parameters:
data pointer to buffer in which to store the data that has been read
maxDataLen the maximum amount of data to read
dataRead a pointer in which to store the actual amount of data read
userData an opaque structure containing information about this device
Returns:
0 for success -1 for failure

int ipod_io_memory_seek size_t  offset,
void *  userData
 

Seeks the device to the given location.

Parameters:
offset the offset into the device to which to seek
userData an opaque structure containing information about this device
Returns:
0 for success -1 for failure

size_t ipod_io_memory_size ipod_io  io  ) 
 

The amount of memeory currently begin used for the device.

Parameters:
io the ipod_io device
Returns:
the size of the memory block on this device

int ipod_io_memory_tell size_t *  offset,
void *  userData
 

The current location of the device mark.

Parameters:
offset a pointer to a location in which to write the mark
userData an opaque structure containing information about this device
Returns:
0 for success -1 for failure

int ipod_io_memory_write void *  data,
size_t  dataLen,
size_t *  dataWritten,
void *  userData
 

Write data to this device.

Parameters:
data pointer to buffer from which to read the data to be written
dataLen the amount of data to write
dataWritten a pointer in which to store the actual amount of data written
userData an opaque structure containing information about this device
Returns:
0 for success -1 for failure


Generated on Tue Dec 13 14:55:22 2005 for libipod by  doxygen 1.3.9.1