Tizen Native API

Functions

Eina_Iteratoreina_xattr_ls (const char *file)
 Get an iterator that list all extended attribute of a file.
Eina_Iteratoreina_xattr_value_ls (const char *file)
 Get an iterator that list all extended attribute value related to a fd.
Eina_Iteratoreina_xattr_fd_ls (int fd)
 Get an iterator that list all extended attribute related to a fd.
Eina_Iteratoreina_xattr_value_fd_ls (int fd)
 Get an iterator that list all extended attribute value related to a fd.
void * eina_xattr_get (const char *file, const char *attribute, ssize_t *size) 2
 Retrieve an extended attribute from a file.
Eina_Bool eina_xattr_set (const char *file, const char *attribute, const void *data, ssize_t length, Eina_Xattr_Flags flags) 2
 Set an extended attribute on a file.
Eina_Bool eina_xattr_string_set (const char *file, const char *attribute, const char *data, Eina_Xattr_Flags flags)
 Set a string as a extended attribute properties.
char * eina_xattr_string_get (const char *file, const char *attribute)
 Get a string from an extended attribute properties.
Eina_Bool eina_xattr_double_set (const char *file, const char *attribute, double value, Eina_Xattr_Flags flags)
 Set a double as a extended attribute properties.
Eina_Bool eina_xattr_double_get (const char *file, const char *attribute, double *value)
 Get a double from an extended attribute properties.
Eina_Bool eina_xattr_int_set (const char *file, const char *attribute, int value, Eina_Xattr_Flags flags)
 Set an int as a extended attribute properties.
Eina_Bool eina_xattr_int_get (const char *file, const char *attribute, int *value)
 Get a int from an extended attribute properties.

Defines

#define EINA_SAFETY_ON_NULL_RETURN(exp)   do { (void)(!(exp)); } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_NULL_RETURN_VAL(exp, val)   do { if (0 && !(exp)) { (void)val; } } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_NULL_GOTO(exp, label)   do { if (0 && (exp) == NULL) { goto label; } } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_TRUE_RETURN(exp)   do { (void)(exp); } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_TRUE_RETURN_VAL(exp, val)   do { if (0 && (exp)) { (void)val; } } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_TRUE_GOTO(exp, label)   do { if (0 && (exp)) { goto label; } } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_FALSE_RETURN(exp)   do { (void)(!(exp)); } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_FALSE_RETURN_VAL(exp, val)   do { if (0 && !(exp)) { (void)val; } } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.
#define EINA_SAFETY_ON_FALSE_GOTO(exp, label)   do { if (0 && !(exp)) { goto label; } } while (0)
 The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

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 Eina String example string example.


Define Documentation

#define EINA_SAFETY_ON_FALSE_GOTO (   exp,
  label 
)    do { if (0 && !(exp)) { goto label; } } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
labelThe label to jump to.
#define EINA_SAFETY_ON_FALSE_RETURN (   exp)    do { (void)(!(exp)); } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
#define EINA_SAFETY_ON_FALSE_RETURN_VAL (   exp,
  val 
)    do { if (0 && !(exp)) { (void)val; } } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
valThe value to be returned.
#define EINA_SAFETY_ON_NULL_GOTO (   exp,
  label 
)    do { if (0 && (exp) == NULL) { goto label; } } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
labelThe label to jump to.
#define EINA_SAFETY_ON_NULL_RETURN (   exp)    do { (void)(!(exp)); } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
#define EINA_SAFETY_ON_NULL_RETURN_VAL (   exp,
  val 
)    do { if (0 && !(exp)) { (void)val; } } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
valThe value to be returned.
#define EINA_SAFETY_ON_TRUE_GOTO (   exp,
  label 
)    do { if (0 && (exp)) { goto label; } } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
labelThe label to jump to.
#define EINA_SAFETY_ON_TRUE_RETURN (   exp)    do { (void)(exp); } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
#define EINA_SAFETY_ON_TRUE_RETURN_VAL (   exp,
  val 
)    do { if (0 && (exp)) { (void)val; } } while (0)

The macro doesn't do anything unless EINA_SAFETY_CHECKS is defined.

Parameters:
expThe expression to be evaluated.
valThe value to be returned.

Enumeration Type Documentation

define extended attribute creation

Since (EFL) :
1.1
Enumerator:
EINA_XATTR_INSERT 

This is the default behaviour, it will either create or replace the extended attribute

EINA_XATTR_REPLACE 

This will only succeed if the extended attribute previously existed

EINA_XATTR_CREATED 

This will only succeed if the extended attribute wasn't previously set


Function Documentation

