Freeciv-3.3: /fast/freeciv/nightly/main/common/server_settings.h Source File

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. */
30 server_setting_id server_setting_by_name(const char *name);
31bool server_setting_exists(server_setting_id id);
32
33enum sset_type server_setting_type_get(server_setting_id id);
34
35const char *server_setting_name_get(server_setting_id id);
36
37bool server_setting_value_bool_get(server_setting_id id);
38int server_setting_value_int_get(server_setting_id id);
39unsigned int server_setting_value_bitwise_get(server_setting_id id);
40
41
42/* Special value to signal the absence of a server setting + its value. */
43#define SSETV_NONE SERVER_SETTING_NONE
44
45 ssetv ssetv_from_values(server_setting_id setting, int value);
46 server_setting_id ssetv_setting_get(ssetv enc);
47int ssetv_value_get(ssetv enc);
48
49 ssetv 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
54bool ssetv_setting_has_value(ssetv val);
55
56#ifdef __cplusplus
57}
58#endif /* __cplusplus */
59
60#endif /* FC_SERVER_SETTINGS_H */
incite_cost
char * incite_cost
Definition comments.c:74
fc_types.h
server_setting_id
int server_setting_id
Definition fc_types.h:1080
ssetv
int ssetv
Definition fc_types.h:700
name
const char * name
Definition inputfile.c:127
server_setting_name_get
const char * server_setting_name_get(server_setting_id id)
Definition server_settings.c:40
server_setting_by_name
server_setting_id server_setting_by_name(const char *name)
Definition server_settings.c:29
server_setting_value_bool_get
bool server_setting_value_bool_get(server_setting_id id)
Definition server_settings.c:70
server_setting_type_get
enum sset_type server_setting_type_get(server_setting_id id)
Definition server_settings.c:51
ssetv_setting_get
server_setting_id ssetv_setting_get(ssetv enc)
Definition server_settings.c:129
server_setting_exists
bool server_setting_exists(server_setting_id id)
Definition server_settings.c:62
ssetv_setting_has_value
bool ssetv_setting_has_value(ssetv val)
Definition server_settings.c:201
ssetv_value_get
int ssetv_value_get(ssetv enc)
Definition server_settings.c:141
ssetv_by_rule_name
ssetv ssetv_by_rule_name(const char *name)
Definition server_settings.c:153
ssetv_rule_name
const char * ssetv_rule_name(ssetv val)
Definition server_settings.c:169
ssetv_from_values
ssetv ssetv_from_values(server_setting_id setting, int value)
Definition server_settings.c:106
server_setting_value_bitwise_get
unsigned int server_setting_value_bitwise_get(server_setting_id id)
Definition server_settings.c:94
ssetv_human_readable
const char * ssetv_human_readable(ssetv val, bool present)
Definition server_settings.c:181
server_setting_value_int_get
int server_setting_value_int_get(server_setting_id id)
Definition server_settings.c:82
setting
Definition settings.c:92