1 /*
2  * The checkpoint map functions
3  *
4  * Copyright (C) 2018-2021, 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( _LIBFSAPFS_CHECKPOINT_MAP_H )
23 #define _LIBFSAPFS_CHECKPOINT_MAP_H
24 
25 #include <common.h>
26 #include <types.h>
27 
28 #include "libfsapfs_libbfio.h"
29 #include "libfsapfs_libcdata.h"
30 #include "libfsapfs_libcerror.h"
31 
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35 
36 typedef struct libfsapfs_checkpoint_map libfsapfs_checkpoint_map_t;
37 
38 struct libfsapfs_checkpoint_map
39 {
40 	/* The entries array
41 	 */
42 	libcdata_array_t *entries_array;
43 };
44 
45 int libfsapfs_checkpoint_map_initialize(
46      libfsapfs_checkpoint_map_t **checkpoint_map,
47      libcerror_error_t **error );
48 
49 int libfsapfs_checkpoint_map_free(
50      libfsapfs_checkpoint_map_t **checkpoint_map,
51      libcerror_error_t **error );
52 
53 int libfsapfs_checkpoint_map_read_file_io_handle(
54      libfsapfs_checkpoint_map_t *checkpoint_map,
55      libbfio_handle_t *file_io_handle,
56      off64_t file_offset,
57      libcerror_error_t **error );
58 
59 int libfsapfs_checkpoint_map_read_data(
60      libfsapfs_checkpoint_map_t *checkpoint_map,
61      const uint8_t *data,
62      size_t data_size,
63      libcerror_error_t **error );
64 
65 int libfsapfs_checkpoint_map_get_physical_address_by_object_identifier(
66      libfsapfs_checkpoint_map_t *checkpoint_map,
67      uint64_t object_identifier,
68      uint64_t *physical_address,
69      libcerror_error_t **error );
70 
71 #if defined( __cplusplus )
72 }
73 #endif
74 
75 #endif /* !defined( _LIBFSAPFS_CHECKPOINT_MAP_H ) */
76 
77