Eina_Bool eina_xattr_double_get ( const char *  file,
const char *  attribute,
double *  value 
)

Get a double from an extended attribute properties.

Since :
2.3
Parameters:
[in]fileThe file to get the string from.
[in]attributeThe attribute to get.
[out]valueWhere to put the extracted value
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Remarks:
This call check that the double is correctly set.
Since (EFL) :
1.1
Eina_Bool eina_xattr_double_set ( const char *  file,
const char *  attribute,
double  value,
Eina_Xattr_Flags  flags 
)

Set a double as a extended attribute properties.

Since :
2.3
Parameters:
[in]fileThe file to set the double to.
[in]attributeThe attribute to set.
[in]valueThe NULL-terminated double to set.
[in]flagsDefine the set policy.
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Since (EFL) :
1.1

Get an iterator that list all extended attribute related to a fd.

Since :
2.3
Parameters:
[in]fdThe file descriptor to retrieve the extended attribute list from.
Returns:
an iterator.
Remarks:
The iterator will not allocate any data during the iteration step, so you need to copy them yourself if you need.
Since (EFL) :
1.2
void* eina_xattr_get ( const char *  file,
const char *  attribute,
ssize_t *  size 
)

Retrieve an extended attribute from a file.

Since :
2.3
Parameters:
[in]fileThe file to retrieve the extended attribute from.
[in]attributeThe extended attribute name to retrieve.
[out]sizeThe size of the retrieved extended attribute.
Returns:
the allocated data that hold the extended attribute value.
Remarks:
It will return NULL and *size will be 0 if it fails.
Since (EFL) :
1.1
Eina_Bool eina_xattr_int_get ( const char *  file,
const char *  attribute,
int *  value 
)

Get a int from an extended attribute properties.

Since :
2.3
Parameters:
[in]fileThe file to get the string from.
[in]attributeThe attribute to get.
[out]valueWhere to put the extracted value
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Remarks:
This call check that the int is correctly set.
Since (EFL) :
1.1
Eina_Bool eina_xattr_int_set ( const char *  file,
const char *  attribute,
int  value,
Eina_Xattr_Flags  flags 
)

Set an int as a extended attribute properties.

Since :
2.3
Parameters:
[in]fileThe file to set the int to.
[in]attributeThe attribute to set.
[in]valueThe NULL-terminated int to set.
[in]flagsDefine the set policy.
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Since (EFL) :
1.1
Eina_Iterator* eina_xattr_ls ( const char *  file)

Get an iterator that list all extended attribute of a file.

Since :
2.3
Parameters:
[in]fileThe filename to retrieve the extended attribute list from.
Returns:
an iterator.
Remarks:
The iterator will not allocate any data during the iteration step, so you need to copy them yourself if you need.
Since (EFL) :
1.1
Eina_Bool eina_xattr_set ( const char *  file,
const char *  attribute,
const void *  data,
ssize_t  length,
Eina_Xattr_Flags  flags 
)

Set an extended attribute on a file.

Since :
2.3
Parameters:
[in]fileThe file to set the extended attribute to.
[in]attributeThe attribute to set.
[in]dataThe data to set.
[in]lengthThe length of the data to set.
[in]flagsDefine the set policy.
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Since (EFL) :
1.1
char* eina_xattr_string_get ( const char *  file,
const char *  attribute 
)

Get a string from an extended attribute properties.

Since :
2.3
Parameters:
[in]fileThe file to get the string from.
[in]attributeThe attribute to get.
Returns:
A valid string on success, NULL otherwise.
Remarks:
This call check that the string is properly NULL-terminated before returning it.
Since (EFL) :
1.1
Eina_Bool eina_xattr_string_set ( const char *  file,
const char *  attribute,
const char *  data,
Eina_Xattr_Flags  flags 
)

Set a string as a extended attribute properties.

Since :
2.3
Parameters:
[in]fileThe file to set the string to.
[in]attributeThe attribute to set.
[in]dataThe NULL-terminated string to set.
[in]flagsDefine the set policy.
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Since (EFL) :
1.1

Get an iterator that list all extended attribute value related to a fd.

Since :
2.3
Parameters:
[in]fdThe file descriptor to retrieve the extended attribute list from.
Returns:
an iterator.
Remarks:
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.
Since (EFL) :
1.2
Eina_Iterator* eina_xattr_value_ls ( const char *  file)

Get an iterator that list all extended attribute value related to a fd.

Since :
2.3
Parameters:
[in]fileThe filename to retrieve the extended attribute list from.
Returns:
an iterator.
Remarks:
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.
Since (EFL) :
1.2