File: ogcache-client.h

package info (click to toggle)
bomberclone 0.11.9-7.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,228 kB
  • sloc: ansic: 14,256; sh: 3,800; makefile: 337
file content (47 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (4)
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
/* $Id: ogcache-client.h,v 1.2 2005-03-27 01:31:50 stpohle Exp $
 * include file for the opengamesrv.c file
 */

#ifndef _OGCACHE_CLIENT_H
#define _OGCACHE_CLIENT_H

#define MAX_OGC_ENTRYS 255
#define UDP_DEFAULTPORT "11111"
#define LEN_OGCHOST 64
#define LEN_OGCPORT 10
#define LEN_GAME 32

#ifndef LEN_VERSION
	#define LEN_VERSION 20
#endif

#define LEN_STATUS 6
#define LEN_GAMENAME 32
#define BUF_SIZE 1024

struct game_entry {
	int serial;
    char host[LEN_OGCHOST];
    char port[LEN_OGCPORT];
	char game[LEN_GAME];
	char version [LEN_VERSION];
    char gamename[LEN_GAMENAME];
    int curplayers;
    int maxplayers;
    signed char ai_family;
    char status[LEN_STATUS];
};

extern struct game_entry ogc_array[MAX_OGC_ENTRYS];
extern int ogc_browsing;

int ogc_init (char *localport, char *server, char *port, char *game, int ai_family);
void ogc_shutdown ();
int ogc_loop ();
int ogc_sendgamestatus (int sock, char *game, char *version, char *gamename,
						int curplayers, int maxplayers, char *status);
int ogc_sendgamequit (int sock); /* send that the game quitted */
void ogc_browsestart ();
void ogc_browsestop ();

#endif