Data Fields
_Ecore_Audio_Vio Struct Reference

Data Fields

int(* get_length )(void *data, Eo *eo_obj)
 Gets the length of the file. More...
 
int(* seek )(void *data, Eo *eo_obj, int offset, int whence)
 Seeks to a position within the file. More...
 
int(* tell )(void *data, Eo *eo_obj)
 Gets the current position within the file. More...
 
int(* read )(void *data, Eo *eo_obj, void *buffer, int length)
 Reads some data from the file. More...
 
int(* write )(void *data, Eo *eo_obj, const void *buffer, int length)
 Writes some data to the file. More...
 

Field Documentation

◆ get_length

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

Gets 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

◆ seek

int(* _Ecore_Audio_Vio::seek) (void *data, Eo *eo_obj, int offset, int whence)

Seeks 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 occurred (i.e. out of bounds)
Since
1.8

◆ tell

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

Gets 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

◆ read

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

Reads 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

◆ write

int(* _Ecore_Audio_Vio::write) (void *data, Eo *eo_obj, const void *buffer, int length)

Writes 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