Freeciv-3.3
Loading...
Searching...
No Matches
client
gui-stub
connectdlg.c
Go to the documentation of this file.
1
/***********************************************************************
2
Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
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
#ifdef HAVE_CONFIG_H
15
#include <fc_config.h>
16
#endif
17
18
#include <errno.h>
19
20
/* utility */
21
#include "
fcintl.h
"
22
#include "
log.h
"
23
#include "
support.h
"
24
25
/* gui main header */
26
#include "
gui_stub.h
"
27
28
#include "
connectdlg_g.h
"
29
30
/* client */
31
#include "
chatline_common.h
"
/* for append_output_window */
32
#include "
client_main.h
"
33
#include "
connectdlg.h
"
34
#include "
packhand_gen.h
"
35
36
37
/**********************************************************************/
41
void
gui_close_connection_dialog
(
void
)
42
{
43
/* PORTME */
44
}
45
46
/**********************************************************************/
50
void
handle_authentication_req
(
enum
authentication_type
type
,
51
const
char
*
message
)
52
{
53
switch
(
type
) {
54
case
AUTH_NEWUSER_FIRST
:
55
/* PORTME: switch configs if need be */
56
return
;
57
case
AUTH_NEWUSER_RETRY
:
58
/* PORTME: switch configs if need be */
59
return
;
60
case
AUTH_LOGIN_FIRST
:
61
/* if we magically have a password already present in 'fc_password'
62
* then, use that and skip the password entry dialog */
63
if
(
fc_password
[0] !=
'\0'
) {
64
struct
packet_authentication_reply
reply
;
65
66
sz_strlcpy
(
reply
.password,
fc_password
);
67
send_packet_authentication_reply
(&
client
.
conn
, &
reply
);
68
return
;
69
}
else
{
70
/* PORTME: switch configs if need be */
71
}
72
return
;
73
case
AUTH_LOGIN_RETRY
:
74
/* PORTME: switch configs if need be */
75
return
;
76
}
77
78
log_error
(
"Unsupported authentication type %d: %s."
,
type
,
message
);
79
}
80
81
/**********************************************************************/
87
void
handle_game_load
(
bool
load_successful,
const
char
*filename)
88
{
89
/* PORTME */
90
}
91
92
93
/**********************************************************************/
96
void
gui_server_connect
(
void
)
97
{
98
/* PORTME */
99
}
chatline_common.h
client
struct civclient client
Definition
client_main.c:154
fc_password
char fc_password[MAX_LEN_PASSWORD]
Definition
client_main.c:147
client_main.h
incite_cost
char * incite_cost
Definition
comments.c:76
authentication_type
authentication_type
Definition
conn_types.h:41
AUTH_NEWUSER_RETRY
@ AUTH_NEWUSER_RETRY
Definition
conn_types.h:45
AUTH_NEWUSER_FIRST
@ AUTH_NEWUSER_FIRST
Definition
conn_types.h:43
AUTH_LOGIN_RETRY
@ AUTH_LOGIN_RETRY
Definition
conn_types.h:44
AUTH_LOGIN_FIRST
@ AUTH_LOGIN_FIRST
Definition
conn_types.h:42
connectdlg_g.h
fcintl.h
type
GType type
Definition
repodlgs.c:1313
handle_game_load
void handle_game_load(bool load_successful, const char *filename)
Definition
connectdlg.c:80
handle_authentication_req
void handle_authentication_req(enum authentication_type type, const char *message)
Definition
connectdlg.c:1119
gui_close_connection_dialog
void gui_close_connection_dialog(void)
Definition
connectdlg.c:41
gui_server_connect
void gui_server_connect(void)
Definition
connectdlg.c:96
connectdlg.h
gui_stub.h
log.h
log_error
#define log_error(message,...)
Definition
log.h:104
send_packet_authentication_reply
int send_packet_authentication_reply(struct connection *pc, const struct packet_authentication_reply *packet)
Definition
packets_gen.c:1873
packhand_gen.h
civclient::conn
struct connection conn
Definition
client_main.h:96
message
Definition
messagewin_common.h:29
packet_authentication_reply
Definition
packets_gen.h:66
support.h
sz_strlcpy
#define sz_strlcpy(dest, src)
Definition
support.h:195
Generated on Sun Dec 22 2024 22:30:34 for Freeciv-3.3 by
1.9.8