From 2217f284f735cd3d9bb6657914104ae2c2e8a7be Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Sat, 25 Jun 2011 22:49:01 +0000 Subject: [PATCH] eio: make it possible to know if an Eio_File was cancelled. SVN revision: 60689 --- legacy/eio/src/lib/eio_file.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/legacy/eio/src/lib/eio_file.c b/legacy/eio/src/lib/eio_file.c index f3389caa41..cdcaa120b6 100644 --- a/legacy/eio/src/lib/eio_file.c +++ b/legacy/eio/src/lib/eio_file.c @@ -886,6 +886,20 @@ 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) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_TRUE); + return ecore_thread_check(ls->thread); +} + /** * @brief Return the container during EIO operation * @param ls The asynchronous IO operation to retrieve container from.