1228753Smm/*-
2228753Smm * Copyright (c) 2003-2009 Tim Kientzle
3228753Smm * All rights reserved.
4228753Smm *
5228753Smm * Redistribution and use in source and binary forms, with or without
6228753Smm * modification, are permitted provided that the following conditions
7228753Smm * are met:
8228753Smm * 1. Redistributions of source code must retain the above copyright
9228753Smm *    notice, this list of conditions and the following disclaimer
10228753Smm *    in this position and unchanged.
11228753Smm * 2. Redistributions in binary form must reproduce the above copyright
12228753Smm *    notice, this list of conditions and the following disclaimer in the
13228753Smm *    documentation and/or other materials provided with the distribution.
14228753Smm *
15228753Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
16228753Smm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17228753Smm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18228753Smm * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
19228753Smm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20228753Smm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21228753Smm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22228753Smm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23228753Smm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24228753Smm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25228753Smm *
26229592Smm * $FreeBSD$
27228753Smm */
28228753Smm
29228753Smm#ifndef __LIBARCHIVE_BUILD
30228753Smm#error This header is only to be used internally to libarchive.
31228753Smm#endif
32228753Smm
33228753Smm#ifndef ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED
34228753Smm#define ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED
35228753Smm
36228753Smmstruct archive_read_disk {
37228753Smm	struct archive	archive;
38228753Smm
39228753Smm	/*
40228753Smm	 * Symlink mode is one of 'L'ogical, 'P'hysical, or 'H'ybrid,
41228753Smm	 * following an old BSD convention.  'L' follows all symlinks,
42228753Smm	 * 'P' follows none, 'H' follows symlinks only for the first
43228753Smm	 * item.
44228753Smm	 */
45228753Smm	char	symlink_mode;
46228753Smm
47228753Smm	/*
48228753Smm	 * Since symlink interaction changes, we need to track whether
49228753Smm	 * we're following symlinks for the current item.  'L' mode above
50228753Smm	 * sets this true, 'P' sets it false, 'H' changes it as we traverse.
51228753Smm	 */
52228753Smm	char	follow_symlinks;  /* Either 'L' or 'P'. */
53228753Smm
54228753Smm	const char * (*lookup_gname)(void *private, gid_t gid);
55228753Smm	void	(*cleanup_gname)(void *private);
56228753Smm	void	 *lookup_gname_data;
57228753Smm	const char * (*lookup_uname)(void *private, gid_t gid);
58228753Smm	void	(*cleanup_uname)(void *private);
59228753Smm	void	 *lookup_uname_data;
60228753Smm};
61228753Smm
62228753Smm#endif
63