1 /* 2 * Python object wrapper of libfsapfs_extended_attribute_t 3 * 4 * Copyright (C) 2018-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( _PYFSAPFS_EXTENDED_ATTRIBUTE_H ) 23 #define _PYFSAPFS_EXTENDED_ATTRIBUTE_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyfsapfs_libfsapfs.h" 29 #include "pyfsapfs_python.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 typedef struct pyfsapfs_extended_attribute pyfsapfs_extended_attribute_t; 36 37 struct pyfsapfs_extended_attribute 38 { 39 /* Python object initialization 40 */ 41 PyObject_HEAD 42 43 /* The libfsapfs extended attribute 44 */ 45 libfsapfs_extended_attribute_t *extended_attribute; 46 47 /* The parent object 48 */ 49 PyObject *parent_object; 50 }; 51 52 extern PyMethodDef pyfsapfs_extended_attribute_object_methods[]; 53 extern PyTypeObject pyfsapfs_extended_attribute_type_object; 54 55 PyObject *pyfsapfs_extended_attribute_new( 56 libfsapfs_extended_attribute_t *extended_attribute, 57 PyObject *parent_object ); 58 59 int pyfsapfs_extended_attribute_init( 60 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute ); 61 62 void pyfsapfs_extended_attribute_free( 63 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute ); 64 65 PyObject *pyfsapfs_extended_attribute_get_identifier( 66 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 67 PyObject *arguments ); 68 69 PyObject *pyfsapfs_extended_attribute_get_name( 70 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 71 PyObject *arguments ); 72 73 PyObject *pyfsapfs_extended_attribute_read_buffer( 74 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 75 PyObject *arguments, 76 PyObject *keywords ); 77 78 PyObject *pyfsapfs_extended_attribute_read_buffer_at_offset( 79 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 80 PyObject *arguments, 81 PyObject *keywords ); 82 83 PyObject *pyfsapfs_extended_attribute_seek_offset( 84 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 85 PyObject *arguments, 86 PyObject *keywords ); 87 88 PyObject *pyfsapfs_extended_attribute_get_offset( 89 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 90 PyObject *arguments ); 91 92 PyObject *pyfsapfs_extended_attribute_get_size( 93 pyfsapfs_extended_attribute_t *pyfsapfs_extended_attribute, 94 PyObject *arguments ); 95 96 #if defined( __cplusplus ) 97 } 98 #endif 99 100 #endif /* !defined( _PYFSAPFS_EXTENDED_ATTRIBUTE_H ) */ 101 102