OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
qr2regkeys.h
1
2
3#ifndef _QR2REGKEYS_H_
4#define _QR2REGKEYS_H_
5
6#include "../common/gsCommon.h"
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12
13#define MAX_REGISTERED_KEYS 254
14#define NUM_RESERVED_KEYS 50
15
16
17#define HOSTNAME_KEY 1
18#define GAMENAME_KEY 2
19#define GAMEVER_KEY 3
20#define HOSTPORT_KEY 4
21#define MAPNAME_KEY 5
22#define GAMETYPE_KEY 6
23#define GAMEVARIANT_KEY 7
24#define NUMPLAYERS_KEY 8
25#define NUMTEAMS_KEY 9
26#define MAXPLAYERS_KEY 10
27#define GAMEMODE_KEY 11
28#define TEAMPLAY_KEY 12
29#define FRAGLIMIT_KEY 13
30#define TEAMFRAGLIMIT_KEY 14
31#define TIMEELAPSED_KEY 15
32#define TIMELIMIT_KEY 16
33#define ROUNDTIME_KEY 17
34#define ROUNDELAPSED_KEY 18
35#define PASSWORD_KEY 19
36#define GROUPID_KEY 20
37#define PLAYER__KEY 21
38#define SCORE__KEY 22
39#define SKILL__KEY 23
40#define PING__KEY 24
41#define TEAM__KEY 25
42#define DEATHS__KEY 26
43#define PID__KEY 27
44#define TEAM_T_KEY 28
45#define SCORE_T_KEY 29
46#define NN_GROUP_ID_KEY 30
47
48// Query-From-Master-Only keys
49// - these two values are retrieved only from the master server so we need to make
50// sure not to overwrite them when querying servers directly
51#define COUNTRY_KEY 31
52#define REGION_KEY 32
53
54
55#ifndef GSI_UNICODE
56 #define qr2_register_key qr2_register_keyA
57#else
58 #define qr2_register_key qr2_register_keyW
59#endif
60
61extern const char *qr2_registered_key_list[];
62void qr2_register_key(int keyid, const gsi_char *key);
63
66// Necessary for unicode support. Must store a copy of the UTF8 keys
67// generated from qr2_register_keyW
68void qr2_internal_key_list_append(char* theKey);
69void qr2_internal_key_list_free(); // call this at qr2 shutdown
70
71// internal function used by ServerBrowser to check if a key is Query-Master-Only
72gsi_bool qr2_internal_is_master_only_key(const char * keyname);
73
74
75// Always define for direct access
76void qr2_register_keyA(int keyid, const char *key);
77void qr2_register_keyW(int keyid, const unsigned short *key);
78
79#ifdef __cplusplus
80}
81#endif
82
83
84#endif