1 /* 2 * Python object wrapper of libfwnt_access_control_list_t 3 * 4 * Copyright (C) 2009-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( _PYFWNT_ACCESS_CONTROL_LIST_H ) 23 #define _PYFWNT_ACCESS_CONTROL_LIST_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyfwnt_libfwnt.h" 29 #include "pyfwnt_python.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 typedef struct pyfwnt_access_control_list pyfwnt_access_control_list_t; 36 37 struct pyfwnt_access_control_list 38 { 39 /* Python object initialization 40 */ 41 PyObject_HEAD 42 43 /* The libfwnt access control list 44 */ 45 libfwnt_access_control_list_t *access_control_list; 46 47 /* The parent object 48 */ 49 PyObject *parent_object; 50 }; 51 52 extern PyMethodDef pyfwnt_access_control_list_object_methods[]; 53 extern PyTypeObject pyfwnt_access_control_list_type_object; 54 55 PyObject *pyfwnt_access_control_list_new( 56 libfwnt_access_control_list_t *access_control_list, 57 PyObject *parent_object ); 58 59 int pyfwnt_access_control_list_init( 60 pyfwnt_access_control_list_t *pyfwnt_access_control_list ); 61 62 void pyfwnt_access_control_list_free( 63 pyfwnt_access_control_list_t *pyfwnt_access_control_list ); 64 65 PyObject *pyfwnt_access_control_list_get_number_of_entries( 66 pyfwnt_access_control_list_t *pyfwnt_access_control_list, 67 PyObject *arguments ); 68 69 PyObject *pyfwnt_access_control_list_get_entry_by_index( 70 PyObject *pyfwnt_access_control_list, 71 int entry_index ); 72 73 PyObject *pyfwnt_access_control_list_get_entry( 74 pyfwnt_access_control_list_t *pyfwnt_access_control_list, 75 PyObject *arguments, 76 PyObject *keywords ); 77 78 PyObject *pyfwnt_access_control_list_get_entries( 79 pyfwnt_access_control_list_t *pyfwnt_access_control_list, 80 PyObject *arguments ); 81 82 #if defined( __cplusplus ) 83 } 84 #endif 85 86 #endif /* !defined( _PYFWNT_ACCESS_CONTROL_LIST_H ) */ 87 88