1 /*
2  * Info handle
3  *
4  * Copyright (C) 2011-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( _INFO_HANDLE_H )
23 #define _INFO_HANDLE_H
24 
25 #include <common.h>
26 #include <file_stream.h>
27 #include <types.h>
28 
29 #include "evtxtools_libevtx.h"
30 #include "evtxtools_libcerror.h"
31 
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35 
36 typedef struct info_handle info_handle_t;
37 
38 struct info_handle
39 {
40 	/* The libevtx input file
41 	 */
42 	libevtx_file_t *input_file;
43 
44 	/* The event log type
45 	 */
46 	int event_log_type;
47 
48 	/* The ascii codepage
49 	 */
50 	int ascii_codepage;
51 
52 	/* The notification output stream
53 	 */
54 	FILE *notify_stream;
55 
56 	/* Value to indicate if abort was signalled
57 	 */
58 	int abort;
59 };
60 
61 int info_handle_initialize(
62      info_handle_t **info_handle,
63      libcerror_error_t **error );
64 
65 int info_handle_free(
66      info_handle_t **info_handle,
67      libcerror_error_t **error );
68 
69 int info_handle_signal_abort(
70      info_handle_t *info_handle,
71      libcerror_error_t **error );
72 
73 int info_handle_set_ascii_codepage(
74      info_handle_t *info_handle,
75      const system_character_t *string,
76      libcerror_error_t **error );
77 
78 int info_handle_set_event_log_type_from_filename(
79      info_handle_t *info_handle,
80      const system_character_t *filename,
81      libcerror_error_t **error );
82 
83 int info_handle_open(
84      info_handle_t *info_handle,
85      const system_character_t *filename,
86      libcerror_error_t **error );
87 
88 int info_handle_close(
89      info_handle_t *info_handle,
90      libcerror_error_t **error );
91 
92 int info_handle_file_fprint(
93      info_handle_t *info_handle,
94      libcerror_error_t **error );
95 
96 #if defined( __cplusplus )
97 }
98 #endif
99 
100 #endif /* !defined( _INFO_HANDLE_H ) */
101 
102