A generic IFF/RIFF file reader helper.
More...
Typedefs |
typedef struct PlankIffFileReader * | PlankIffFileReaderRef |
| An opaque reference to the Plank IffFileReader object.
|
Functions |
PlankIffFileReaderRef | pl_IffFileReader_CreateAndInit () |
| Create and initialise a Plank IffFileReader object and return an oqaque reference to it.
|
PlankIffFileReaderRef | pl_IffFileReader_Create () |
| Create a Plank IffFileReader object and return an oqaque reference to it.
|
PlankResult | pl_IffFileReader_Init (PlankIffFileReaderRef p) |
| Initialise a Plank IffFileReader object.
|
PlankResult | pl_IffFileReader_DeInit (PlankIffFileReaderRef p) |
| Deinitialise a Plank IffFileReader object.
|
PlankResult | pl_IffFileReader_Destroy (PlankIffFileReaderRef p) |
| Destroy a Plank IffFileReader object.
|
PlankFileRef | pl_IffFileReader_GetFile (PlankIffFileReaderRef p) |
| Gets the underlying Plank File object.
|
PlankResult | pl_IffFileReader_Open (PlankIffFileReaderRef p, const char *filepath) |
PlankResult | pl_IffFileReader_OpenWithFile (PlankIffFileReaderRef p, PlankFileRef file) |
| Open from a file object.
|
PlankResult | pl_IffFileReader_Close (PlankIffFileReaderRef p) |
PlankResult | pl_IffFileReader_GetMainID (PlankIffFileReaderRef p, PlankIffID *mainID) |
PlankResult | pl_IffFileReader_GetFormatID (PlankIffFileReaderRef p, PlankIffID *formatID) |
PlankResult | pl_IffFileReader_GetMainLength (PlankIffFileReaderRef p, PlankLL *mainLength) |
PlankResult | pl_IffFileReader_GetMainEnd (PlankIffFileReaderRef p, PlankLL *mainEnd) |
PlankResult | pl_IffFileReader_IsBigEndian (PlankIffFileReaderRef p, PlankB *isBigEndian) |
PlankResult | pl_IffFileReader_SetEndian (PlankIffFileReaderRef p, const PlankB isBigEndian) |
PlankResult | pl_IffFileReader_SeekChunk (PlankIffFileReaderRef p, const PlankLL startPosition, const char *chunkID, PlankLL *chunkLength, PlankLL *chunkDataPos) |
| Seek to the data of a particular chunk.
|
PlankResult | pl_IffFileReader_ParseChunkHeader (PlankIffFileReaderRef p, char *chunkIDstr, PlankIffID *chunkID, PlankLL *chunkLength, PlankLL *chunkEnd, PlankLL *chunkPos) |
Detailed Description
A generic IFF/RIFF file reader helper.
Typedef Documentation
An opaque reference to the Plank IffFileReader object.
Function Documentation
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
Create a Plank IffFileReader object and return an oqaque reference to it.
- Returns:
- A Plank IffFileReader object as an opaque reference or PLANK_NULL.
Create and initialise a Plank IffFileReader object and return an oqaque reference to it.
- Returns:
- A Plank IffFileReader object as an opaque reference or PLANK_NULL.
Deinitialise a Plank IffFileReader object.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
Destroy a Plank IffFileReader object.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
Gets the underlying Plank File object.
This is the raw file object the is performing the fundamental file access operations.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- The Plank File object.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
Initialise a Plank IffFileReader object.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
Open from a file object.
Takes ownership and zeros the input file. The file must be little endian to start with.
PlankResult pl_IffFileReader_ParseChunkHeader |
( |
PlankIffFileReaderRef |
p, |
|
|
char * |
chunkIDstr, |
|
|
PlankIffID * |
chunkID, |
|
|
PlankLL * |
chunkLength, |
|
|
PlankLL * |
chunkEnd, |
|
|
PlankLL * |
chunkPos |
|
) |
| |
- Parameters:
-
p | The Plank IffFileReader object. |
chunkIDstr | The chunk ID as astring can be returned here. This should point to a string capable of holding at least 37 characters. Use 0 to ignore. |
chunkID | The chunk ID can be returned here. Use 0 to ignore. |
chunkLength | The chunk length is returned here. Use 0 to ignore. |
chunkEnd | The chunk end is returned here. Use 0 to ignore. |
chunkPos | The chunk data position is returned here. Use 0 to ignore. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_SeekChunk |
( |
PlankIffFileReaderRef |
p, |
|
|
const PlankLL |
startPosition, |
|
|
const char * |
chunkID, |
|
|
PlankLL * |
chunkLength, |
|
|
PlankLL * |
chunkDataPos |
|
) |
| |
Seek to the data of a particular chunk.
- Parameters:
-
p | The Plank IffFileReader object. |
startPosition | Where to start searching within the file, in bytes. There are two special values:
- 0 : Specifies the start of the file (although this will be offset to the first chunk).
- -1 : Specifies the current file position.
|
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.
- Parameters:
-
p | The Plank IffFileReader object. |
- Returns:
- A result code which will be PlankResult_OK if the operation was completely successful.