1 /* 2 * Python object wrapper of libvslvm_stripe_t 3 * 4 * Copyright (C) 2014-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( _PYVSLVM_STRIPE_H ) 23 #define _PYVSLVM_STRIPE_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "pyvslvm_libvslvm.h" 29 #include "pyvslvm_python.h" 30 #include "pyvslvm_segment.h" 31 32 #if defined( __cplusplus ) 33 extern "C" { 34 #endif 35 36 typedef struct pyvslvm_stripe pyvslvm_stripe_t; 37 38 struct pyvslvm_stripe 39 { 40 /* Python object initialization 41 */ 42 PyObject_HEAD 43 44 /* The libvslvm stripe 45 */ 46 libvslvm_stripe_t *stripe; 47 48 /* The pyvslvm segment object 49 */ 50 pyvslvm_segment_t *segment_object; 51 }; 52 53 extern PyMethodDef pyvslvm_stripe_object_methods[]; 54 extern PyTypeObject pyvslvm_stripe_type_object; 55 56 PyObject *pyvslvm_stripe_new( 57 libvslvm_stripe_t *stripe, 58 pyvslvm_segment_t *segment_object ); 59 60 int pyvslvm_stripe_init( 61 pyvslvm_stripe_t *pyvslvm_stripe ); 62 63 void pyvslvm_stripe_free( 64 pyvslvm_stripe_t *pyvslvm_stripe ); 65 66 #if defined( __cplusplus ) 67 } 68 #endif 69 70 #endif 71 72