forked from enlightenment/efl
eio: update efl_io_manager_ls example.
This commit is contained in:
parent
33fd77e9e4
commit
6645743f79
|
@ -39,12 +39,13 @@ done_cb(void *data EINA_UNUSED,
|
||||||
|
|
||||||
// Progress used to be the "Eio_Main_Cb" family of callbacks in the legacy API.
|
// Progress used to be the "Eio_Main_Cb" family of callbacks in the legacy API.
|
||||||
static void
|
static void
|
||||||
progress_cb(void *data EINA_UNUSED, Eina_Accessor *access)
|
progress_cb(void *data EINA_UNUSED, Eina_Array *array)
|
||||||
{
|
{
|
||||||
|
Eina_Array_Iterator it;
|
||||||
const char *filename;
|
const char *filename;
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
EINA_ACCESSOR_FOREACH(access, count, filename)
|
EINA_ARRAY_ITER_NEXT(array, count, filename, it)
|
||||||
printf("%s listing filename: %s\n", __FUNCTION__, filename);
|
printf("%s listing filename: %s\n", __FUNCTION__, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,19 +9,7 @@
|
||||||
#include <Eio.h>
|
#include <Eio.h>
|
||||||
#include <Ecore.h>
|
#include <Ecore.h>
|
||||||
|
|
||||||
void error_cb(void *data, const Efl_Event *ev)
|
Eina_Value
|
||||||
{
|
|
||||||
Efl_Future_Event_Failure *failure = ev->info;
|
|
||||||
const char *msg = eina_error_msg_get(failure->error);
|
|
||||||
Efl_Io_Manager *job = data;
|
|
||||||
(void) job;
|
|
||||||
|
|
||||||
EINA_LOG_ERR("error: %s", msg);
|
|
||||||
|
|
||||||
ecore_main_loop_quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
static Eina_Value
|
|
||||||
_close_cb(void *data EINA_UNUSED, const Eina_Value array, const Eina_Future *dead EINA_UNUSED)
|
_close_cb(void *data EINA_UNUSED, const Eina_Value array, const Eina_Future *dead EINA_UNUSED)
|
||||||
{
|
{
|
||||||
printf("%s closed all files.\n", __FUNCTION__);
|
printf("%s closed all files.\n", __FUNCTION__);
|
||||||
|
|
Loading…
Reference in New Issue