2012-02-28 13:09:12 +01:00
|
|
|
/*! \file config.h
|
|
|
|
* \brief Configuration manager headers.
|
|
|
|
*/
|
2012-03-04 13:32:42 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) Sebastian Krzyszkowiak <dos@dosowisko.net>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
2012-02-28 23:16:55 +01:00
|
|
|
/*! \brief Reads config from file into memory. */
|
2012-02-24 13:03:30 +01:00
|
|
|
void InitConfig();
|
2012-02-28 23:16:55 +01:00
|
|
|
/*! \brief Returns value of requested config entry. */
|
2012-03-05 10:35:25 +01:00
|
|
|
const char* GetConfigOption(char* section, char* name);
|
2012-02-28 23:16:55 +01:00
|
|
|
/*! \brief Returns value of requested config entry, or def if no such entry exists. */
|
2012-03-05 10:35:25 +01:00
|
|
|
const char* GetConfigOptionDefault(char* section, char* name, const char* def);
|
2012-02-28 23:16:55 +01:00
|
|
|
/*! \brief Sets new value of requested config entry, or created new if no such entry exists. */
|
2012-02-26 00:47:41 +01:00
|
|
|
void SetConfigOption(char* section, char* name, char* value);
|
2012-02-28 23:16:55 +01:00
|
|
|
/*! \brief Writes config from memory to file. */
|
2012-02-24 13:03:30 +01:00
|
|
|
void DeinitConfig();
|