File: fs2netd_client.h

package info (click to toggle)
freespace2 3.7.0%2Brepack-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 22,848 kB
  • ctags: 41,897
  • sloc: cpp: 369,931; makefile: 1,060; xml: 129; sh: 112
file content (84 lines) | stat: -rw-r--r-- 1,749 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 * Copyright (C) Volition, Inc. 1999.  All rights reserved.
 *
 * All source code herein is the property of Volition, Inc. You may not sell 
 * or otherwise commercially exploit the source or things you created based on the 
 * source.
 *
*/



#ifndef _FS2NETD_CLIENT_H
#define _FS2NETD_CLIENT_H

#include "network/multi.h"

struct net_addr;
struct player;

// channel to associate when creating a server
extern char Multi_fs_tracker_channel[];

// channel to use when polling the tracker for games
extern char Multi_fs_tracker_filter[];

typedef struct tracker_game_data {
	char name[MAX_GAMENAME_LEN+1];
	char mission_name[MAX_GAMENAME_LEN+1];
	char title[NAME_LENGTH+1];
	char campaign_name[NAME_LENGTH+1];
	char chat_channel[MAX_PATH+1];

	ubyte campaign_mode;
	int flags;
	int type_flags;
	short players;
	short max_players;
	ubyte mode;
	ubyte rank_base;
	ubyte game_state;
	ubyte speed;
} tracker_game_data;

extern tracker_game_data Multi_tracker_game_data;


bool fs2netd_is_online();

void fs2netd_reset_connection();
void fs2netd_disconnect();

void fs2netd_close();

bool fs2netd_login();

void fs2netd_maybe_init();

void fs2netd_do_frame();

void fs2netd_gameserver_start();
void fs2netd_gameserver_update(bool force = false);
void fs2netd_gameserver_disconnect();

void fs2netd_send_game_request();

void fs2netd_store_stats();

bool fs2netd_player_banned(net_addr *addr);

void fs2netd_update_ban_list();

bool fs2netd_get_valid_missions();

int fs2netd_update_valid_tables();

int fs2netd_get_pilot_info(const char *callsign, player *out_plr, bool first_call);

void fs2netd_options_config_init();

void fs2netd_add_table_validation(char *tblname);

void fs2netd_update_game_count(char *chan_name);

#endif // _FS2NETD_CLIENT_H