Move size, ino, dev cache from IsoFileSrc to IsoStream.

That is a better decission, as it reduces the number of stat() call 
needed, and anyway some Streams will need the size.
This commit is contained in:
Vreixo Formoso
2007-12-18 20:46:28 +01:00
parent 5b93cb4cdc
commit 39bde82ff6
5 changed files with 85 additions and 74 deletions

View File

@ -25,6 +25,8 @@ struct Iso_Stream
/**
* Opens the stream.
*
* TODO it would be great to return a different success code if the
* underlying source size has changed.
* @return
* 1 on success, < 0 on error
*/
@ -37,9 +39,8 @@ struct Iso_Stream
int (*close)(IsoStream *stream);
/**
* Get the size (in bytes) of the stream.
* @return
* The size, or -1 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.
*/
off_t (*get_size)(IsoStream *stream);