1 /*
2  * Python object wrapper of libolecf_property_set_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_SET_H )
23 #define _PYOLECF_PROPERTY_SET_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_set pyolecf_property_set_t;
36 
37 struct pyolecf_property_set
38 {
39 	/* Python object initialization
40 	 */
41 	PyObject_HEAD
42 
43 	/* The libolecf property set
44 	 */
45 	libolecf_property_set_t *property_set;
46 
47 	/* The parent object
48 	 */
49 	PyObject *parent_object;
50 };
51 
52 extern PyMethodDef pyolecf_property_set_object_methods[];
53 extern PyTypeObject pyolecf_property_set_type_object;
54 
55 PyObject *pyolecf_property_set_new(
56            libolecf_property_set_t *property_set,
57            PyObject *parent_object );
58 
59 int pyolecf_property_set_init(
60      pyolecf_property_set_t *pyolecf_property_set );
61 
62 void pyolecf_property_set_free(
63       pyolecf_property_set_t *pyolecf_property_set );
64 
65 PyObject *pyolecf_property_set_get_class_identifier(
66            pyolecf_property_set_t *pyolecf_property_set,
67            PyObject *arguments );
68 
69 PyObject *pyolecf_property_set_get_number_of_sections(
70            pyolecf_property_set_t *pyolecf_property_set,
71            PyObject *arguments );
72 
73 PyObject *pyolecf_property_set_get_section_by_index(
74            PyObject *pyolecf_property_set,
75            int section_index );
76 
77 PyObject *pyolecf_property_set_get_section(
78            pyolecf_property_set_t *pyolecf_property_set,
79            PyObject *arguments,
80            PyObject *keywords );
81 
82 PyObject *pyolecf_property_set_get_sections(
83            pyolecf_property_set_t *pyolecf_property_set,
84            PyObject *arguments );
85 
86 #if defined( __cplusplus )
87 }
88 #endif
89 
90 #endif /* !defined( _PYOLECF_PROPERTY_SET_H ) */
91 
92