| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#if !defined( _PYVHDI_FILE_OBJECT_IO_HANDLE_H ) |
| 23 |
#define _PYVHDI_FILE_OBJECT_IO_HANDLE_H |
| 24 |
|
| 25 |
#include <common.h> |
| 26 |
#include <types.h> |
| 27 |
|
| 28 |
#include "pyvhdi_libbfio.h" |
| 29 |
#include "pyvhdi_libcerror.h" |
| 30 |
#include "pyvhdi_python.h" |
| 31 |
|
| 32 |
#if defined( __cplusplus ) |
| 33 |
extern "C" { |
| 34 |
#endif |
| 35 |
|
| 36 |
typedef struct pyvhdi_file_object_io_handle pyvhdi_file_object_io_handle_t; |
| 37 |
|
| 38 |
struct pyvhdi_file_object_io_handle |
| 39 |
{ |
| 40 |
|
| 41 |
|
| 42 |
PyObject *file_object; |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
int access_flags; |
| 47 |
}; |
| 48 |
|
| 49 |
int pyvhdi_file_object_io_handle_initialize( |
| 50 |
pyvhdi_file_object_io_handle_t **file_object_io_handle, |
| 51 |
PyObject *file_object, |
| 52 |
libcerror_error_t **error ); |
| 53 |
|
| 54 |
int pyvhdi_file_object_initialize( |
| 55 |
libbfio_handle_t **handle, |
| 56 |
PyObject *file_object, |
| 57 |
libcerror_error_t **error ); |
| 58 |
|
| 59 |
int pyvhdi_file_object_io_handle_free( |
| 60 |
pyvhdi_file_object_io_handle_t **file_object_io_handle, |
| 61 |
libcerror_error_t **error ); |
| 62 |
|
| 63 |
int pyvhdi_file_object_io_handle_clone( |
| 64 |
pyvhdi_file_object_io_handle_t **destination_file_object_io_handle, |
| 65 |
pyvhdi_file_object_io_handle_t *source_file_object_io_handle, |
| 66 |
libcerror_error_t **error ); |
| 67 |
|
| 68 |
int pyvhdi_file_object_io_handle_open( |
| 69 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 70 |
int access_flags, |
| 71 |
libcerror_error_t **error ); |
| 72 |
|
| 73 |
int pyvhdi_file_object_io_handle_close( |
| 74 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 75 |
libcerror_error_t **error ); |
| 76 |
|
| 77 |
ssize_t pyvhdi_file_object_read_buffer( |
| 78 |
PyObject *file_object, |
| 79 |
uint8_t *buffer, |
| 80 |
size_t size, |
| 81 |
libcerror_error_t **error ); |
| 82 |
|
| 83 |
ssize_t pyvhdi_file_object_io_handle_read( |
| 84 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 85 |
uint8_t *buffer, |
| 86 |
size_t size, |
| 87 |
libcerror_error_t **error ); |
| 88 |
|
| 89 |
ssize_t pyvhdi_file_object_write_buffer( |
| 90 |
PyObject *file_object, |
| 91 |
const uint8_t *buffer, |
| 92 |
size_t size, |
| 93 |
libcerror_error_t **error ); |
| 94 |
|
| 95 |
ssize_t pyvhdi_file_object_io_handle_write( |
| 96 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 97 |
const uint8_t *buffer, |
| 98 |
size_t size, |
| 99 |
libcerror_error_t **error ); |
| 100 |
|
| 101 |
int pyvhdi_file_object_seek_offset( |
| 102 |
PyObject *file_object, |
| 103 |
off64_t offset, |
| 104 |
int whence, |
| 105 |
libcerror_error_t **error ); |
| 106 |
|
| 107 |
int pyvhdi_file_object_get_offset( |
| 108 |
PyObject *file_object, |
| 109 |
off64_t *offset, |
| 110 |
libcerror_error_t **error ); |
| 111 |
|
| 112 |
off64_t pyvhdi_file_object_io_handle_seek_offset( |
| 113 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 114 |
off64_t offset, |
| 115 |
int whence, |
| 116 |
libcerror_error_t **error ); |
| 117 |
|
| 118 |
int pyvhdi_file_object_io_handle_exists( |
| 119 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 120 |
libcerror_error_t **error ); |
| 121 |
|
| 122 |
int pyvhdi_file_object_io_handle_is_open( |
| 123 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 124 |
libcerror_error_t **error ); |
| 125 |
|
| 126 |
int pyvhdi_file_object_get_size( |
| 127 |
PyObject *file_object, |
| 128 |
size64_t *size, |
| 129 |
libcerror_error_t **error ); |
| 130 |
|
| 131 |
int pyvhdi_file_object_io_handle_get_size( |
| 132 |
pyvhdi_file_object_io_handle_t *file_object_io_handle, |
| 133 |
size64_t *size, |
| 134 |
libcerror_error_t **error ); |
| 135 |
|
| 136 |
#if defined( __cplusplus ) |
| 137 |
} |
| 138 |
#endif |
| 139 |
|
| 140 |
#endif |
| 141 |
|