Commit Graph

91 Commits

Author SHA1 Message Date
Stefan Schmidt f3d9b8ee70 esacpe: remove library from tree
This has not been used for a while and is not even buildable after our
switch to meson. It was a niche to start with given that it needed the
PS3 OS to run on. I asked for any remaining users at EDD and on the list
but heard nothing. Time to remove.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10778
2019-12-04 12:21:24 -08:00
Xavi Artigas 1c5849c5a8 doxygen: Prevent auto-linking of invalid links
Anything starting with http://, ftp:// or file:// is automatically
converted into a link by doxygen. However, we have a few instances
where we do not want this. Fortunately, doxygen allows using % to
forbid specific words from being linked.
2019-11-18 12:00:35 +01:00
Vincent Torri a5267d3d9c remove Evil.h when not necessary, include evil_private.h when necessary
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8925
2019-05-20 09:10:00 -04:00
Marcel Hollerbach e7618b7169 build: do not reply on header checking libinotify.h
but rather use the sys_bsd flag. The reason why relying on the header
existance is bad, is that bsd decided to install this header, with the
essential difference, that on bsd we require to link against libinotify,
which makes the compilation fail.

ref T7710

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8093
2019-03-11 21:23:52 +01:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Marcel Hollerbach 347dc66ba9 meson: unify system properties
this unifies the system types into 4 boolean flags
This fixes the fact that meson changed the system string accross
versions.

Differential Revision: https://phab.enlightenment.org/D7144
2018-10-05 13:40:29 +02:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Myoungwoon Roy, Kim e06a9b6acf docs: Fix typos and some wrong expressions in API reference doc.
Summary: I had fixed some typos and some wrong expressions in API reference doc

Test Plan: N/A

Reviewers: raster, zmike, Hermet, segfaultxavi

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6943
2018-08-30 14:01:21 +09:00
Cedric BAIL 2894a2e3c3 ecore_file: on shutdown properly set to NULL to avoid confusion when cycling init/shutdown. 2018-05-24 16:02:20 -07:00
Cedric BAIL 33fd77e9e4 ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
2018-05-01 10:39:01 -07:00
Marcel Hollerbach c705139623 ecore_file: switch from buf to tmpstr
before 	c65782b15c the acutal path has
been filled into buf, with eina_file_mkstemp the string is filled into
tmpstr, so that path should be chmoded instead of the template buf.

Thx to MatP for the report!
2018-04-10 14:27:44 +02:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Yeshwanth Reddivari 9c191d3890 ecore_file: modify check for wd in file monitor del
Summary:
Make checks consistent in ecore_file_monitor_backend_del.
inotify_add_watch can return 0 as well on success.
So, even if wd is 0, inotify_rm_watch need to be invoked.

Reviewers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Mike Blumenkrantz 7927cfefe3 ecore-file: make monitoring truly fork-safe
add a fork reset callback and attempt to preserve existing monitors
during reset

@fix
2018-02-02 16:59:44 -05:00
Vincent Torri ef0f0a50b2 Ecore_File: remove symlinks support on Windows (library and test) 2018-01-30 16:52:24 +09:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
WooHyun Jung 9fc1dd1a4e ecore_file_monitor: replace EINA_LIST_FOREACH to EINA_LIST_FOREACH_SAFE
If ecore_file_monitor_del is called inside the file monitor callback function,
eina_list found from monitor_hash would be freed. (You can check this inside
eina_hash_list_remove.)
Then, EINA_LIST_FOREACH makes one more for loop with invalid eina_list pointer.

EINA_LIST_FOREACH_SAFE can prevent from this problem.
2018-01-15 13:54:01 +09:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Andy Williams d234458dfc Fix and simpligy windows behaviour.
Author: Vincent Torri
2017-12-31 16:08:31 +00:00
JinYong Park b05cae250c ecore_file: rename parameter for doxygen
Summary:
Some parameter's name are different in annotations and statements,
so it occurs doxygen warning.
To fix it, rename that parameters.

Test Plan: API Doxygen Revision

Reviewers: raster, cedric, jpeg, myoungwoon, Jaehyun_Cho

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 14:02:37 -07:00
Mike Blumenkrantz 11e92cdc86 ecore-file: do not emit events when an inotify watch is removed
???????????????????????????????????????????????????????????????????????????????

@fix
2017-10-03 13:34:22 -04:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Cedric BAIL 214e22bf72 ecore_file: use new API eina_file_close_on_exec. 2017-04-18 16:56:18 -07:00
Carsten Haitzler c65782b15c ecore file - use eina_file_mkstmp to solve umask complaint
this fixes coverity CID 1039614
2017-04-18 17:30:50 +09:00
Myoungwoon Roy, Kim 8c19d9251d docs: Fix typos and some wrong expressions
Covers: Ecore_Drm, Ecore_Evas, Ecore_File, Ecore_IMF, and
Ecore_IMF_Evas API reference doxygen.

Summary: I had fixed some typos and wrong expressions, such
as capital letters, singular Etc. in Ecore_Drm, Ecore_Evas,
Ecore_File, Ecore_IMF, and Ecore_IMF_Evas API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: stefan, cedric, raster, jpeg, Jaehyun_Cho

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4680
2017-02-27 19:37:43 +09:00
Gustavo Sverzut Barbieri a679c4a322 cmake: add ecore_file. 2017-02-02 17:15:31 -02:00
Ivan Furs 12ee780653 ecore_file: add case to properly rename a file in Windows
Summary:
If the file with a new path was created and 'rename' wants to replace the old path to the new path. 'rename' will return:
   Windows 7: -1 (errno=EEXIST) (EEXIST == 17)
   Ubuntu: 0

