1 /*
2  * Leak values functions
3  *
4  * Copyright (C) 2009-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( _LIBMSIECF_LEAK_VALUES_H )
23 #define _LIBMSIECF_LEAK_VALUES_H
24 
25 #include <common.h>
26 #include <types.h>
27 
28 #include "libmsiecf_libbfio.h"
29 #include "libmsiecf_libcerror.h"
30 #include "libmsiecf_libfvalue.h"
31 
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35 
36 typedef struct libmsiecf_leak_values libmsiecf_leak_values_t;
37 
38 struct libmsiecf_leak_values
39 {
40 	/* The cached file size
41 	 */
42 	uint32_t cached_file_size;
43 
44 	/* The cache directory index
45 	 */
46 	uint8_t cache_directory_index;
47 
48 	/* The filename value
49 	 */
50 	libfvalue_value_t *filename;
51 };
52 
53 int libmsiecf_leak_values_initialize(
54      libmsiecf_leak_values_t **leak_values,
55      libcerror_error_t **error );
56 
57 int libmsiecf_leak_values_free(
58      libmsiecf_leak_values_t **leak_values,
59      libcerror_error_t **error );
60 
61 int libmsiecf_leak_values_read_data(
62      libmsiecf_leak_values_t *leak_values,
63      const uint8_t *data,
64      size_t data_size,
65      int ascii_codepage,
66      uint8_t item_flags,
67      libcerror_error_t **error );
68 
69 int libmsiecf_leak_values_read_file_io_handle(
70      libmsiecf_leak_values_t *leak_values,
71      libbfio_handle_t *file_io_handle,
72      off64_t leak_record_offset,
73      size32_t record_size,
74      int ascii_codepage,
75      uint8_t item_flags,
76      libcerror_error_t **error );
77 
78 #if defined( __cplusplus )
79 }
80 #endif
81 
82 #endif /* !defined( _LIBMSIECF_LEAK_VALUES_H ) */
83 
84