Tizen Native API  7.0
Eio asynchronous API for Eet file.

This set of functions help in the asynchronous use of Eet.

Functions

Eio_Fileeio_eet_open (const char *filename, Eet_File_Mode mode, Eio_Eet_Open_Cb eet_cb, Eio_Error_Cb error_cb, const void *data)
 Open an eet file on disk, and returns a handle to it asynchronously.
Eio_Fileeio_eet_close (Eet_File *ef, Eio_Done_Cb done_cb, Eio_Eet_Error_Cb error_cb, const void *data)
 Close an eet file handle and flush pending writes asynchronously.
Eio_Fileeio_eet_sync (Eet_File *ef, Eio_Done_Cb done_cb, Eio_Eet_Error_Cb error_cb, const void *data)
 Sync content of an eet file handle, flushing pending writes asynchronously.
Eio_Fileeio_eet_data_write_cipher (Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key, void *write_data, int compress, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *user_data)
 Write a data structure from memory and store in an eet file using a cipher asynchronously.
Eio_Fileeio_eet_data_read_cipher (Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const char *cipher_key, Eio_Done_ERead_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Read a data structure from an eet file and decodes it using a cipher asynchronously.
Eio_Fileeio_eet_data_image_write_cipher (Eet_File *ef, const char *name, const char *cipher_key, void *write_data, unsigned int w, unsigned int h, int alpha, int compress, int quality, int lossy, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *user_data)
 Write image data to the named key in an eet file asynchronously.
Eio_Fileeio_eet_read_direct (Eet_File *ef, const char *name, Eio_Done_Data_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Read a specified entry from an eet file and return data.
Eio_Fileeio_eet_read_cipher (Eet_File *ef, const char *name, const char *cipher_key, Eio_Done_Read_Cb done_cb, Eio_Error_Cb error_cb, const void *data)
 Read a specified entry from an eet file and return data.
Eio_Fileeio_eet_write_cipher (Eet_File *ef, const char *name, void *write_data, int size, int compress, const char *cipher_key, Eio_Done_Int_Cb done_cb, Eio_Error_Cb error_cb, const void *user_data)
 Write a specified entry to an eet file handle using a cipher.

Function Documentation

Eio_File* eio_eet_close ( Eet_File ef,
Eio_Done_Cb  done_cb,
Eio_Eet_Error_Cb  error_cb,
const void *  data 
)

Close an eet file handle and flush pending writes asynchronously.

Parameters:
efA valid eet file handle.
done_cbCallback called from the main loop when the file has been closed.
error_cbCallback called in the main loop when the file can't be closed.
dataUnmodified user data passed to callbacks
Returns:
NULL in case of a failure.

This function will call eet_close() from another thread by using Ecore_Thread. You should assume that the Eet_File is dead after this function is called.

Since :
3.0
Eio_File* eio_eet_data_image_write_cipher ( Eet_File ef,
const char *  name,
const char *  cipher_key,
void *  write_data,
unsigned int  w,
unsigned int  h,
int  alpha,
int  compress,
int  quality,
int  lossy,
Eio_Done_Int_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  user_data 
)

Write image data to the named key in an eet file asynchronously.

Parameters:
efA valid eet file handle opened for writing.
nameName of the entry. eg: "/base/file_i_want".
cipher_keyThe key to use as cipher.
write_dataA pointer to the image pixel data.
wThe width of the image in pixels.
hThe height of the image in pixels.
alphaThe alpha channel flag.
compressThe compression amount.
qualityThe quality encoding amount.
lossyThe lossiness flag.
done_cbCallback called from the main loop when the data has been put in the Eet_File.
error_cbCallback called in the main loop when the file can't be written.
user_dataPrivate data given to each callback.
Returns:
NULL in case of a failure.
Since :
3.0
Eio_File* eio_eet_data_read_cipher ( Eet_File ef,
Eet_Data_Descriptor edd,
const char *  name,
const char *  cipher_key,
Eio_Done_ERead_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Read a data structure from an eet file and decodes it using a cipher asynchronously.

Parameters:
efThe eet file handle to read from.
eddThe data descriptor handle to use when decoding.
nameThe key the data is stored under in the eet file.
cipher_keyThe key to use as cipher.
done_cbCallback called from the main loop when the data has been read and decoded.
error_cbCallback called in the main loop when the data can't be read.
dataUnmodified user data passed to callbacks
Returns:
NULL in case of a failure.
Since :
3.0
Eio_File* eio_eet_data_write_cipher ( Eet_File ef,
Eet_Data_Descriptor edd,
const char *  name,
const char *  cipher_key,
void *  write_data,
int  compress,
Eio_Done_Int_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  user_data 
)

Write a data structure from memory and store in an eet file using a cipher asynchronously.

Parameters:
efThe eet file handle to write to.
eddThe data descriptor to use when encoding.
nameThe key to store the data under in the eet file.
cipher_keyThe key to use as cipher.
write_dataA pointer to the data structure to save and encode.
compressCompression flags for storage.
done_cbCallback called from the main loop when the data has been put in the Eet_File.
error_cbCallback called in the main loop when the file can't be written.
user_dataPrivate data given to each callback.
Returns:
NULL in case of a failure.
Since :
3.0
Eio_File* eio_eet_open ( const char *  filename,
Eet_File_Mode  mode,
Eio_Eet_Open_Cb  eet_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Open an eet file on disk, and returns a handle to it asynchronously.

Parameters:
filenameThe file path to the eet file. eg: "/tmp/file.eet".
modeThe mode for opening. Either EET_FILE_MODE_READ, EET_FILE_MODE_WRITE or EET_FILE_MODE_READ_WRITE.
eet_cbThe callback to call when the file has been successfully opened.
error_cbCallback called in the main loop when the file can't be opened.
dataUnmodified user data passed to callbacks
Returns:
NULL in case of a failure.

This function calls eet_open() from another thread using Ecore_Thread.

Since :
3.0
Eio_File* eio_eet_read_cipher ( Eet_File ef,
const char *  name,
const char *  cipher_key,
Eio_Done_Read_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Read a specified entry from an eet file and return data.

Parameters:
efA valid eet file handle opened for reading.
nameName of the entry. eg: "/base/file_i_want".
cipher_keyThe key to use as cipher.
done_cbCallback called from the main loop when the data has been read.
error_cbCallback called in the main loop when the data can't be read.
dataUnmodified user data passed to callbacks
Returns:
NULL in case of a failure.
Since :
3.0
Eio_File* eio_eet_read_direct ( Eet_File ef,
const char *  name,
Eio_Done_Data_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  data 
)

Read a specified entry from an eet file and return data.

Parameters:
efA valid eet file handle opened for reading.
nameName of the entry. eg: "/base/file_i_want".
done_cbCallback called from the main loop when the data has been read.
error_cbCallback called in the main loop when the data can't be read.
dataUnmodified user data passed to callbacks
Returns:
NULL in case of a failure.
Since :
3.0
Eio_File* eio_eet_sync ( Eet_File ef,
Eio_Done_Cb  done_cb,
Eio_Eet_Error_Cb  error_cb,
const void *  data 
)

Sync content of an eet file handle, flushing pending writes asynchronously.

Parameters:
efA valid eet file handle.
done_cbCallback called from the main loop when the file has been synced.
error_cbCallback called in the main loop when the file can't be synced.
dataUnmodified user data passed to callbacks
Returns:
NULL in case of a failure.

This function will call eet_sync() from another thread. As long as the done_cb or error_cb haven't be called, you must keep ef open.

Since :
3.0
Eio_File* eio_eet_write_cipher ( Eet_File ef,
const char *  name,
void *  write_data,
int  size,
int  compress,
const char *  cipher_key,
Eio_Done_Int_Cb  done_cb,
Eio_Error_Cb  error_cb,
const void *  user_data 
)

Write a specified entry to an eet file handle using a cipher.

Parameters:
efA valid eet file handle opened for writing.
nameName of the entry. eg: "/base/file_i_want".
write_dataPointer to the data to be stored.
sizeLength in bytes in the data to be stored.
compressCompression flags (1 == compress, 0 = don't compress).
cipher_keyThe key to use as cipher.
done_cbCallback called from the main loop when the data has been put in the Eet_File.
error_cbCallback called in the main loop when the file can't be written.
user_dataPrivate data given to each callback.
Returns:
NULL in case of a failure.
Since :
3.0