**EEXIST**
**Ubuntu**: The link named by new is a directory that is not an empty directory. (https://linux.die.net/man/3/rename)
**Windows 7**: Files exist. An attempt has been made to create a file that already exists. For example, the _O_CREAT and _O_EXCL flags are specified in an _open call, but the named file already exists.(https://msdn.microsoft.com/en-us/library/5814770t.aspx)

Test Plan:
**Sample code to rename in Linux and Windows if the file with the new name already exists:**

int main()
{
	const char *_old = "old";
	const char *_new = "new";

	int fd1 = open(_old, O_CREAT);
	close(fd1);
	int fd2 = open(_new, O_CREAT);
	close(fd2);
	printf("rename:\t%s -> %s\n", _old, _new);
	int r = rename(_old, _new);
	if (r == 0)
	{
		printf("GOOD\n");
	}
	else
	{
		printf("CODE ERROR:\n"                  );
		printf(" -rename...: %d\n", r    );
		printf(" -errno....: %d\n", errno);
	}
	return 0;
}

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

Reviewed By: cedric

Subscribers: artem.popov, cedric, jpeg

Tags: #efl, #windows

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 16:24:34 -08:00
Vyacheslav Reutskiy 67d228230a Revert "ecore_file: use win api for delete folder"
It was mistake, rmdir work correct, problem was fixed in commit
56c202614b

This reverts commit 5e25b8037c.
2016-11-30 14:03:00 +02:00
Gustavo Sverzut Barbieri 4b771d3e1b ecore_file_download: callback completion_cb with status=1.
When download is aborted we must call completion_cb using status == 1,
this was checked in the test suite.
2016-11-23 16:23:58 -02:00
Vyacheslav Reutskiy dc18e71903 ecore_file: get stat from correct file 2016-11-23 16:20:06 +02:00
Vyacheslav Reutskiy 5e25b8037c ecore_file: use win api for delete folder
The RemoveDirectory on Windows guarantee that given folder will be
delete.
2016-11-23 16:20:03 +02:00
Vyacheslav Reutskiy 164ece9e3f ecore_file: update docs for ecore_file_rmdir 2016-11-23 16:19:48 +02:00
Cedric BAIL 1b5e8fe3a2 ecore_file: restore past behavior and fix ecore_file_download tests. 2016-11-22 11:57:40 -08:00
Gustavo Sverzut Barbieri 02d352e1f2 ecore_file_download: use new efl_net_dialer_http.
Greatly reduce code complexity while providing better support, at
least according to @netstar efl_net_dialer_http works better than
traditional ecore_con_url on BSD.
2016-11-21 19:47:35 -02:00
Jee-Yong Um 3b4293ffa3 ecore_file/ipc: clean up documentation
Summary: move comment from c source to header and adjust ingroup relationship

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D4328
2016-10-04 21:08:17 +09:00
Artem Popov 132ae9683c ecore_file: Fix improper way of comparing in ecore_file_path_dir_exists @fix
Summary: There is wrong comparing while using strcmp function. Should be inverted.

Reviewers: cedric, raster, NikaWhite

Reviewed By: NikaWhite

Subscribers: cedric, NikaWhite, jpeg

Differential Revision: https://phab.enlightenment.org/D4291
2016-09-20 19:52:23 +03:00
Jean Guyomarc'h 8bbab0d015 ecore_file: fix memory leak
@fix
2016-05-06 22:18:57 +02:00
Carsten Haitzler bbcde33f93 fix efreet/file monitor stringshare optimization
fixes e4d815dc48 that i just put in a
few days back - it's a good idea to copy the string into your buffer
to use it.. not just 0 terminate it. :)
2016-04-23 23:45:28 +09:00
Carsten Haitzler e4d815dc48 efreetd - reduce memory usage by using stringshare much more
lots of long paths for monitoring file paths for icons etc. are in
memory for efreetd. this reduces that memory by sharing them much more.

@optimization
2016-04-23 23:07:48 +09:00
Vincent Torri 68107e5eb8 Ecore_File: fix merge and simplify logic in ecore_file_file_get() on WindoWS
Summary: Ecore_File: fix merge and simplify logic in ecore_file_file_get() on WindowS

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3404
2015-12-07 14:08:19 +09:00
Vincent Torri 892df20bd4 ecore_file: fix ecore_file_file_get() on Windows
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 11:35:24 -08:00
Jaehyun Cho 39f154f8ca ecore_file: Fix ecore_file_file_get function on Windows.
On Windows, both backslash and slash can be used as file path
separators. Therefore, it is fixed to consider backslash as a file path
separator as well on Windows.

@fix
2015-11-02 10:32:10 +09:00
Vincent Torri b72be67388 ecore_file: remove whitespaces
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri b9ed3375f2 ecore_file: fix ecore_file management function on Windows
On windows, stat() returns -1 if a path is finished with a \ or /,
so replace all stat() calls with a function which removes the trailing
slash or backslash on Windows

At this stage the code duplicate many code path for avoiding potential
borkage on Unix system. During 1.17 release cycle, it would be nice to
refactor this piece.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri 315e1f5a2b Ecore_File: use ecore_file_mkdir() 2015-07-03 16:23:06 +01:00
Vincent Torri 308dbff141 Ecore_File: better implementation of ecore_file_mkdir() 2015-07-03 16:23:06 +01:00
Vincent Torri a46adde19d Ecore_File: improve comment of ecore_file_mkdir() 2015-07-03 16:23:06 +01:00
Cedric BAIL 241d0d3e18 ecore_file: use portable environment lookup. 2015-05-14 18:41:48 +02:00