1231200Smm/*-
2231200Smm * Copyright (c) 2011 Michihiro NAKAJIMA
3231200Smm * All rights reserved.
4231200Smm *
5231200Smm * Redistribution and use in source and binary forms, with or without
6231200Smm * modification, are permitted provided that the following conditions
7231200Smm * are met:
8231200Smm * 1. Redistributions of source code must retain the above copyright
9231200Smm *    notice, this list of conditions and the following disclaimer.
10231200Smm * 2. Redistributions in binary form must reproduce the above copyright
11231200Smm *    notice, this list of conditions and the following disclaimer in the
12231200Smm *    documentation and/or other materials provided with the distribution.
13231200Smm *
14231200Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
15231200Smm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16231200Smm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17231200Smm * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18231200Smm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19231200Smm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20231200Smm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21231200Smm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22231200Smm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23231200Smm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24231200Smm *
25231200Smm * $FreeBSD$
26231200Smm */
27231200Smm
28231200Smm#ifndef __LIBARCHIVE_BUILD
29231200Smm#error This header is only to be used internally to libarchive.
30231200Smm#endif
31231200Smm
32231200Smm#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED
33231200Smm#define	ARCHIVE_ENTRY_LOCALE_H_INCLUDED
34231200Smm
35231200Smmstruct archive_entry;
36231200Smmstruct archive_string_conv;
37231200Smm
38231200Smm/*
39231200Smm * Utility functions to set and get entry attributes by translating
40231200Smm * character-set. These are designed for use in format readers and writers.
41231200Smm *
42231200Smm * The return code and interface of these are quite different from other
43231200Smm * functions for archive_entry defined in archive_entry.h.
44231200Smm * Common return code are:
45231200Smm *   Return 0 if the string conversion succeeded.
46231200Smm *   Return -1 if the string conversion failed.
47231200Smm */
48231200Smm
49231200Smm#define archive_entry_gname_l	_archive_entry_gname_l
50231200Smmint _archive_entry_gname_l(struct archive_entry *,
51231200Smm    const char **, size_t *, struct archive_string_conv *);
52231200Smm#define archive_entry_hardlink_l	_archive_entry_hardlink_l
53231200Smmint _archive_entry_hardlink_l(struct archive_entry *,
54231200Smm    const char **, size_t *, struct archive_string_conv *);
55231200Smm#define archive_entry_pathname_l	_archive_entry_pathname_l
56231200Smmint _archive_entry_pathname_l(struct archive_entry *,
57231200Smm    const char **, size_t *, struct archive_string_conv *);
58231200Smm#define archive_entry_symlink_l	_archive_entry_symlink_l
59231200Smmint _archive_entry_symlink_l(struct archive_entry *,
60231200Smm    const char **, size_t *, struct archive_string_conv *);
61231200Smm#define archive_entry_uname_l	_archive_entry_uname_l
62231200Smmint _archive_entry_uname_l(struct archive_entry *,
63231200Smm    const char **, size_t *, struct archive_string_conv *);
64231200Smm#define archive_entry_acl_text_l _archive_entry_acl_text_l
65231200Smmint _archive_entry_acl_text_l(struct archive_entry *, int,
66231200Smm    const char **, size_t *, struct archive_string_conv *);
67231200Smm
68231200Smm
69231200Smm#define archive_entry_copy_gname_l	_archive_entry_copy_gname_l
70231200Smmint _archive_entry_copy_gname_l(struct archive_entry *,
71231200Smm    const char *, size_t, struct archive_string_conv *);
72231200Smm#define archive_entry_copy_hardlink_l	_archive_entry_copy_hardlink_l
73231200Smmint _archive_entry_copy_hardlink_l(struct archive_entry *,
74231200Smm    const char *, size_t, struct archive_string_conv *);
75231200Smm#define archive_entry_copy_link_l	_archive_entry_copy_link_l
76231200Smmint _archive_entry_copy_link_l(struct archive_entry *,
77231200Smm    const char *, size_t, struct archive_string_conv *);
78231200Smm#define archive_entry_copy_pathname_l	_archive_entry_copy_pathname_l
79231200Smmint _archive_entry_copy_pathname_l(struct archive_entry *,
80231200Smm    const char *, size_t, struct archive_string_conv *);
81231200Smm#define archive_entry_copy_symlink_l	_archive_entry_copy_symlink_l
82231200Smmint _archive_entry_copy_symlink_l(struct archive_entry *,
83231200Smm    const char *, size_t, struct archive_string_conv *);
84231200Smm#define archive_entry_copy_uname_l	_archive_entry_copy_uname_l
85231200Smmint _archive_entry_copy_uname_l(struct archive_entry *,
86231200Smm    const char *, size_t, struct archive_string_conv *);
87231200Smm
88231200Smm#endif /* ARCHIVE_ENTRY_LOCALE_H_INCLUDED */
89