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 * 26228763Smm * $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 36232153Smmstruct tree; 37238856Smmstruct archive_entry; 38232153Smm 39228753Smmstruct archive_read_disk { 40228753Smm struct archive archive; 41228753Smm 42228753Smm /* 43228753Smm * Symlink mode is one of 'L'ogical, 'P'hysical, or 'H'ybrid, 44228753Smm * following an old BSD convention. 'L' follows all symlinks, 45228753Smm * 'P' follows none, 'H' follows symlinks only for the first 46228753Smm * item. 47228753Smm */ 48228753Smm char symlink_mode; 49228753Smm 50228753Smm /* 51228753Smm * Since symlink interaction changes, we need to track whether 52228753Smm * we're following symlinks for the current item. 'L' mode above 53228753Smm * sets this true, 'P' sets it false, 'H' changes it as we traverse. 54228753Smm */ 55228753Smm char follow_symlinks; /* Either 'L' or 'P'. */ 56228753Smm 57232153Smm /* Directory traversals. */ 58232153Smm struct tree *tree; 59238856Smm int (*open_on_current_dir)(struct tree*, const char *, int); 60238856Smm int (*tree_current_dir_fd)(struct tree*); 61238856Smm int (*tree_enter_working_dir)(struct tree*); 62232153Smm 63232153Smm /* Set 1 if users request to restore atime . */ 64232153Smm int restore_time; 65238856Smm /* Set 1 if users request to honor nodump flag . */ 66238856Smm int honor_nodump; 67238856Smm /* Set 1 if users request to enable mac copyfile. */ 68238856Smm int enable_copyfile; 69238856Smm /* Set 1 if users request to traverse mount points. */ 70238856Smm int traverse_mount_points; 71232153Smm 72232153Smm const char * (*lookup_gname)(void *private, int64_t gid); 73228753Smm void (*cleanup_gname)(void *private); 74228753Smm void *lookup_gname_data; 75232153Smm const char * (*lookup_uname)(void *private, int64_t uid); 76228753Smm void (*cleanup_uname)(void *private); 77228753Smm void *lookup_uname_data; 78238856Smm 79238856Smm int (*metadata_filter_func)(struct archive *, void *, 80238856Smm struct archive_entry *); 81238856Smm void *metadata_filter_data; 82238856Smm 83238856Smm /* ARCHIVE_MATCH object. */ 84238856Smm struct archive *matching; 85238856Smm /* Callback function, this will be invoked when ARCHIVE_MATCH 86238856Smm * archive_match_*_excluded_ae return true. */ 87238856Smm void (*excluded_cb_func)(struct archive *, void *, 88238856Smm struct archive_entry *); 89238856Smm void *excluded_cb_data; 90228753Smm}; 91228753Smm 92228753Smm#endif 93