_Ecore_Audio_Vio Struct Reference

Data Fields

int(* get_length )(void *data, Eo *eo_obj)
 Get the length of the file. More...
 
int(* seek )(void *data, Eo *eo_obj, int offset, int whence)
 Seek to a position within the file. More...
 
int(* tell )(void *data, Eo *eo_obj)
 Get the current position within the file. More...
 
int(* read )(void *data, Eo *eo_obj, void *buffer, int length)
 Read some data from the file. More...
 
int(* write )(void *data, Eo *eo_obj, const void *buffer, int length)
 Write some data to the file. More...
 

Field Documentation

int(* _Ecore_Audio_Vio::get_length)(void *data, Eo *eo_obj)

Get the length of the file.

Parameters
dataUser data from the ecore_audio_obj_set_vio call
eo_objThe Ecore_Audio object this operates on
Returns
The length of the virtual file in bytes
Since
1.8
int(* _Ecore_Audio_Vio::seek)(void *data, Eo *eo_obj, int offset, int whence)

Seek to a position within the file.

Parameters
dataUser data from the ecore_audio_obj_set_vio call
eo_objThe Ecore_Audio object this operates on
offsetThe number of bytes to move (can be negative)
whenceAccepts the same values as fseek(), which are: SEEK_SET: offset is absolute SEEK_CUR: offset is relative to the current position SEEK_END: offset is relative to the end
Returns
The resulting position from the start of the file (in bytes) or -1 if an error occured (i.e. out of bounds)
Since
1.8
int(* _Ecore_Audio_Vio::tell)(void *data, Eo *eo_obj)

Get the current position within the file.

Parameters
dataUser data from the ecore_audio_obj_set_vio call
eo_objThe Ecore_Audio object this operates on
Returns
The resulting position from the start of the file (in bytes)

This is equivalent to calling seek() with offset 0 and whence SEEK_CUR.

Since
1.8
int(* _Ecore_Audio_Vio::read)(void *data, Eo *eo_obj, void *buffer, int length)

Read some data from the file.

Parameters
dataUser data from the ecore_audio_obj_set_vio call
eo_objThe Ecore_Audio object this operates on
[out]bufferthe buffer to write the data to
lengthThe number of bytes to read
Returns
The number of bytes read from the file. May be less than length
Since
1.8
int(* _Ecore_Audio_Vio::write)(void *data, Eo *eo_obj, const void *buffer, int length)

Write some data to the file.

Parameters
dataUser data from the ecore_audio_obj_set_vio call
eo_objThe Ecore_Audio object this operates on
bufferWrite data from here to the file
lengthThe number of bytes to write
Returns
The number of bytes written to the file. May be less than length
Since
1.8