Commit Graph

323 Commits

Author SHA1 Message Date
Cedric BAIL e33d0d9996 eio: first convertion to new future/promise. 2017-09-11 16:10:46 -07:00
Felipe Magno de Almeida 2544456819 eio: Fix eio model children count in initialization of children model 2017-09-07 12:36:48 +09:00
Vincent Torri 45bcc87e76 eio: fix correct stat structure on Windows 32 bits
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-14 10:17:24 -07:00
Al Poole 169a08c03a efreetd: BSD optimizations.
Summary: Related to ticket T5475.

Reviewers: raster, cedric

Subscribers: jpeg, cedric, raster

Differential Revision: https://phab.enlightenment.org/D4865

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-10 12:26:08 -07:00
Al Poole 7ee68cb4e2 eio: improve Kevent (FreeBSD et. al)
Summary: Adds initial support for file/directory creation and deletion detection.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: raster, jpeg

Differential Revision: https://phab.enlightenment.org/D4811

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-28 10:17:17 -07:00
Carsten Haitzler 24b77d8ed9 eio monitor - remove unused vars and fix warning 2017-04-21 16:39:06 +09:00
Cedric BAIL 9bd80d542c eio: use new API eina_file_close_on_exec. 2017-04-18 16:56:40 -07:00
Cedric BAIL aef1ee96e8 eio: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Felipe Magno de Almeida a1f2db255b cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00
Daniel Kolesa 192ea2c9ad eio, edje: use new property impl syntax 2016-12-27 17:47:00 +01:00
Ivan Furs 3df48e281e eio: Correct deletion backend
Summary:

This patch fixes the bug Fileselector.
When backend is deleted need to remove event handler from the list.
This commit adds ecore_main_win32_handler_del for correct clean
handlers for cases when monitor backend was created by
eio_monitor_backend_add(Windows method) or eio_monitor_fallback_add. To
remove them needed to use eio_monitor_backend_del(Windows method) or
eio_monitor_fallback_del. To identify the method which should free
backend was added flag monitor->fallback instead of using static
_eio_monitor_win32_native. This solves conflicts if 2  monitors was
created and the second monitor changed the _eio_monitor_win32_native
variable value. When 1 monitor removed it will be deleted correctly .

@fix

Reviewers: NikaWhite

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4518
2016-12-27 16:20:59 +02:00
Jee-Yong Um f1ab136abc doxygen: remove reference warnings.
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4503

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-20 16:39:30 -08:00
Ivan Furs 1c0b3668e1 Eio_monitor: support native monitor for Win32 (T4978)
Test Plan:
eio_monitor_backend_add()  and eio_monitor_fallback_add use different structures
**eio_monitor_backend_add()  **
struct _Eio_Monitor_Backend
{
   Eio_Monitor               *parent;
   Eio_Monitor_Win32_Watcher *watcher_file;
   Eio_Monitor_Win32_Watcher *watcher_dir;
   Eio_Monitor_Win32_Watcher *watcher_parent;
};

**eio_monitor_fallback_add()**
struct _Eio_Monitor_Backend
{
   Eio_Monitor *parent;

   Eina_Stat self;
   Eina_Hash *children;

   Ecore_Timer *timer;
   Ecore_Idler *idler;
   Ecore_Thread *work;

   int version;

   Eina_Bool delete_me : 1;
   Eina_Bool initialised : 1;
   Eina_Bool destroyed : 1;
};

therefore, an error occurs
**void eio_monitor_backend_del**(Eio_Monitor *monitor)
{

   if (!_eio_monitor_win32_native)          <------_eio_monitor_win32_native is EINA_TRUE
     {

        eio_monitor_fallback_del(monitor);  <------ignored------
        return;                             <------ignored------
     }

   _eio_monitor_win32_watcher_free(monitor->backend->watcher_parent);
   _eio_monitor_win32_watcher_free(monitor->backend->watcher_dir);
   _eio_monitor_win32_watcher_free(monitor->backend->watcher_file);
   free(monitor->backend);
   monitor->backend = NULL;
}

Reviewers: raster, vtorri, an.kroitor, jpeg, reutskiy.v.v, FurryMyad, cedric

Reviewed By: cedric

