eio: move documentation into header like other EFL library.

NOTE: need some help to finish splitting this API in a more meaningfull sense.

TODO: Fix a few FIXME and update monitoring backend to work on most system.


SVN revision: 65840
This commit is contained in:
Cedric BAIL 2011-12-03 13:21:07 +00:00
parent 96b3521583
commit 2e21c6899f
7 changed files with 597 additions and 637 deletions

View File

@ -39,3 +39,248 @@
* This library is cross-platform and can be compiled and used on
* Linux, BSD, Opensolaris and Windows (XP and CE).
*/
/**
* @page tutorial_dir_copy eio_dir_copy() tutorial
*
* To use eio_dir_copy(), you basically need the source and
* destination files (or directories), and set three callbacks:
*
* @li The notification callback, which allows you to know if a file or
* a directory is copied, and the progress of the copy.
* @li The end callback, which is called when the copy is finished.
* @li The error callback, which is called if an error occured. You
* can then retrieve the error type as an errno error.
*
* @warning It is the user's duty to provide the "right target". It
* means that copying to '.' will copy the content directly inside '.'
* and not in a subdirectory.
*
* Here is a simple example:
*
* @code
* #include <Ecore.h>
* #include <Eio.h>
*
* static void
* _test_notify_cb(void *data, Eio_File *handler, const Eio_Progress *info)
* {
* switch (info->op)
* {
* case EIO_FILE_COPY:
* printf("[%s] %f%%\n", info->dest, info->percent);
* break;
* case EIO_DIR_COPY:
* printf("global [%li/%li] %f%%\n", info->current, info->max, info->percent);
* break;
* }
* }
*
* static void
* _test_done_cb(void *data, Eio_File *handler)
* {
* printf("copy done\n");
* ecore_main_loop_quit();
* }
*
* static void
* _test_error_cb(int error, Eio_File *handler, void *data)
* {
* fprintf(stderr, "error: [%s]\n", strerror(error));
* ecore_main_loop_quit();
* }
*
* int
* main(int argc, char **argv)
* {
* Eio_File *cp;
*
* if (argc != 3)
* {
* fprintf(stderr, "eio_cp source_file destination_file\n");
* return -1;
* }
*
* ecore_init();
* eio_init();
*
* cp = eio_dir_copy(argv[1], argv[2],
* _test_notify_cb,
* _test_done_cb,
* _test_error_cb,
* NULL);
*
* ecore_main_loop_begin();
*
* eio_shutdown();
* ecore_shutdown();
*
* return 0;
* }
* @endcode
*/
/**
* @page tutorial_dir_stat_ls eio_dir_stat_ls() tutorial
*
* @li The filter callback, which allow or not a file to be seen
* by the main loop handler. This callback run in a separated thread.
* @li The main callback, which receive in the main loop all the file
* that are allowed by the filter. If you are updating a user interface
* it make sense to delay the insertion a little, so you get a chance
* to update the canvas for a bunch of file instead of one by one.
* @li The end callback, which is called in the main loop when the
* content of the directory has been correctly scanned and all the
* file notified to the main loop.
* @li The error callback, which is called if an error occured or
* if the listing was cancelled during it's run. You can then retrieve
* the error type as an errno error.
*
* Here is a simple example that implement a stupidly simple replacement for find:
*
* @code
* #include <Ecore.h>
* #include <Eio.h>
*
* static Eina_Bool
* _test_filter_cb(void *data, Eio_File *handler, const Eina_File_Direct_Info *info)
* {
* fprintf(stderr, "ACCEPTING: %s\n", info->path);
* return EINA_TRUE;
* }
*
* static void
* _test_main_cb(void *data, Eio_File *handler, const Eina_File_Direct_Info *info)
* {
* fprintf(stderr, "PROCESS: %s\n", info->path);
* }
*
* static void
* _test_done_cb(void *data, Eio_File *handler)
* {
* printf("ls done\n");
* ecore_main_loop_quit();
* }
*
* static void
* _test_error_cb(void *data, Eio_File *handler, int error)
* {
* fprintf(stderr, "error: [%s]\n", strerror(error));
* ecore_main_loop_quit();
* }
*
* int
* main(int argc, char **argv)
* {
* Eio_File *cp;
*
* if (argc != 2)
* {
* fprintf(stderr, "eio_ls directory\n");
* return -1;
* }
*
* ecore_init();
* eio_init();
*
* cp = eio_dir_stat_ls(argv[1],
* _test_filter_cb,
* _test_main_cb,
* _test_done_cb,
* _test_error_cb,
* NULL);
*
* ecore_main_loop_begin();
*
* eio_shutdown();
* ecore_shutdown();
*
* return 0;
* }
*
* @endcode
*/
/**
* @page tutorial_file_ls eio_file_ls() tutorial
*
* To use eio_file_ls(), you just need to define four callbacks:
*
* @li The filter callback, which allow or not a file to be seen
* by the main loop handler. This callback run in a separated thread.
* @li The main callback, which receive in the main loop all the file
* that are allowed by the filter. If you are updating a user interface
* it make sense to delay the insertion a little, so you get a chance
* to update the canvas for a bunch of file instead of one by one.
* @li The end callback, which is called in the main loop when the
* content of the directory has been correctly scanned and all the
* file notified to the main loop.
* @li The error callback, which is called if an error occured or
* if the listing was cancelled during it's run. You can then retrieve
* the error type as an errno error.
*
* Here is a simple example:
*
* @code
* #include <Ecore.h>
* #include <Eio.h>
*
* static Eina_Bool
* _test_filter_cb(void *data, Eio_File *handler, const char *file)
* {
* fprintf(stderr, "ACCEPTING: %s\n", file);
* return EINA_TRUE;
* }
*
* static void
* _test_main_cb(void *data, Eio_File *handler, const char *file)
* {
* fprintf(stderr, "PROCESS: %s\n", file);
* }
*
* static void
* _test_done_cb(void *data, Eio_File *handler)
* {
* printf("ls done\n");
* ecore_main_loop_quit();
* }
*
* static void
* _test_error_cb(void *data, Eio_File *handler, int error)
* {
* fprintf(stderr, "error: [%s]\n", strerror(error));
* ecore_main_loop_quit();
* }
*
* int
* main(int argc, char **argv)
* {
* Eio_File *cp;
*
* if (argc != 2)
* {
* fprintf(stderr, "eio_ls directory\n");
* return -1;
* }
*
* ecore_init();
* eio_init();
*
* cp = eio_file_ls(argv[1],
* _test_filter_cb,
* _test_main_cb,
* _test_done_cb,
* _test_error_cb,
* NULL);
*
* ecore_main_loop_begin();
*
* eio_shutdown();
* ecore_shutdown();
*
* return 0;
* }
*
* @endcode
*/

