diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-05 19:08:10 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-05 19:08:10 +0200 |
commit | f8a92529ec04b560b5b9e647b976892412f78134 (patch) | |
tree | 5308d7f500df46ef64423708ed40a37675f4020c /include/sqfs/xattr.h | |
parent | 320ae4f8e752f6652c7b5c8201d7267cd4de17c1 (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/xattr.h')
-rw-r--r-- | include/sqfs/xattr.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/sqfs/xattr.h b/include/sqfs/xattr.h index 5350534..d1b3bdd 100644 --- a/include/sqfs/xattr.h +++ b/include/sqfs/xattr.h @@ -9,6 +9,7 @@ #include "config.h" +#include "sqfs/predef.h" #include "sqfs/compress.h" #include <stdbool.h> @@ -54,28 +55,31 @@ extern "C" { #endif /* Get a prefix string from the ID or NULL if unknown */ -const char *sqfs_get_xattr_prefix(E_SQFS_XATTR_TYPE id); +SQFS_API const char *sqfs_get_xattr_prefix(E_SQFS_XATTR_TYPE id); /* Get id from xattr key prefix or -1 if not supported */ -int sqfs_get_xattr_prefix_id(const char *key); +SQFS_API 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); +SQFS_API bool sqfs_has_xattr(const char *key); -void sqfs_xattr_reader_destroy(sqfs_xattr_reader_t *xr); +SQFS_API void sqfs_xattr_reader_destroy(sqfs_xattr_reader_t *xr); -sqfs_xattr_reader_t *sqfs_xattr_reader_create(int sqfsfd, sqfs_super_t *super, - sqfs_compressor_t *cmp); +SQFS_API sqfs_xattr_reader_t *sqfs_xattr_reader_create(int sqfsfd, + sqfs_super_t *super, + sqfs_compressor_t *cmp); -int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, uint32_t idx, - sqfs_xattr_id_t *desc); +SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, uint32_t idx, + sqfs_xattr_id_t *desc); -int sqfs_xattr_reader_seek_kv(sqfs_xattr_reader_t *xr, - const sqfs_xattr_id_t *desc); +SQFS_API int sqfs_xattr_reader_seek_kv(sqfs_xattr_reader_t *xr, + const sqfs_xattr_id_t *desc); +SQFS_API sqfs_xattr_value_t *sqfs_xattr_reader_read_value(sqfs_xattr_reader_t *xr, const sqfs_xattr_entry_t *key); +SQFS_API sqfs_xattr_entry_t *sqfs_xattr_reader_read_key(sqfs_xattr_reader_t *xr); #ifdef __cplusplus |