Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-sdl2/connectdlg.c File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Functions | Variables
connectdlg.c File Reference
`#include <stdlib.h>`
`#include <SDL2/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_list * | sdl_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_scan * | server_scan = NULL
static struct advanced_dialog * | meta_server = NULL
static struct small_dialog * | connect_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 526 of file connectdlg.c.

Referenced by cancel_passwd_callback(), and popup_join_game_dialog().

## ◆ cancel_passwd_callback()

static int cancel_passwd_callback | ( | struct widget * | pwidget | ) |

static

Close password dialog with no password given.

Definition at line 770 of file connectdlg.c.

Referenced by popup_new_user_passwd_dialog(), and popup_user_passwd_dialog().

## ◆ close_connection_dialog()

void close_connection_dialog | ( | void |  | ) |

Close and destroy the dialog.

Definition at line 1094 of file connectdlg.c.

## ◆ connect_callback()

static int connect_callback | ( | struct widget * | pwidget | ) |

static

User interacted with connect -widget

Definition at line 88 of file connectdlg.c.

Referenced by popup_join_game_dialog().

## ◆ convert_first_passwd_callback()

static int convert_first_passwd_callback | ( | struct widget * | pwidget | ) |

static

New Password

Definition at line 909 of file connectdlg.c.

Referenced by popup_new_user_passwd_dialog().

## ◆ convert_passwd_callback()

static int convert_passwd_callback | ( | struct widget * | pwidget | ) |

static

User interacted with password widget

Definition at line 729 of file connectdlg.c.

Referenced by popup_user_passwd_dialog().

## ◆ convert_playername_callback()

static int convert_playername_callback | ( | struct widget * | pwidget | ) |

static

User interacted with playername widget.

Definition at line 463 of file connectdlg.c.

Referenced by popup_join_game_dialog().

## ◆ convert_portnr_callback()

static int convert_portnr_callback | ( | struct widget * | pwidget | ) |

static

User interacted with port number widget.

Definition at line 503 of file connectdlg.c.

Referenced by popup_join_game_dialog().

## ◆ convert_second_passwd_callback()

static int convert_second_passwd_callback | ( | struct widget * | pwidget | ) |

static

Verify Password

Definition at line 926 of file connectdlg.c.

Referenced by popup_new_user_passwd_dialog().

## ◆ convert_servername_callback()

static int convert_servername_callback | ( | struct widget * | pwidget | ) |

static

User interacted with servername widget.

Definition at line 483 of file connectdlg.c.

Referenced by popup_join_game_dialog().

## ◆ exit_meta_server_dlg_callback()

static int exit_meta_server_dlg_callback | ( | struct widget * | pwidget | ) |

static

Close servers dialog.

Definition at line 123 of file connectdlg.c.

Referenced by popup_connection_dialog(), and select_meta_servers_callback().

## ◆ 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 1119 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 80 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 115 of file connectdlg.c.

Referenced by popup_connection_dialog().

## ◆ popup_connection_dialog()

void popup_connection_dialog | ( | bool | lan_scan | ) |

Open connection dialog for either meta or lan scan.

Definition at line 219 of file connectdlg.c.

Referenced by servers_callback().

## ◆ popup_join_game_dialog()

void popup_join_game_dialog | ( | void |  | ) |

Open dialog for joining to game.

Definition at line 539 of file connectdlg.c.

Referenced by real_set_client_page().

## ◆ popup_new_user_passwd_dialog()

static void popup_new_user_passwd_dialog | ( | const char * | message | ) |

static

Open dialog for new password.

Definition at line 952 of file connectdlg.c.

Referenced by convert_second_passwd_callback(), and handle_authentication_req().

## ◆ popup_user_passwd_dialog()

static void popup_user_passwd_dialog | ( | const char * | message | ) |

static

Open password dialog.

Definition at line 782 of file connectdlg.c.

Referenced by handle_authentication_req().

## ◆ 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 187 of file connectdlg.c.

Referenced by popup_connection_dialog().

## ◆ select_meta_servers_callback()

static int select_meta_servers_callback | ( | struct widget * | pwidget | ) |

static

Server selected from dialog.

Definition at line 142 of file connectdlg.c.

Referenced by popup_connection_dialog().

## ◆ send_passwd_callback()

static int send_passwd_callback | ( | struct widget * | pwidget | ) |

static

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

Definition at line 743 of file connectdlg.c.

Referenced by popup_new_user_passwd_dialog(), and popup_user_passwd_dialog().

## ◆ server_connect()

void server_connect | ( | void |  | ) |

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

Definition at line 1155 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 159 of file connectdlg.c.

Referenced by sdl_create_server_list().

## Variable Documentation

## ◆ connect_dlg

struct small_dialog* connect_dlg = NULL

static

Definition at line 65 of file connectdlg.c.

Referenced by close_connection_dialog(), popup_join_game_dialog(), popup_new_user_passwd_dialog(), and popup_user_passwd_dialog().

## ◆ meta_server

struct advanced_dialog* meta_server = NULL

static

Definition at line 64 of file connectdlg.c.

Referenced by close_connection_dialog(), and popup_connection_dialog().

## ◆ server_list

struct server_list* server_list = NULL

static

Definition at line 61 of file connectdlg.c.

Referenced by close_connection_dialog(), delete_server_list(), exit_meta_server_dlg_callback(), popup_connection_dialog(), and server_scan_error().

## ◆ server_scan

struct server_scan* server_scan = NULL

static

Definition at line 62 of file connectdlg.c.