libsuperderpy/src/config.h

38 lines
1.5 KiB
C
Raw Normal View History

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
2017-07-22 18:22:12 +02:00
* the Free Software Foundation; either version 3 of the License, or
2012-03-04 13:32:42 +01:00
* (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
2017-07-22 18:22:12 +02:00
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2012-03-04 13:32:42 +01:00
*/
2016-07-03 00:43:32 +02:00
#ifndef LIBSUPERDERPY_CONFIG_H
#define LIBSUPERDERPY_CONFIG_H
#include "libsuperderpy.h"
2012-02-28 23:16:55 +01:00
/*! \brief Reads config from file into memory. */
void InitConfig(struct Game* game);
2012-02-28 23:16:55 +01:00
/*! \brief Returns value of requested config entry. */
const char* GetConfigOption(struct Game* game, 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. */
const char* GetConfigOptionDefault(struct Game* game, 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. */
void SetConfigOption(struct Game* game, char* section, char* name, char* value);
2012-02-28 23:16:55 +01:00
/*! \brief Writes config from memory to file. */
void DeinitConfig(struct Game* game);
2016-07-03 00:43:32 +02:00
#endif