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

ipod_io_file.h File Reference

An implementation of an ipod_io device that reads and writes files. More...

#include <ipod/ipod_io.h>

Go to the source code of this file.

Functions

int ipod_io_file_read (void *data, size_t maxDataLen, size_t *dataRead, void *userData)
 Read data from this device.
int ipod_io_file_write (void *data, size_t dataLen, size_t *dataWritten, void *userData)
 Write data to this device.
int ipod_io_file_tell (size_t *offset, void *userData)
 The current location of the device mark.
int ipod_io_file_seek (size_t offset, void *userData)
 Seeks the device to the given location.
int ipod_io_file_length (size_t *offset, void *userData)
 The total amount of data on the device.
ipod_io ipod_io_file_new (FILE *file)
 Create a new device for the given FILE object.
void ipod_io_file_free (ipod_io io)
 Close the file, free the device.


Detailed Description

An implementation of an ipod_io device that reads and writes files.


Function Documentation

void ipod_io_file_free ipod_io  io  ) 
 

Close the file, free the device.

Parameters:
io the ipod_io device to free

int ipod_io_file_length size_t *  offset,
void *  userData
 

The total amount of data on 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_file_new FILE *  file  ) 
 

Create a new device for the given FILE object.

Parameters:
file a POSIX file object
Returns:
an ipod_io device

int ipod_io_file_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_file_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

int ipod_io_file_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_file_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