00001 #ifndef fooconfighfoo 00002 #define fooconfighfoo 00003 00004 /* $Id: config.h 27 2003-10-22 22:34:06Z lennart $ */ 00005 00006 /*** 00007 This file is part of libnewmail 00008 00009 libnewmail is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 libnewmail is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with libnewmail; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00022 USA 00023 ***/ 00024 00032 #include <stdio.h> 00033 00036 typedef struct { 00037 FILE *file; 00038 } config_t; 00039 00044 config_t* nm_config_open(const char *fn); 00045 00049 void nm_config_close(config_t *c); 00050 00057 const char *nm_config_get(config_t *c, const char*entry, const char* def); 00058 00065 int nm_config_get_int(config_t *c, const char*entry, int def); 00066 00073 int nm_config_get_bool(config_t *c, const char*entry, int def); 00074 00075 #endif