Freeciv-3.1
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
meta.h File Reference
#include "freeciv_config.h"
#include "support.h"

Go to the source code of this file.

Macros

#define DEFAULT_META_SERVER_NO_SEND   TRUE
 
#define DEFAULT_META_SERVER_ADDR   FREECIV_META_URL
 
#define METASERVER_REFRESH_INTERVAL   (3*60)
 
#define METASERVER_MIN_UPDATE_INTERVAL   7 /* not too short, not too long */
 

Enumerations

enum  meta_flag { META_INFO , META_REFRESH , META_GOODBYE }
 

Functions

const char * default_meta_patches_string (void)
 
const char * default_meta_message_string (void)
 
const char * get_meta_patches_string (void)
 
const char * get_meta_message_string (void)
 
const char * get_user_meta_message_string (void)
 
void maybe_automatic_meta_message (const char *automatic)
 
void set_meta_patches_string (const char *string)
 
void set_meta_message_string (const char *string)
 
void set_user_meta_message_string (const char *string)
 
char * meta_addr_port (void)
 
void server_close_meta (void)
 
bool server_open_meta (bool persistent)
 
bool is_metaserver_open (void)
 
bool send_server_info_to_metaserver (enum meta_flag flag)
 

Macro Definition Documentation

◆ DEFAULT_META_SERVER_ADDR

#define DEFAULT_META_SERVER_ADDR   FREECIV_META_URL

Definition at line 21 of file meta.h.

◆ DEFAULT_META_SERVER_NO_SEND

#define DEFAULT_META_SERVER_NO_SEND   TRUE

Definition at line 20 of file meta.h.

◆ METASERVER_MIN_UPDATE_INTERVAL

#define METASERVER_MIN_UPDATE_INTERVAL   7 /* not too short, not too long */

Definition at line 23 of file meta.h.

◆ METASERVER_REFRESH_INTERVAL

#define METASERVER_REFRESH_INTERVAL   (3*60)

Definition at line 22 of file meta.h.

Enumeration Type Documentation

◆ meta_flag

enum meta_flag
Enumerator
META_INFO 
META_REFRESH 
META_GOODBYE 

Definition at line 25 of file meta.h.

Function Documentation

◆ default_meta_message_string()

const char * default_meta_message_string ( void  )

Return static string with default info line to send to metaserver.

Definition at line 90 of file meta.c.

Referenced by establish_new_connection(), server_open_meta(), set_user_meta_message_string(), srv_prepare(), and write_init_script().

◆ default_meta_patches_string()

const char * default_meta_patches_string ( void  )

The default metaserver patches for this server

Definition at line 82 of file meta.c.

Referenced by server_open_meta(), sg_load_game(), sg_load_game(), and write_init_script().

◆ get_meta_message_string()

const char * get_meta_message_string ( void  )

The metaserver message

Definition at line 114 of file meta.c.

Referenced by send_lanserver_response(), and write_init_script().

◆ get_meta_patches_string()

const char * get_meta_patches_string ( void  )

The metaserver patches

Definition at line 106 of file meta.c.

Referenced by sg_save_game(), and write_init_script().

◆ get_user_meta_message_string()

const char * get_user_meta_message_string ( void  )

The metaserver message set by user

Definition at line 136 of file meta.c.

Referenced by maybe_automatic_meta_message().

◆ is_metaserver_open()

bool is_metaserver_open ( void  )

Are we sending info to the metaserver?

Definition at line 482 of file meta.c.

Referenced by metaconnection_command(), metamessage_action(), metamessage_command(), and metapatches_command().

◆ maybe_automatic_meta_message()

void maybe_automatic_meta_message ( const char *  automatic)

Update meta message. Set it to user meta message, if it is available. Otherwise use provided message. It is ok to call this with NULL message. Then it only replaces current meta message with user meta message if available.

Definition at line 151 of file meta.c.

Referenced by establish_new_connection(), and srv_prepare().

◆ meta_addr_port()

char * meta_addr_port ( void  )

Return string describing both metaserver name and port.

Definition at line 202 of file meta.c.

Referenced by close_metaserver_connection(), metaserver_command(), open_metaserver_connection(), sg_save_game(), srv_prepare(), and write_init_script().

◆ send_server_info_to_metaserver()

bool send_server_info_to_metaserver ( enum meta_flag  flag)

◆ server_close_meta()

void server_close_meta ( void  )

Stop sending updates to metaserver

Definition at line 454 of file meta.c.

Referenced by close_connections_and_socket(), and close_metaserver_connection().

◆ server_open_meta()

bool server_open_meta ( bool  persistent)

Lookup the correct address for the metaserver.

Definition at line 463 of file meta.c.

Referenced by open_metaserver_connection(), and srv_prepare().

◆ set_meta_message_string()

void set_meta_message_string ( const char *  string)

Set the metaserver message string

Definition at line 179 of file meta.c.

Referenced by maybe_automatic_meta_message(), server_open_meta(), server_sniff_all_input(), and set_user_meta_message_string().

◆ set_meta_patches_string()

void set_meta_patches_string ( const char *  string)

Set the metaserver patches string

Definition at line 171 of file meta.c.

Referenced by metapatches_command(), server_open_meta(), sg_load_game(), and sg_load_game().

◆ set_user_meta_message_string()

void set_user_meta_message_string ( const char *  string)

Set user defined metaserver message string

Definition at line 187 of file meta.c.

Referenced by metamessage_action(), and metamessage_command().