Debian Codegraph @

libfdata/libfdata_range.h

raw symbols SCIP
1 /*
2 * The range functions
3 *
4 * Copyright (C) 2010-2024, Joachim Metz <[email protected]>
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( _LIBFDATA_RANGE_H )
23 #define _LIBFDATA_RANGE_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "libfdata_libcerror.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 typedef struct libfdata_range libfdata_range_t;
35
36 struct libfdata_range
37 {
38 /* The file index
39 */
40 int file_index;
41
42 /* The offset
43 */
44 off64_t offset;
45
46 /* The size
47 */
48 size64_t size;
49
50 /* The flags
51 */
52 uint32_t flags;
53 };
54
55 int libfdata_range_initialize(
56 libfdata_range_t **range,
57 libcerror_error_t **error );
58
59 int libfdata_range_free(
60 libfdata_range_t **range,
61 libcerror_error_t **error );
62
63 int libfdata_range_clone(
64 libfdata_range_t **destination_range,
65 libfdata_range_t *source_range,
66 libcerror_error_t **error );
67
68 int libfdata_range_get(
69 libfdata_range_t *range,
70 int *file_index,
71 off64_t *offset,
72 size64_t *size,
73 uint32_t *flags,
74 libcerror_error_t **error );
75
76 int libfdata_range_get_size(
77 libfdata_range_t *range,
78 size64_t *size,
79 libcerror_error_t **error );
80
81 int libfdata_range_set(
82 libfdata_range_t *range,
83 int file_index,
84 off64_t offset,
85 size64_t size,
86 uint32_t flags,
87 libcerror_error_t **error );
88
89 #if defined( __cplusplus )
90 }
91 #endif
92
93 #endif /* !defined( _LIBFDATA_RANGE_H ) */
94