Freeciv-3.3
Loading...
Searching...
No Matches
server_settings.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2017 - Freeciv Development Team
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifndef FC_SERVER_SETTINGS_H
15#define FC_SERVER_SETTINGS_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* common */
22#include "fc_types.h"
23
24
25/* Special value to signal the absence of a server setting. */
26#define SERVER_SETTING_NONE ((server_setting_id) -1)
27
28
29/* Pure server settings. */
32
34
36
40
41
42/* Special value to signal the absence of a server setting + its value. */
43#define SSETV_NONE SERVER_SETTING_NONE
44
48
49ssetv ssetv_by_rule_name(const char *name);
50const char *ssetv_rule_name(ssetv val);
51
52const char *ssetv_human_readable(ssetv val, bool present);
53
55
56#ifdef __cplusplus
57}
58#endif /* __cplusplus */
59
60#endif /* FC_SERVER_SETTINGS_H */
char * incite_cost
Definition comments.c:76
int server_setting_id
Definition fc_types.h:778
int ssetv
Definition fc_types.h:525
const char * name
Definition inputfile.c:127
const char * server_setting_name_get(server_setting_id id)
server_setting_id server_setting_by_name(const char *name)
bool server_setting_value_bool_get(server_setting_id id)
enum sset_type server_setting_type_get(server_setting_id id)
server_setting_id ssetv_setting_get(ssetv enc)
bool server_setting_exists(server_setting_id id)
bool ssetv_setting_has_value(ssetv val)
int ssetv_value_get(ssetv enc)
ssetv ssetv_by_rule_name(const char *name)
const char * ssetv_rule_name(ssetv val)
ssetv ssetv_from_values(server_setting_id setting, int value)
unsigned int server_setting_value_bitwise_get(server_setting_id id)
const char * ssetv_human_readable(ssetv val, bool present)
int server_setting_value_int_get(server_setting_id id)