Debian Codegraph @

pyvhdi/pyvhdi_file.h

raw symbols SCIP
1 /*
2 * Python object wrapper of libvhdi_file_t
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( _PYVHDI_FILE_H )
23 #define _PYVHDI_FILE_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "pyvhdi_libbfio.h"
29 #include "pyvhdi_libvhdi.h"
30 #include "pyvhdi_python.h"
31
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35
36 typedef struct pyvhdi_file pyvhdi_file_t;
37
38 struct pyvhdi_file
39 {
40 /* Python object initialization
41 */
42 PyObject_HEAD
43
44 /* The libvhdi file
45 */
46 libvhdi_file_t *file;
47
48 /* The libbfio file IO handle
49 */
50 libbfio_handle_t *file_io_handle;
51
52 /* The parent file
53 */
54 pyvhdi_file_t *parent_file;
55 };
56
57 extern PyMethodDef pyvhdi_file_object_methods[];
58 extern PyTypeObject pyvhdi_file_type_object;
59
60 int pyvhdi_file_init(
61 pyvhdi_file_t *pyvhdi_file );
62
63 void pyvhdi_file_free(
64 pyvhdi_file_t *pyvhdi_file );
65
66 PyObject *pyvhdi_file_signal_abort(
67 pyvhdi_file_t *pyvhdi_file,
68 PyObject *arguments );
69
70 PyObject *pyvhdi_file_open(
71 pyvhdi_file_t *pyvhdi_file,
72 PyObject *arguments,
73 PyObject *keywords );
74
75 PyObject *pyvhdi_file_open_file_object(
76 pyvhdi_file_t *pyvhdi_file,
77 PyObject *arguments,
78 PyObject *keywords );
79
80 PyObject *pyvhdi_file_close(
81 pyvhdi_file_t *pyvhdi_file,
82 PyObject *arguments );
83
84 PyObject *pyvhdi_file_read_buffer(
85 pyvhdi_file_t *pyvhdi_file,
86 PyObject *arguments,
87 PyObject *keywords );
88
89 PyObject *pyvhdi_file_read_buffer_at_offset(
90 pyvhdi_file_t *pyvhdi_file,
91 PyObject *arguments,
92 PyObject *keywords );
93
94 PyObject *pyvhdi_file_seek_offset(
95 pyvhdi_file_t *pyvhdi_file,
96 PyObject *arguments,
97 PyObject *keywords );
98
99 PyObject *pyvhdi_file_get_offset(
100 pyvhdi_file_t *pyvhdi_file,
101 PyObject *arguments );
102
103 PyObject *pyvhdi_file_set_parent(
104 pyvhdi_file_t *pyvhdi_file,
105 PyObject *arguments,
106 PyObject *keywords );
107
108 PyObject *pyvhdi_file_get_format_version(
109 pyvhdi_file_t *pyvhdi_file,
110 PyObject *arguments );
111
112 PyObject *pyvhdi_file_get_disk_type(
113 pyvhdi_file_t *pyvhdi_file,
114 PyObject *arguments );
115
116 PyObject *pyvhdi_file_get_media_size(
117 pyvhdi_file_t *pyvhdi_file,
118 PyObject *arguments );
119
120 PyObject *pyvhdi_file_get_bytes_per_sector(
121 pyvhdi_file_t *pyvhdi_file,
122 PyObject *arguments );
123
124 PyObject *pyvhdi_file_get_identifier(
125 pyvhdi_file_t *pyvhdi_file,
126 PyObject *arguments );
127
128 PyObject *pyvhdi_file_get_parent_identifier(
129 pyvhdi_file_t *pyvhdi_file,
130 PyObject *arguments );
131
132 PyObject *pyvhdi_file_get_parent_filename(
133 pyvhdi_file_t *pyvhdi_file,
134 PyObject *arguments );
135
136 #if defined( __cplusplus )
137 }
138 #endif
139
140 #endif /* !defined( _PYVHDI_FILE_H ) */
141