1 /* 2 * Python object definition of the libfsntfs volume 3 * 4 * Copyright (C) 2010-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( _PYFSNTFS_VOLUME_H ) 23 #define _PYFSNTFS_VOLUME_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyfsntfs_libfsntfs.h" 29 #include "pyfsntfs_libbfio.h" 30 #include "pyfsntfs_python.h" 31 32 #if defined( __cplusplus ) 33 extern "C" { 34 #endif 35 36 typedef struct pyfsntfs_volume pyfsntfs_volume_t; 37 38 struct pyfsntfs_volume 39 { 40 /* Python object initialization 41 */ 42 PyObject_HEAD 43 44 /* The libfsntfs volume 45 */ 46 libfsntfs_volume_t *volume; 47 48 /* The libbfio file IO handle 49 */ 50 libbfio_handle_t *file_io_handle; 51 }; 52 53 extern PyMethodDef pyfsntfs_volume_object_methods[]; 54 extern PyTypeObject pyfsntfs_volume_type_object; 55 56 int pyfsntfs_volume_init( 57 pyfsntfs_volume_t *pyfsntfs_volume ); 58 59 void pyfsntfs_volume_free( 60 pyfsntfs_volume_t *pyfsntfs_volume ); 61 62 PyObject *pyfsntfs_volume_signal_abort( 63 pyfsntfs_volume_t *pyfsntfs_volume, 64 PyObject *arguments ); 65 66 PyObject *pyfsntfs_volume_open( 67 pyfsntfs_volume_t *pyfsntfs_volume, 68 PyObject *arguments, 69 PyObject *keywords ); 70 71 PyObject *pyfsntfs_volume_open_file_object( 72 pyfsntfs_volume_t *pyfsntfs_volume, 73 PyObject *arguments, 74 PyObject *keywords ); 75 76 PyObject *pyfsntfs_volume_close( 77 pyfsntfs_volume_t *pyfsntfs_volume, 78 PyObject *arguments ); 79 80 PyObject *pyfsntfs_volume_get_bytes_per_sector( 81 pyfsntfs_volume_t *pyfsntfs_volume, 82 PyObject *arguments ); 83 84 PyObject *pyfsntfs_volume_get_cluster_block_size( 85 pyfsntfs_volume_t *pyfsntfs_volume, 86 PyObject *arguments ); 87 88 PyObject *pyfsntfs_volume_get_mft_entry_size( 89 pyfsntfs_volume_t *pyfsntfs_volume, 90 PyObject *arguments ); 91 92 PyObject *pyfsntfs_volume_get_index_entry_size( 93 pyfsntfs_volume_t *pyfsntfs_volume, 94 PyObject *arguments ); 95 96 PyObject *pyfsntfs_volume_get_name( 97 pyfsntfs_volume_t *pyfsntfs_volume, 98 PyObject *arguments ); 99 100 PyObject *pyfsntfs_volume_get_serial_number( 101 pyfsntfs_volume_t *pyfsntfs_volume, 102 PyObject *arguments ); 103 104 PyObject *pyfsntfs_volume_get_number_of_file_entries( 105 pyfsntfs_volume_t *pyfsntfs_volume, 106 PyObject *arguments ); 107 108 PyObject *pyfsntfs_volume_get_file_entry_by_index( 109 pyfsntfs_volume_t *pyfsntfs_volume, 110 uint64_t file_entry_index ); 111 112 PyObject *pyfsntfs_volume_get_file_entry( 113 pyfsntfs_volume_t *pyfsntfs_volume, 114 PyObject *arguments, 115 PyObject *keywords ); 116 117 PyObject *pyfsntfs_volume_get_file_entries( 118 pyfsntfs_volume_t *pyfsntfs_volume, 119 PyObject *arguments ); 120 121 PyObject *pyfsntfs_volume_get_file_entry_by_path( 122 pyfsntfs_volume_t *pyfsntfs_volume, 123 PyObject *arguments, 124 PyObject *keywords ); 125 126 PyObject *pyfsntfs_volume_get_root_directory( 127 pyfsntfs_volume_t *pyfsntfs_volume, 128 PyObject *arguments ); 129 130 PyObject *pyfsntfs_volume_get_usn_change_journal( 131 pyfsntfs_volume_t *pyfsntfs_volume, 132 PyObject *arguments ); 133 134 #if defined( __cplusplus ) 135 } 136 #endif 137 138 #endif /* !defined( _PYFSNTFS_VOLUME_H ) */ 139 140