libsquashfs: include/sqfs/xattr_reader.h Source File

libsquashfs 1.3.2 A new set of tools and libraries for working with SquashFS images

Loading...
Searching...
No Matches
xattr_reader.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-3.0-or-later */
2/*
3 * xattr_reader.h - This file is part of libsquashfs
4 *
5 * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published
9 * by the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20#ifndef SQFS_XATTR_READER_H
21#define SQFS_XATTR_READER_H
22
23#include "sqfs/predef.h"
24
30
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
91SQFS_API sqfs_xattr_reader_t *sqfs_xattr_reader_create(sqfs_u32 flags);
92
110SQFS_API int sqfs_xattr_reader_load(sqfs_xattr_reader_t *xr,
111 const sqfs_super_t *super,
112 sqfs_file_t *file, sqfs_compressor_t *cmp);
113
129SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, sqfs_u32 idx,
130 sqfs_xattr_id_t *desc);
131
147SQFS_API int sqfs_xattr_reader_seek_kv(sqfs_xattr_reader_t *xr,
148 const sqfs_xattr_id_t *desc);
149
167SQFS_API
168 int sqfs_xattr_reader_read_key(sqfs_xattr_reader_t *xr,
169 sqfs_xattr_entry_t **key_out);
170
188SQFS_API
189 int sqfs_xattr_reader_read_value(sqfs_xattr_reader_t *xr,
190 const sqfs_xattr_entry_t *key,
191 sqfs_xattr_value_t **val_out);
192
193#ifdef __cplusplus
194}
195#endif
196
197#endif /* SQFS_XATTR_READER_H */
predef.h
Includes forward declarations of data structures, macros and integer types.
sqfs_compressor_t
Encapsultes a compressor with a simple interface to compress or extract chunks of data.
Definition compressor.h:40
sqfs_file_t
Abstracts file I/O to make it easy to embedd SquashFS.
Definition io.h:94
sqfs_super_t
The SquashFS super block, located at the beginning of the file system to describe the layout of the f...
Definition super.h:47
sqfs_xattr_entry_t
On-disk data structure that holds a single xattr key.
Definition xattr.h:53
sqfs_xattr_id_t
On-disk data structure that describes a set of key-value pairs.
Definition xattr.h:94
sqfs_xattr_reader_t
Abstracts read access to extended attributes in a SquashFS filesystem.
sqfs_xattr_reader_t::sqfs_xattr_reader_read_value
SQFS_API int sqfs_xattr_reader_read_value(sqfs_xattr_reader_t *xr, const sqfs_xattr_entry_t *key, sqfs_xattr_value_t **val_out)
Read the xattr value belonging to the last read key.
sqfs_xattr_reader_t::sqfs_xattr_reader_get_desc
SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, sqfs_u32 idx, sqfs_xattr_id_t *desc)
Resolve an xattr index from an inode to an xattr description.
sqfs_xattr_reader_t::sqfs_xattr_reader_create
SQFS_API sqfs_xattr_reader_t * sqfs_xattr_reader_create(sqfs_u32 flags)
Create an xattr reader.
sqfs_xattr_reader_t::sqfs_xattr_reader_read_key
SQFS_API int sqfs_xattr_reader_read_key(sqfs_xattr_reader_t *xr, sqfs_xattr_entry_t **key_out)
Read the next xattr key.
sqfs_xattr_reader_t::sqfs_xattr_reader_seek_kv
SQFS_API int sqfs_xattr_reader_seek_kv(sqfs_xattr_reader_t *xr, const sqfs_xattr_id_t *desc)
Resolve an xattr index from an inode to an xattr description.
sqfs_xattr_reader_t::sqfs_xattr_reader_load
SQFS_API int sqfs_xattr_reader_load(sqfs_xattr_reader_t *xr, const sqfs_super_t *super, sqfs_file_t *file, sqfs_compressor_t *cmp)
Load the locations of the xattr meta data blocks into memory.
sqfs_xattr_value_t
On-disk data structure that holds a single xattr value.
Definition xattr.h:78