1 /*
2  * file user.h - communication interface for users
3  *
4  * $Id: user.h,v 1.10 2006/02/10 15:07:18 fzago Exp $
5  *
6  * Program XBLAST
7  * (C) by Oliver Vogel (e-mail: m.vogel@ndh.net)
8  * Added by Koen De Raedt for central support
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published
12  * by the Free Software Foundation; either version 2; or (at your option)
13  * any later version
14  *
15  * This program is distributed in the hope that it will be entertaining,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILTY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18  * Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.
22  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23  */
24 #ifndef XBLAST_USER_H
25 #define XBLAST_USER_H
26 
27 #define CENTRAL_FINISHED 0+(1<<10)
28 #define CENTRAL_DISCONNECT 1+(1<<10)
29 #define CENTRAL_READ_ERR 2+(1<<10)
30 #define CENTRAL_WRITE_ERR 3+(1<<10)
31 #define CENTRAL_COT_INVALID 4+(1<<10)
32 
33 /*
34  * global prototypes
35  */
36 
37 /* connect/disconnect */
38 extern XBBool User_Connect (CFGCentralSetup *);
39 extern void User_Disconnect (void);
40 extern XBBool User_EventToCentral (const XBEventToCentral);
41 
42 /* get data */
43 extern XBBool User_Connected (void);
44 extern int User_GetPID (void);
45 extern int User_Received (void);
46 extern void User_NoMorePlayers (void);
47 
48 /* receive data */
49 extern void User_ReceivePlayerPID (const char *data);
50 extern void User_ReceivePlayerConfig (const char *data);
51 
52 /* queue data */
53 extern void User_SendDisconnect (void);
54 extern void User_RequestUpdate (void);
55 extern void User_SendRegisterPlayer (XBAtom);
56 extern void User_SendUnregisterPlayer (XBAtom);
57 extern void User_SendGameStat (int numPlayers, BMPlayer * playerStat, int *pa);
58 
59 #endif
60 /*
61  * end of file user.h
62  */
63