IsoStream_Iface Struct Reference

#include <libisofs.h>


Detailed Description

Interface definition for IsoStream methods.

Since:
0.6.4

Definition at line 696 of file libisofs.h.


Data Fields

int version
char type [4]
 Type of Stream.
int(* open )(IsoStream *stream)
 Opens the stream.
int(* close )(IsoStream *stream)
 Close the Stream.
off_t(* get_size )(IsoStream *stream)
 Get the size (in bytes) of the stream.
int(* read )(IsoStream *stream, void *buf, size_t count)
 Attempts to read up to count bytes from the given stream into the buffer starting at buf.
int(* is_repeatable )(IsoStream *stream)
 Whether this IsoStream can be read several times, with the same results.
void(* get_id )(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)
 Get an unique identifier for the IsoStream.
void(* free )(IsoStream *stream)
 Free implementation specific data.

Field Documentation

Definition at line 699 of file libisofs.h.

Type of Stream.

"fsrc" -> Read from file source "mem " -> Read from memory "boot" -> Boot catalog "user" -> User supplied stream

Definition at line 708 of file libisofs.h.

Opens the stream.

Returns:
1 on success, 2 file greater than expected, 3 file smaller than expected, < 0 on error

Close the Stream.

Returns:
1 on success, < 0 on error

Get the size (in bytes) of the stream.

This function should always return the same size, even if the underlying source size changes.

int(* IsoStream_Iface::read)(IsoStream *stream, void *buf, size_t count)

Attempts to read up to count bytes from the given stream into the buffer starting at buf.

The stream must be open() before calling this, and close() when no more needed.

Returns:
number of bytes read, 0 if EOF, < 0 on error

Whether this IsoStream can be read several times, with the same results.

For example, a regular file is repeatable, you can read it as many times as you want. However, a pipe isn't.

This function doesn't take into account if the file has been modified between the two reads.

Returns:
1 if stream is repeatable, 0 if not, < 0 on error

void(* IsoStream_Iface::get_id)(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id)

Get an unique identifier for the IsoStream.

void(* IsoStream_Iface::free)(IsoStream *stream)

Free implementation specific data.

Should never be called by user. Use iso_stream_unref() instead.


The documentation for this struct was generated from the following file:

Generated on Wed Aug 6 12:55:38 2008 for libisofs by  doxygen 1.5.6