Merge branch 'master' into releases
[rocksndiamonds.git] / src / netserv.h
1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
3 *----------------------------------------------------------*
4 * (c) 1995-2006 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * netserv.h                                                *
12 ***********************************************************/
13
14 #ifndef NETSERV_H
15 #define NETSERV_H
16
17 #include "main.h"
18
19 #define DEFAULT_SERVER_PORT     19504
20
21 #define PROTOCOL_VERSION_1      1
22 #define PROTOCOL_VERSION_2      2
23 #define PROTOCOL_VERSION_3      0
24
25 #define OP_PROTOCOL_VERSION     1
26 #define OP_BAD_PROTOCOL_VERSION 2
27 #define OP_YOUR_NUMBER          3
28 #define OP_NUMBER_WANTED        4
29 #define OP_PLAYER_NAME          5
30 #define OP_PLAYER_CONNECTED     6
31 #define OP_PLAYER_DISCONNECTED  7
32 #define OP_START_PLAYING        8
33 #define OP_PAUSE_PLAYING        9
34 #define OP_CONTINUE_PLAYING     10
35 #define OP_STOP_PLAYING         11
36 #define OP_MOVE_PLAYER          12
37 #define OP_BROADCAST_MESSAGE    13
38
39 #define MAX_BUFFER_SIZE         4096
40
41 #if defined(TARGET_SDL)
42 int NetworkServerThread(void *);
43 #endif
44
45 void NetworkServer(int, int);
46
47 #endif