Eina tools aims to help application development, providing ways to make it safer, log errors, manage memory more efficiently and more. More...
Modules | |
Benchmark | |
These functions allow you to add a benchmark framework to a project for timing critical parts and detecting slow parts of code. | |
Convert | |
These functions allow you to convert integer or real numbers to string or conversely. | |
Counter | |
This group discusses the functions that allow you to get the time spent in a part of a code. | |
Copy On Write | |
These functions provide some helper for a pseudo Copy-On-Write mechanism. | |
Cpu | |
Cpu and architecture related helpers. | |
Error | |
This group discusses the functions that provide error management for projects. | |
File | |
This group discusses the functions to handle files and directories. | |
Lazy allocator | |
Lock | |
This group provides thread locking and synchronization capabilities. | |
Log | |
Full-featured logging system. | |
Magic | |
Eina_Magic provides run-time type-checking. | |
Memory Pool | |
This group discusses the functions that provide memory pool management. | |
Module | |
These macros allow you to define module informations like author/description/version/license. | |
Prefix | |
This group discusses the functions that provide the ability to determine the runtime location of a software package. | |
Rectangle | |
These functions provide rectangle management. | |
Safety Checks | |
Safety checks are a set of macros to check for parameters or values that should never happen, it is similar in concept to assert(), but will log and return instead of abort() your program. | |
Schedule | |
TODO: description. | |
Simple_XML | |
Simplistic relaxed SAX-like XML parser. | |
String | |
Provides useful functions for C string manipulation. | |
Thread | |
Abstracts platform threads, providing a uniform API. | |
Data Structures | |
struct | _Eina_Xattr |
Macros | |
#define | EINA_FLT_EQ(a, b) (!!(fabsf((float)(a) - (float)(b)) <= FLT_EPSILON)) |
Safe comparison of float. More... | |
#define | EINA_FLT_NONZERO(a) (!!(fpclassify((float)(a)) != FP_ZERO)) |
Determines if a float is not zero. More... | |
#define | EINA_DBL_EQ(a, b) (!!(fabs((double)(a) - (double)(b)) <= DBL_EPSILON)) |
Safe comparison of double. More... | |
#define | EINA_DBL_NONZERO(a) (!!(fpclassify((double)(a)) != FP_ZERO)) |
Determines if a double is not zero. More... | |
Typedefs | |
typedef struct _Eina_Xattr | Eina_Xattr |
Enumerations | |
enum | Eina_Xattr_Flags { EINA_XATTR_INSERT = 0 , EINA_XATTR_REPLACE = 1 , EINA_XATTR_CREATED = 2 , EINA_XATTR_FLAGS_INSERT = 0 , EINA_XATTR_FLAGS_REPLACE = 1 , EINA_XATTR_FLAGS_CREATED = 2 } |
define extended attribute creation More... | |
Functions | |
const char * | eina_environment_home_get (void) |
Returns the content of the environment referred by HOME on this system. More... | |
const char * | eina_environment_tmp_get (void) |
Returns the content of the environment referred as TMPDIR on this system. More... | |
static Eina_Bool | eina_dbl_exact (double a, double b) |
Warningless comparison of doubles using ==. More... | |
static Eina_Bool | eina_flt_exact (float a, float b) |
Warningless comparison of floats using ==. More... | |
Eina_Iterator * | eina_xattr_ls (const char *file) |
Gets an iterator that lists all extended attribute of a file. More... | |
Eina_Iterator * | eina_xattr_value_ls (const char *file) |
Gets an iterator that list all extended attribute value related to a fd. More... | |
Eina_Iterator * | eina_xattr_fd_ls (int fd) |
Gets an iterator that list all extended attribute related to a fd. More... | |
Eina_Iterator * | eina_xattr_value_fd_ls (int fd) |
Gets an iterator that list all extended attribute value related to a fd. More... | |
Eina_Bool | eina_xattr_copy (const char *src, const char *dst) |
Copies the extended attribute from one file to another. More... | |
Eina_Bool | eina_xattr_fd_copy (int src, int dst) |
Copies the extended attribute from one file descriptor to another. More... | |
void * | eina_xattr_get (const char *file, const char *attribute, ssize_t *size) |
Retrieves an extended attribute from a file. More... | |
void * | eina_xattr_fd_get (int fd, const char *attribute, ssize_t *size) |
Retrieves an extended attribute from a file descriptor. More... | |
Eina_Bool | eina_xattr_set (const char *file, const char *attribute, const void *data, ssize_t length, Eina_Xattr_Flags flags) |
Sets an extended attribute on a file. More... | |
Eina_Bool | eina_xattr_fd_set (int fd, const char *attribute, const void *data, ssize_t length, Eina_Xattr_Flags flags) |
Sets an extended attribute on a file descriptor. More... | |
Eina_Bool | eina_xattr_del (const char *file, const char *attribute) |
Deletes (removes) an extended attribute from a file. More... | |
Eina_Bool | eina_xattr_fd_del (int fd, const char *attribute) |
Deletes (removes) an extended attribute from a file descriptor. More... | |
Eina_Bool | eina_xattr_string_set (const char *file, const char *attribute, const char *data, Eina_Xattr_Flags flags) |
Sets a string as a extended attribute properties. More... | |
char * | eina_xattr_string_get (const char *file, const char *attribute) |
Gets a string from an extended attribute properties. More... | |
Eina_Bool | eina_xattr_double_set (const char *file, const char *attribute, double value, Eina_Xattr_Flags flags) |
Sets a double as a extended attribute properties. More... | |
Eina_Bool | eina_xattr_double_get (const char *file, const char *attribute, double *value) |
Gets a double from an extended attribute properties. More... | |
Eina_Bool | eina_xattr_int_set (const char *file, const char *attribute, int value, Eina_Xattr_Flags flags) |
Sets an int as a extended attribute properties. More... | |
Eina_Bool | eina_xattr_int_get (const char *file, const char *attribute, int *value) |
Gets a int from an extended attribute properties. More... | |
Eina tools aims to help application development, providing ways to make it safer, log errors, manage memory more efficiently and more.
For more information refer to the string example.
#define EINA_FLT_EQ | ( | a, | |
b | |||
) | (!!(fabsf((float)(a) - (float)(b)) <= FLT_EPSILON)) |
Safe comparison of float.
[in] | a | First member to compare |
[in] | b | Second member to compare |
true
if two floats match #define EINA_FLT_NONZERO | ( | a | ) | (!!(fpclassify((float)(a)) != FP_ZERO)) |
Determines if a float is not zero.
[in] | a | The float |
true
if float is not zero #define EINA_DBL_EQ | ( | a, | |
b | |||
) | (!!(fabs((double)(a) - (double)(b)) <= DBL_EPSILON)) |
Safe comparison of double.
[in] | a | First member to compare |
[in] | b | Second member to compare |
true
if two double match #define EINA_DBL_NONZERO | ( | a | ) | (!!(fpclassify((double)(a)) != FP_ZERO)) |
Determines if a double is not zero.
[in] | a | The double |
true
if double is not zero enum Eina_Xattr_Flags |
define extended attribute creation
const char* eina_environment_home_get | ( | void | ) |
Returns the content of the environment referred by HOME on this system.
Referenced by ecore_file_app_exe_get().
const char* eina_environment_tmp_get | ( | void | ) |
Returns the content of the environment referred as TMPDIR on this system.
Referenced by ecore_con_local_path_new().
|
inlinestatic |
Warningless comparison of doubles using ==.
[in] | a | First member to compare |
[in] | b | Second member to compare |
true
if two doubles match Referenced by eina_convert_strtod_c().
|
inlinestatic |
Warningless comparison of floats using ==.
[in] | a | First member to compare |
[in] | b | Second member to compare |
true
if two floats match Eina_Iterator* eina_xattr_ls | ( | const char * | file | ) |
Gets an iterator that lists all extended attribute of a file.
[in] | file | The filename to retrieve the extended attribute list from. |
The iterator will not allocate any data during the iteration step, so you need to copy them yourself if you need.
References EINA_MAGIC_SET, EINA_SAFETY_ON_NULL_RETURN_VAL, FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.
Eina_Iterator* eina_xattr_value_ls | ( | const char * | file | ) |
Gets an iterator that list all extended attribute value related to a fd.
[in] | file | The filename to retrieve the extended attribute list from. |
The iterator will not allocate any data during the iteration step, so you need to copy them yourself if you need. The iterator will provide an Eina_Xattr structure.
References EINA_MAGIC_SET, EINA_SAFETY_ON_NULL_RETURN_VAL, eina_stringshare_add(), FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.
Eina_Iterator* eina_xattr_fd_ls | ( | int | fd | ) |
Gets an iterator that list all extended attribute related to a fd.
[in] | fd | The file descriptor to retrieve the extended attribute list from. |
The iterator will not allocate any data during the iteration step, so you need to copy them yourself if you need.
References EINA_MAGIC_SET, FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.
Referenced by eina_file_xattr_get().
Eina_Iterator* eina_xattr_value_fd_ls | ( | int | fd | ) |
Gets an iterator that list all extended attribute value related to a fd.
[in] | fd | The file descriptor to retrieve the extended attribute list from. |
The iterator will not allocate any data during the iteration step, so you need to copy them yourself if you need. The iterator will provide an Eina_Xattr structure.
References EINA_MAGIC_SET, FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.
Referenced by eina_file_xattr_value_get().
Eina_Bool eina_xattr_copy | ( | const char * | src, |
const char * | dst | ||
) |
Copies the extended attribute from one file to another.
[in] | src | source file to use as input. |
[in] | dst | destination file to use as output. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_GOTO, and eina_xattr_fd_copy().
Eina_Bool eina_xattr_fd_copy | ( | int | src, |
int | dst | ||
) |
Copies the extended attribute from one file descriptor to another.
[in] | src | source file descriptor to use as input. |
[in] | dst | destination file descriptor to use as output. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_GOTO, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_GOTO, EINA_SAFETY_ON_TRUE_RETURN_VAL, and EINA_TRUE.
Referenced by eina_xattr_copy().
void* eina_xattr_get | ( | const char * | file, |
const char * | attribute, | ||
ssize_t * | size | ||
) |
Retrieves an extended attribute from a file.
[in] | file | The file to retrieve the extended attribute from. |
[in] | attribute | The extended attribute name to retrieve. |
[out] | size | The size of the retrieved extended attribute. |
It will return NULL
and *size will be 0
if it fails.
References EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_SAFETY_ON_TRUE_RETURN_VAL.
Referenced by eet_data_xattr_cipher_get(), and eina_xattr_string_get().
void* eina_xattr_fd_get | ( | int | fd, |
const char * | attribute, | ||
ssize_t * | size | ||
) |
Retrieves an extended attribute from a file descriptor.
[in] | fd | The file descriptor to retrieve the extended attribute from. |
[in] | attribute | The extended attribute name to retrieve. |
[out] | size | The size of the retrieved extended attribute. |
It will return NULL
and *size will be 0
if it fails.
References EINA_SAFETY_ON_NULL_RETURN_VAL.
Eina_Bool eina_xattr_set | ( | const char * | file, |
const char * | attribute, | ||
const void * | data, | ||
ssize_t | length, | ||
Eina_Xattr_Flags | flags | ||
) |
Sets an extended attribute on a file.
[in] | file | The file to set the extended attribute to. |
[in] | attribute | The attribute to set. |
[in] | data | The data to set. |
[in] | length | The length of the data to set. |
[in] | flags | Define the set policy. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, EINA_TRUE, EINA_XATTR_CREATED, EINA_XATTR_INSERT, and EINA_XATTR_REPLACE.
Referenced by eet_data_xattr_cipher_set(), and eina_xattr_string_set().
Eina_Bool eina_xattr_fd_set | ( | int | fd, |
const char * | attribute, | ||
const void * | data, | ||
ssize_t | length, | ||
Eina_Xattr_Flags | flags | ||
) |
Sets an extended attribute on a file descriptor.
[in] | fd | The file descriptor to set the extended attribute to. |
[in] | attribute | The attribute to set. |
[in] | data | The data to set. |
[in] | length | The length of the data to set. |
[in] | flags | Define the set policy. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, EINA_TRUE, EINA_XATTR_CREATED, EINA_XATTR_INSERT, and EINA_XATTR_REPLACE.
Eina_Bool eina_xattr_del | ( | const char * | file, |
const char * | attribute | ||
) |
Deletes (removes) an extended attribute from a file.
[in] | file | The file to del the extended attribute from. |
[in] | attribute | The attribute to del. |
References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.
Eina_Bool eina_xattr_fd_del | ( | int | fd, |
const char * | attribute | ||
) |
Deletes (removes) an extended attribute from a file descriptor.
[in] | fd | The file descriptor to del the extended attribute from. |
[in] | attribute | The attribute to del. |
References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.
Eina_Bool eina_xattr_string_set | ( | const char * | file, |
const char * | attribute, | ||
const char * | data, | ||
Eina_Xattr_Flags | flags | ||
) |
Sets a string as a extended attribute properties.
[in] | file | The file to set the string to. |
[in] | attribute | The attribute to set. |
[in] | data | The NULL-terminated string to set. |
[in] | flags | Define the set policy. |
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and eina_xattr_set().
Referenced by eina_xattr_double_set(), and eina_xattr_int_set().
char* eina_xattr_string_get | ( | const char * | file, |
const char * | attribute | ||
) |
Gets a string from an extended attribute properties.
[in] | file | The file to get the string from. |
[in] | attribute | The attribute to get. |
NULL
otherwise.This call check that the string is properly NULL-terminated before returning it.
References eina_xattr_get().
Referenced by eina_xattr_double_get(), and eina_xattr_int_get().
Eina_Bool eina_xattr_double_set | ( | const char * | file, |
const char * | attribute, | ||
double | value, | ||
Eina_Xattr_Flags | flags | ||
) |
Sets a double as a extended attribute properties.
[in] | file | The file to set the double to. |
[in] | attribute | The attribute to set. |
[in] | value | The NULL-terminated double to set. |
[in] | flags | Define the set policy. |
References eina_convert_dtoa(), and eina_xattr_string_set().
Referenced by emotion_object_last_position_save().
Eina_Bool eina_xattr_double_get | ( | const char * | file, |
const char * | attribute, | ||
double * | value | ||
) |
Gets a double from an extended attribute properties.
[in] | file | The file to get the string from. |
[in] | attribute | The attribute to get. |
[out] | value | Where to put the extracted value |
This call check that the double is correctly set.
References eina_convert_atod(), EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_TRUE, and eina_xattr_string_get().
Referenced by emotion_object_last_position_load().
Eina_Bool eina_xattr_int_set | ( | const char * | file, |
const char * | attribute, | ||
int | value, | ||
Eina_Xattr_Flags | flags | ||
) |
Sets an int as a extended attribute properties.
[in] | file | The file to set the int to. |
[in] | attribute | The attribute to set. |
[in] | value | The NULL-terminated int to set. |
[in] | flags | Define the set policy. |
References eina_convert_itoa(), and eina_xattr_string_set().
Eina_Bool eina_xattr_int_get | ( | const char * | file, |
const char * | attribute, | ||
int * | value | ||
) |
Gets a int from an extended attribute properties.
[in] | file | The file to get the string from. |
[in] | attribute | The attribute to get. |
[out] | value | Where to put the extracted value |
This call check that the int is correctly set.
References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and eina_xattr_string_get().