aboutsummaryrefslogtreecommitdiff
path: root/include/sqfs/meta_writer.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 19:08:10 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 19:08:10 +0200
commitf8a92529ec04b560b5b9e647b976892412f78134 (patch)
tree5308d7f500df46ef64423708ed40a37675f4020c /include/sqfs/meta_writer.h
parent320ae4f8e752f6652c7b5c8201d7267cd4de17c1 (diff)
Fix API visibility for libsquashfs.so
This commit adds a "predef.h" header to libsquashfs that exposes two macros, SQFS_API and SQFS_INTERNAL that are used to explicilty set the visibiliy of stuff that ends up in libsquashfs to default or hidden. For compatibillity with Windows which may at some point eventually be considered, the SQFS_API define is set to dllexport IF the cpp symbol SQFS_BUILDING_DLL is defined and set to import otherwise. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/meta_writer.h')
-rw-r--r--include/sqfs/meta_writer.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/sqfs/meta_writer.h b/include/sqfs/meta_writer.h
index bb14993..3611984 100644
--- a/include/sqfs/meta_writer.h
+++ b/include/sqfs/meta_writer.h
@@ -9,6 +9,7 @@
#include "config.h"
+#include "sqfs/predef.h"
#include "sqfs/compress.h"
#include "sqfs/id_table.h"
#include "sqfs/data.h"
@@ -24,31 +25,32 @@ extern "C" {
If keep_in_mem is true, the blocks are collected in memory and must
be explicitly flushed to disk using meta_write_write_to_file.
*/
-sqfs_meta_writer_t *sqfs_meta_writer_create(int fd, sqfs_compressor_t *cmp,
- bool keep_in_mem);
+SQFS_API sqfs_meta_writer_t *sqfs_meta_writer_create(int fd,
+ sqfs_compressor_t *cmp,
+ bool keep_in_mem);
-void sqfs_meta_writer_destroy(sqfs_meta_writer_t *m);
+SQFS_API void sqfs_meta_writer_destroy(sqfs_meta_writer_t *m);
/* Compress and flush the currently unfinished block to disk. Returns 0 on
success, internally prints error message to stderr on failure */
-int sqfs_meta_writer_flush(sqfs_meta_writer_t *m);
+SQFS_API int sqfs_meta_writer_flush(sqfs_meta_writer_t *m);
/* Returns 0 on success. Prints error message to stderr on failure. */
-int sqfs_meta_writer_append(sqfs_meta_writer_t *m, const void *data,
- size_t size);
+SQFS_API int sqfs_meta_writer_append(sqfs_meta_writer_t *m, const void *data,
+ size_t size);
/* Query the current block start position and offset within the block */
-void sqfs_meta_writer_get_position(const sqfs_meta_writer_t *m,
- uint64_t *block_start,
- uint32_t *offset);
+SQFS_API void sqfs_meta_writer_get_position(const sqfs_meta_writer_t *m,
+ uint64_t *block_start,
+ uint32_t *offset);
/* Reset all internal state, including the current block start position. */
-void sqfs_meta_writer_reset(sqfs_meta_writer_t *m);
+SQFS_API void sqfs_meta_writer_reset(sqfs_meta_writer_t *m);
/* If created with keep_in_mem true, write the collected blocks to disk.
Does not flush the current block. Writes error messages to stderr and
returns non-zero on failure. */
-int sqfs_meta_write_write_to_file(sqfs_meta_writer_t *m);
+SQFS_API int sqfs_meta_write_write_to_file(sqfs_meta_writer_t *m);
#ifdef __cplusplus
}