Manipulate an Eina_File asynchronously
This function help manipulating file asynchronously. More...
Functions | |
EAPI Eio_File * | eio_file_open (const char *name, Eina_Bool shared, Eio_Open_Cb open_cb, Eio_Error_Cb error_cb, const void *data) |
Assynchronously open a file. More... | |
EAPI Eio_File * | eio_file_close (Eina_File *f, Eio_Done_Cb done_cb, Eio_Error_Cb error_cb, const void *data) |
Assynchronously close a file. More... | |
EAPI 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) |
Assynchronously map a file in memory. More... | |
EAPI 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) |
Assynchronously map a part of a file in memory. More... | |
Detailed Description
This function help manipulating file asynchronously.
This set of function work on top of Eina_File and Ecore_Thread to do basic operations in a file, like openning, closing and mapping a file to memory.
Function Documentation
EAPI Eio_File* eio_file_open | ( | const char * | name, |
Eina_Bool | shared, | ||
Eio_Open_Cb | open_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Assynchronously open a file.
- Parameters
-
name The file to open. shared If it's a shared memory file. open_cb Callback called in the main loop when the file has been successfully opened. error_cb Callback called in the main loop when the file couldn't be opened. data Unmodified user data passed to callbacks
- Returns
- Pointer to the file if successfull or NULL otherwise.
EAPI Eio_File* eio_file_close | ( | Eina_File * | f, |
Eio_Done_Cb | done_cb, | ||
Eio_Error_Cb | error_cb, | ||
const void * | data | ||
) |
Assynchronously close a file.
- Parameters
-
f The file to close. done_cb Callback called in the main loop when the file has been successfully closed. error_cb Callback called in the main loop when the file couldn't be closed. data Unmodified user data passed to callbacks
- Returns
- Pointer to the file if successfull or NULL otherwise.
EAPI 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 | ||
) |
Assynchronously map a file in memory.
- Parameters
-
f The file to map. rule The rule to apply to the map. filter_cb Callback called in the thread to validate the content of the map. map_cb Callback called in the main loop when the file has been successfully mapped. error_cb Callback called in the main loop when the file can't be mapped. data Unmodified user data passed to callbacks
- Returns
- Pointer to the file if successfull or NULL otherwise.
The container of the Eio_File is the Eina_File.
EAPI 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 | ||
) |
Assynchronously map a part of a file in memory.
- Parameters
-
f The file to map. rule The rule to apply to the map. offset The offset inside the file length The length of the memory to map filter_cb Callback called in the thread to validate the content of the map. map_cb Callback called in the main loop when the file has been successfully mapped. error_cb Callback called in the main loop when the file can't be mapped. data Unmodified user data passed to callbacks
- Returns
- Pointer to the file if successfull or NULL otherwise.
The container of the Eio_File is the Eina_File.