Subscribers: vtorri, artem.popov, cedric, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D4492

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-16 15:27:14 -08:00
Cedric BAIL 9393560178 eio: check error case for eina_value_get.
CID 1356609
2016-12-16 14:10:58 -08:00
Carsten Haitzler 2de9f552b9 eio - have a smaller mempool as i can see 270k of stuff hanging about
eio seems to consume memory even when not in active use. this saves
most of 270k even when no longer needed. the mempool just keeps stuff
around pretty much forever. also the memory size limit doesn't work at
asll if yous set it to something other than -1. it just locks eio up.

@optimize
2016-12-03 18:01:53 +09:00
Jee-Yong Um e037f30be4 efl.io.manager: fix eo types and indent
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4413

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-28 11:35:27 -08:00
Stefan Schmidt 124effc524 docs: eio: finish up missing eo file docs in eio 2016-11-11 09:15:24 +01:00
Stefan Schmidt a670418431 docs: efl_io: add missing docs for efl_io_manager 2016-11-07 15:53:35 +01:00
Daniel Kolesa a8f240e10d ecore_audio, eio eo: remove pointers 2016-11-04 17:14:30 +01:00
Stefan Schmidt 4a66bd14b7 docs: document all missing type defines in our eo files
With this commit we reach 100% alias doc coverage for our eo files.
2016-11-03 11:57:40 +01:00
Vitor Sousa 9f2270804b eio model: remove useless efreet_mime_type_get call 2016-10-28 21:21:57 -02:00
Stefan Schmidt 0fd32899ec docs: eio: document missing structs 2016-10-27 18:22:42 +02:00
Cedric Bail fb8d139ad0 eio: fetch mime type asynchronously. 2016-10-25 16:54:55 -07:00
Jean-Philippe Andre 7f6f282210 Efl.Loop.User: Use prefix to rename efl_loop_user_loop_get
efl_loop_user_loop_get is idiotic. efl_loop_get should be good enough.
2016-10-06 12:24:59 +09:00
Jean-Philippe Andre 4e811bed17 eio_model: Provide main loop even without parent
An eio model (and I believe most other models as well, in fact)
require a Efl.Loop.User as parent in order for efl future/promises
to work. This adds a fallback code directly inside eio model. The
alternative was to parent and efl_del all models in fileselector.

See T4686
2016-10-06 09:43:19 +09:00
Al Poole 72125bd8c3 eio - put in fix by disabling some fallback code
as per https://phab.enlightenment.org/T4619

fixes 4619

@fix
2016-10-04 15:05:58 +09:00
Felipe Magno de Almeida 1a2014a122 efl: Update Efl.Model to use new Efl_Promise and Efl_Future
Replaced all Eina_Promise_Owner and Eina_Promise with Efl_Promise and
Efl_Future.
2016-09-29 13:12:27 -03:00
Vitor Sousa 87fec80413 eio model: use empty mime type when efreet is unable to determine it
FIX T4502