View File

@ -75,6 +75,12 @@ extern "C" {
* @{
*/
/**
* @addtogroup Eio_Group Eio Reference API
*
* @{
*/
/**
* @enum _Eio_File_Op
* Input/Output operations on files.
@ -137,9 +143,31 @@ struct _Eio_Progress
const char *dest; /**< target of the IO operation */
};
/**
* @brief Initialize eio and all it's required submodule.
* @return the current number of eio users.
*/
EAPI int eio_init(void);
/**
* @brief Shutdown eio and all it's submodule if possible.
* @return the number of pending users of eio.
*/
EAPI int eio_shutdown(void);
/**
* @brief List content of a directory without locking your app.
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_file_ls.
* @return A reference to the IO operation.
*
* eio_file_ls run eina_file_ls in a separated thread using ecore_thread_feedback_run. This prevent
* any lock in your apps.
*/
EAPI Eio_File *eio_file_ls(const char *dir,
Eio_Filter_Cb filter_cb,
Eio_Main_Cb main_cb,
@ -147,6 +175,19 @@ EAPI Eio_File *eio_file_ls(const char *dir,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief List content of a directory without locking your app.
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_file_direct_ls.
* @return A reference to the IO operation.
*
* eio_file_direct_ls run eina_file_direct_ls in a separated thread using
* ecore_thread_feedback_run. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_file_direct_ls(const char *dir,
Eio_Filter_Direct_Cb filter_cb,
Eio_Main_Direct_Cb main_cb,
@ -154,6 +195,19 @@ EAPI Eio_File *eio_file_direct_ls(const char *dir,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief List content of a directory without locking your app.
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_file_stat_ls.
* @return A reference to the IO operation.
*
* eio_file_stat_ls() run eina_file_stat_ls() in a separated thread using
* ecore_thread_feedback_run. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_file_stat_ls(const char *dir,
Eio_Filter_Direct_Cb filter_cb,
Eio_Main_Direct_Cb main_cb,
@ -161,6 +215,19 @@ EAPI Eio_File *eio_file_stat_ls(const char *dir,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief List the content of a directory and all it's sub-content asynchronously
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_dir_stat_find.
* @return A reference to the IO operation.
*
* eio_dir_stat_find() run eina_file_stat_ls() recursivly in a separated thread using
* ecore_thread_feedback_run. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_dir_stat_ls(const char *dir,
Eio_Filter_Direct_Cb filter_cb,
Eio_Main_Direct_Cb main_cb,
@ -168,17 +235,51 @@ EAPI Eio_File *eio_dir_stat_ls(const char *dir,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Stat a file/directory.
* @param path The path to stat.
* @param done_cb Callback called from the main loop when stat was successfully called..
* @param error_cb Callback called from the main loop when stat failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_direct_stat basically call stat in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_file_direct_stat(const char *path,
Eio_Stat_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Change right of a path.
* @param path The directory path to change access right.
* @param mode The permission to set, follow (mode & ~umask & 0777).
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_chmod basically call chmod in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_file_chmod(const char *path,
mode_t mode,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Change owner of a path.
* @param path The directory path to change owner.
* @param user The new user to set (could be NULL).
* @param group The new group to set (could be NULL).
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_chown determine the uid/gid that correspond to both user and group string and then call chown. This prevent any lock in your apps by calling
* this function from another thread. The string could be the name of the user or the name of the group or directly their numerical value.
*/
EAPI Eio_File *eio_file_chown(const char *path,
const char *user,
const char *group,
@ -186,17 +287,51 @@ EAPI Eio_File *eio_file_chown(const char *path,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Unlink a file/directory.
* @param path The path to unlink.
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_unlink basically call unlink in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_file_unlink(const char *path,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Create a new directory.
* @param path The directory path to create.
* @param mode The permission to set, follow (mode & ~umask & 0777).
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_mkdir basically call mkdir in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *eio_file_mkdir(const char *path,
mode_t mode,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Move a file asynchronously
* @param source Should be the name of the file to move the data from.
* @param dest Should be the name of the file to move the data to.
* @param progress_cb Callback called to know the progress of the move.
* @param done_cb Callback called when the move is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will copy a file from source to dest. It will try to use splice
* if possible, if not it will fallback to mmap/write. It will try to preserve
* access right, but not user/group identification.
*/
EAPI Eio_File *eio_file_move(const char *source,
const char *dest,
Eio_Progress_Cb progress_cb,
@ -204,6 +339,19 @@ EAPI Eio_File *eio_file_move(const char *source,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Copy a file asynchronously
* @param source Should be the name of the file to copy the data from.
* @param dest Should be the name of the file to copy the data to.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will copy a file from source to dest. It will try to use splice
* if possible, if not it will fallback to mmap/write. It will try to preserve
* access right, but not user/group identification.
*/
EAPI Eio_File *eio_file_copy(const char *source,
const char *dest,
Eio_Progress_Cb progress_cb,
@ -211,6 +359,20 @@ EAPI Eio_File *eio_file_copy(const char *source,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Move a directory and it's content asynchronously
* @param source Should be the name of the directory to copy the data from.
* @param dest Should be the name of the directory to copy the data to.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will move a directory and all it's content from source to dest.
* It will try first to rename the directory, if not it will try to use splice
* if possible, if not it will fallback to mmap/write.
* It will try to preserve access right, but not user/group identity.
*/
EAPI Eio_File *eio_dir_move(const char *source,
const char *dest,
Eio_Filter_Direct_Cb filter_cb,
@ -219,6 +381,19 @@ EAPI Eio_File *eio_dir_move(const char *source,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Copy a directory and it's content asynchronously
* @param source Should be the name of the directory to copy the data from.
* @param dest Should be the name of the directory to copy the data to.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will copy a directory and all it's content from source to dest.
* It will try to use splice if possible, if not it will fallback to mmap/write.
* It will try to preserve access right, but not user/group identity.
*/
EAPI Eio_File *eio_dir_copy(const char *source,
const char *dest,
Eio_Filter_Direct_Cb filter_cb,
@ -227,6 +402,19 @@ EAPI Eio_File *eio_dir_copy(const char *source,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Remove a directory and it's content asynchronously
* @param path Should be the name of the directory to destroy.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will move a directory and all it's content from source to dest.
* It will try first to rename the directory, if not it will try to use splice
* if possible, if not it will fallback to mmap/write.
* It will try to preserve access right, but not user/group identity.
*/
EAPI Eio_File *eio_dir_unlink(const char *path,
Eio_Filter_Direct_Cb filter_cb,
Eio_Progress_Cb progress_cb,
@ -241,14 +429,19 @@ EAPI Eio_File *eio_file_xattr(const char *path,
Eio_Error_Cb error_cb,
const void *data);
EAPI Eio_File *eio_file_xattr_set(const char *path,
const char *attribute,
const char *xattr_data,
unsigned int xattr_size,
Eina_Xattr_Flags flags,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Define an extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_int The value to link the attribute with.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_int_set call eina_xattr_int_set from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *eio_file_xattr_int_set(const char *path,
const char *attribute,
int xattr_int,
@ -256,6 +449,20 @@ EAPI Eio_File *eio_file_xattr_int_set(const char *path,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Define an extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_double The value to link the attribute with.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_double_set call eina_xattr_double_set from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *eio_file_xattr_double_set(const char *path,
const char *attribute,
double xattr_double,
@ -263,6 +470,19 @@ EAPI Eio_File *eio_file_xattr_double_set(const char *path,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Define a string extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_string The string to link the attribute with.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_string_set call eina_xattr_string_set from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *eio_file_xattr_string_set(const char *path,
const char *attribute,
const char *xattr_string,
@ -270,6 +490,20 @@ EAPI Eio_File *eio_file_xattr_string_set(const char *path,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Define an extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_data The data to link the attribute with.
* @param xattr_size The size of the data to set.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_set call setxattr from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *eio_file_xattr_set(const char *path,
const char *attribute,
const char *xattr_data,
@ -279,40 +513,143 @@ EAPI Eio_File *eio_file_xattr_set(const char *path,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Retrieve the extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_get call getxattr from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *eio_file_xattr_get(const char *path,
const char *attribute,
Eio_Done_Data_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Retrieve a extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_int_get call eina_xattr_int_get from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *eio_file_xattr_int_get(const char *path,
const char *attribute,
Eio_Done_Int_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Retrieve a extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_double_get call eina_xattr_double_get from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *eio_file_xattr_double_get(const char *path,
const char *attribute,
Eio_Done_Double_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Retrieve a string extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_string_get call eina_xattr_string_get from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *eio_file_xattr_string_get(const char *path,
const char *attribute,
Eio_Done_String_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data);
/**
* @brief Return the container during EIO operation
* @param ls The asynchronous IO operation to retrieve container from.
* @return NULL if not available, a DIRP if it is.
*
* This is only available and make sense in the thread callback, not in
* the mainloop.
*/
EAPI void *eio_file_container_get(Eio_File *ls);
/**
* @brief Cancel any Eio_File.
* @param ls The asynchronous IO operation to cancel.
* @return EINA_FALSE if the destruction is delayed, EINA_TRUE if it's done.
*
* This will cancel any kind of IO operation and cleanup the mess. This means
* that it could take time to cancel an IO.
*/
EAPI Eina_Bool eio_file_cancel(Eio_File *ls);
/**
* @brief Check if an Eio_File operation has been cancelled.
* @param ls The asynchronous IO operation to check.
* @return EINA_TRUE if it was canceled, EINA_FALSE other wise.
*
* In case of an error it also return EINA_TRUE.
*/
EAPI Eina_Bool eio_file_check(Eio_File *ls);
/**
* @brief Associate data with the current filtered file.
* @param ls The Eio_File ls request currently calling the filter callback.
* @param key The key to associate data to.
* @param data The data to associate the data to.
* @param free_cb The function to call to free the associated data, @p free will be called if not specified.
* @return EINA_TRUE if insertion was fine.
*
* This function could only be safely called from within the filter callback.
* If you don't need to copy the key around you can use @ref eio_file_associate_direct_add
*/
EAPI Eina_Bool eio_file_associate_add(Eio_File *ls,
const char *key,
const void *data, Eina_Free_Cb free_cb);
/**
* @brief Associate data with the current filtered file.
* @param ls The Eio_File ls request currently calling the filter callback.
* @param key The key to associate data to (will not be copied, and the pointer will be used as long as the file is not notified).
* @param data The data to associate the data to.
* @param free_cb The function to call to free the associated data, @p free will be called if not specified.
* @return EINA_TRUE if insertion was fine.
*
* This function could only be safely called from within the filter callback.
* If you need eio to make a proper copy of the @p key to be safe use
* @ref eio_file_associate_add instead.
*/
EAPI Eina_Bool eio_file_associate_direct_add(Eio_File *ls,
const char *key,
const void *data, Eina_Free_Cb free_cb);
/**
* @brief Get the data associated during the filter callback inside the main loop
* @param ls The Eio_File ls request currently calling the notify callback.
* @param key The key pointing to the data to retrieve.
* @return the data associated with the key or @p NULL if not found.
*/
EAPI void *eio_file_associate_find(Eio_File *ls, const char *key);
/**
* @}
*/
/**
* @}
*/

View File

@ -17,167 +17,6 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
/**
* @page tutorial_dir_copy eio_dir_copy() tutorial
*
* To use eio_dir_copy(), you basically need the source and
* destination files (or directories), and set three callbacks:
*
* @li The notification callback, which allows you to know if a file or
* a directory is copied, and the progress of the copy.
* @li The end callback, which is called when the copy is finished.
* @li The error callback, which is called if an error occured. You
* can then retrieve the error type as an errno error.
*
* @warning It is the user's duty to provide the "right target". It
* means that copying to '.' will copy the content directly inside '.'
* and not in a subdirectory.
*
* Here is a simple example:
*
* @code
* #include <Ecore.h>
* #include <Eio.h>
*
* static void
* _test_notify_cb(void *data, Eio_File *handler, const Eio_Progress *info)
* {
* switch (info->op)
* {
* case EIO_FILE_COPY:
* printf("[%s] %f%%\n", info->dest, info->percent);
* break;
* case EIO_DIR_COPY:
* printf("global [%li/%li] %f%%\n", info->current, info->max, info->percent);
* break;
* }
* }
*
* static void
* _test_done_cb(void *data, Eio_File *handler)
* {
* printf("copy done\n");
* ecore_main_loop_quit();
* }
*
* static void
* _test_error_cb(int error, Eio_File *handler, void *data)
* {
* fprintf(stderr, "error: [%s]\n", strerror(error));
* ecore_main_loop_quit();
* }
*
* int
* main(int argc, char **argv)
* {
* Eio_File *cp;
*
* if (argc != 3)
* {
* fprintf(stderr, "eio_cp source_file destination_file\n");
* return -1;
* }
*
* ecore_init();
* eio_init();
*
* cp = eio_dir_copy(argv[1], argv[2],
* _test_notify_cb,
* _test_done_cb,
* _test_error_cb,
* NULL);
*
* ecore_main_loop_begin();
*
* eio_shutdown();
* ecore_shutdown();
*
* return 0;
* }
* @endcode
*/
/**
* @page tutorial_dir_stat_ls eio_dir_stat_ls() tutorial
*
* @li The filter callback, which allow or not a file to be seen
* by the main loop handler. This callback run in a separated thread.
* @li The main callback, which receive in the main loop all the file
* that are allowed by the filter. If you are updating a user interface
* it make sense to delay the insertion a little, so you get a chance
* to update the canvas for a bunch of file instead of one by one.
* @li The end callback, which is called in the main loop when the
* content of the directory has been correctly scanned and all the
* file notified to the main loop.
* @li The error callback, which is called if an error occured or
* if the listing was cancelled during it's run. You can then retrieve
* the error type as an errno error.
*
* Here is a simple example that implement a stupidly simple replacement for find:
*
* @code
* #include <Ecore.h>
* #include <Eio.h>
*
* static Eina_Bool
* _test_filter_cb(void *data, Eio_File *handler, const Eina_File_Direct_Info *info)
* {
* fprintf(stderr, "ACCEPTING: %s\n", info->path);
* return EINA_TRUE;
* }
*
* static void
* _test_main_cb(void *data, Eio_File *handler, const Eina_File_Direct_Info *info)
* {
* fprintf(stderr, "PROCESS: %s\n", info->path);
* }
*
* static void
* _test_done_cb(void *data, Eio_File *handler)
* {
* printf("ls done\n");
* ecore_main_loop_quit();
* }
*
* static void
* _test_error_cb(void *data, Eio_File *handler, int error)
* {
* fprintf(stderr, "error: [%s]\n", strerror(error));
* ecore_main_loop_quit();
* }
*
* int
* main(int argc, char **argv)
* {
* Eio_File *cp;
*
* if (argc != 2)
* {
* fprintf(stderr, "eio_ls directory\n");
* return -1;
* }
*
* ecore_init();
* eio_init();
*
* cp = eio_dir_stat_ls(argv[1],
* _test_filter_cb,
* _test_main_cb,
* _test_done_cb,
* _test_error_cb,
* NULL);
*
* ecore_main_loop_begin();
*
* eio_shutdown();
* ecore_shutdown();
*
* return 0;
* }
*
* @endcode
*/
#include "eio_private.h"
#include "Eio.h"
@ -941,25 +780,6 @@ _eio_dir_stat_error(void *data, Ecore_Thread *thread __UNUSED__)
*============================================================================*/
/**
* @addtogroup Eio_Group Eio Reference API
*
* @{
*/
/**
* @brief Copy a directory and it's content asynchronously
* @param source Should be the name of the directory to copy the data from.
* @param dest Should be the name of the directory to copy the data to.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will copy a directory and all it's content from source to dest.
* It will try to use splice if possible, if not it will fallback to mmap/write.
* It will try to preserve access right, but not user/group identity.
*/
EAPI Eio_File *
eio_dir_copy(const char *source,
const char *dest,
@ -1001,20 +821,6 @@ eio_dir_copy(const char *source,
return &copy->progress.common;
}
/**
* @brief Move a directory and it's content asynchronously
* @param source Should be the name of the directory to copy the data from.
* @param dest Should be the name of the directory to copy the data to.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will move a directory and all it's content from source to dest.
* It will try first to rename the directory, if not it will try to use splice
* if possible, if not it will fallback to mmap/write.
* It will try to preserve access right, but not user/group identity.
*/
EAPI Eio_File *
eio_dir_move(const char *source,
const char *dest,
@ -1056,19 +862,6 @@ eio_dir_move(const char *source,
return &move->progress.common;
}
/**
* @brief Remove a directory and it's content asynchronously
* @param path Should be the name of the directory to destroy.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will move a directory and all it's content from source to dest.
* It will try first to rename the directory, if not it will try to use splice
* if possible, if not it will fallback to mmap/write.
* It will try to preserve access right, but not user/group identity.
*/
EAPI Eio_File *
eio_dir_unlink(const char *path,
Eio_Filter_Direct_Cb filter_cb,
@ -1108,19 +901,6 @@ eio_dir_unlink(const char *path,
return &rmrf->progress.common;
}
/**
* @brief List the content of a directory and all it's sub-content asynchronously
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_dir_stat_find.
* @return A reference to the IO operation.
*
* eio_dir_stat_find() run eina_file_stat_ls() recursivly in a separated thread using
* ecore_thread_feedback_run. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_dir_stat_ls(const char *dir,
Eio_Filter_Direct_Cb filter_cb,
@ -1156,6 +936,3 @@ eio_dir_stat_ls(const char *dir,
return &async->ls.common;
}
/**
* @}
*/

View File

@ -19,89 +19,6 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
/**
* @page tutorial_file_ls eio_file_ls() tutorial
*
* To use eio_file_ls(), you just need to define four callbacks:
*
* @li The filter callback, which allow or not a file to be seen
* by the main loop handler. This callback run in a separated thread.
* @li The main callback, which receive in the main loop all the file
* that are allowed by the filter. If you are updating a user interface
* it make sense to delay the insertion a little, so you get a chance
* to update the canvas for a bunch of file instead of one by one.
* @li The end callback, which is called in the main loop when the
* content of the directory has been correctly scanned and all the
* file notified to the main loop.
* @li The error callback, which is called if an error occured or
* if the listing was cancelled during it's run. You can then retrieve
* the error type as an errno error.
*
* Here is a simple example:
*
* @code
* #include <Ecore.h>
* #include <Eio.h>
*
* static Eina_Bool
* _test_filter_cb(void *data, Eio_File *handler, const char *file)
* {
* fprintf(stderr, "ACCEPTING: %s\n", file);
* return EINA_TRUE;
* }
*
* static void
* _test_main_cb(void *data, Eio_File *handler, const char *file)
* {
* fprintf(stderr, "PROCESS: %s\n", file);
* }
*
* static void
* _test_done_cb(void *data, Eio_File *handler)
* {
* printf("ls done\n");
* ecore_main_loop_quit();
* }
*
* static void
* _test_error_cb(void *data, Eio_File *handler, int error)
* {
* fprintf(stderr, "error: [%s]\n", strerror(error));
* ecore_main_loop_quit();
* }
*
* int
* main(int argc, char **argv)
* {
* Eio_File *cp;
*
* if (argc != 2)
* {
* fprintf(stderr, "eio_ls directory\n");
* return -1;
* }
*
* ecore_init();
* eio_init();
*
* cp = eio_file_ls(argv[1],
* _test_filter_cb,
* _test_main_cb,
* _test_done_cb,
* _test_error_cb,
* NULL);
*
* ecore_main_loop_begin();
*
* eio_shutdown();
* ecore_shutdown();
*
* return 0;
* }
*
* @endcode
*/
#include "eio_private.h"
#include "Eio.h"
@ -757,25 +674,6 @@ eio_async_error(void *data, Ecore_Thread *thread __UNUSED__)
* API *
*============================================================================*/
/**
* @addtogroup Eio_Group Eio Reference API
*
* @{
*/
/**
* @brief List content of a directory without locking your app.
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_file_ls.
* @return A reference to the IO operation.
*
* eio_file_ls run eina_file_ls in a separated thread using ecore_thread_feedback_run. This prevent
* any lock in your apps.
*/
EAPI Eio_File *
eio_file_ls(const char *dir,
Eio_Filter_Cb filter_cb,
@ -811,19 +709,6 @@ eio_file_ls(const char *dir,
return &async->ls.common;
}
/**
* @brief List content of a directory without locking your app.
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_file_direct_ls.
* @return A reference to the IO operation.
*
* eio_file_direct_ls run eina_file_direct_ls in a separated thread using
* ecore_thread_feedback_run. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_file_direct_ls(const char *dir,
Eio_Filter_Direct_Cb filter_cb,
@ -859,19 +744,6 @@ eio_file_direct_ls(const char *dir,
return &async->ls.common;
}
/**
* @brief List content of a directory without locking your app.
* @param dir The directory to list.
* @param filter_cb Callback called from another thread.
* @param main_cb Callback called from the main loop for each accepted file.
* @param done_cb Callback called from the main loop when the content of the directory has been listed.
* @param error_cb Callback called from the main loop when the directory could not be opened or listing content has been canceled.
* @param data Data passed to callback and not modified at all by eio_file_stat_ls.
* @return A reference to the IO operation.
*
* eio_file_stat_ls() run eina_file_stat_ls() in a separated thread using
* ecore_thread_feedback_run. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_file_stat_ls(const char *dir,
Eio_Filter_Direct_Cb filter_cb,
@ -907,14 +779,6 @@ eio_file_stat_ls(const char *dir,
return &async->ls.common;
}
/**
* @brief Cancel any Eio_File.
* @param ls The asynchronous IO operation to cancel.
* @return EINA_FALSE if the destruction is delayed, EINA_TRUE if it's done.
*
* This will cancel any kind of IO operation and cleanup the mess. This means
* that it could take time to cancel an IO.
*/
EAPI Eina_Bool
eio_file_cancel(Eio_File *ls)
{
@ -922,13 +786,6 @@ eio_file_cancel(Eio_File *ls)
return ecore_thread_cancel(ls->thread);
}
/**
* @brief Check if an Eio_File operation has been cancelled.
* @param ls The asynchronous IO operation to check.
* @return EINA_TRUE if it was canceled, EINA_FALSE other wise.
*
* In case of an error it also return EINA_TRUE.
*/
EAPI Eina_Bool
eio_file_check(Eio_File *ls)
{
@ -936,14 +793,6 @@ eio_file_check(Eio_File *ls)
return ecore_thread_check(ls->thread);
}
/**
* @brief Return the container during EIO operation
* @param ls The asynchronous IO operation to retrieve container from.
* @return NULL if not available, a DIRP if it is.
*
* This is only available and make sense in the thread callback, not in
* the mainloop.
*/
EAPI void *
eio_file_container_get(Eio_File *ls)
{
@ -951,17 +800,6 @@ eio_file_container_get(Eio_File *ls)
return ls->container;
}
/**
* @brief Associate data with the current filtered file.
* @param ls The Eio_File ls request currently calling the filter callback.
* @param key The key to associate data to.
* @param data The data to associate the data to.
* @param free_cb The function to call to free the associated data, @p free will be called if not specified.
* @return EINA_TRUE if insertion was fine.
*
* This function could only be safely called from within the filter callback.
* If you don't need to copy the key around you can use @ref eio_file_associate_direct_add
*/
EAPI Eina_Bool
eio_file_associate_add(Eio_File *ls,
const char *key,
@ -976,18 +814,6 @@ eio_file_associate_add(Eio_File *ls,
eio_associate_malloc(data, free_cb));
}
/**
* @brief Associate data with the current filtered file.
* @param ls The Eio_File ls request currently calling the filter callback.
* @param key The key to associate data to (will not be copied, and the pointer will be used as long as the file is not notified).
* @param data The data to associate the data to.
* @param free_cb The function to call to free the associated data, @p free will be called if not specified.
* @return EINA_TRUE if insertion was fine.
*
* This function could only be safely called from within the filter callback.
* If you need eio to make a proper copy of the @p key to be safe use
* @ref eio_file_associate_add instead.
*/
EAPI Eina_Bool
eio_file_associate_direct_add(Eio_File *ls,
const char *key,
@ -1002,12 +828,6 @@ eio_file_associate_direct_add(Eio_File *ls,
eio_associate_malloc(data, free_cb));
}
/**
* @brief Get the data associated during the filter callback inside the main loop
* @param ls The Eio_File ls request currently calling the notify callback.
* @param key The key pointing to the data to retrieve.
* @return the data associated with the key or @p NULL if not found.
*/
EAPI void *
eio_file_associate_find(Eio_File *ls, const char *key)
{
@ -1021,19 +841,6 @@ eio_file_associate_find(Eio_File *ls, const char *key)
return search->data;
}
/**
* @brief Copy a file asynchronously
* @param source Should be the name of the file to copy the data from.
* @param dest Should be the name of the file to copy the data to.
* @param progress_cb Callback called to know the progress of the copy.
* @param done_cb Callback called when the copy is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will copy a file from source to dest. It will try to use splice
* if possible, if not it will fallback to mmap/write. It will try to preserve
* access right, but not user/group identification.
*/
EAPI Eio_File *
eio_file_copy(const char *source,
const char *dest,
@ -1070,20 +877,6 @@ eio_file_copy(const char *source,
return &copy->common;
}
/**
* @brief Move a file asynchronously
* @param source Should be the name of the file to move the data from.
* @param dest Should be the name of the file to move the data to.
* @param progress_cb Callback called to know the progress of the move.
* @param done_cb Callback called when the move is done.
* @param error_cb Callback called when something goes wrong.
* @param data Private data given to callback.
*
* This function will copy a file from source to dest. It will try to use splice
* if possible, if not it will fallback to mmap/write. It will try to preserve
* access right, but not user/group identification.
*/
EAPI Eio_File *
eio_file_move(const char *source,
const char *dest,
@ -1120,7 +913,3 @@ eio_file_move(const char *source,
return &move->progress.common;
}
/**
* @}
*/

View File

@ -205,16 +205,6 @@ eio_associate_free(void *data)
* API *
*============================================================================*/
/**
* @addtogroup Eio_Group Eio Reference API
*
* @{
*/
/**
* @brief Initialize eio and all it's required submodule.
* @return the current number of eio users.
*/
EAPI int
eio_init(void)
{
@ -235,10 +225,6 @@ eio_init(void)
return _eio_count;
}
/**
* @brief Shutdown eio and all it's submodule if possible.
* @return the number of pending users of eio.
*/
EAPI int
eio_shutdown(void)
{
@ -277,7 +263,3 @@ eio_shutdown(void)
eina_shutdown();
return _eio_count;
}
/**
* @}
*/

View File

@ -334,22 +334,6 @@ eio_file_container_set(Eio_File *common, void *container)
* API *
*============================================================================*/
/**
* @addtogroup Eio_Group Eio Reference API
*
* @{
*/
/**
* @brief Stat a file/directory.
* @param path The path to stat.
* @param done_cb Callback called from the main loop when stat was successfully called..
* @param error_cb Callback called from the main loop when stat failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_direct_stat basically call stat in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_file_direct_stat(const char *path,
Eio_Stat_Cb done_cb,
@ -379,16 +363,6 @@ eio_file_direct_stat(const char *path,
return &s->common;
}
/**
* @brief Unlink a file/directory.
* @param path The path to unlink.
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_unlink basically call unlink in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_file_unlink(const char *path,
Eio_Done_Cb done_cb,
@ -417,17 +391,6 @@ eio_file_unlink(const char *path,
return &l->common;
}
/**
* @brief Create a new directory.
* @param path The directory path to create.
* @param mode The permission to set, follow (mode & ~umask & 0777).
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_mkdir basically call mkdir in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_file_mkdir(const char *path,
mode_t mode,
@ -458,17 +421,6 @@ eio_file_mkdir(const char *path,
return &r->common;
}
/**
* @brief Change right of a path.
* @param path The directory path to change access right.
* @param mode The permission to set, follow (mode & ~umask & 0777).
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_chmod basically call chmod in another thread. This prevent any lock in your apps.
*/
EAPI Eio_File *
eio_file_chmod(const char *path,
mode_t mode,
@ -499,25 +451,13 @@ eio_file_chmod(const char *path,
return &r->common;
}
/**
* @brief Change owner of a path.
* @param path The directory path to change owner.
* @param user The new user to set (could be NULL).
* @param group The new group to set (could be NULL).
* @param done_cb Callback called from the main loop when the directory has been created.
* @param error_cb Callback called from the main loop when the directory failed to be created or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_chown determine the uid/gid that correspond to both user and group string and then call chown. This prevent any lock in your apps by calling
* this function from another thread. The string could be the name of the user or the name of the group or directly their numerical value.
*/
EAPI Eio_File *eio_file_chown(const char *path,
const char *user,
const char *group,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data)
EAPI Eio_File *
eio_file_chown(const char *path,
const char *user,
const char *group,
Eio_Done_Cb done_cb,
Eio_Error_Cb error_cb,
const void *data)
{
Eio_File_Chown *c = NULL;
@ -543,7 +483,3 @@ EAPI Eio_File *eio_file_chown(const char *path,
return &c->common;
}
/**
* @}
*/

View File

@ -280,12 +280,6 @@ _eio_file_xattr_setup_set(Eio_File_Xattr *async,
* API *
*============================================================================*/
/**
* @addtogroup Eio_Group Eio Reference API
*
* @{
*/
EAPI Eio_File *
eio_file_xattr(const char *path,
Eio_Filter_Cb filter_cb,
@ -321,17 +315,6 @@ eio_file_xattr(const char *path,
return &async->ls.common;
}
/**
* @brief Retrieve the extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_get call getxattr from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *
eio_file_xattr_get(const char *path,
const char *attribute,
@ -353,17 +336,6 @@ eio_file_xattr_get(const char *path,
return _eio_file_xattr_setup_get(async, path, attribute, error_cb, data);
}
/**
* @brief Retrieve a string extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_string_get call eina_xattr_string_get from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *
eio_file_xattr_string_get(const char *path,
const char *attribute,
@ -385,17 +357,6 @@ eio_file_xattr_string_get(const char *path,
return _eio_file_xattr_setup_get(async, path, attribute, error_cb, data);
}
/**
* @brief Retrieve a extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_double_get call eina_xattr_double_get from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *
eio_file_xattr_double_get(const char *path,
const char *attribute,
@ -417,17 +378,6 @@ eio_file_xattr_double_get(const char *path,
return _eio_file_xattr_setup_get(async, path, attribute, error_cb, data);
}
/**
* @brief Retrieve a extended attribute of a file/directory.
* @param path The path to retrieve the extended attribute from.
* @param attribute The name of the attribute to retrieve.
* @param done_cb Callback called from the main loop when getxattr succeeded.
* @param error_cb Callback called from the main loop when getxattr failed or has been canceled.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_int_get call eina_xattr_int_get from another thread. This prevent lock in your apps.
*/
EAPI Eio_File *
eio_file_xattr_int_get(const char *path,
const char *attribute,
@ -449,20 +399,6 @@ eio_file_xattr_int_get(const char *path,
return _eio_file_xattr_setup_get(async, path, attribute, error_cb, data);
}
/**
* @brief Define an extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_data The data to link the attribute with.
* @param xattr_size The size of the data to set.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_set call setxattr from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *
eio_file_xattr_set(const char *path,
const char *attribute,
@ -489,19 +425,6 @@ eio_file_xattr_set(const char *path,
return _eio_file_xattr_setup_set(async, path, attribute, flags, done_cb, error_cb, data);
}
/**
* @brief Define a string extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_string The string to link the attribute with.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_string_set call eina_xattr_string_set from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *
eio_file_xattr_string_set(const char *path,
const char *attribute,
@ -534,19 +457,6 @@ eio_file_xattr_string_set(const char *path,
return _eio_file_xattr_setup_set(async, path, attribute, flags, done_cb, error_cb, data);
}
/**
* @brief Define an extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_double The value to link the attribute with.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_double_set call eina_xattr_double_set from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *
eio_file_xattr_double_set(const char *path,
const char *attribute,
@ -570,19 +480,6 @@ eio_file_xattr_double_set(const char *path,
return _eio_file_xattr_setup_set(async, path, attribute, flags, done_cb, error_cb, data);
}
/**
* @brief Define an extented attribute on a file/directory.
* @param path The path to set the attribute on.
* @param attribute The name of the attribute to define.
* @param xattr_int The value to link the attribute with.
* @param done_cb The callback called from the main loop when setxattr succeeded.
* @param error_cb The callback called from the main loop when setxattr failed.
* @param data Private data given to callback.
* @return A reference to the IO operation.
*
* eio_file_xattr_int_set call eina_xattr_int_set from another thread. This prevent lock in your apps. If
* the writing succeeded, the done_cb will be called even if a cancel was requested, but came to late.
*/
EAPI Eio_File *
eio_file_xattr_int_set(const char *path,
const char *attribute,
@ -606,6 +503,3 @@ eio_file_xattr_int_set(const char *path,
return _eio_file_xattr_setup_set(async, path, attribute, flags, done_cb, error_cb, data);
}
/**
* @}
*/