aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/src/include/eina_xattr.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/eina/src/include/eina_xattr.h')
-rw-r--r--libraries/eina/src/include/eina_xattr.h53
1 files changed, 50 insertions, 3 deletions
diff --git a/libraries/eina/src/include/eina_xattr.h b/libraries/eina/src/include/eina_xattr.h
index 8ddb30a..0f89cc3 100644
--- a/libraries/eina/src/include/eina_xattr.h
+++ b/libraries/eina/src/include/eina_xattr.h
@@ -39,6 +39,14 @@ typedef enum {
39 EINA_XATTR_CREATED /**< This will only succeed if the extended attribute wasn't previously set */ 39 EINA_XATTR_CREATED /**< This will only succeed if the extended attribute wasn't previously set */
40} Eina_Xattr_Flags; 40} Eina_Xattr_Flags;
41 41
42typedef struct _Eina_Xattr Eina_Xattr;
43struct _Eina_Xattr
44{
45 const char *name; /**< The eXtended attribute name @since 1.2 */
46 const char *value; /**< The eXtended attribute value @since 1.2 */
47
48 size_t length; /**< The length of the eXtended attribute value @since 1.2 */
49};
42 50
43/** 51/**
44 * @brief Get an iterator that list all extended attribute of a file. 52 * @brief Get an iterator that list all extended attribute of a file.
@@ -54,10 +62,49 @@ typedef enum {
54EAPI Eina_Iterator *eina_xattr_ls(const char *file); 62EAPI Eina_Iterator *eina_xattr_ls(const char *file);
55 63
56/** 64/**
65 * @brief Get an iterator that list all extended attribute value related to a fd.
66 *
67 * @param file The filename to retrieve the extended attribute list from.
68 * @return an iterator.
69 *
70 * The iterator will not allocate any data during the iteration step, so you need to copy them yourself
71 * if you need. The iterator will provide an Eina_Xattr structure.
72 *
73 * @since 1.2
74 */
75EAPI Eina_Iterator *eina_xattr_value_ls(const char *file);
76
77/**
78 * @brief Get an iterator that list all extended attribute related to a fd.
79 *
80 * @param fd The file descriptor to retrieve the extended attribute list from.
81 * @return an iterator.
82 *
83 * The iterator will not allocate any data during the iteration step, so you need to copy them yourself
84 * if you need.
85 *
86 * @since 1.2
87 */
88EAPI Eina_Iterator *eina_xattr_fd_ls(int fd);
89
90/**
91 * @brief Get an iterator that list all extended attribute value related to a fd.
92 *
93 * @param fd The file descriptor to retrieve the extended attribute list from.
94 * @return an iterator.
95 *
96 * The iterator will not allocate any data during the iteration step, so you need to copy them yourself
97 * if you need. The iterator will provide an Eina_Xattr structure.
98 *
99 * @since 1.2
100 */
101EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd);
102
103/**
57 * @brief Retrieve an extended attribute from a file. 104 * @brief Retrieve an extended attribute from a file.
58 * 105 *
59 * @param file The file to retrieve the extended attribute from. 106 * @param file The file to retrieve the extended attribute from.
60 * @param atttribute The extended attribute name to retrieve. 107 * @param attribute The extended attribute name to retrieve.
61 * @param size The size of the retrieved extended attribute. 108 * @param size The size of the retrieved extended attribute.
62 * @return the allocated data that hold the extended attribute value. 109 * @return the allocated data that hold the extended attribute value.
63 * 110 *
@@ -112,7 +159,7 @@ EAPI char *eina_xattr_string_get(const char *file, const char *attribute);
112 * 159 *
113 * @param file The file to set the double to. 160 * @param file The file to set the double to.
114 * @param attribute The attribute to set. 161 * @param attribute The attribute to set.
115 * @param data The NULL terminated double to set. 162 * @param value The NULL terminated double to set.
116 * @param flags Define the set policy. 163 * @param flags Define the set policy.
117 * @return EINA_TRUE on success, EINA_FALSE otherwise. 164 * @return EINA_TRUE on success, EINA_FALSE otherwise.
118 * 165 *
@@ -139,7 +186,7 @@ EAPI Eina_Bool eina_xattr_double_get(const char *file, const char *attribute, do
139 * 186 *
140 * @param file The file to set the int to. 187 * @param file The file to set the int to.
141 * @param attribute The attribute to set. 188 * @param attribute The attribute to set.
142 * @param data The NULL terminated int to set. 189 * @param value The NULL terminated int to set.
143 * @param flags Define the set policy. 190 * @param flags Define the set policy.
144 * @return EINA_TRUE on success, EINA_FALSE otherwise. 191 * @return EINA_TRUE on success, EINA_FALSE otherwise.
145 * 192 *