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
28358090Smm#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED
29358090Smm#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED
30358090Smm
31231200Smm#ifndef __LIBARCHIVE_BUILD
32231200Smm#error This header is only to be used internally to libarchive.
33231200Smm#endif
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,
66313571Smmconst char **, size_t *, struct archive_string_conv *) __LA_DEPRECATED;
67313571Smm#define archive_entry_acl_to_text_l _archive_entry_acl_to_text_l
68313571Smmchar *_archive_entry_acl_to_text_l(struct archive_entry *, ssize_t *, int,
69313571Smm    struct archive_string_conv *);
70313571Smm#define archive_entry_acl_from_text_l _archive_entry_acl_from_text_l
71313571Smmint _archive_entry_acl_from_text_l(struct archive_entry *, const char* text,
72313571Smm    int type, struct archive_string_conv *);
73231200Smm#define archive_entry_copy_gname_l	_archive_entry_copy_gname_l
74231200Smmint _archive_entry_copy_gname_l(struct archive_entry *,
75231200Smm    const char *, size_t, struct archive_string_conv *);
76231200Smm#define archive_entry_copy_hardlink_l	_archive_entry_copy_hardlink_l
77231200Smmint _archive_entry_copy_hardlink_l(struct archive_entry *,
78231200Smm    const char *, size_t, struct archive_string_conv *);
79231200Smm#define archive_entry_copy_link_l	_archive_entry_copy_link_l
80231200Smmint _archive_entry_copy_link_l(struct archive_entry *,
81231200Smm    const char *, size_t, struct archive_string_conv *);
82231200Smm#define archive_entry_copy_pathname_l	_archive_entry_copy_pathname_l
83231200Smmint _archive_entry_copy_pathname_l(struct archive_entry *,
84231200Smm    const char *, size_t, struct archive_string_conv *);
85231200Smm#define archive_entry_copy_symlink_l	_archive_entry_copy_symlink_l
86231200Smmint _archive_entry_copy_symlink_l(struct archive_entry *,
87231200Smm    const char *, size_t, struct archive_string_conv *);
88231200Smm#define archive_entry_copy_uname_l	_archive_entry_copy_uname_l
89231200Smmint _archive_entry_copy_uname_l(struct archive_entry *,
90231200Smm    const char *, size_t, struct archive_string_conv *);
91231200Smm
92231200Smm#endif /* ARCHIVE_ENTRY_LOCALE_H_INCLUDED */
93