forked from enlightenment/efl
eina: eina_value - Add "struct tm" support
Ref T6204 @feature
This commit is contained in:
parent
744d2a63c5
commit
04fe5e10a2
|
@ -0,0 +1,32 @@
|
||||||
|
//Compile with:
|
||||||
|
//gcc eina_value_04.c -o eina_value_04 `pkg-config --cflags --libs eina`
|
||||||
|
|
||||||
|
#include <Eina.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Eina_Value tm_val;
|
||||||
|
time_t rawtime;
|
||||||
|
struct tm *timeinfo, timeinfo2;
|
||||||
|
char buf[1024];
|
||||||
|
|
||||||
|
eina_init();
|
||||||
|
|
||||||
|
eina_value_setup(&tm_val, EINA_VALUE_TYPE_TM);
|
||||||
|
|
||||||
|
time(&rawtime);
|
||||||
|
timeinfo = localtime(&rawtime);
|
||||||
|
|
||||||
|
eina_value_set(&tm_val, *timeinfo);
|
||||||
|
strftime(buf, 1024, "Now its %d/%m/%y", timeinfo);
|
||||||
|
printf("%s\n", buf);
|
||||||
|
|
||||||
|
eina_value_get(&tm_val, &timeinfo2);
|
||||||
|
strftime(buf, 1024, "Copy: %d/%m/%y", &timeinfo2);
|
||||||
|
printf("%s\n", buf);
|
||||||
|
|
||||||
|
eina_value_free(&tm_val);
|
||||||
|
|
||||||
|
eina_shutdown();
|
||||||
|
}
|
|
@ -3530,6 +3530,98 @@ static const Eina_Value_Type _EINA_VALUE_TYPE_TIMEVAL = {
|
||||||
_eina_value_type_timeval_pget
|
_eina_value_type_timeval_pget
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_setup(const Eina_Value_Type *type, void *mem)
|
||||||
|
{
|
||||||
|
memset(mem, 0, type->value_size);
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem EINA_UNUSED)
|
||||||
|
{
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_copy(const Eina_Value_Type *type EINA_UNUSED, const void *src, void * dst)
|
||||||
|
{
|
||||||
|
struct tm *tmsrc = (struct tm *)src;
|
||||||
|
struct tm *tmdst = dst;
|
||||||
|
*tmdst = *tmsrc;
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_eina_value_type_tm_compare(const Eina_Value_Type *type, const void *a, const void *b)
|
||||||
|
{
|
||||||
|
struct tm tma = *(struct tm*)a;
|
||||||
|
struct tm tmb = *(struct tm*)b;
|
||||||
|
time_t ta, tb;
|
||||||
|
|
||||||
|
ta = mktime(&tma);
|
||||||
|
tb = mktime(&tmb);
|
||||||
|
|
||||||
|
return _eina_value_type_timeval_compare(type, &ta, &tb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem, const void *ptr)
|
||||||
|
{
|
||||||
|
*(struct tm*)mem = *(struct tm*)ptr;
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_vset(const Eina_Value_Type *type, void *mem, va_list args)
|
||||||
|
{
|
||||||
|
const struct tm tm_val = va_arg(args, struct tm);
|
||||||
|
return _eina_value_type_tm_pset(type, mem, &tm_val);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_pget(const Eina_Value_Type *type, const void *mem, void *ptr)
|
||||||
|
{
|
||||||
|
memcpy(ptr, mem, type->value_size);
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_eina_value_type_tm_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
|
||||||
|
{
|
||||||
|
struct tm tmv = *(struct tm *)type_mem;
|
||||||
|
time_t t = mktime(&tmv);
|
||||||
|
struct timeval v = {t, 0};
|
||||||
|
|
||||||
|
if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
|
||||||
|
convert == EINA_VALUE_TYPE_STRING)
|
||||||
|
{
|
||||||
|
const char *other_mem;
|
||||||
|
char buf[64];
|
||||||
|
|
||||||
|
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &tmv);
|
||||||
|
other_mem = buf; /* required due &buf == buf */
|
||||||
|
return eina_value_type_pset(convert, convert_mem, &other_mem);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return _eina_value_type_timeval_convert_to(type, convert, &v, convert_mem);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Eina_Value_Type _EINA_VALUE_TYPE_TM = {
|
||||||
|
EINA_VALUE_TYPE_VERSION,
|
||||||
|
sizeof(struct tm),
|
||||||
|
"struct tm",
|
||||||
|
_eina_value_type_tm_setup,
|
||||||
|
_eina_value_type_tm_flush,
|
||||||
|
_eina_value_type_tm_copy,
|
||||||
|
_eina_value_type_tm_compare,
|
||||||
|
_eina_value_type_tm_convert_to,
|
||||||
|
NULL, //No convert from
|
||||||
|
_eina_value_type_tm_vset,
|
||||||
|
_eina_value_type_tm_pset,
|
||||||
|
_eina_value_type_tm_pget
|
||||||
|
};
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_eina_value_type_blob_setup(const Eina_Value_Type *type EINA_UNUSED, void *mem)
|
_eina_value_type_blob_setup(const Eina_Value_Type *type EINA_UNUSED, void *mem)
|
||||||
{
|
{
|
||||||
|
@ -5365,6 +5457,7 @@ eina_value_init(void)
|
||||||
EINA_VALUE_TYPE_LIST = &_EINA_VALUE_TYPE_LIST;
|
EINA_VALUE_TYPE_LIST = &_EINA_VALUE_TYPE_LIST;
|
||||||
EINA_VALUE_TYPE_HASH = &_EINA_VALUE_TYPE_HASH;
|
EINA_VALUE_TYPE_HASH = &_EINA_VALUE_TYPE_HASH;
|
||||||
EINA_VALUE_TYPE_TIMEVAL = &_EINA_VALUE_TYPE_TIMEVAL;
|
EINA_VALUE_TYPE_TIMEVAL = &_EINA_VALUE_TYPE_TIMEVAL;
|
||||||
|
EINA_VALUE_TYPE_TM = &_EINA_VALUE_TYPE_TM;
|
||||||
EINA_VALUE_TYPE_BLOB = &_EINA_VALUE_TYPE_BLOB;
|
EINA_VALUE_TYPE_BLOB = &_EINA_VALUE_TYPE_BLOB;
|
||||||
EINA_VALUE_TYPE_STRUCT = &_EINA_VALUE_TYPE_STRUCT;
|
EINA_VALUE_TYPE_STRUCT = &_EINA_VALUE_TYPE_STRUCT;
|
||||||
|
|
||||||
|
@ -5461,6 +5554,7 @@ EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT = NULL;
|
||||||
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_OPTIONAL = NULL;
|
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_OPTIONAL = NULL;
|
||||||
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_FILE = NULL;
|
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_FILE = NULL;
|
||||||
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_RECTANGLE = NULL;
|
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_RECTANGLE = NULL;
|
||||||
|
EAPI const Eina_Value_Type *EINA_VALUE_TYPE_TM = NULL;
|
||||||
|
|
||||||
|
|
||||||
EAPI const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC = NULL;
|
EAPI const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC = NULL;
|
||||||
|
|
|
@ -622,6 +622,20 @@ EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_BLOB;
|
||||||
*/
|
*/
|
||||||
EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT;
|
EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var EINA_VALUE_TYPE_TM
|
||||||
|
* manages 'struct tm' type
|
||||||
|
*
|
||||||
|
* eina_value_set() takes a "struct tm" from time.h.
|
||||||
|
* eina_value_pset() takes a pointer to "struct tm".
|
||||||
|
*
|
||||||
|
* eina_value_get() and eina_value_pget() takes a pointer to "struct
|
||||||
|
* tm" and it's an exact copy of value.
|
||||||
|
*
|
||||||
|
* @since 1.21
|
||||||
|
*/
|
||||||
|
EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_TM;
|
||||||
|
|
||||||
EAPI extern Eina_Error EINA_ERROR_VALUE_FAILED;
|
EAPI extern Eina_Error EINA_ERROR_VALUE_FAILED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -779,6 +793,7 @@ static inline int eina_value_compare(const Eina_Value *a,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -842,6 +857,7 @@ static inline Eina_Bool eina_value_set(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -947,6 +963,7 @@ static inline Eina_Bool eina_value_vget(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -1015,6 +1032,7 @@ static inline Eina_Bool eina_value_pset(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -1242,6 +1260,7 @@ static inline Eina_Bool eina_value_array_remove(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -1305,6 +1324,7 @@ static inline Eina_Bool eina_value_array_set(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -1356,6 +1376,7 @@ static inline Eina_Bool eina_value_array_get(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -1413,6 +1434,7 @@ static inline Eina_Bool eina_value_array_insert(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -1556,6 +1578,7 @@ static inline Eina_Bool eina_value_array_vappend(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -1623,6 +1646,7 @@ static inline Eina_Bool eina_value_array_pset(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -1675,6 +1699,7 @@ static inline Eina_Bool eina_value_array_pget(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -1735,6 +1760,7 @@ static inline Eina_Bool eina_value_array_pinsert(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -1950,6 +1976,7 @@ static inline Eina_Bool eina_value_list_remove(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -2012,6 +2039,7 @@ static inline Eina_Bool eina_value_list_set(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -2062,6 +2090,7 @@ static inline Eina_Bool eina_value_list_get(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -2118,6 +2147,7 @@ static inline Eina_Bool eina_value_list_insert(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -2260,6 +2290,7 @@ static inline Eina_Bool eina_value_list_vappend(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -2326,6 +2357,7 @@ static inline Eina_Bool eina_value_list_pset(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
* Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT);
|
||||||
|
@ -2377,6 +2409,7 @@ static inline Eina_Bool eina_value_list_pget(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -2436,6 +2469,7 @@ static inline Eina_Bool eina_value_list_pinsert(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -2592,6 +2626,7 @@ static inline Eina_Bool eina_value_hash_del(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -2647,6 +2682,7 @@ static inline Eina_Bool eina_value_hash_set(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -2735,6 +2771,7 @@ static inline Eina_Bool eina_value_hash_vget(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
|
@ -2793,6 +2830,7 @@ static inline Eina_Bool eina_value_hash_pset(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
|
* Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0);
|
||||||
|
@ -3172,6 +3210,7 @@ static inline const Eina_Value_Struct_Desc *eina_value_struct_desc_get(const Ein
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* struct myst {
|
* struct myst {
|
||||||
|
@ -3242,6 +3281,7 @@ static inline Eina_Bool eina_value_struct_set(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* struct myst {
|
* struct myst {
|
||||||
|
@ -3346,7 +3386,8 @@ static inline Eina_Bool eina_value_struct_vget(const Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
*
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
|
*
|
||||||
* @note the pointer contents are written using the size defined by
|
* @note the pointer contents are written using the size defined by
|
||||||
* type. It can be larger than void* or uint64_t.
|
* type. It can be larger than void* or uint64_t.
|
||||||
*
|
*
|
||||||
|
@ -3420,6 +3461,7 @@ static inline Eina_Bool eina_value_struct_pset(Eina_Value *value,
|
||||||
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
* @li EINA_VALUE_TYPE_TIMEVAL: struct timeval*
|
||||||
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
|
||||||
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
* @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct*
|
||||||
|
* @li EINA_VALUE_TYPE_TM: struct tm*
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* struct myst {
|
* struct myst {
|
||||||
|
|
Loading…
Reference in New Issue