@fix
2016-09-23 13:21:55 -03:00
Cedric BAIL 59a77b3315 eio: properly track destruction of all Eet eio request.
@fix T4550
2016-09-12 16:19:10 -07:00
Cedric BAIL bd362b13d6 efl: add documentation and last cleanup of the API. 2016-09-08 15:16:43 -07:00
Cedric BAIL 0c067fb62f eio: implement efl_io_manager_xattr_ls 2016-09-08 15:16:43 -07:00
Cedric BAIL c6e145da2d eio: add an internal function for getting xattr in bulk. 2016-09-08 15:16:43 -07:00
Cedric BAIL 5579d2f5cd eio: make xattr list packed for better performance. 2016-09-08 15:16:43 -07:00
Cedric BAIL d7fbd6f13e eio: fix allocation in eio_dir to reuse common safer infra. 2016-09-08 15:16:43 -07:00
Cedric Bail 52c63190d5 eio: rework efl_io_manager to use efl_future. 2016-09-08 15:16:23 -07:00
Cedric Bail 11fe9b8cd9 eio: add internal function able to build array instead of triggering a callback per files. 2016-09-08 14:58:06 -07:00
Cedric Bail d26a0a2f70 eio: track length of resulting operation to be reported by futures. 2016-09-08 14:58:06 -07:00
Al Poole a19f730137 eio: fix kevent monitor to not SIGBUS. 2016-09-07 16:41:59 -07:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Vitor Sousa f02ff462e7 efl callbacks: update some events calls to no longer trigger legacy callbacks 2016-08-30 13:59:59 -03:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Stephen Houston 31f351ae4e Eio: Update my email address. 2016-08-05 20:33:27 -05:00
Cedric BAIL dd1d3f0d2d autotools: since it has been broken for some times and nobody noticed, let's remove per directory support. 2016-08-01 13:36:47 -07:00
Cedric Bail 57226d86ff eio: handle failure due to lack of access right. 2016-07-15 17:07:49 -07:00
Cedric Bail adff89dfc0 eio: make it possible to force fallback monitor for testing purpose. 2016-07-15 17:07:49 -07:00
Cedric Bail e93d6f90db eio: avoid access after death of eio handler due to inotify triggering IN_IGNORED event. 2016-07-15 17:07:49 -07:00
Cedric Bail bf369ba661 eio: cleanup thread pointer on thread finish. 2016-07-15 17:07:49 -07:00
Carsten Haitzler e3b6b74aa6 eio model - fix leak found by coverity
fix CID 1355012
2016-07-08 18:15:05 +09:00
Cedric BAIL b047bf7f64 eio: register one Efl_Io_Manager by default on the main loop at init time. 2016-06-22 13:19:13 -07:00
Cedric BAIL 10aadafcfd eio: rename eio_job to efl_io_manager.
There is still a lot of work to do in this API to make it efficient and
stable. Will try to get at it before 1.18 release.
2016-06-22 13:19:13 -07:00
Felipe Magno de Almeida 8e4f383d61 efl: Move promise parameter to return in data model
Summary:
Instead of:

efl_model_property_get("name", &promise);

now:

promise = efl_model_property_get("name");

Reviewers: stefan_schmidt, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4038
2016-06-16 22:01:07 -03:00
Larry Jr 3f1466b77d eio: Fixed Eio_Model monitor life cycle 2016-06-14 20:57:00 -03:00
Felipe Magno de Almeida f6d20c839e eio: Removed wrong attribution to promise vtable from Eio 2016-06-11 10:40:27 -03:00
Larry Jr 191bc882d4 eio: fixed Eina_Value_Type in model property mtime 2016-06-10 19:33:30 -03:00
Lauro Moura 46843551c0 eina: Remove value type promises
All values in promises are now considered as by-pointer.
2016-06-09 22:38:54 -03:00
Jean-Philippe Andre ba85c4eff9 eio: Fix build for windows
dllimport vs dllexport problem due to invalid include order.
Thanks @vtorri for the report

See 1ba06bb642
2016-06-07 15:09:07 +09:00
Benjamin Jacobs 35bae18e43 eio: fix pointer comparison.
Fix a warning on dragonfly.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 12:05:43 -07:00
Cedric BAIL b1f62061b9 eio: remove eio_model that should already be part of Eio.h. 2016-06-06 11:01:16 -07:00
Larry Jr c9c178f2db eio: fix free eina_promises in error_callbacks 2016-06-06 03:30:42 -03:00
Larry Jr b57579a295 eio: treat Eina_Accessor NULL as success instead of failure in model
We treated as errors when Eina_Accessor was NULL, which meant
that we could never get an empty range os children. Treat it
as success and pass an empty Eina_Accessor
2016-06-05 22:53:55 -03:00
Larry Jr 1ba06bb642 eio: Add mime_type property in Eio_Model 2016-06-05 22:08:06 -03:00
Larry Jr c33caa86ab eio: Eio_Model parent_get return parent model 2016-06-05 22:08:06 -03:00
Larry Jr e14042eabe eio: Fix Eio_Model promise accessor 2016-06-05 22:08:06 -03:00
Felipe Magno de Almeida 8fec0d5139 eina: Remove unnecessary indirection to promises
Now when dealing with pointer types, we will not get pointer to
pointer semantics in callbacks and eina_promise_owner_value_set
for Eina_Promise.

It will work as expected:

Eina_Promise_Owner* promise = eina_promise_add();

void* p = malloc(sizeof(T));
eina_promise_owner_value_set(promise, p, &free);
2016-06-03 17:22:12 -03:00
Daniel Kolesa b1946ca5d6 eolian: utilize the new void_ptr builtin across eo files
This lets me narrow down the remaining cases of pointers across the EFL.
The void pointers will later need to be reevaluated on per-case basis and
replaced appropriately where possible/feasible.
2016-06-02 13:00:26 +01:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Hermet Park 01c7fd7cda eio: fix build break.
there were missing eo headers.
fix and make it work again.
2016-05-28 19:08:03 +09:00
Lauro Moura 7241b7375d eio: Adds Eo-based Eio API
The legacy Eio_File factory functions are replaced by an Eo object
called Eo_Job that return promises wrapping the async file operations.
With this commit, the legacy Eio callbacks are replaced by the following
Eo/Promises counterparts :

* Done_Cb -> Promise then success callback
* Error_Cb -> Promise then error callback
* Main_Cb -> Promise progress callback
* Filter_Cb -> Job object event (more below)

Events are used to deliver and get the filter data. To differentiate
between the named and direct versions, they come in "filter,direct" and
"filter,name" versions.

Monitors were wrapped inside a new class Eo_Sentry.

The user creates a sentry object and adds monitoring targets to it,
listening to events on it.

The sentry event info is composed of two strings. The source string
is the path being monitored, i.e. the one passed to eio_sentry_add, and
the trigger string is the path that actually triggered the event, e.g.
a new file created in a monitored directory.
2016-05-25 21:32:03 -03:00
Lauro Moura 0eacdc03da eio: Call correct function to cleanup Eio_File.
The Eio functions operating on Eina_Files were just freeing
the Eio_File pointer on completion instead of calling eio_file_free
to unregister the thread.
2016-05-25 21:32:03 -03:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Tom Hacohen 138d4e1353 Efl model: Remove the no longer needed .Base hack. 2016-05-10 11:36:35 +01:00
Larry Jr 0c76f82a31 Efl, Eio, Eldbus, Elementary: new model API use eina_promise
Efl - efl_model_base changed to use eina_promise
Eio - eio_model use efl_model_base with promise
Eldbus - elddbus models use promise now
Elementary - elm_view_list and elm_view_form use new models with promise

updated all related examples and tests
2016-04-29 13:21:24 -03:00
Stefan Schmidt 3e4a902270 docs: eio: add class description for eio model class 2016-04-20 12:46:41 +02:00
Cedric BAIL 968dcaae34 eio: make it possible to build the library alone. 2016-04-14 16:18:19 -07:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 4e285d6a32 Eio model: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 14:05:50 +00:00
Vivek Ellur d64f50acfc eio_monitor: fix memory leak in eio monitor module
Summary:
Free the allocated memory in eio monitor win32 module.

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3160

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Vivek Ellur 491fdb94b0 eio_monitor: fix memory leak issue
Summary:
@fix

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3161

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Cedric BAIL a4c588b1e4 eio: make poll backend pass eio_test_monitor.c test suite.
Summary: The current poll backend code uses only filename when reporting changes, while eio tests (and presumably other backends) use absolute path. This makes poll backends behavior more consistent with other backends.

Test Plan: Ran eio test suite with poll backend.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3083

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-04 16:22:49 +02:00
Cedric BAIL 1bd5a60c75 eio: improve documentation.
This set of documentation update basically make it clearer that Eio
use Eina and do cross linking of function used by Eio to Eina. It
also copy some of the warning coming from Eina documentation into Eio.
2015-10-01 14:13:51 -07:00
Amitesh Singh 17a891e00d eio: fix typo in documentation 2015-09-28 21:57:35 +05:30
Cedric BAIL d00deaaef3 eio: add kevent backend.
Summary: Implement basic kqueue/kevent backend for eio. When it comes to tracking directory changes, this backend falls back to the polling one.

Test Plan: Ran Enlightenment for several days and some other EFL apps without any issue.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #e_on_freebsd, #efl

Differential Revision: https://phab.enlightenment.org/D2983

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-22 00:13:38 +02:00
Guillaume Friloux 1cc4d91dd5 eio: unify deletion of eina_file_ls's iterator.
Due to a bug with eio_file_stat_ls(), a previous patch
(73a23401ef) was written.

This patch change the way we delete returned eina iterator
from eina_file_ls in _eio_file_eina_ls_heavy() from a separate
thread, into eio_async_end() from the main thread.

