1 /* 2 SANE EPSON backend 3 Copyright (C) 2001, 2008 SEIKO EPSON Corporation 4 5 Date Author Reason 6 06/13/2001 N.Sasaki New 7 8 This file is part of the `iscan' program. 9 10 This program is free software; you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation; either version 2 of the License, or 13 (at your option) any later version. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 24 As a special exception, the copyright holders give permission 25 to link the code of this program with the esmod library and 26 distribute linked combinations including the two. You must obey 27 the GNU General Public License in all respects for all of the 28 code used other then esmod. 29 */ 30 31 32 #ifndef ___PISA_PREFERENCE_H 33 #define ___PISA_PREFERENCE_H 34 35 typedef enum 36 { 37 CFG_BOOL, 38 CFG_LONG, 39 CFG_ULONG, 40 CFG_DOUBLE, 41 CFG_STRING 42 } cfg_value_type; 43 44 typedef enum 45 { 46 CFG_PARAM, 47 CFG_VALUE 48 } cfg_key_type; 49 50 typedef enum 51 { 52 CFG_QUOTE_NO, 53 CFG_QUOTE_SINGLE, 54 CFG_QUOTE_DOUBLE 55 } cfg_quote_type; 56 57 typedef struct 58 { 59 const char * name; 60 cfg_value_type type; 61 void * value; 62 } cfg_struct; 63 64 void get_cfg ( char * file, cfg_struct * cfg, int num ); 65 void set_cfg ( char * file, cfg_struct * cfg, int num ); 66 67 #endif // ___PISA_PREFERENCE_H 68 69