1 /*- 2 * Copyright (c) 2011 Michihiro NAKAJIMA 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26 #ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED 27 #define ARCHIVE_ENTRY_LOCALE_H_INCLUDED 28 29 #ifndef __LIBARCHIVE_BUILD 30 #error This header is only to be used internally to libarchive. 31 #endif 32 33 struct archive_entry; 34 struct archive_string_conv; 35 36 /* 37 * Utility functions to set and get entry attributes by translating 38 * character-set. These are designed for use in format readers and writers. 39 * 40 * The return code and interface of these are quite different from other 41 * functions for archive_entry defined in archive_entry.h. 42 * Common return code are: 43 * Return 0 if the string conversion succeeded. 44 * Return -1 if the string conversion failed. 45 */ 46 47 #define archive_entry_gname_l _archive_entry_gname_l 48 int _archive_entry_gname_l(struct archive_entry *, 49 const char **, size_t *, struct archive_string_conv *); 50 #define archive_entry_hardlink_l _archive_entry_hardlink_l 51 int _archive_entry_hardlink_l(struct archive_entry *, 52 const char **, size_t *, struct archive_string_conv *); 53 #define archive_entry_pathname_l _archive_entry_pathname_l 54 int _archive_entry_pathname_l(struct archive_entry *, 55 const char **, size_t *, struct archive_string_conv *); 56 #define archive_entry_symlink_l _archive_entry_symlink_l 57 int _archive_entry_symlink_l(struct archive_entry *, 58 const char **, size_t *, struct archive_string_conv *); 59 #define archive_entry_uname_l _archive_entry_uname_l 60 int _archive_entry_uname_l(struct archive_entry *, 61 const char **, size_t *, struct archive_string_conv *); 62 #define archive_entry_acl_text_l _archive_entry_acl_text_l 63 int _archive_entry_acl_text_l(struct archive_entry *, int, 64 const char **, size_t *, struct archive_string_conv *) __LA_DEPRECATED; 65 #define archive_entry_acl_to_text_l _archive_entry_acl_to_text_l 66 char *_archive_entry_acl_to_text_l(struct archive_entry *, ssize_t *, int, 67 struct archive_string_conv *); 68 #define archive_entry_acl_from_text_l _archive_entry_acl_from_text_l 69 int _archive_entry_acl_from_text_l(struct archive_entry *, const char* text, 70 int type, struct archive_string_conv *); 71 #define archive_entry_copy_gname_l _archive_entry_copy_gname_l 72 int _archive_entry_copy_gname_l(struct archive_entry *, 73 const char *, size_t, struct archive_string_conv *); 74 #define archive_entry_copy_hardlink_l _archive_entry_copy_hardlink_l 75 int _archive_entry_copy_hardlink_l(struct archive_entry *, 76 const char *, size_t, struct archive_string_conv *); 77 #define archive_entry_copy_link_l _archive_entry_copy_link_l 78 int _archive_entry_copy_link_l(struct archive_entry *, 79 const char *, size_t, struct archive_string_conv *); 80 #define archive_entry_copy_pathname_l _archive_entry_copy_pathname_l 81 int _archive_entry_copy_pathname_l(struct archive_entry *, 82 const char *, size_t, struct archive_string_conv *); 83 #define archive_entry_copy_symlink_l _archive_entry_copy_symlink_l 84 int _archive_entry_copy_symlink_l(struct archive_entry *, 85 const char *, size_t, struct archive_string_conv *); 86 #define archive_entry_copy_uname_l _archive_entry_copy_uname_l 87 int _archive_entry_copy_uname_l(struct archive_entry *, 88 const char *, size_t, struct archive_string_conv *); 89 90 #endif /* ARCHIVE_ENTRY_LOCALE_H_INCLUDED */ 91