aboutsummaryrefslogtreecommitdiff
path: root/include/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'include/sqfs')
-rw-r--r--include/sqfs/xattr.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sqfs/xattr.h b/include/sqfs/xattr.h
index 2e48a4e..92fdbfe 100644
--- a/include/sqfs/xattr.h
+++ b/include/sqfs/xattr.h
@@ -9,6 +9,8 @@
#include "config.h"
+#include "sqfs/compress.h"
+
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
@@ -45,6 +47,8 @@ typedef struct {
uint32_t unused;
} sqfs_xattr_id_table_t;
+typedef struct xattr_reader_t xattr_reader_t;
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -58,6 +62,21 @@ int sqfs_get_xattr_prefix_id(const char *key);
/* Check if a given xattr key can be encoded in squashfs at all. */
bool sqfs_has_xattr(const char *key);
+void xattr_reader_destroy(xattr_reader_t *xr);
+
+xattr_reader_t *xattr_reader_create(int sqfsfd, sqfs_super_t *super,
+ compressor_t *cmp);
+
+int xattr_reader_get_desc(xattr_reader_t *xr, uint32_t idx,
+ sqfs_xattr_id_t *desc);
+
+int xattr_reader_seek_kv(xattr_reader_t *xr, const sqfs_xattr_id_t *desc);
+
+sqfs_xattr_value_t *xattr_reader_read_value(xattr_reader_t *xr,
+ const sqfs_xattr_entry_t *key);
+
+sqfs_xattr_entry_t *xattr_reader_read_key(xattr_reader_t *xr);
+
#ifdef __cplusplus
}
#endif