To clarify the code, and avoid a useless call to
eina_iterator_free(), this patch also moves the deletion
of the same eina iterator from _eio_file_heavy() into
eio_async_end() as well.
2015-09-03 10:19:12 +01:00
Cedric BAIL c11f40a3eb eio: limit race condition during shutdown. 2015-08-19 20:22:57 +02:00
Daniel Kolesa 18502b8429 efl: fix doc references across the tree to validate right 2015-07-08 15:13:26 +01:00
Daniel Kolesa 7d40ec0ad9 ector,ecore,eio,emotion: convert some docs 2015-06-10 14:35:11 +01:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
Daniel Kolesa 058a9c9d88 eolian: new syntax for params/values/keys
Instead of "@in type name;" we now use "@in name: type;". This change
is done because of consistency with the rest of Eolian; pretty much
every other part of Eolian syntax uses the latter form.

This is a big breaking change in the .eo format, so please update your
.eo files accordingly and compile Elementary together with the EFL.

@feature
2015-05-18 16:14:31 +01:00
Yomi 2305084d09 eio: fix grammar and spelling mistakes in Eio.h.
Summary: Fix grammar and spelling mistakes in Eio.h

Reviewers: cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D2472

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-10 23:02:11 +02:00
Cedric BAIL 84ddee331b eio: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Carsten Haitzler 7d36abad25 eio - fix crashes due to stale eio files in tracking list
so eio_eet didnt free fiels the same as the rest of eio. it thought it
was special. it thought it could just go free() it's objects (even
though they inherit the core Eio_File object type in their structs).
everyone else ended up calling eio_file_free() EXCEPT eio_eet. so the
eio_(long)_file_set() funcs ewnded up adding this eio file to the
tracking list via eio_file_register() but never unregistered because
they really liked to just do their own thing anyway...

BAD CEDRIC! SPANKING TIME

http://33.media.tumblr.com/3422c76c33c3b9b045f623ff73e0bf8d/tumblr_mhvu61N9br1rbavngo1_500.gi

