diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-16 19:46:46 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-17 15:27:19 +0200 |
commit | 0abe1816da2706f87432c4e04918ad0eec902479 (patch) | |
tree | bae50f863a3784ddd709911cdabac06c5e759679 /include/sqfs | |
parent | 230453fc840c112bbe2c18708338fd897f1174ec (diff) |
Move data writer ostream into libsquashfs
It is mainly a very thin wrapper on top of the block processor so far.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs')
-rw-r--r-- | include/sqfs/block_processor.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/sqfs/block_processor.h b/include/sqfs/block_processor.h index a5eed33..cc40605 100644 --- a/include/sqfs/block_processor.h +++ b/include/sqfs/block_processor.h @@ -381,6 +381,27 @@ SQFS_API int sqfs_block_processor_finish(sqfs_block_processor_t *proc); SQFS_API const sqfs_block_processor_stats_t *sqfs_block_processor_get_stats(const sqfs_block_processor_t *proc); +/** + * @brief Create an @ref sqfs_ostream_t that writes to a data writer + * + * @memberof sqfs_block_processor_t + * + * @param out Receives a pointer to an @ref sqfs_ostream_t on success + * @param filename A filename that the ostream returns when queried. + * @param proc A pointer to a data writer object. + * @param inode An optional pointer to a pointer to an inode. If not NULL, the + * block processor creates a file inode and stores a pointer to + * it here and keeps updating the inode as the file grows. + * @param flags A combination of @ref SQFS_BLK_FLAGS that can be used to + * micro manage how the data is processed. + * + * @return Zero on sucess, a negative @ref SQFS_ERROR value on failure. + */ +SQFS_API int sqfs_block_processor_create_ostream(sqfs_ostream_t **out, + const char *filename, + sqfs_block_processor_t *proc, + sqfs_inode_generic_t **inode, + sqfs_u32 flags); #ifdef __cplusplus } #endif |