Tizen Native API  3.0
Manipulate an Eina_File asynchronously

This function helps when manipulating a file asynchronously.

These set of functions work on top of Eina_File and Ecore_Thread to do basic operations on a file, like opening, closing and mapping a file to memory.

Functions

Eio_Fileeio_file_open (const char *name, Eina_Bool shared, Eio_Open_Cb open_cb, Eio_Error_Cb error_cb, const void *data)
 Asynchronously open a file.
Eio_Fileeio_file_close (Eina_File *f, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Asynchronously close a file.
Eio_Fileeio_file_map_all (Eina_File *f, Eina_File_Populate rule, Eio_Filter_Map_Cb filter_cb, Eio_Map_Cb map_cb, Eio_Error_Cb error_cb, const void *data)
 Asynchronously map a file in memory.
Eio_Fileeio_file_map_new (Eina_File *f, Eina_File_Populate rule, unsigned long int offset, unsigned long int length, Eio_Filter_Map_Cb filter_cb, Eio_Map_Cb map_cb, Eio_Error_Cb error_cb, const void *data)
 Asynchronously map a part of a file in memory.

Function Documentation

Eio_File* eio_file_close ( Eina_File f,
Eio_Done_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Asynchronously close a file.

Parameters:
fThe file to close.
done_cbCallback called in the main loop when the file has been successfully closed.
error_cbCallback called in the main loop when the file couldn't be closed.
dataUnmodified user data passed to callbacks
Returns:
Pointer to the file if successful or NULL otherwise.
Since :
3.0
Eio_File* eio_file_map_all ( Eina_File f,
Eina_File_Populate  rule,
Eio_Filter_Map_Cb  filter_cb,
Eio_Map_Cb  map_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Asynchronously map a file in memory.

Parameters:
fThe file to map.
ruleThe rule to apply to the map.
filter_cbCallback called in the thread to validate the content of the map.
map_cbCallback called in the main loop when the file has been successfully mapped.
error_cbCallback called in the main loop when the file can't be mapped.
dataUnmodified user data passed to callbacks
Returns:
Pointer to the file if successful or NULL otherwise.

The container of the Eio_File is the Eina_File.

Since :
3.0
Eio_File* eio_file_map_new ( Eina_File f,
Eina_File_Populate  rule,
unsigned long int  offset,
unsigned long int  length,
Eio_Filter_Map_Cb  filter_cb,
Eio_Map_Cb  map_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Asynchronously map a part of a file in memory.

Parameters:
fThe file to map.
ruleThe rule to apply to the map.
offsetThe offset inside the file
lengthThe length of the memory to map
filter_cbCallback called in the thread to validate the content of the map.
map_cbCallback called in the main loop when the file has been successfully mapped.
error_cbCallback called in the main loop when the file can't be mapped.
dataUnmodified user data passed to callbacks
Returns:
Pointer to the file if successful or NULL otherwise.

The container of the Eio_File is the Eina_File.

Since :
3.0
Eio_File* eio_file_open ( const char *  name,
Eina_Bool  shared,
Eio_Open_Cb  open_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Asynchronously open a file.

Parameters:
nameThe file to open.
sharedIf it's a shared memory file.
open_cbCallback called in the main loop when the file has been successfully opened.
error_cbCallback called in the main loop when the file couldn't be opened.
dataUnmodified user data passed to callbacks
Returns:
Pointer to the file if successful or NULL otherwise.
Since :
3.0