Debian Codegraph @

pyfsntfs/pyfsntfs_mft_metadata_file_entries.h

raw symbols SCIP
1 /*
2 * Python object definition of the MFT metadata file entries sequence and iterator
3 *
4 * Copyright (C) 2010-2024, 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( _PYFSNTFS_MFT_METADATA_FILE_ENTRIES_H )
23 #define _PYFSNTFS_MFT_METADATA_FILE_ENTRIES_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "pyfsntfs_file_entry.h"
29 #include "pyfsntfs_libfsntfs.h"
30 #include "pyfsntfs_mft_metadata_file.h"
31 #include "pyfsntfs_python.h"
32
33 #if defined( __cplusplus )
34 extern "C" {
35 #endif
36
37 typedef struct pyfsntfs_mft_metadata_file_entries pyfsntfs_mft_metadata_file_entries_t;
38
39 struct pyfsntfs_mft_metadata_file_entries
40 {
41 /* Python object initialization
42 */
43 PyObject_HEAD
44
45 /* The MFT metadata file object
46 */
47 pyfsntfs_mft_metadata_file_t *mft_metadata_file_object;
48
49 /* The get file entry by index callback function
50 */
51 PyObject* (*get_file_entry_by_index)(
52 pyfsntfs_mft_metadata_file_t *mft_metadata_file_object,
53 uint64_t file_entry_index );
54
55 /* The (current) file entry index
56 */
57 uint64_t file_entry_index;
58
59 /* The number of file entries
60 */
61 uint64_t number_of_file_entries;
62 };
63
64 extern PyTypeObject pyfsntfs_mft_metadata_file_entries_type_object;
65
66 PyObject *pyfsntfs_mft_metadata_file_entries_new(
67 pyfsntfs_mft_metadata_file_t *mft_metadata_file,
68 PyObject* (*get_file_entry_by_index)(
69 pyfsntfs_mft_metadata_file_t *mft_metadata_file_object,
70 uint64_t file_entry_index ),
71 uint64_t number_of_file_entries );
72
73 int pyfsntfs_mft_metadata_file_entries_init(
74 pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );
75
76 void pyfsntfs_mft_metadata_file_entries_free(
77 pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );
78
79 Py_ssize_t pyfsntfs_mft_metadata_file_entries_len(
80 pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );
81
82 PyObject *pyfsntfs_mft_metadata_file_entries_getitem(
83 pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries,
84 Py_ssize_t item_index );
85
86 PyObject *pyfsntfs_mft_metadata_file_entries_iter(
87 pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );
88
89 PyObject *pyfsntfs_mft_metadata_file_entries_iternext(
90 pyfsntfs_mft_metadata_file_entries_t *pyfsntfs_mft_metadata_file_entries );
91
92 #if defined( __cplusplus )
93 }
94 #endif
95
96 #endif /* !defined( _PYFSNTFS_MFT_METADATA_FILE_ENTRIES_H ) */
97