1 /* 2 * libInstPatch 3 * Copyright (C) 1999-2014 Element Green <element@elementsofsound.org> 4 * 5 * Author of this file: (C) 2012 BALATON Zoltan <balaton@eik.bme.hu> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public License 9 * as published by the Free Software Foundation; version 2.1 10 * of the License only. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 * 02110-1301, USA or on the web at http://www.gnu.org. 21 */ 22 #ifndef __IPATCH_SLI_READER_H__ 23 #define __IPATCH_SLI_READER_H__ 24 25 #include <glib.h> 26 #include <libinstpatch/IpatchSLIFile.h> 27 #include <libinstpatch/IpatchSLI.h> 28 29 typedef struct _IpatchSLIReader IpatchSLIReader; /* private structure */ 30 typedef struct _IpatchSLIReaderClass IpatchSLIReaderClass; 31 32 #define IPATCH_TYPE_SLI_READER (ipatch_sli_reader_get_type ()) 33 #define IPATCH_SLI_READER(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), IPATCH_TYPE_SLI_READER, \ 35 IpatchSLIReader)) 36 #define IPATCH_SLI_READER_CLASS(klass) \ 37 (G_TYPE_CHECK_CLASS_CAST ((klass), IPATCH_TYPE_SLI_READER, \ 38 IpatchSLIReaderClass)) 39 #define IPATCH_IS_SLI_READER(obj) \ 40 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IPATCH_TYPE_SLI_READER)) 41 #define IPATCH_IS_SLI_READER_CLASS(klass) \ 42 (G_TYPE_CHECK_CLASS_TYPE ((klass), IPATCH_TYPE_SLI_READER)) 43 44 /* Spectralis SLI/SLC file parser object 45 * Spectralis files do not sufficiently follow RIFF format 46 * so this object is not derived from IpatchRiff class */ 47 struct _IpatchSLIReader 48 { 49 GObject parent_instance; /* derived from GObject */ 50 IpatchFileHandle *handle; /* file object being parsed */ 51 IpatchSLI *sli; /* Spectralis object to load file into */ 52 }; 53 54 /* Spectralis SLI/SLC file parser class */ 55 struct _IpatchSLIReaderClass 56 { 57 GObjectClass parent_class; 58 }; 59 60 GType ipatch_sli_reader_get_type(void); 61 IpatchSLIReader *ipatch_sli_reader_new(IpatchFileHandle *handle); 62 void ipatch_sli_reader_set_file_handle(IpatchSLIReader *reader, 63 IpatchFileHandle *handle); 64 IpatchSLI *ipatch_sli_reader_load(IpatchSLIReader *reader, GError **err); 65 66 #endif 67