1 /* 2 * Python object wrapper of libolecf_property_section_t 3 * 4 * Copyright (C) 2008-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( _PYOLECF_PROPERTY_SECTION_H ) 23 #define _PYOLECF_PROPERTY_SECTION_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyolecf_libolecf.h" 29 #include "pyolecf_python.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 typedef struct pyolecf_property_section pyolecf_property_section_t; 36 37 struct pyolecf_property_section 38 { 39 /* Python object initialization 40 */ 41 PyObject_HEAD 42 43 /* The libolecf property section 44 */ 45 libolecf_property_section_t *property_section; 46 47 /* The parent object 48 */ 49 PyObject *parent_object; 50 }; 51 52 extern PyMethodDef pyolecf_property_section_object_methods[]; 53 extern PyTypeObject pyolecf_property_section_type_object; 54 55 PyObject *pyolecf_property_section_new( 56 libolecf_property_section_t *property_section, 57 PyObject *parent_object ); 58 59 int pyolecf_property_section_init( 60 pyolecf_property_section_t *pyolecf_property_section ); 61 62 void pyolecf_property_section_free( 63 pyolecf_property_section_t *pyolecf_property_section ); 64 65 PyObject *pyolecf_property_section_get_class_identifier( 66 pyolecf_property_section_t *pyolecf_property_section, 67 PyObject *arguments ); 68 69 PyObject *pyolecf_property_section_get_number_of_properties( 70 pyolecf_property_section_t *pyolecf_property_section, 71 PyObject *arguments ); 72 73 PyObject *pyolecf_property_section_get_property_by_index( 74 PyObject *pyolecf_property_section, 75 int property_index ); 76 77 PyObject *pyolecf_property_section_get_property( 78 pyolecf_property_section_t *pyolecf_property_section, 79 PyObject *arguments, 80 PyObject *keywords ); 81 82 PyObject *pyolecf_property_section_get_properties( 83 pyolecf_property_section_t *pyolecf_property_section, 84 PyObject *arguments ); 85 86 #if defined( __cplusplus ) 87 } 88 #endif 89 90 #endif /* !defined( _PYOLECF_PROPERTY_SECTION_H ) */ 91 92