Debian Codegraph @

libcdata/libcdata_range_list_value.h

raw symbols SCIP
1 /*
2 * Range list value
3 *
4 * Copyright (C) 2006-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( _LIBCDATA_RANGE_LIST_VALUE_H )
23 #define _LIBCDATA_RANGE_LIST_VALUE_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "libcdata_extern.h"
29 #include "libcdata_libcerror.h"
30 #include "libcdata_types.h"
31
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35
36 typedef struct libcdata_range_list_value libcdata_range_list_value_t;
37
38 struct libcdata_range_list_value
39 {
40 /* The (range) start value
41 */
42 uint64_t start;
43
44 /* The (range) end
45 */
46 uint64_t end;
47
48 /* The (range) size
49 */
50 uint64_t size;
51
52 /* The value
53 */
54 intptr_t *value;
55 };
56
57 int libcdata_range_list_value_initialize(
58 libcdata_range_list_value_t **range_list_value,
59 libcerror_error_t **error );
60
61 int libcdata_range_list_value_free(
62 libcdata_range_list_value_t **range_list_value,
63 int (*value_free_function)(
64 intptr_t **value,
65 libcerror_error_t **error ),
66 libcerror_error_t **error );
67
68 int libcdata_range_list_value_clone(
69 libcdata_range_list_value_t **destination_range_list_value,
70 libcdata_range_list_value_t *source_range_list_value,
71 int (*value_free_function)(
72 intptr_t **value,
73 libcerror_error_t **error ),
74 int (*value_clone_function)(
75 intptr_t **destination_value,
76 intptr_t *source_value,
77 libcerror_error_t **error ),
78 libcerror_error_t **error );
79
80 int libcdata_range_list_value_merge(
81 libcdata_range_list_value_t *destination_range_list_value,
82 libcdata_range_list_value_t *source_range_list_value,
83 int (*value_merge_function)(
84 intptr_t *destination_value,
85 intptr_t *source_value,
86 libcerror_error_t **error ),
87 libcerror_error_t **error );
88
89 int libcdata_range_list_value_check_range_overlap(
90 libcdata_range_list_value_t *range_list_value,
91 uint64_t range_start,
92 uint64_t range_end,
93 libcerror_error_t **error );
94
95 #if defined( __cplusplus )
96 }
97 #endif
98
99 #endif /* !defined( _LIBCDATA_RANGE_LIST_VALUE_H ) */
100