From ee26abcab9faf037cf87438cca20d54e5b0edd05 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 23 Sep 2023 11:00:27 +0200 Subject: Cleanup: move xfrm stream wrappers to libxfrm Signed-off-by: David Oberhollenzer --- include/io/xfrm.h | 55 ----------------------------------------------------- include/xfrm/wrap.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 include/io/xfrm.h create mode 100644 include/xfrm/wrap.h (limited to 'include') diff --git a/include/io/xfrm.h b/include/io/xfrm.h deleted file mode 100644 index 21ffa57..0000000 --- a/include/io/xfrm.h +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * xfrm.h - * - * Copyright (C) 2019 David Oberhollenzer - */ -#ifndef IO_XFRM_H -#define IO_XFRM_H - -#include "sqfs/predef.h" -#include "xfrm/stream.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Create an input stream that transparently decodes data. - * - * @memberof sqfs_istream_t - * - * This function creates an input stream that wraps an underlying input stream - * that is encoded/compressed and transparently decodes the data when reading - * from it. - * - * @param strm A pointer to another stream that should be wrapped. - * @param xfrm The transformation stream to use. - * - * @return A pointer to an input stream on success, NULL on failure. - */ -SQFS_INTERNAL sqfs_istream_t *istream_xfrm_create(sqfs_istream_t *strm, - xfrm_stream_t *xfrm); - -/** - * @brief Create an output stream that transparently encodes data. - * - * @memberof sqfs_ostream_t - * - * This function creates an output stream that transparently encodes - * (e.g. compresses) all data appended to it and writes it to an - * underlying, wrapped output stream. - * - * @param strm A pointer to another stream that should be wrapped. - * @param xfrm The transformation stream to use. - * - * @return A pointer to an output stream on success, NULL on failure. - */ -SQFS_INTERNAL sqfs_ostream_t *ostream_xfrm_create(sqfs_ostream_t *strm, - xfrm_stream_t *xfrm); - -#ifdef __cplusplus -} -#endif - -#endif /* IO_XFRM_H */ diff --git a/include/xfrm/wrap.h b/include/xfrm/wrap.h new file mode 100644 index 0000000..48ae112 --- /dev/null +++ b/include/xfrm/wrap.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * wrap.h + * + * Copyright (C) 2019 David Oberhollenzer + */ +#ifndef XFRM_WRAP_H +#define XFRM_WRAP_H + +#include "sqfs/predef.h" +#include "xfrm/stream.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Create an input stream that transparently decodes data. + * + * @memberof sqfs_istream_t + * + * This function creates an input stream that wraps an underlying input stream + * that is encoded/compressed and transparently decodes the data when reading + * from it. + * + * @param strm A pointer to another stream that should be wrapped. + * @param xfrm The transformation stream to use. + * + * @return A pointer to an input stream on success, NULL on failure. + */ +SQFS_INTERNAL sqfs_istream_t *istream_xfrm_create(sqfs_istream_t *strm, + xfrm_stream_t *xfrm); + +/** + * @brief Create an output stream that transparently encodes data. + * + * @memberof sqfs_ostream_t + * + * This function creates an output stream that transparently encodes + * (e.g. compresses) all data appended to it and writes it to an + * underlying, wrapped output stream. + * + * @param strm A pointer to another stream that should be wrapped. + * @param xfrm The transformation stream to use. + * + * @return A pointer to an output stream on success, NULL on failure. + */ +SQFS_INTERNAL sqfs_ostream_t *ostream_xfrm_create(sqfs_ostream_t *strm, + xfrm_stream_t *xfrm); + +#ifdef __cplusplus +} +#endif + +#endif /* XFRM_WRAP_H */ -- cgit v1.2.3