so this unifies all allocation to now use a single allocator (that
also ensures all eio async io objects are zero'd out), and a SINGLE
free path, and then it all works. no more valgrind complaints on e
shutdown/restart whilst eio "things" were used before or ... maybe
still around.

this should fix T2129

so try again "git master" after this commit.

@fix
2015-04-20 21:55:24 +09:00
Cedric BAIL 0784d5cc2a eio: reorder include to fix build on Windows. 2015-04-18 17:28:46 +02:00
Cedric BAIL b3cbb14af7 eio: correct header inclusion for Windows. 2015-04-14 22:27:40 +02:00
Felipe Magno de Almeida cdd597cb56 eio-model: Fixed concurrent access to filter_cb and monitoring empty directories
Added a spinlock, since contetion should be non-existant. And removed wrong if.
2015-04-10 17:23:12 -03:00
Felipe Magno de Almeida 22cfae5b8c eio_monitor: Removed unnecessary eio_file_direct_stat
Removed unnecessary asynchronous stat, which could make eio_monitor to
lose events between the monitor creation and stat completion.
2015-04-10 17:23:12 -03:00
Felipe Magno de Almeida d02f99ee21 eio-model: Fix Eio model races in tests
Removed sleep and implemented a deterministic way to test if the test has really finished.
2015-04-09 22:47:17 -03:00
Felipe Magno de Almeida 7928609a29 efl: move emodel to be an efl interfaces. 2015-04-05 16:23:38 +02:00
Larry Jr 2f53833331 emodel: api change property_get/set and event modelchange 2015-04-05 15:19:55 +02:00
Cedric BAIL 23cfd2b4f4 eio: fix coding style of Eio_Model. 2015-04-05 15:19:53 +02:00
Cedric BAIL 92be4f9c89 eio: use Eina_Log in Eio_Model. 2015-04-05 15:19:52 +02:00
Larry Jr 9ed6bea380 emodel: API changes and removed unnecessary eina_values copy and stringshares 2015-04-05 15:19:49 +02:00
Guilherme Lepsch 68a31df227 eio: fix mismatch datatypes for internal data model properties. 2015-04-05 15:19:47 +02:00
Larry Jr 05eecf5c8f emodel: Created Emodel and Eio_Model. 2015-04-05 15:19:45 +02:00
pierre lamot de767cabfa eio: don't restart a monitor on MacOSX when every paths have been removed.
This patch check that when a monitor is removed the FSEvent service, it is
not restarted if there is no more paths to monitor. This was generating an
error message from FSEvent.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot d958afd9fd eio: add OSX implementation of eio_monitor based on FSEvent
this patch adds an implementation of eio_monitor based on FSEvent
for OSX. This implentation has some limitations compared to inotify
implementation. Folowing events are not detected:
  - EIO_MONITOR_FILE_CLOSED
  - EIO_MONITOR_SELF_RENAME
  - EIO_MONITOR_SELF_DELETED

It should be noted that some events that happend before the call
to eio_monitor_add can be catched. This is why sleep timers have
been added in the test suite.

Tests have been added to check uncovered scenarios.

some things might still be improved:
  - self_deleted events for files might be handled by checking the
    file_name manually

  - self_deleted events for directories might be handled by setting
    kFSEventStreamCreateFlagWatchRoot. I've noticed by doing so that
	a lot more unwanted event are raised

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01:00
michelle legrand 73823ac7b0 eio: fix segmentation fault on eio_monitor for win32 api
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:58 +01:00
michelle legrand a9035c1cf5 eio: check that the file to be monitored is not an empty string.
This fix segmentation faults on Windows caused by eio_monitor events.

@fix
2015-02-11 17:03:37 +01:00
michelle legrand db55e76a4a eio: Win32 make GetOverlappedResult function non-blocking
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-30 10:49:49 +01:00
Cedric BAIL e6ff0a53ae eio: forcefully wait on shutdown for all thread to stop.
This should avoid potential crash during shutdown while some Eio thread
were still running. We are still not blocking for more than 30s, so if
an IO is blocked on a dead device, you should be fine.
2015-01-07 16:45:07 +01:00
Jean-Philippe Andre 8d9c6c0a00 inotify: Fix safety after read in 3 places
Fixes Coverity issues:
 - CID 1039565
 - CID 1039566
2014-10-28 10:54:51 +09:00
Adrien Nader 73d58b9446 eio: add doc for returns of eio_file_{mkdir,move,copy}, eio_dir_{move,copy}. 2014-10-20 18:28:19 +02:00
Philippe Caseiro a10d8585c9 eio: documentation for return values.
- eio_file_copy
 - eio_file_move
 - eio_dir_copy
 - eio_dir_move
 - eio_dir_unlink
2014-10-20 18:28:14 +02:00
Cedric BAIL 5e5e602ab0 eio: actually correctly set all field to NULL.
@fix T1729
2014-10-18 15:22:30 +02:00
Guillaume Friloux 73a23401ef Fix a bug with using Eio_File handler in main callback.
When using eio_file_stat_ls() (or any other exposing Eio_File *handler),
it will not be possible to use it from the main callback due to eio
freeing data too fast from the thread.

Moved frees from _eio_file_eina_ls_heavy() to eio_async_end() to be
sure that all the calls to main callback are over.
This implied adding the Eina_Iterator from eina_file_stat_ls to
the _Eio_File_Ls structure.
2014-10-09 15:53:01 -04:00
Daniel Juyung Seo 8ba2cc6fe9 doc: fixed typo. 2014-08-18 01:10:39 +09:00
Carsten Haitzler 257e853407 eio - fix possible stringhare del bug in dir chmod
coverity picked this up - CID 1039645. it does indeed look like a real
bug. if order->dirs is empty. for example.
2014-08-14 19:40:54 +09:00
Carsten Haitzler 8da87146b4 formatting fix 2014-08-14 19:39:46 +09:00
Jean-Philippe Andre f4a0c8054f Win64: Fix a bunch of warnings
Fix invalid casts.
Use printf("%z") where appropriate.
Fix unused variables warnings.

Thanks vtorri for the patch.

@fix
2014-05-29 20:02:16 +09:00
Jean-Philippe Andre 0405d8e9a5 Win32: Fix invalid free in eio monitor
You can't just duplicate a string once and free it three times...
2014-05-21 18:03:53 +09:00
Jérémy Zurcher f8c2c57406 do not use EINA_FALSE instead of NULL 2014-05-07 17:45:11 +02:00
Mike Blumenkrantz d03ecb0f3d "whether" has 2x 'h' 2014-04-10 09:27:51 -04:00
Mike Blumenkrantz cc6eed2f86 eio monitors no longer trigger a CRI error during free
@fix
2014-03-21 14:21:04 -04:00
Cedric BAIL 41a9e2149e eio: let's not divide by 0.
fix CID 1193208.
2014-03-20 16:47:25 +09:00
Cedric BAIL 20d95413c3 eio: check if we need to wake up thread when the memory limit is changed. 2014-03-07 16:49:14 +09:00
Cedric BAIL 5915780274 eio: make it possible to limit the amount of memory used by threads.
Eio does need to allocate memory from the thread, transmit it to the
main loop where it is processed and later on freed. If the main loop
is to slow to handle the stream of incoming data, a huge peak of
memory can happen. Some people may want to limit the amount of memory
used at peak time and so this new infrastructure make that possible.

@feature
2014-03-05 14:06:39 +09:00
Cedric BAIL 042407a39d eio: remove warning. 2014-03-05 14:06:27 +09:00
Cedric BAIL be25ab6f85 eio: let's report the path we didn't found. 2014-03-05 11:46:12 +09:00
Cedric BAIL a31102ab43 eio: factorize code to have one place where data are pushed. 2014-03-05 10:41:37 +09:00
Cedric BAIL e1e4774306 eio: improve log when monitoring files. 2014-03-05 10:40:55 +09:00
Jean-Philippe Andre 8fdd3992f0 Eio monitor: Fix crash on invalid data access
Fix race condition when touching/changing a (theme) file often.
An Eio_Monitor was marked as "delete_me" but the rename callback
was still called, leading to memory access to already freed
objects.

Test protocol was:
ELM_THEME=~/default.edj elementary_test &
watch touch ~/default.edj
2014-01-14 14:23:05 +09:00
Carsten Haitzler 323f293ab5 eio - protect against posible segv on rename with eio
this MIGHT fix T45 but i can't reproduce to confirm, but reading a
backtrace indicates this could have been the issue. it looks like
there is room for a dangling pointer anyway, so fix.

stable release - cherry-pick me!
2014-01-07 17:49:29 +09:00
Jihoon Kim 946a797e0d fix warning related to argument in generating doxygen 2014-01-07 11:27:15 +09:00
Jihoon Kim 8fcedfc017 fix 'found unknown command' warning in generating doxygen 2014-01-06 14:01:15 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Carsten Haitzler b07c0a76ce alpha1 release autofoo/build tree work to pass distcheck and actually work 2013-11-04 18:33:35 +09:00
Stefan Schmidt d2f8eaf6c8 eio: Check return code of fcntl()
CID 1039686
2013-08-07 15:18:19 +01:00
Chris Michael 8270fc29f3 ecore_main_fd_handler_fd_get can return -1 so check fd validity before
calling read() with potentially -1.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 11:24:11 +01:00
Chris Michael 5444ee0681 ecore_main_fd_handler_fd_get Can return -1 so check fd validity before
calling close() on it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 10:56:37 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Jihoon Kim 3c2332f88f eio: fix Eio.h author information 2013-05-17 09:33:22 +09:00
ChunEon Park 959cb4e053 eio - fix header doc. 2013-05-16 22:34:42 +09:00
Cedric BAIL 2063e4353d efl: integrate eina_log_timing. 2013-03-27 21:43:45 +09:00
Cedric Bail a1c24625dd eio: fix a typos. 2013-03-24 23:06:43 +09:00
Cedric Bail 1f95cbdc7b eio: Use _eio_lstat instead of lstat to improve protability. 2013-03-12 15:58:43 +09:00
Carsten Haitzler ab7bd544f8 emotion - free up engine and stuff on obj del, and let smartdata hang
about for eio stuff. hrmmmmf. cedric!!! :)
2013-03-11 16:54:59 +09:00
Cedric Bail 8d5e33077e efl: use HAVE_FCNTL around call to fcntl. 2013-03-10 23:10:27 +09:00
Gustavo Sverzut Barbieri df701d8ca2 some clang warning cleanups i forgot to commit
SVN revision: 83024
2013-01-21 00:22:35 +00:00
Cedric BAIL f74ca2f5a2 eio: fix wrong container set in eio_file_map_new.
Bug reported by Kuri.


