eina: Fix spelling/punctuation errors in documentation (thread..xattr)

Summary:
Also makes some of the doxygen comment line spacing/formatting
consistent.

Interesting ref on grammar of 'an uniform' vs. 'a uniform':
  https://english.stackexchange.com/questions/4700/is-it-a-uniform-or-an-uniform
It is AN honor to work with such A uniform language as English. *sigh*

Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5459
This commit is contained in:
Bryce Harrington 2017-11-13 12:04:59 +09:00 committed by Jean-Philippe Andre
parent d0ded365e9
commit dab3a6fca3
11 changed files with 217 additions and 61 deletions

View File

@ -142,7 +142,7 @@
* @ingroup Eina
*
* @defgroup Eina_Content_Access_Group Content Access
* @brief Eina provides an uniform way to access elements of a container,
* @brief Eina provides a uniform way to access elements of a container,
* either sequential or indexed.
* @ingroup Eina_Data_Types_Group
*

View File

@ -34,7 +34,7 @@
/**
* @defgroup Eina_Thread_Group Thread
*
* Abstracts platform threads, providing an uniform API. It's modelled
* Abstracts platform threads, providing a uniform API. It's modelled
* after POSIX THREADS (pthreads), on Linux they are almost 1:1
* mapping.
*
@ -305,7 +305,7 @@ typedef void *(*Eina_Thread_Cancellable_Run_Cb)(void *data);
* in the case the thread was already canceled and that was
* pending.
*
* This helper does exactly the following code. Shall you need a
* This helper does exactly the following code. Should you need a
* slightly different behavior, use the base calls yourself.
*
* @code

View File

@ -19,7 +19,7 @@
* designed with the idea of sending large volumes of messages with no
* copies from one thread to another (or from/to the mainloop). The idea
* is that a thread queue is created and then one or more threads send
* messages in one end and fetch messages on the other end. If you set a
* messages in one end and fetch messages off the other end. If you set a
* parent message queue to 1 or more queues, then this parent will wake up
* with a sub queue message, indicating which child queue woke up. This can
* be used to implement the ability to listen to multiple queues at once.
@ -41,6 +41,7 @@ typedef struct _Eina_Thread_Queue Eina_Thread_Queue;
* @since 1.11
*/
typedef struct _Eina_Thread_Queue_Msg Eina_Thread_Queue_Msg;
/**
* @typedef Eina_Thread_Queue_Msg_Sub
*

View File

@ -86,7 +86,7 @@
/**
* @defgroup Eina_Tiler_Group Tiler
*
* @warning This is a very low level tool, in most situations(for example if
* @warning This is a very low level tool, in most situations (for example if
* you're using evas) you won't need this.
*
* @section basic Basic usage
@ -184,6 +184,7 @@ typedef struct _Eina_Tile_Grid_Slicer Eina_Tile_Grid_Slicer;
* @see eina_tiler_free()
*/
EAPI Eina_Tiler *eina_tiler_new(int w, int h);
/**
* @brief Frees a tiler.
*
@ -193,6 +194,7 @@ EAPI Eina_Tiler *eina_tiler_new(int w, int h);
* elements of @p t.
*/
EAPI void eina_tiler_free(Eina_Tiler *t);
/**
* @brief Sets the size of tiles for a tiler.
*
@ -246,7 +248,7 @@ EAPI void eina_tiler_strict_set(Eina_Tiler *t, Eina_Bool strict);
* @brief Tells if a tiler is empty or not.
*
* @param t The tiler to apply the strict rules to.
* @return EINA_TRUE when empty, EINA_FALSE when not.
* @return #EINA_TRUE when empty, #EINA_FALSE when not.
*
* @since 1.8
*/
@ -262,6 +264,7 @@ EAPI Eina_Bool eina_tiler_empty(const Eina_Tiler *t);
* @see eina_tiler_rect_del()
*/
EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, const Eina_Rectangle *r);
/**
* @brief Removes a rectangle from a tiler.
*
@ -272,6 +275,7 @@ EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, const Eina_Rectangle
* @see eina_tiler_clear()
*/
EAPI void eina_tiler_rect_del(Eina_Tiler *t, const Eina_Rectangle *r);
/**
* @brief Removes all rectangles from tiles.
*
@ -280,6 +284,7 @@ EAPI void eina_tiler_rect_del(Eina_Tiler *t, const Eina_Rectangle
* @see eina_tiler_rect_del()
*/
EAPI void eina_tiler_clear(Eina_Tiler *t);
/**
* @brief Creates a iterator to access the tilers calculated rectangles.
*
@ -316,7 +321,7 @@ EAPI Eina_Iterator *eina_tile_grid_slicer_iterator_new(int x, int y, int w,
* @param src The second tiler.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* This fuction get the union of tilers @p dst and @p src.
* This function gets the union of tilers @p dst and @p src.
* The result is stored in @p dst. It returns #EINA_TRUE if it succeeds.
* @since 1.11
*/
@ -329,7 +334,7 @@ EAPI Eina_Bool eina_tiler_union(Eina_Tiler *dst, Eina_Tiler *src);
* @param src The second tiler.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* This fuction subtracts two tilers @p dst and @p src.
* This function subtracts two tilers @p dst and @p src.
* The result is stored in @p dst. It returns #EINA_TRUE if it succeeds.
* @since 1.11
*/
@ -342,7 +347,7 @@ EAPI Eina_Bool eina_tiler_subtract(Eina_Tiler *dst, Eina_Tiler *src);
* @param t2 The second tiler.
* @return A pointer of intersection result. @c NULL if intersection doesn't exist.
*
* This fuction gest intersection of two tilers @p t1 and @p t2.
* This function gets the intersection of two tilers @p t1 and @p t2.
* It returns a pointer of result if intersection of two tilers exists., otherwise returns NULL.
* @since 1.11
*/
@ -353,9 +358,9 @@ EAPI Eina_Tiler *eina_tiler_intersection(Eina_Tiler *t1, Eina_Tiler *t2);
*
* @param t1 The first tiler.
* @param t2 The second tiler.
* @return #EINA_TRUE is equal, #EINA_FALSE is unequal.
* @return #EINA_TRUE is equal, #EINA_FALSE is inequal.
*
* This fuction gets result of comparison for @p t1 and @p t2.
* This function gets result of comparison for @p t1 and @p t2.
* It returns #EINA_TRUE if tilers are equal.
* @since 1.11
*/
@ -367,7 +372,7 @@ EAPI Eina_Bool eina_tiler_equal(const Eina_Tiler *t1, const Eina_Tiler
* @param slc Pointer to an Eina_Tile_Grid_Slicer struct.
* @param rect Pointer to a struct Eina_Tile_Grid_Info *.
* @return #EINA_TRUE if the current rect is valid. #EINA_FALSE if there
* is no more rects to iterate over (and thus the current one isn't valid).
* are no more rects to iterate over (and thus the current one isn't valid).
*
* This functions iterates over each Eina_Tile_Grid_Info *rect of the grid.
* eina_tile_grid_slicer_setup() must be called first, and *rect is only valid
@ -376,6 +381,7 @@ EAPI Eina_Bool eina_tiler_equal(const Eina_Tiler *t1, const Eina_Tiler
* @note Consider using eina_tile_grid_slicer_iterator_new() instead.
*/
static inline Eina_Bool eina_tile_grid_slicer_next(Eina_Tile_Grid_Slicer *slc, const Eina_Tile_Grid_Info **rect);
/**
* @brief Sets up an Eina_Tile_Grid_Slicer struct.
*
@ -388,7 +394,7 @@ static inline Eina_Bool eina_tile_grid_slicer_next(Eina_Tile_Grid_Slicer *slc, c
* @param tile_h Tile height.
* @return A pointer to the Eina_Iterator, @c NULL on failure.
*
* The region defined by @a x, @a y, @a w, @a h will be divided in to a grid of
* The region defined by @a x, @a y, @a w, @a h will be divided into a grid of
* tiles of width @a tile_w and height @p tile_h, @p slc can then be used with
* eina_tile_grid_slicer_next() to access each tile.
*

View File

@ -123,7 +123,7 @@ typedef const char Eina_Tmpstr;
/**
* @brief Adds a new temporary string based on the input string.
*
* @param str This is the input stringthat is copied into the temp string.
* @param str This is the input string that is copied into the temp string.
* @return A pointer to the tmp string that is a standard C string.
*
* When you add a temporary string (tmpstr) it is expected to have a very

View File

@ -58,7 +58,7 @@
# else
/**
* @def EAPI
* @brief Used to export functions(by changing visibility).
* @brief Used to export functions (by changing visibility).
*/
# define EAPI
# endif
@ -83,7 +83,7 @@
# else
/**
* @def EAPI
* @brief Used to export functions(by changing visibility).
* @brief Used to export functions (by changing visibility).
*/
# define EXPORTAPI
# endif
@ -303,7 +303,7 @@
* @def EINA_ARG_NONNULL
* Used to warn when the specified arguments of the function are @c NULL.
*
* @param ... Oridnals of the parameters to check for nullity (1..n)
* @param ... Ordinals of the parameters to check for nullity (1..n)
*
* @return Nothing, but Doxygen will complain if it's not documented :-P
*
@ -315,6 +315,7 @@
* Used to warn when the function is considered as deprecated.
*/
# define EINA_DEPRECATED
/**
* @def EINA_MALLOC
* @brief EINA_MALLOC is used to tell the compiler that a function may be treated
@ -322,54 +323,64 @@
* the function returns and that the memory has undefined content.
*/
# define EINA_MALLOC
/**
* @def EINA_PURE
* @brief EINA_PURE is used to tell the compiler this functions has no effects
* except the return value and their return value depends only on the parameters
* @brief EINA_PURE is used to tell the compiler this function has no effect
* except the return value and its return value depends only on the parameters
* and/or global variables.
*/
# define EINA_PURE
/**
* @def EINA_PRINTF
* @param fmt The format to be used.
* @param arg The argument to be used.
*/
# define EINA_PRINTF(fmt, arg)
/**
* @def EINA_SCANF
* @param fmt The format to be used.
* @param arg The argument to be used.
*/
# define EINA_SCANF(fmt, arg)
/**
* @def EINA_FORMAT
* @param fmt The format to be used.
*/
# define EINA_FORMAT(fmt)
/**
* @def EINA_CONST
* @brief Attribute from gcc to prevent the function to read/modify any global memory.
*/
# define EINA_CONST
/**
* @def EINA_NOINSTRUMENT
* @brief Attribute from gcc to disable instrumentation for a specific function.
*/
# define EINA_NOINSTRUMENT
/**
* @def EINA_UNLIKELY
* @param exp The expression to be used.
*/
# define EINA_UNLIKELY(exp) exp
/**
* @def EINA_LIKELY
* @param exp The expression to be used.
*/
# define EINA_LIKELY(exp) exp
/**
* @def EINA_SENTINEL
* @brief Attribute from gcc to prevent calls without the necessary NULL
* sentinel in certain variadic functions
*
* @since 1.7
*/
# define EINA_SENTINEL
@ -378,6 +389,7 @@
* @def EINA_FALLTHROUGH
* @brief Attribute from gcc to prevent warning and indicate that we expect
* to actually go to the next switch statement
*
* @since 1.20
*/
# define EINA_FALLTHROUGH
@ -385,11 +397,14 @@
/**
* @def EINA_PREFETCH
* @brief Hints that the pointer @parg needs to be pre-fetched into cache
*
* This hints to the compiler to probably issue a prefetch command for the
* memory address @p arg and ensure it goes into all levels of cache. For
* just writing to an address look at EINA_PREFETCH_WRITE().
*
* Note that the pointer @p arg does not have to be a valid pointer and
* will not cause any exceptions (like segfaults) if it is invalid.
*
* @since 1.19
*/
# define EINA_PREFETCH(arg)
@ -397,12 +412,15 @@
/**
* @def EINA_PREFETCH_WRITE
* @brief Hints that the pointer @parg needs to be pre-fetched into cache
*
* This hints to the compiler to probably issue a prefetch command for the
* memory address @p arg and ensure it goes into all levels of cache. This
* specifically indicates that the address is going to be written to as
* opposed to being read from as with EINA_PREFETCH().
*
* Note that the pointer @p arg does not have to be a valid pointer and
* will not cause any exceptions (like segfaults) if it is invalid.
*
* @since 1.19
*/
# define EINA_PREFETCH_WRITE(arg)
@ -410,23 +428,30 @@
/**
* @def EINA_PREFETCH_NOCACHE
* @brief Hints that the pointer @parg needs to be pre-fetched into cache
*
* This hints to the compiler to probably issue a prefetch command for the
* memory address @p arg and ensure it goes into just the closest(l1) cache.
* For just writing to an address look at EINA_PREFETCH_WRITE_NOCACHE().
*
* Note that the pointer @p arg does not have to be a valid pointer and
* will not cause any exceptions (like segfaults) if it is invalid.
*
* @since 1.19
*/
# define EINA_PREFETCH_NOCACHE(arg)
/**
* @def EINA_PREFETCH_WRITE_NOCACHE
*
* @brief Hints that the pointer @parg needs to be pre-fetched into cache
*
* This hints to the compiler to probably issue a prefetch command for the
* memory address @p arg and ensure it goes into just the closest(l1) cache.
* This specifically indicates that the address is going to be written to as
* opposed to being read from as with EINA_PREFETCH_NOCACHE().
* Note that the pointer @p arg does not have to be a valid pointer and
* will not cause any exceptions (like segfaults) if it is invalid.
*
* @since 1.19
*/
# define EINA_PREFETCH_NOCACHE_WRITE(arg)
@ -514,9 +539,11 @@ typedef void (*Eina_Free_Cb)(void *data);
/**
* @def EINA_C_ARRAY_LENGTH
* Macro to return the array length of a standard c array.
*
* For example:
* int foo[] = { 0, 1, 2, 3 };
* would return 4 and not 4 * sizeof(int).
*
* @since 1.2.0
*/
#define EINA_C_ARRAY_LENGTH(arr) (sizeof(arr) / sizeof((arr)[0]))
@ -525,7 +552,7 @@ typedef void (*Eina_Free_Cb)(void *data);
* @def EINA_DOUBLE_EQUAL
* Macro to compare 2 double floating point values and deal with precision
* loss issues.
*
*
* @since 1.18
*/
#define EINA_DOUBLE_EQUAL(x, y) \

View File

@ -53,7 +53,6 @@ EAPI size_t eina_unicode_strlen(const Eina_Unicode *ustr) EINA_ARG_NONNUL
*/
EAPI size_t eina_unicode_strnlen(const Eina_Unicode *ustr, int n) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_PURE;
/**
* @brief Same as the standard strdup just with Eina_Unicode instead of char.
*
@ -62,7 +61,6 @@ EAPI size_t eina_unicode_strnlen(const Eina_Unicode *ustr, int n) EINA_AR
*/
EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode *text) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
/**
* @brief Same as strdup but cuts on the given size. Assumes n < len
*
@ -78,7 +76,6 @@ EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode *text) EINA_WARN_UNUSE
*/
EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
/**
* @brief Same as the standard strcmp just with Eina_Unicode instead of char.
*
@ -88,7 +85,6 @@ EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA
*/
EAPI int eina_unicode_strcmp(const Eina_Unicode *a, const Eina_Unicode *b) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
/**
* @brief Same as the standard strcpy just with Eina_Unicode instead of char.
*
@ -98,7 +94,6 @@ EAPI int eina_unicode_strcmp(const Eina_Unicode *a, const Eina_Unicode
*/
EAPI Eina_Unicode *eina_unicode_strcpy(Eina_Unicode *dest, const Eina_Unicode *source) EINA_ARG_NONNULL(1, 2);
/**
* @brief Same as the standard strstr just with Eina_Unicode instead of char.
*
@ -109,7 +104,6 @@ EAPI Eina_Unicode *eina_unicode_strcpy(Eina_Unicode *dest, const Eina_Unicode *s
*/
EAPI Eina_Unicode *eina_unicode_strstr(const Eina_Unicode *haystack, const Eina_Unicode *needle) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
/**
* @brief Same as the standard strncpy just with Eina_Unicode instead of char.
*
@ -120,7 +114,6 @@ EAPI Eina_Unicode *eina_unicode_strstr(const Eina_Unicode *haystack, const Eina_
*/
EAPI Eina_Unicode *eina_unicode_strncpy(Eina_Unicode *dest, const Eina_Unicode *source, size_t n) EINA_ARG_NONNULL(1, 2);
/**
* @see eina_str_escape()
*
@ -131,18 +124,19 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL
/* UTF-8 Handling */
/**
* Reads UTF8 bytes from @p buf, starting at @p iindex and returns
* the decoded code point at @p iindex offset, and advances @p iindex
* to the next code point after this. @p iindex is always advanced,
* unless if the advancement is after the @c NULL.
*
* On error: return a codepoint between DC80 to DCFF where the low 8 bits
* are the byte's value.
*
* @param buf the string
* @param iindex the index to look at and return by.
* @return the codepoint found, 0 if @p buf or @p iindex are NULL
*
* @since 1.8.0
*/
static inline Eina_Unicode eina_unicode_utf8_next_get(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2);
@ -153,27 +147,31 @@ static inline Eina_Unicode eina_unicode_utf8_next_get(const char *buf, int *iind
* the decoded code point at @p iindex offset, and advances @p iindex
* to the next code point after this. @p iindex is always advanced,
* unless if the advancement is after the @c NULL.
*
* On error: return a codepoint between DC80 to DCFF where the low 8 bits
* are the byte's value.
*
* @param buf the string
* @param iindex the index to look at and return by.
* @return the codepoint found, 0 if @p buf or @p iindex are NULL
*
* @since 1.1.0
*/
EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2) EINA_DEPRECATED;
/**
* Reads UTF8 bytes from @p buf, starting at @p iindex and returns
* the decoded code point at @p iindex offset, and moves àp iindex
* the decoded code point at @p iindex offset, and moves @p iindex
* to the previous code point. @p iindex is always moved, as long
* as it's not past the start of the string.
*
* On error: return a codepoint between DC80 to DCFF where the low 8 bits
* are the byte's value.
*
* @param buf the string
* @param iindex the index to look at and return by.
* @return the codepoint found.
*
* @since 1.1.0
*/
EAPI Eina_Unicode eina_unicode_utf8_get_prev(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2);
@ -185,6 +183,7 @@ EAPI Eina_Unicode eina_unicode_utf8_get_prev(const char *buf, int *iindex) EINA_
*
* @param buf the string
* @return the number of unicode characters (not bytes) in the string
*
* @since 1.1.0
*/
EAPI int eina_unicode_utf8_get_len(const char *buf) EINA_ARG_NONNULL(1);
@ -206,6 +205,7 @@ EAPI Eina_Unicode *eina_unicode_utf8_to_unicode(const char *utf, int *_len) EINA
* @param ulen the length in the unicode string to convert.
* @param _len the length byte length of the return utf8 substring.
* @return the newly allocated utf-8 substring.
*
* @since 1.17
*/
EAPI char * eina_unicode_unicode_to_utf8_range(const Eina_Unicode *uni, int ulen, int *_len) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
@ -216,6 +216,7 @@ EAPI char * eina_unicode_unicode_to_utf8_range(const Eina_Unicode *uni, int ulen
* @param uni the Eina_Unicode string
* @param _len the length byte length of the return utf8 string.
* @return the newly allocated utf-8 string.
*
* @since 1.1.0
*/
EAPI char * eina_unicode_unicode_to_utf8(const Eina_Unicode *uni, int *_len) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;

View File

@ -50,7 +50,7 @@ EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
/**
* @brief Creates a new string buffer using the passed string. The passed
* string is used directly as the buffer, it's somehow the opposite function of
* @ref eina_ustrbuf_string_steal . The passed string must be malloced.
* @ref eina_ustrbuf_string_steal . The passed string must be malloc'd.
*
* @param str The string to manage
* @return Newly allocated string buffer instance
@ -68,7 +68,7 @@ EAPI Eina_UStrbuf *eina_ustrbuf_manage_new(Eina_Unicode *str) EINA_MALLOC EINA_W
/**
* @brief Creates a new string buffer using the passed string. The passed
* string is used directly as the buffer, it's somehow the opposite function of
* @ref eina_ustrbuf_string_steal . The passed string must be malloced.
* @ref eina_ustrbuf_string_steal . The passed string must be malloc'd.
*
* @param str The string to manage
* @param length The length of the string.
@ -143,7 +143,7 @@ EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Unicode
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
*
* This function appends at most @p maxlen characters of @p str to
* @p buf. It can't appends more than the length of @p str. It
* @p buf. It can't append more than the length of @p str. It
* computes the length of @p str, so is slightly slower than
* eina_ustrbuf_append_length(). If the length is known beforehand,
* consider using that variant (@p maxlen should then be checked so
@ -316,7 +316,7 @@ EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf *buf, Eina_Unicode c, size_
* @param str The string to prepend.
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
*
* This macro is calling eina_ustrbuf_insert() at position 0.If @p buf
* This macro is calling eina_ustrbuf_insert() at position 0. If @p buf
* can't prepend it, #EINA_FALSE is returned, otherwise #EINA_TRUE is
* returned.
*/

View File

@ -59,11 +59,11 @@
*
* Just because we stored a string doesn't mean we can't use the @c
* eina_value_to_string() function, we can and it's important to note that it
* will return not the stored string but rather a copy of it(one we have to
* will return not the stored string but rather a copy of it (one we have to
* free):
* @until eina_value_flush
*
* And now to explore conversions between two type we'll create another value:
* And now to explore conversions between two types we'll create another value:
* @until eina_value_setup
*
* And make sure @c v and @c others have different types:
@ -280,8 +280,8 @@
* Abstracts generic data storage and access to it in an extensible
* and efficient way.
*
* It comes with pre-defined types for numbers, array, list, hash,
* blob and structs. It is able to convert between data types,
* It comes with pre-defined types for numbers, arrays, lists, hashes,
* blobs and structs. It is able to convert between data types,
* including to string.
*
* It is meant for simple data types, providing uniform access and
@ -690,9 +690,9 @@ EAPI Eina_Value *eina_value_new(const Eina_Value_Type *type) EINA_ARG_NONNULL(1)
*/
EAPI void eina_value_free(Eina_Value *value);
/**
* @brief Initializes generic value storage.
*
* @param value Value object
* @param type How to manage this value.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -717,6 +717,7 @@ static inline Eina_Bool eina_value_setup(Eina_Value *value,
/**
* @brief Creates generic value storage.
*
* @param value Value object
*
* Releases all the resources associated with an #Eina_Value. The
@ -735,6 +736,7 @@ static inline void eina_value_flush(Eina_Value *value) EINA_ARG_NONNULL(1);
/**
* @brief Copies generic value storage.
*
* @param value Source value object
* @param copy Destination value object
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -765,6 +767,7 @@ static inline int eina_value_compare(const Eina_Value *a,
/**
* @brief Sets the generic value.
*
* @param value Source value object
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
@ -824,6 +827,7 @@ static inline Eina_Bool eina_value_set(Eina_Value *value,
/**
* @brief Gets the generic value.
*
* @param value Source value object
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
@ -891,6 +895,7 @@ static inline Eina_Bool eina_value_get(const Eina_Value *value,
/**
* @brief Sets the generic value.
*
* @param value Source value object
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -910,6 +915,7 @@ static inline Eina_Bool eina_value_vset(Eina_Value *value,
/**
* @brief Gets the generic value.
*
* @param value Source value object
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -998,6 +1004,7 @@ static inline Eina_Bool eina_value_pset(Eina_Value *value,
/**
* @brief Gets the generic value to pointer.
*
* @param value Source value object
* @param ptr Pointer to receive the contents.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -1066,6 +1073,7 @@ static inline Eina_Bool eina_value_pget(const Eina_Value *value,
/**
* @brief Converts one value to another type.
*
* @param value Source value object.
* @param convert Destination value object.
* @return #EINA_TRUE if converted, #EINA_FALSE otherwise.
@ -1406,6 +1414,7 @@ static inline Eina_Bool eina_value_array_insert(Eina_Value *value,
/**
* @brief Appends a generic value in an array.
*
* @param value Source value object
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
@ -1462,10 +1471,12 @@ static inline Eina_Bool eina_value_array_append(Eina_Value *value,
/**
* @brief Sets a generic value to an array member.
*
* @param value Source value object
* @param position Index of the member
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_array_set()
* @see eina_value_array_get()
* @see eina_value_array_pset()
@ -1484,6 +1495,7 @@ static inline Eina_Bool eina_value_array_vset(Eina_Value *value,
/**
* @brief Gets the generic value from an array member.
*
* @param value Source value object
* @param position Index of the member
* @param args Variable argument
@ -1505,10 +1517,12 @@ static inline Eina_Bool eina_value_array_vget(const Eina_Value *value,
va_list args) EINA_ARG_NONNULL(1);
/**
* @brief Inserts a generic value to an array member position.
*
* @param value Source value object
* @param position Index of the member
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_array_set()
* @see eina_value_array_get()
* @see eina_value_array_vset()
@ -1527,9 +1541,11 @@ static inline Eina_Bool eina_value_array_vinsert(Eina_Value *value,
/**
* @brief Appends a generic value to an array.
*
* @param value Source value object
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_array_set()
* @see eina_value_array_get()
* @see eina_value_array_vget()
@ -1548,6 +1564,7 @@ static inline Eina_Bool eina_value_array_vappend(Eina_Value *value,
/**
* @brief Sets a generic value to an array member from a pointer.
*
* @param value Source value object
* @param position Index of the member
* @param ptr Pointer to specify the contents.
@ -1611,6 +1628,7 @@ static inline Eina_Bool eina_value_array_pset(Eina_Value *value,
/**
* @brief Retrieves a generic value into a pointer from an array member.
*
* @param value Source value object
* @param position Index of the member
* @param ptr Pointer to receive the contents.
@ -1669,6 +1687,7 @@ static inline Eina_Bool eina_value_array_pget(const Eina_Value *value,
/**
* @brief Inserts a generic value to an array member position from a pointer.
*
* @param value Source value object
* @param position Index of the member
* @param ptr Pointer to specify the contents.
@ -1791,12 +1810,13 @@ static inline Eina_Bool eina_value_array_pappend(Eina_Value *value,
/**
* @brief Retrieves a value from the array as an Eina_Value copy.
*
* @param src Source value object
* @param position Index of the member
* @param dst Where to return the array member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* The argument @a dst is considered uninitialized and it's setup to
* The argument @a dst is considered uninitialized and it's set to
* the type of the member.
*
* @since 1.2
@ -1885,6 +1905,7 @@ struct _Eina_Value_List
/**
* @brief Creates generic value storage of type list.
*
* @param subtype How to manage this list members.
* @return The new value, or @c NULL on failure.
*
@ -1905,6 +1926,7 @@ EAPI Eina_Value *eina_value_list_new(const Eina_Value_Type *subtype) EINA_ARG_NO
/**
* @brief Initializes generic value storage of type list.
*
* @param value Value object
* @param subtype How to manage this list members.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -1930,24 +1952,29 @@ static inline Eina_Bool eina_value_list_setup(Eina_Value *value,
/**
* @brief Queries number of elements in value of list type.
*
* @param value value object.
* @return number of child elements.
*
* @since 1.2
*/
static inline unsigned int eina_value_list_count(const Eina_Value *value);
/**
* @brief Removes element at given position in value of list type.
*
* @param value value object.
* @param position index of the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_list_remove(Eina_Value *value,
unsigned int position) EINA_ARG_NONNULL(1);
/**
* @brief Sets the generic value in an list member.
* @brief Sets the generic value in a list member.
*
* @param value Source value object
* @param position Index of the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -2005,7 +2032,8 @@ static inline Eina_Bool eina_value_list_set(Eina_Value *value,
...) EINA_ARG_NONNULL(1);
/**
* @brief Gets the generic value from an list member.
* @brief Gets the generic value from a list member.
*
* @param value Source value object
* @param position Index of the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -2061,7 +2089,8 @@ static inline Eina_Bool eina_value_list_get(const Eina_Value *value,
...) EINA_ARG_NONNULL(1);
/**
* @brief Inserts the generic value in an list member position.
* @brief Inserts the generic value in a list member position.
*
* @param value Source value object
* @param position Index of the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -2119,7 +2148,8 @@ static inline Eina_Bool eina_value_list_insert(Eina_Value *value,
/**
* @brief Appends the generic value in an list.
* @brief Appends the generic value in a list.
*
* @param value Source value object
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
@ -2174,11 +2204,13 @@ static inline Eina_Bool eina_value_list_append(Eina_Value *value,
...) EINA_ARG_NONNULL(1);
/**
* @brief Sets the generic value in an list member.
* @brief Sets the generic value in a list member.
*
* @param value Source value object
* @param position Index of the member
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_list_set()
* @see eina_value_list_get()
* @see eina_value_list_pset()
@ -2196,7 +2228,8 @@ static inline Eina_Bool eina_value_list_vset(Eina_Value *value,
va_list args) EINA_ARG_NONNULL(1);
/**
* @brief Gets the generic value from an list member.
* @brief Gets the generic value from a list member.
*
* @param value Source value object
* @param position Index of the member
* @param args Variable argument
@ -2217,11 +2250,13 @@ static inline Eina_Bool eina_value_list_vget(const Eina_Value *value,
unsigned int position,
va_list args) EINA_ARG_NONNULL(1);
/**
* @brief Inserts the generic value in an list member position.
* @brief Inserts the generic value in a list member position.
*
* @param value Source value object
* @param position Index of the member
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_list_set()
* @see eina_value_list_get()
* @see eina_value_list_vset()
@ -2239,10 +2274,12 @@ static inline Eina_Bool eina_value_list_vinsert(Eina_Value *value,
va_list args) EINA_ARG_NONNULL(1);
/**
* @brief Appends the generic value in an list.
* @brief Appends the generic value in a list.
*
* @param value Source value object
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_list_set()
* @see eina_value_list_get()
* @see eina_value_list_vget()
@ -2260,7 +2297,8 @@ static inline Eina_Bool eina_value_list_vappend(Eina_Value *value,
/**
* @brief Sets the generic value in an list member from pointer.
* @brief Sets the generic value in a list member from pointer.
*
* @param value Source value object
* @param position Index of the member
* @param ptr Pointer to specify the contents.
@ -2322,7 +2360,8 @@ static inline Eina_Bool eina_value_list_pset(Eina_Value *value,
const void *ptr) EINA_ARG_NONNULL(1, 3);
/**
* @brief Gets the generic value to pointer from an list member.
* @brief Gets the generic value to pointer from a list member.
*
* @param value Source value object
* @param position Index of the member
* @param ptr Pointer to receive the contents.
@ -2379,7 +2418,8 @@ static inline Eina_Bool eina_value_list_pget(const Eina_Value *value,
void *ptr) EINA_ARG_NONNULL(1, 3);
/**
* @brief Inserts the generic value in an list member position from pointer.
* @brief Inserts the generic value in a list member position from pointer.
*
* @param value Source value object
* @param position Index of the member
* @param ptr Pointer to specify the contents.
@ -2440,7 +2480,8 @@ static inline Eina_Bool eina_value_list_pinsert(Eina_Value *value,
const void *ptr) EINA_ARG_NONNULL(1);
/**
* @brief Appends the generic value in an list from pointer.
* @brief Appends the generic value in a list from pointer.
*
* @param value Source value object
* @param ptr Pointer to specify the contents.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -2531,12 +2572,13 @@ struct _Eina_Value_Hash
/**
* @brief Creates generic value storage of type hash.
*
* @param subtype How to manage this hash members.
* @param buckets_power_size How to allocate hash buckets (2 ^
* buckets_power_size), if zero then a sane value is chosen.
* @return The new value, or @c NULL on failure.
*
* Create a new generic value storage of type hash. The members are
* Creates a new generic value storage of type hash. The members are
* managed using the description specified by @a subtype.
*
* On failure, @c NULL is returned.
@ -2553,6 +2595,7 @@ EAPI Eina_Value *eina_value_hash_new(const Eina_Value_Type *subtype, unsigned in
/**
* @brief Initializes generic value storage of type hash.
*
* @param value Value object
* @param subtype How to manage this hash members.
* @param buckets_power_size How to allocate hash buckets (2 ^
@ -2581,17 +2624,21 @@ static inline Eina_Bool eina_value_hash_setup(Eina_Value *value,
/**
* @brief Queries number of elements in value of hash type.
*
* @param value value object.
* @return number of child elements.
*
* @since 1.2
*/
static inline unsigned int eina_value_hash_population(const Eina_Value *value);
/**
* @brief Removes element at given position in value of hash type.
*
* @param value value object.
* @param key key to find the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_hash_del(Eina_Value *value,
@ -2599,6 +2646,7 @@ static inline Eina_Bool eina_value_hash_del(Eina_Value *value,
/**
* @brief Sets the generic value in an hash member.
*
* @param value Source value object
* @param key Key to find the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -2650,6 +2698,7 @@ static inline Eina_Bool eina_value_hash_set(Eina_Value *value,
/**
* @brief Gets the generic value from an hash member.
*
* @param value Source value object
* @param key Key to find the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -2705,10 +2754,12 @@ static inline Eina_Bool eina_value_hash_get(const Eina_Value *value,
/**
* @brief Sets the generic value in an hash member.
*
* @param value Source value object
* @param key Key to find the member
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_hash_set()
* @see eina_value_hash_get()
* @see eina_value_hash_pset()
@ -2721,6 +2772,7 @@ static inline Eina_Bool eina_value_hash_vset(Eina_Value *value,
/**
* @brief Gets the generic value from an hash member.
*
* @param value Source value object
* @param key Key to find the member
* @param args Variable argument
@ -2743,6 +2795,7 @@ static inline Eina_Bool eina_value_hash_vget(const Eina_Value *value,
/**
* @brief Sets the generic value in an hash member from pointer.
*
* @param value Source value object
* @param key Key to find the member
* @param ptr Pointer to specify the contents.
@ -2797,6 +2850,7 @@ static inline Eina_Bool eina_value_hash_pset(Eina_Value *value,
/**
* @brief Gets the generic value to pointer from an hash member.
*
* @param value Source value object
* @param key Key to find the member
* @param ptr Pointer to receive the contents.
@ -2865,6 +2919,7 @@ static inline Eina_Bool eina_value_hash_pget(const Eina_Value *value,
* @typedef Eina_Value_Blob_Operations
* How to manage blob. Any @c NULL callback is ignored.
* @see #_Eina_Value_Blob_Operations explains fields.
*
* @since 1.2
*/
typedef struct _Eina_Value_Blob_Operations Eina_Value_Blob_Operations;
@ -2878,6 +2933,7 @@ typedef struct _Eina_Value_Blob_Operations Eina_Value_Blob_Operations;
/**
* @struct _Eina_Value_Blob_Operations
* How to manage blob. Any @c NULL callback is ignored.
*
* @since 1.2
*/
struct _Eina_Value_Blob_Operations
@ -2905,6 +2961,7 @@ EAPI extern const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC;
* Value type for #EINA_VALUE_TYPE_BLOB.
*
* @see #_Eina_Value_Blob explains fields.
*
* @since 1.2
*/
typedef struct _Eina_Value_Blob Eina_Value_Blob;
@ -2912,6 +2969,7 @@ typedef struct _Eina_Value_Blob Eina_Value_Blob;
/**
* @struct _Eina_Value_Blob
* Used to store the blob information and management operations.
*
* @since 1.2
*/
struct _Eina_Value_Blob
@ -2952,6 +3010,7 @@ typedef struct _Eina_Value_Struct_Operations Eina_Value_Struct_Operations;
* parameter, as in eina_value_struct_set().
*
* @see #_Eina_Value_Struct_Member explains fields.
*
* @since 1.2
*/
typedef struct _Eina_Value_Struct_Member Eina_Value_Struct_Member;
@ -2960,6 +3019,7 @@ typedef struct _Eina_Value_Struct_Member Eina_Value_Struct_Member;
* @typedef Eina_Value_Struct_Desc
* Describes the struct by listing its size, members and operations.
* @see #_Eina_Value_Struct_Desc explains fields.
*
* @since 1.2
*/
typedef struct _Eina_Value_Struct_Desc Eina_Value_Struct_Desc;
@ -2969,6 +3029,7 @@ typedef struct _Eina_Value_Struct_Desc Eina_Value_Struct_Desc;
* Value type for #EINA_VALUE_TYPE_STRUCT.
*
* @see #_Eina_Value_Struct explains fields.
*
* @since 1.2
*/
typedef struct _Eina_Value_Struct Eina_Value_Struct;
@ -2982,6 +3043,7 @@ typedef struct _Eina_Value_Struct Eina_Value_Struct;
/**
* @struct _Eina_Value_Struct_Operations
* How to manage struct. Any @c NULL callback is ignored.
*
* @since 1.2
*/
struct _Eina_Value_Struct_Operations
@ -3128,6 +3190,7 @@ struct _Eina_Value_Struct
/**
* @brief Creates generic value storage of type struct.
*
* @param desc How to manage this struct members.
* @return The new value, or @c NULL on failure.
*
@ -3148,6 +3211,7 @@ EAPI Eina_Value *eina_value_struct_new(const Eina_Value_Struct_Desc *desc) EINA_
/**
* @brief Initializes generic value storage of type struct.
*
* @param value Value object
* @param desc How to manage this struct members.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -3173,6 +3237,7 @@ static inline Eina_Bool eina_value_struct_setup(Eina_Value *value,
/**
* @brief Checks for a struct and get its description.
*
* @param value Value object
* @return structure description, with all members and size.
* on failure, #NULL is returned.
@ -3182,7 +3247,8 @@ static inline Eina_Bool eina_value_struct_setup(Eina_Value *value,
static inline const Eina_Value_Struct_Desc *eina_value_struct_desc_get(const Eina_Value *value) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
/**
* @brief Sets the generic value in an struct member.
* @brief Sets the generic value in a struct member.
*
* @param value Source value object
* @param name Name to find the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -3248,7 +3314,8 @@ static inline Eina_Bool eina_value_struct_set(Eina_Value *value,
...) EINA_ARG_NONNULL(1, 2);
/**
* @brief Gets the generic value from an struct member.
* @brief Gets the generic value from a struct member.
*
* @param value Source value object
* @param name Name to find the member
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
@ -3319,11 +3386,13 @@ static inline Eina_Bool eina_value_struct_get(const Eina_Value *value,
...) EINA_ARG_NONNULL(1, 2);
/**
* @brief Sets the generic value in an struct member.
* @brief Sets the generic value in a struct member.
*
* @param value Source value object
* @param name Name to find the member
* @param args Variable argument
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_value_struct_set()
* @see eina_value_struct_get()
* @see eina_value_struct_pset()
@ -3335,7 +3404,8 @@ static inline Eina_Bool eina_value_struct_vset(Eina_Value *value,
va_list args) EINA_ARG_NONNULL(1, 2);
/**
* @brief Gets the generic value from an struct member.
* @brief Gets the generic value from a struct member.
*
* @param value Source value object
* @param name Name to find the member
* @param args Variable argument
@ -3357,7 +3427,8 @@ static inline Eina_Bool eina_value_struct_vget(const Eina_Value *value,
va_list args) EINA_ARG_NONNULL(1, 2);
/**
* @brief Sets the generic value in an struct member from pointer.
* @brief Sets the generic value in a struct member from pointer.
*
* @param value Source value object
* @param name Name to find the member
* @param ptr Pointer to specify the contents.
@ -3387,7 +3458,7 @@ static inline Eina_Bool eina_value_struct_vget(const Eina_Value *value,
* @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob*
* @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
* type. It can be larger than void* or uint64_t.
*
@ -3427,7 +3498,8 @@ static inline Eina_Bool eina_value_struct_pset(Eina_Value *value,
const void *ptr) EINA_ARG_NONNULL(1, 2, 3);
/**
* @brief Gets the generic value to pointer from an struct member.
* @brief Gets the generic value to pointer from a struct member.
*
* @param value Source value object
* @param name Name to find the member
* @param ptr Pointer to receive the contents.
@ -3500,9 +3572,10 @@ static inline Eina_Bool eina_value_struct_pget(const Eina_Value *value,
/**
* @brief Gets the member as Eina_Value copy
*
* @param src Source value object
* @param name Name to find the member
* @param dst Shere to return the member value.
* @param dst Where to return the member value.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* The argument @a dst is considered uninitialized and it's setup to
@ -3516,6 +3589,7 @@ static inline Eina_Bool eina_value_struct_value_get(const Eina_Value *src,
/**
* @brief Sets the member from Eina_Value source.
*
* @param dst destination value object
* @param name name to find the member
* @param src source value
@ -3529,6 +3603,7 @@ static inline Eina_Bool eina_value_struct_value_set(Eina_Value *dst,
/**
* @brief Gets the member as Eina_Value copy given its member description.
*
* @param src Source value object
* @param member The member description to use
* @param dst Where to return the member value.
@ -3545,6 +3620,7 @@ static inline Eina_Bool eina_value_struct_member_value_get(const Eina_Value *src
/**
* @brief Sets the member from Eina_Value source.
*
* @param dst destination value object
* @param member the member description to use
* @param src source value
@ -3598,14 +3674,17 @@ struct _Eina_Value_Type
/**
* @brief Queries type name.
*
* @param type type reference.
* @return string or @c NULL if type is invalid.
*
* @since 1.2
*/
EAPI const char *eina_value_type_name_get(const Eina_Value_Type *type) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
/**
* @brief Checks if type is valid.
*
* @param type Type reference.
* @return #EINA_TRUE if valid, #EINA_FALSE otherwise.
*
@ -3618,90 +3697,108 @@ EAPI Eina_Bool eina_value_type_check(const Eina_Value_Type *type) EINA_PURE EINA
/**
* @brief Initializes memory using type descriptor.
*
* @param type type reference.
* @param mem memory to operate, must be of size @c type->value_size.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_setup(const Eina_Value_Type *type, void *mem);
/**
* @brief Flushes (clears) memory using type descriptor.
*
* @param type type reference.
* @param mem memory to operate, must be of size @c type->value_size.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_flush(const Eina_Value_Type *type, void *mem);
/**
* @brief Copies memory using type descriptor.
*
* @param type type reference.
* @param src memory to operate, must be of size @c type->value_size.
* @param dst memory to operate, must be of size @c type->value_size.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst);
/**
* @brief Compares memory using type descriptor.
*
* @param type type reference.
* @param a memory to operate, must be of size @c type->value_size.
* @param b memory to operate, must be of size @c type->value_size.
* @return less than zero if a < b, greater than zero if a > b, zero if equal.
*
* @since 1.2
*/
static inline int eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b);
/**
* @brief Converts memory using type descriptor.
*
* @param type type reference of the source.
* @param convert type reference of the destination.
* @param type_mem memory to operate, must be of size @c type->value_size.
* @param convert_mem memory to operate, must be of size @c convert->value_size.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem);
/**
* @brief Converts memory using type descriptor.
*
* @param type type reference of the destination.
* @param convert type reference of the source.
* @param type_mem memory to operate, must be of size @c type->value_size.
* @param convert_mem memory to operate, must be of size @c convert->value_size.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem);
/**
* @brief Sets memory using type descriptor and variable argument.
*
* @param type type reference of the source.
* @param mem memory to operate, must be of size @c type->value_size.
* @param args input value.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args);
/**
* @brief Sets memory using type descriptor and pointer.
*
* @param type type reference of the source.
* @param mem memory to operate, must be of size @c type->value_size.
* @param ptr pointer to input value.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr);
/**
* @brief Gets memory using type descriptor.
*
* @param type type reference of the source.
* @param mem memory to operate, must be of size @c type->value_size.
* @param ptr pointer to output.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.2
*/
static inline Eina_Bool eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr);
@ -3733,16 +3830,20 @@ typedef Eina_Value_Union Eina_Value_Optional;
/**
* @brief Creates an empty optional. This is the same as eina_value_new(EINA_VALUE_TYPE_OPTIONAL).
*
* @return returns an empty optional eina value.
*
* @since 1.17
*/
static inline Eina_Value *eina_value_optional_empty_new(void);
/**
* @brief Creates an optional eina value with the passed value
*
* @param subtype Eina_Value_Type of parameter value
* @param value The value to be used to construct optional eina value
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.17
*/
EAPI Eina_Value *eina_value_optional_new(const Eina_Value_Type *subtype,
@ -3750,9 +3851,11 @@ EAPI Eina_Value *eina_value_optional_new(const Eina_Value_Type *subtype,
/**
* @brief Function to know if an eina optional is empty or not
*
* @param value Eina Value Optional
* @param is_empty #EINA_TRUE if optional is empty, #EINA_FALSE otherwise.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.17
*/
static inline Eina_Bool eina_value_optional_empty_is(const Eina_Value *value,
@ -3760,10 +3863,12 @@ static inline Eina_Bool eina_value_optional_empty_is(const Eina_Value *value,
/**
* @brief Sets the optional with a value
*
* @param value Eina Value Optional to be set with subvalue
* @param subtype Type of subvalue
* @param subvalue Value to be set in optional
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.17
*/
EAPI Eina_Bool eina_value_optional_pset(Eina_Value *value,
@ -3772,10 +3877,12 @@ EAPI Eina_Bool eina_value_optional_pset(Eina_Value *value,
/**
* @brief Gets the value from an optional
*
* @param value Eina Value Optional to get value from
* @param subvalue Pointer to where value is to be copied to. You must use
* the correct type according to eina_value_optional_type_get
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.17
*/
EAPI Eina_Bool eina_value_optional_pget(Eina_Value *value,
@ -3783,16 +3890,20 @@ EAPI Eina_Bool eina_value_optional_pget(Eina_Value *value,
/**
* @brief Resets eina optional to empty
*
* @param value Eina Value Optional
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @since 1.17
*/
EAPI Eina_Bool eina_value_optional_reset(Eina_Value *value) EINA_ARG_NONNULL(1);
/**
*
* @brief Gets type from value that is stored on Eina Value Optional
* @param value Eina Value Optional
* @return The optional sub-type.
*
* @since 1.17
*/
static inline const Eina_Value_Type *eina_value_optional_type_get(Eina_Value *value) EINA_ARG_NONNULL(1);

View File

@ -30,15 +30,19 @@
/**
* @brief Creates a basic #Eina_Value struct desc with refcounting.
*
* @return The #Eina_Value_Struct_Desc on success, @c NULL on failure
*
* @since 1.12
*/
EAPI Eina_Value_Struct_Desc *eina_value_util_struct_desc_new(void);
/**
* @brief Creates a new #Eina_Value containing the passed parameter.
*
* @param timestr The value to use
* @return The #Eina_Value
*
* @since 1.12
*/
EAPI Eina_Value *eina_value_util_time_string_new(const char *timestr);

View File

@ -49,7 +49,7 @@ struct _Eina_Xattr
};
/**
* @brief Gets an iterator that list all extended attribute of a file.
* @brief Gets an iterator that lists all extended attribute of a file.
*
* @param file The filename to retrieve the extended attribute list from.
* @return an iterator.
@ -102,20 +102,26 @@ EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd) EINA_WARN_UNUSED_RESULT;
/**
* @brief Copies the extended attribute from one file to another.
*
* @param src source file to use as input.
* @param dst destination file to use as output.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_xattr_fd_copy()
*
* @since 1.8
*/
EAPI Eina_Bool eina_xattr_copy(const char *src, const char *dst) EINA_ARG_NONNULL(1, 2);
/**
* @brief Copies the extended attribute from one file descriptor to another.
*
* @param src source file descriptor to use as input.
* @param dst destination file descriptor to use as output.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*
* @see eina_xattr_copy()
*
* @since 1.8
*/
EAPI Eina_Bool eina_xattr_fd_copy(int src, int dst);