Debian Codegraph @

libfdata/libfdata_mapped_range.h

raw symbols SCIP
1 /*
2 * The (data) mapped 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_MAPPED_RANGE_H )
23 #define _LIBFDATA_MAPPED_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_mapped_range libfdata_mapped_range_t;
35
36 struct libfdata_mapped_range
37 {
38 /* The (start) offset
39 */
40 off64_t offset;
41
42 /* The size
43 */
44 size64_t size;
45 };
46
47 int libfdata_mapped_range_initialize(
48 libfdata_mapped_range_t **mapped_range,
49 libcerror_error_t **error );
50
51 int libfdata_mapped_range_free(
52 libfdata_mapped_range_t **mapped_range,
53 libcerror_error_t **error );
54
55 int libfdata_mapped_range_clone(
56 libfdata_mapped_range_t **destination_mapped_range,
57 libfdata_mapped_range_t *source_mapped_range,
58 libcerror_error_t **error );
59
60 int libfdata_mapped_range_get(
61 libfdata_mapped_range_t *mapped_range,
62 off64_t *offset,
63 size64_t *size,
64 libcerror_error_t **error );
65
66 int libfdata_mapped_range_set(
67 libfdata_mapped_range_t *mapped_range,
68 off64_t offset,
69 size64_t size,
70 libcerror_error_t **error );
71
72 #if defined( __cplusplus )
73 }
74 #endif
75
76 #endif /* !defined( _LIBFDATA_MAPPED_RANGE_H ) */
77