SVN revision: 82749
2013-01-14 10:11:27 +00:00
Lucas De Marchi 4af2647d05 efl: remove check for libgen.h
SVN revision: 82582
2013-01-10 20:25:48 +00:00
Lucas De Marchi db395ef7eb efl: Remove check for unistd.h
* unistd.h: is very useful, very old and very standard.



SVN revision: 82577
2013-01-10 20:25:26 +00:00
Gustavo Sverzut Barbieri 0a2d116119 efl: eina_alloca.h to simplify alloca() usage.
having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
2013-01-03 15:10:34 +00:00
Sebastian Dransfeld f4d4630328 eio: formatting
SVN revision: 82045
2013-01-03 07:47:27 +00:00
WooHyun Jung 56cbfddcff fixed build error :)
SVN revision: 82027
2013-01-03 02:01:25 +00:00
Cedric BAIL ef9ad2032b efl: add eio_eet_sync symbols
Patch by Jérémy Zurcher <jeremy@asynk.ch>.


SVN revision: 82025
2013-01-03 00:39:18 +00:00
Gustavo Sverzut Barbieri 014cd8065d efl/eio: use eina_file_copy()
SVN revision: 81944
2012-12-31 23:45:24 +00:00
Gustavo Sverzut Barbieri 80fd3a77c0 eio: use eina_lock abstraction.
SVN revision: 81939
2012-12-31 18:26:53 +00:00
Gustavo Sverzut Barbieri 8ba0561e49 efl: remove lstat and fchmod checks.
- fchmod() was isolated by HAVE_CHMOD, which was always present
   before... then fchmod() is also present as no errors were reported
   since its introduction.

 - fchmod() is POSIX for a while now.

 - lstat() is POSIX for a while now.

 - setxattr is supported by EFL_CHECK_FUNCS() as is used by eina.

 - splice() check added to EFL_CHECK_FUNCS()



