1 /* 2 * Python object wrapper of libfwsi_item_list_t 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( _PYFWSI_ITEM_LIST_H ) 23 #define _PYFWSI_ITEM_LIST_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyfwsi_libcerror.h" 29 #include "pyfwsi_libfwsi.h" 30 #include "pyfwsi_python.h" 31 32 #if defined( __cplusplus ) 33 extern "C" { 34 #endif 35 36 typedef struct pyfwsi_item_list pyfwsi_item_list_t; 37 38 struct pyfwsi_item_list 39 { 40 /* Python object initialization 41 */ 42 PyObject_HEAD 43 44 /* The libfwsi item list 45 */ 46 libfwsi_item_list_t *item_list; 47 }; 48 49 extern PyMethodDef pyfwsi_item_list_object_methods[]; 50 extern PyTypeObject pyfwsi_item_list_type_object; 51 52 PyObject *pyfwsi_item_list_new( 53 void ); 54 55 int pyfwsi_item_list_init( 56 pyfwsi_item_list_t *pyfwsi_item_list ); 57 58 void pyfwsi_item_list_free( 59 pyfwsi_item_list_t *pyfwsi_item_list ); 60 61 PyObject *pyfwsi_item_list_copy_from_byte_stream( 62 pyfwsi_item_list_t *pyfwsi_item_list, 63 PyObject *arguments, 64 PyObject *keywords ); 65 66 PyObject *pyfwsi_item_list_get_number_of_items( 67 pyfwsi_item_list_t *pyfwsi_item_list, 68 PyObject *arguments ); 69 70 PyObject *pyfwsi_item_list_get_item_by_index( 71 PyObject *pyfwsi_item_list, 72 int item_index ); 73 74 PyObject *pyfwsi_item_list_get_item( 75 pyfwsi_item_list_t *pyfwsi_item_list, 76 PyObject *arguments, 77 PyObject *keywords ); 78 79 PyObject *pyfwsi_item_list_get_items( 80 pyfwsi_item_list_t *pyfwsi_item_list, 81 PyObject *arguments ); 82 83 #if defined( __cplusplus ) 84 } 85 #endif 86 87 #endif 88 89