2013-05-16 06:34:03 -07:00
|
|
|
/* EIO - Core asynchronous input/output operation library.
|
2010-07-22 09:08:17 -07:00
|
|
|
* Copyright (C) 2010 Enlightenment Developers:
|
|
|
|
* Cedric Bail <cedric.bail@free.fr>
|
2013-05-16 06:34:03 -07:00
|
|
|
* Gustavo Sverzut Barbieri <barbieri@gmail.com>
|
2010-07-22 09:08:17 -07:00
|
|
|
* Vincent "caro" Torri <vtorri at univ-evry dot fr>
|
2016-08-05 18:33:27 -07:00
|
|
|
* Stephen "okra" Houston <smhouston88@gmail.com>
|
2013-05-16 17:33:22 -07:00
|
|
|
* Guillaume "kuri" Friloux <guillaume.friloux@asp64.com>
|
2010-07-22 09:08:17 -07:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library;
|
|
|
|
* if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EIO_H__
|
|
|
|
# define EIO_H__
|
|
|
|
|
2010-08-31 09:24:58 -07:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2010-07-22 09:08:17 -07:00
|
|
|
#include <Eina.h>
|
2012-02-21 13:01:22 -08:00
|
|
|
#include <Eet.h>
|
2013-11-04 01:31:48 -08:00
|
|
|
#include <Efl_Config.h>
|
2010-07-22 09:08:17 -07:00
|
|
|
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
#ifdef EIO_API
|
|
|
|
#error EIO_API should not be already defined
|
eio: Add weak symbol
Summary:
Add definition for EAPI_WEAK because this macro will be needed when we
change how Eolian generates import/export symbols for the Eio library.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: jptiz, lucas, vtorri, woohyun
Reviewed By: vtorri
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12201
2020-12-06 07:26:13 -08:00
|
|
|
#endif
|
|
|
|
|
2010-07-22 09:08:17 -07:00
|
|
|
#ifdef _WIN32
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
# ifndef EIO_STATIC
|
|
|
|
# ifdef EIO_BUILD
|
|
|
|
# define EIO_API __declspec(dllexport)
|
2010-07-22 09:08:17 -07:00
|
|
|
# else
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
# define EIO_API __declspec(dllimport)
|
2018-01-18 01:04:03 -08:00
|
|
|
# endif
|
2010-07-22 09:08:17 -07:00
|
|
|
# else
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
# define EIO_API
|
2018-01-18 01:04:03 -08:00
|
|
|
# endif
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
# define EIO_API_WEAK
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EIO_API __attribute__ ((visibility("default")))
|
|
|
|
# define EIO_API_WEAK __attribute__ ((weak))
|
2010-07-22 09:08:17 -07:00
|
|
|
# else
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
# define EIO_API
|
|
|
|
# define EIO_API_WEAK
|
2010-07-22 09:08:17 -07:00
|
|
|
# endif
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
#else
|
|
|
|
# define EIO_API
|
|
|
|
# define EIO_API_WEAK
|
2018-01-18 01:04:03 -08:00
|
|
|
#endif
|
2010-07-22 09:08:17 -07:00
|
|
|
|
2010-10-12 07:59:30 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2018-02-26 11:46:35 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @typedef Eio_File
|
|
|
|
* Generic asynchronous I/O reference.
|
|
|
|
* @ingroup Eio
|
|
|
|
*/
|
|
|
|
typedef struct _Eio_File Eio_File;
|
|
|
|
|
|
|
|
typedef Eina_Bool (*Eio_Filter_Direct_Cb)(void *data, Eio_File *handler, const Eina_File_Direct_Info *info);
|
|
|
|
|
2016-04-12 12:00:23 -07:00
|
|
|
#ifndef EFL_NOLEGACY_API_SUPPORT
|
|
|
|
#include "Eio_Legacy.h"
|
|
|
|
#endif
|
|
|
|
#include "Eio_Eo.h"
|
2011-06-22 10:45:22 -07:00
|
|
|
|
2011-12-03 05:21:07 -08:00
|
|
|
/**
|
2012-02-23 03:46:51 -08:00
|
|
|
* @brief get access time from a Eina_Stat
|
2012-02-22 08:30:43 -08:00
|
|
|
* @param stat the structure to get the atime from
|
|
|
|
* @return the last accessed time
|
|
|
|
*
|
|
|
|
* This take care of doing type conversion to match rest of EFL time API.
|
|
|
|
* @note some filesystem don't update that information.
|
2011-12-03 05:21:07 -08:00
|
|
|
*/
|
2012-02-23 03:46:51 -08:00
|
|
|
static inline double eio_file_atime(const Eina_Stat *stat);
|
2011-12-03 05:21:07 -08:00
|
|
|
|
2010-10-28 07:50:24 -07:00
|
|
|
/**
|
2012-02-23 03:46:51 -08:00
|
|
|
* @brief get modification time from a Eina_Stat
|
2012-02-22 08:30:43 -08:00
|
|
|
* @param stat the structure to get the mtime from
|
|
|
|
* @return the last modification time
|
|
|
|
*
|
|
|
|
* This take care of doing type conversion to match rest of EFL time API.
|
2010-10-28 07:50:24 -07:00
|
|
|
*/
|
2012-02-23 03:46:51 -08:00
|
|
|
static inline double eio_file_mtime(const Eina_Stat *stat);
|
2010-10-28 07:50:24 -07:00
|
|
|
|
|
|
|
/**
|
2012-02-23 03:46:51 -08:00
|
|
|
* @brief get the size of the file described in Eina_Stat
|
2012-02-22 08:30:43 -08:00
|
|
|
* @param stat the structure to get the size from
|
|
|
|
* @return the size of the file
|
2010-10-28 07:50:24 -07:00
|
|
|
*/
|
2012-02-23 03:46:51 -08:00
|
|
|
static inline long long eio_file_size(const Eina_Stat *stat);
|
2012-02-22 08:30:43 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief tell if the stated path was a directory or not.
|
|
|
|
* @param stat the structure to get the size from
|
|
|
|
* @return EINA_TRUE, if it was.
|
|
|
|
*/
|
2012-02-23 03:46:51 -08:00
|
|
|
static inline Eina_Bool eio_file_is_dir(const Eina_Stat *stat);
|
2012-02-22 08:30:43 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief tell if the stated path was a link or not.
|
|
|
|
* @param stat the structure to get the size from
|
|
|
|
* @return EINA_TRUE, if it was.
|
|
|
|
*/
|
2012-02-23 03:46:51 -08:00
|
|
|
static inline Eina_Bool eio_file_is_lnk(const Eina_Stat *stat);
|
2010-10-28 07:50:24 -07:00
|
|
|
|
eio: add method for setting the global file polling rate for fallback monitors
Summary:
the default value for the fallback poll monitor timer interval is 60.0 seconds,
which is not useful for all cases, such as CI, where we don't care about cpu
usage and just want things to process as fast as possible at all times
this enables setting the interval to any value, ensuring that any existing
timers are modified to use that value immediately
@feature
Reviewers: stefan_schmidt, bu5hm4n, raster, devilhorns, ManMower
Reviewed By: bu5hm4n, ManMower
Subscribers: ManMower, raster, bu5hm4n, cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6247
2018-06-19 10:33:14 -07:00
|
|
|
/**
|
|
|
|
* @ingroup Eio
|
|
|
|
*
|
|
|
|
* @brief Set the polling interval to control the fallback monitor behavior
|
|
|
|
* @param interval The interval (in seconds) to poll
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
eio: Rename EAPI macro to EIO_API in Eio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.
= The Rationale =
This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.
EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.
MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.
For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.
With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
Example 1:
dll1:
```
EAPI void foo(void);
EAPI void bar()
{
foo();
}
```
dll2:
```
EAPI void foo()
{
printf ("foo\n");
}
```
This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.
However, the following:
Example 2:
dll1:
```
EAPI extern int foo;
EAPI void foobar(void);
EAPI void bar()
{
foo = 5;
foobar();
}
```
dll2:
```
EAPI int foo = 0;
EAPI void foobar()
{
printf ("foo %d\n", foo);
}
```
This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.
Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Reviewers: vtorri, woohyun, lucas, jptiz
Reviewed By: vtorri, lucas
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 06:43:38 -08:00
|
|
|
EIO_API void eio_monitoring_interval_set(double interval);
|
eio: add method for setting the global file polling rate for fallback monitors
Summary:
the default value for the fallback poll monitor timer interval is 60.0 seconds,
which is not useful for all cases, such as CI, where we don't care about cpu
usage and just want things to process as fast as possible at all times
this enables setting the interval to any value, ensuring that any existing
timers are modified to use that value immediately
@feature
Reviewers: stefan_schmidt, bu5hm4n, raster, devilhorns, ManMower
Reviewed By: bu5hm4n, ManMower
Subscribers: ManMower, raster, bu5hm4n, cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6247
2018-06-19 10:33:14 -07:00
|
|
|
|
2010-10-29 05:58:04 -07:00
|
|
|
#include "eio_inline_helper.x"
|
|
|
|
|
2016-04-12 12:00:23 -07:00
|
|
|
#define EIO_VERSION_MAJOR EFL_VERSION_MAJOR
|
|
|
|
#define EIO_VERSION_MINOR EFL_VERSION_MINOR
|
|
|
|
|
2010-10-12 07:59:30 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-07-22 09:08:17 -07:00
|
|
|
#endif
|