SVN revision: 81938
2012-12-31 18:18:00 +00:00
Gustavo Sverzut Barbieri 12e0602452 efl: eio checks cleanup
some functions were being checked but their IFDEF not being handled,
others (getpwnam and getgrnam) were isolated in a code that is now
Windows, then no need to check them as well as these are POSIX.



SVN revision: 81934
2012-12-31 15:16:49 +00:00
Gustavo Sverzut Barbieri 2608f68571 efl/docs: clean-up and make it more uniform.
now unified docs are bit more uniform in their start pages, overall
improved but much to do :-(



SVN revision: 81851
2012-12-28 23:26:05 +00:00
Gustavo Sverzut Barbieri 489bbff765 efl/eio: fix docs.
SVN revision: 81846
2012-12-28 20:47:25 +00:00
Mike Blumenkrantz 300ee59f38 eio functions no longer crash when passed NULL and throw errors accordingly
SVN revision: 81668
2012-12-24 09:44:21 +00:00
Mike Blumenkrantz b2de05f49a all efl object deletion functions now take NULL without crashing or erroring
SVN revision: 81667
2012-12-24 09:35:56 +00:00
Hannes Janetzek 55f2e87201 fix crash in eio_monitor_del
SVN revision: 81630
2012-12-22 01:56:10 +00:00
Cedric BAIL 88ba56d9d5 efl: don't leak fd on exec.
SVN revision: 80434
2012-12-07 11:01:41 +00:00
Gustavo Sverzut Barbieri 6a5eaacc6a efl: common inotify checks, simplified.
Another try to make inotify checks more common.

This time uses AC_CHECK_HEADERS() as for others, that already define
HAVE_SYS_INOTIFY_H, then uses that.

I still kept AM_CONDITIONAL([HAVE_INOTIFY]) because I plan to convert
ecore_file to the same, smarter, method that is used in eio (compiling
the file depending on the backend.



SVN revision: 80358
2012-12-06 13:02:59 +00:00
Vincent Torri 8e1879ade9 inotify: revert : i want to keep autotools **modularized**. Instead, use in Eio what has been detected in Ecore_File.
SVN revision: 80298
2012-12-06 07:23:50 +00:00
Gustavo Sverzut Barbieri 9d93fc18da efl: simplify inotify by moving it to common.
also deprecate very ancient inotify usage by direct syscall.



SVN revision: 80292
2012-12-06 00:57:29 +00:00
Vincent Torri 81c86b19f6 merge: eio + fix compilation on windows + minor fixes + po files
don't move eio to IN-EFL right now


SVN revision: 80180
2012-12-04 17:40:58 +00:00