An iterator over extended attributes.  
 More...
#include <sqsh_xattr_private.h>
An iterator over extended attributes. 
Definition at line 52 of file sqsh_xattr_private.h.
◆ sqsh_xattr_iterator_free()
Frees the resources used by an xattr iterator. 
- Parameters
- 
  
    | [in] | iterator | The iterator to free. |  
 
- Returns
- 0 on success, a negative value on error. 
 
 
◆ sqsh_xattr_iterator_fullname_cmp()
Compares the full name of the current xattr with a given 0-terminated name. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  | [in] | name | The name to compare with. |  
 
- Returns
- 0 if the names match, a negative value if the current xattr's name is less than the given name, a positive value if the current xattr's name is greater than the given name. 
 
 
◆ sqsh_xattr_iterator_fullname_dup()
creates a heap allocated copy of the full name of the current entry. 
The caller is responsible for calling free() on the returned pointer.
The returned string is 0 terminated.
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The full name of the current xattr on success, NULL if the allocation fails. 
 
 
◆ sqsh_xattr_iterator_is_indirect()
Checks if the current xattr is indirect. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- true if the xattr is indirect, false otherwise. 
 
 
◆ sqsh_xattr_iterator_lookup()
Looks up an xattr by name. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  | [in] | name | The name to lookup |  
 
- Returns
- 0 if the xattr was found, a negative value otherwise. 
 
 
◆ sqsh_xattr_iterator_name()
Retrieves the name of the current xattr excluding the prefix. 
The returned pointer is allocated internally and only valid until the next call to sqsh_xattr_iterator_next(). It must not be freed. The string is not 0 terminated. Use sqsh_xattr_iterator_name_size() to get the size of the name.
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The name of the current xattr. 
 
 
◆ sqsh_xattr_iterator_name_size()
Retrieves the size of the name of the current xattr. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The size of the name of the current xattr. 
 
 
◆ sqsh_xattr_iterator_new()
Allocates and initializes a new xattr iterator. 
- Parameters
- 
  
    | [in] | file | The file context to iterate through xattrs. |  | [out] | err | Pointer to an int where the error code will be stored. |  
 
- Returns
- The new iterator on success, NULL on error. 
 
 
◆ sqsh_xattr_iterator_next()
Advances the iterator to the next xattr. 
- Parameters
- 
  
    | [in,out] | iterator | The iterator to advance. |  | [out] | err | Pointer to an int where the error code will be stored. |  
 
- Return values
- 
  
    | true | When the iterator was advanced. |  | false | When the end of the xattrs list was reached or an error occured. |  
 
 
 
◆ sqsh_xattr_iterator_prefix()
Retrieves the prefix of the current xattr. 
There are three possible prefixes that can be returned:
- "user."
- "trusted."
- "security."
The returned pointer is staticly allocated and must not be freed.
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The null terminated prefix of the current xattr. The returned pointer is staticly allocated and must not be freed. 
 
 
◆ sqsh_xattr_iterator_prefix_size()
      
        
          | uint16_t sqsh_xattr_iterator_prefix_size | ( | const struct SqshXattrIterator * | iterator | ) |  | 
      
 
Retrieves the size of the prefix of the current xattr. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The size of the prefix of the current xattr. 
 
 
◆ sqsh_xattr_iterator_type()
Retrieves the type of the current xattr. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The type of the current xattr. 
 
 
◆ sqsh_xattr_iterator_value()
Retrieves the value of the current xattr. 
The returned pointer is allocated internally and only valid until the next call to sqsh_xattr_iterator_next(). It must not be freed. The string is not 0 terminated. Use sqsh_xattr_iterator_value_size() to get the size of the value.
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The value of the current xattr. The returned pointer is allocated internally and only valid until the next call to sqsh_xattr_iterator_next(). It must not be freed. 
 
 
◆ sqsh_xattr_iterator_value_dup()
creates a heap allocated copy of the value of the current entry. 
The caller is responsible for calling free() on the returned pointer.
The returned string is 0 terminated.
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The value of the current xattr on success, NULL if the allocation fails. 
 
 
◆ sqsh_xattr_iterator_value_size()
Retrieves the size of the value of the current xattr. 
- Deprecated
- Since 1.3.0. Use sqsh_xattr_iterator_value_size2() instead.
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The size of the value of the current xattr. 
 
 
◆ sqsh_xattr_iterator_value_size2()
      
        
          | uint32_t sqsh_xattr_iterator_value_size2 | ( | const struct SqshXattrIterator * | iterator | ) |  | 
      
 
Retrieves the size of the value of the current xattr. 
- Parameters
- 
  
    | [in] | iterator | The iterator to use. |  
 
- Returns
- The size of the value of the current xattr. 
 
 
The documentation for this struct was generated from the following files: