Debian Codegraph @

vhditools/mount_handle.h

raw symbols SCIP
1 /*
2 * Mount handle
3 *
4 * Copyright (C) 2012-2025, 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( _MOUNT_HANDLE_H )
23 #define _MOUNT_HANDLE_H
24
25 #include <common.h>
26 #include <file_stream.h>
27 #include <types.h>
28
29 #include "mount_file_entry.h"
30 #include "mount_file_system.h"
31 #include "vhditools_libcerror.h"
32 #include "vhditools_libvhdi.h"
33
34 #if defined( __cplusplus )
35 extern "C" {
36 #endif
37
38 typedef struct mount_handle mount_handle_t;
39
40 struct mount_handle
41 {
42 /* The basename
43 */
44 system_character_t *basename;
45
46 /* The basename size
47 */
48 size_t basename_size;
49
50 /* The file system
51 */
52 mount_file_system_t *file_system;
53
54 /* The notification output stream
55 */
56 FILE *notify_stream;
57 };
58
59 int mount_handle_initialize(
60 mount_handle_t **mount_handle,
61 libcerror_error_t **error );
62
63 int mount_handle_free(
64 mount_handle_t **mount_handle,
65 libcerror_error_t **error );
66
67 int mount_handle_signal_abort(
68 mount_handle_t *mount_handle,
69 libcerror_error_t **error );
70
71 int mount_handle_set_basename(
72 mount_handle_t *mount_handle,
73 const system_character_t *basename,
74 size_t basename_size,
75 libcerror_error_t **error );
76
77 int mount_handle_set_path_prefix(
78 mount_handle_t *mount_handle,
79 const system_character_t *path_prefix,
80 size_t path_prefix_size,
81 libcerror_error_t **error );
82
83 int mount_handle_open(
84 mount_handle_t *mount_handle,
85 const system_character_t *filename,
86 libcerror_error_t **error );
87
88 int mount_handle_open_parent(
89 mount_handle_t *mount_handle,
90 libvhdi_file_t *vhdi_file,
91 libcerror_error_t **error );
92
93 int mount_handle_close(
94 mount_handle_t *mount_handle,
95 libcerror_error_t **error );
96
97 int mount_handle_get_file_entry_by_path(
98 mount_handle_t *mount_handle,
99 const system_character_t *path,
100 mount_file_entry_t **file_entry,
101 libcerror_error_t **error );
102
103 #if defined( __cplusplus )
104 }
105 #endif
106
107 #endif /* !defined( _MOUNT_HANDLE_H ) */
108