Freeciv-3.3
Loading...
Searching...
No Matches
Functions | Variables
connectdlg.c File Reference
#include <stdlib.h>
#include <SDL3/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "client_main.h"
#include "clinet.h"
#include "packhand.h"
#include "servers.h"
#include "update_queue.h"
#include "chatline.h"
#include "colors.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "messagewin.h"
#include "optiondlg.h"
#include "themespec.h"
#include "widget.h"
#include "connectdlg.h"

Go to the source code of this file.

Functions

static int connect_callback (struct widget *pwidget)
 
static int convert_portnr_callback (struct widget *pwidget)
 
static int convert_playername_callback (struct widget *pwidget)
 
static int convert_servername_callback (struct widget *pwidget)
 
static void popup_new_user_passwd_dialog (const char *message)
 
void handle_game_load (bool load_successful, const char *filename)
 
static int meta_server_window_callback (struct widget *pwindow)
 
static int exit_meta_server_dlg_callback (struct widget *pwidget)
 
static int select_meta_servers_callback (struct widget *pwidget)
 
static void server_scan_error (struct server_scan *scan, const char *message)
 
static struct srv_listsdl_create_server_list (bool lan)
 
void popup_connection_dialog (bool lan_scan)
 
static int cancel_connect_dlg_callback (struct widget *pwidget)
 
void popup_join_game_dialog (void)
 
static int convert_passwd_callback (struct widget *pwidget)
 
static int send_passwd_callback (struct widget *pwidget)
 
static int cancel_passwd_callback (struct widget *pwidget)
 
static void popup_user_passwd_dialog (const char *message)
 
static int convert_first_passwd_callback (struct widget *pwidget)
 
static int convert_second_passwd_callback (struct widget *pwidget)
 
void close_connection_dialog (void)
 
void handle_authentication_req (enum authentication_type type, const char *message)
 
void server_connect (void)
 

Variables

static struct server_list * server_list = NULL
 
static struct server_scanserver_scan = NULL
 
static struct advanced_dialogmeta_server = NULL
 
static struct small_dialogconnect_dlg = NULL
 

Function Documentation

◆ cancel_connect_dlg_callback()

static int cancel_connect_dlg_callback ( struct widget pwidget)
static

User interacted with cancel -button

Definition at line 522 of file connectdlg.c.

◆ cancel_passwd_callback()

static int cancel_passwd_callback ( struct widget pwidget)
static

Close password dialog with no password given.

Definition at line 766 of file connectdlg.c.

◆ close_connection_dialog()

void close_connection_dialog ( void  )

Close and destroy the dialog.

Definition at line 1090 of file connectdlg.c.

◆ connect_callback()

static int connect_callback ( struct widget pwidget)
static

User interacted with connect -widget

Definition at line 84 of file connectdlg.c.

◆ convert_first_passwd_callback()

static int convert_first_passwd_callback ( struct widget pwidget)
static

New Password

Definition at line 905 of file connectdlg.c.

◆ convert_passwd_callback()

static int convert_passwd_callback ( struct widget pwidget)
static

User interacted with password widget

Definition at line 725 of file connectdlg.c.

◆ convert_playername_callback()

static int convert_playername_callback ( struct widget pwidget)
static

User interacted with playername widget.

Definition at line 459 of file connectdlg.c.

◆ convert_portnr_callback()

static int convert_portnr_callback ( struct widget pwidget)
static

User interacted with port number widget.

Definition at line 499 of file connectdlg.c.

◆ convert_second_passwd_callback()

static int convert_second_passwd_callback ( struct widget pwidget)
static

Verify Password

Definition at line 922 of file connectdlg.c.

◆ convert_servername_callback()

static int convert_servername_callback ( struct widget pwidget)
static

User interacted with servername widget.

Definition at line 479 of file connectdlg.c.

◆ exit_meta_server_dlg_callback()

static int exit_meta_server_dlg_callback ( struct widget pwidget)
static

Close servers dialog.

Definition at line 119 of file connectdlg.c.

◆ handle_authentication_req()

void handle_authentication_req ( enum authentication_type  type,
const char message 
)

Popup passwd dialog depending on what type of authentication request the server is making.

Definition at line 1115 of file connectdlg.c.

◆ handle_game_load()

void handle_game_load ( bool  load_successful,
const char filename 
)

Provide a packet handler for packet_game_load

Definition at line 76 of file connectdlg.c.

◆ meta_server_window_callback()

static int meta_server_window_callback ( struct widget pwindow)
static

User interacted with server list window.

Definition at line 111 of file connectdlg.c.

◆ popup_connection_dialog()

void popup_connection_dialog ( bool  lan_scan)

Open connection dialog for either meta or lan scan.

Definition at line 215 of file connectdlg.c.

◆ popup_join_game_dialog()

void popup_join_game_dialog ( void  )

Open dialog for joining to game.

Definition at line 535 of file connectdlg.c.

◆ popup_new_user_passwd_dialog()

static void popup_new_user_passwd_dialog ( const char message)
static

Open dialog for new password.

Definition at line 948 of file connectdlg.c.

◆ popup_user_passwd_dialog()

static void popup_user_passwd_dialog ( const char message)
static

Open password dialog.

Definition at line 778 of file connectdlg.c.

◆ sdl_create_server_list()

static struct srv_list * sdl_create_server_list ( bool  lan)
static

Wrapper on server_scan_begin() and server_scan_get_list() functions.

WARNING !: use "server_scan_finish()" to free server list.

Definition at line 183 of file connectdlg.c.

◆ select_meta_servers_callback()

static int select_meta_servers_callback ( struct widget pwidget)
static

Server selected from dialog.

Definition at line 138 of file connectdlg.c.

◆ send_passwd_callback()

static int send_passwd_callback ( struct widget pwidget)
static

User interacted with "Next" -button after entering password.

Definition at line 739 of file connectdlg.c.

◆ server_connect()

void server_connect ( void  )

Provide an interface for connecting to a Freeciv server. sdl3-client does it as popup main start menu which != connecting dlg.

Definition at line 1151 of file connectdlg.c.

◆ server_scan_error()

static void server_scan_error ( struct server_scan scan,
const char message 
)
static

Callback function for when there's an error in the server scan.

Definition at line 155 of file connectdlg.c.

Variable Documentation

◆ connect_dlg

struct small_dialog* connect_dlg = NULL
static

Definition at line 61 of file connectdlg.c.

◆ meta_server

struct advanced_dialog* meta_server = NULL
static

Definition at line 60 of file connectdlg.c.

◆ server_list

struct server_list* server_list = NULL
static

Definition at line 57 of file connectdlg.c.

◆ server_scan

Definition at line 58 of file connectdlg.c.