Freeciv21
Develop your civilization from humble roots to a global empire
meta.h
Go to the documentation of this file.
1
/*__ ___ ***************************************
2
/ \ / \ Copyright (c) 1996-2020 Freeciv21 and Freeciv
3
\_ \ / __/ contributors. This file is part of Freeciv21.
4
_\ \ / /__ Freeciv21 is free software: you can redistribute it
5
\___ \____/ __/ and/or modify it under the terms of the GNU General
6
\_ _/ Public License as published by the Free Software
7
| @ @ \_ Foundation, either version 3 of the License,
8
| or (at your option) any later version.
9
_/ /\ You should have received a copy of the GNU
10
/o) (o/\ \_ General Public License along with Freeciv21.
11
\_____/ / If not, see https://www.gnu.org/licenses/.
12
\____/ ********************************************************/
13
#pragma once
14
15
#include "
support.h
"
// bool type
16
17
// Forward declarations
18
class
QString;
19
20
#define DEFAULT_META_SERVER_NO_SEND true
21
#define DEFAULT_META_SERVER_ADDR FREECIV_META_URL
22
#define METASERVER_REFRESH_INTERVAL (3 * 60)
23
#define METASERVER_MIN_UPDATE_INTERVAL 7
// not too short, not too long
24
25
enum
meta_flag
{
META_INFO
,
META_REFRESH
,
META_GOODBYE
};
26
27
const
char
*
default_meta_patches_string
();
28
const
char
*
default_meta_message_string
();
29
30
const
char
*
get_meta_patches_string
();
31
const
char
*
get_meta_message_string
();
32
const
char
*
get_user_meta_message_string
();
33
34
void
maybe_automatic_meta_message
(
const
char
*automatic);
35
36
void
set_meta_patches_string
(
const
char
*
string
);
37
void
set_meta_message_string
(
const
char
*
string
);
38
void
set_user_meta_message_string
(
const
char
*
string
);
39
40
QString
meta_addr_port
();
41
42
void
server_close_meta
();
43
bool
server_open_meta
(
bool
persistent);
44
bool
is_metaserver_open
();
45
46
bool
send_server_info_to_metaserver
(
enum
meta_flag
flag);
maybe_automatic_meta_message
void maybe_automatic_meta_message(const char *automatic)
Update meta message.
Definition:
meta.cpp:112
get_meta_message_string
const char * get_meta_message_string()
The metaserver message.
Definition:
meta.cpp:80
set_meta_patches_string
void set_meta_patches_string(const char *string)
Set the metaserver patches string.
Definition:
meta.cpp:132
is_metaserver_open
bool is_metaserver_open()
Are we sending info to the metaserver?
Definition:
meta.cpp:464
default_meta_message_string
const char * default_meta_message_string()
Return static string with default info line to send to metaserver.
Definition:
meta.cpp:63
get_meta_patches_string
const char * get_meta_patches_string()
The metaserver patches.
Definition:
meta.cpp:75
server_close_meta
void server_close_meta()
Stop sending updates to metaserver.
Definition:
meta.cpp:436
set_meta_message_string
void set_meta_message_string(const char *string)
Set the metaserver message string.
Definition:
meta.cpp:140
default_meta_patches_string
const char * default_meta_patches_string()
The default metaserver patches for this server.
Definition:
meta.cpp:58
meta_addr_port
QString meta_addr_port()
Return string describing both metaserver name and port.
Definition:
meta.cpp:163
send_server_info_to_metaserver
bool send_server_info_to_metaserver(enum meta_flag flag)
Control when we send info to the metaserver.
Definition:
meta.cpp:469
get_user_meta_message_string
const char * get_user_meta_message_string()
The metaserver message set by user.
Definition:
meta.cpp:97
server_open_meta
bool server_open_meta(bool persistent)
Lookup the correct address for the metaserver.
Definition:
meta.cpp:445
set_user_meta_message_string
void set_user_meta_message_string(const char *string)
Set user defined metaserver message string.
Definition:
meta.cpp:148
meta_flag
meta_flag
Definition:
meta.h:25
META_GOODBYE
@ META_GOODBYE
Definition:
meta.h:25
META_INFO
@ META_INFO
Definition:
meta.h:25
META_REFRESH
@ META_REFRESH
Definition:
meta.h:25
support.h
server
meta.h
Generated by
1.9.1