1 /* 2 * File range functions 3 * 4 * Copyright (C) 2009-2020, Joachim Metz <joachim.metz@gmail.com> 5 * 6 * Refer to AUTHORS for acknowledgements. 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined( _LIBBFIO_FILE_RANGE_H ) 23 #define _LIBBFIO_FILE_RANGE_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "libbfio_extern.h" 29 #include "libbfio_libcerror.h" 30 #include "libbfio_types.h" 31 32 #if defined( __cplusplus ) 33 extern "C" { 34 #endif 35 36 LIBBFIO_EXTERN \ 37 int libbfio_file_range_initialize( 38 libbfio_handle_t **handle, 39 libcerror_error_t **error ); 40 41 LIBBFIO_EXTERN \ 42 int libbfio_file_range_get_name_size( 43 libbfio_handle_t *handle, 44 size_t *name_size, 45 libcerror_error_t **error ); 46 47 LIBBFIO_EXTERN \ 48 int libbfio_file_range_get_name( 49 libbfio_handle_t *handle, 50 char *name, 51 size_t name_size, 52 libcerror_error_t **error ); 53 54 LIBBFIO_EXTERN \ 55 int libbfio_file_range_set_name( 56 libbfio_handle_t *handle, 57 const char *name, 58 size_t name_length, 59 libcerror_error_t **error ); 60 61 #if defined( HAVE_WIDE_CHARACTER_TYPE ) 62 63 LIBBFIO_EXTERN \ 64 int libbfio_file_range_get_name_size_wide( 65 libbfio_handle_t *handle, 66 size_t *name_size, 67 libcerror_error_t **error ); 68 69 LIBBFIO_EXTERN \ 70 int libbfio_file_range_get_name_wide( 71 libbfio_handle_t *handle, 72 wchar_t *name, 73 size_t name_size, 74 libcerror_error_t **error ); 75 76 LIBBFIO_EXTERN \ 77 int libbfio_file_range_set_name_wide( 78 libbfio_handle_t *handle, 79 const wchar_t *name, 80 size_t name_length, 81 libcerror_error_t **error ); 82 83 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ 84 85 LIBBFIO_EXTERN \ 86 int libbfio_file_range_get( 87 libbfio_handle_t *handle, 88 off64_t *range_offset, 89 size64_t *range_size, 90 libcerror_error_t **error ); 91 92 LIBBFIO_EXTERN \ 93 int libbfio_file_range_set( 94 libbfio_handle_t *handle, 95 off64_t range_offset, 96 size64_t range_size, 97 libcerror_error_t **error ); 98 99 #if defined( __cplusplus ) 100 } 101 #endif 102 103 #endif /* !defined( _LIBBFIO_FILE_RANGE_H ) */ 104 105