File: gserver.h

package info (click to toggle)
openmohaa 0.81.1%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: trixie
  • size: 29,124 kB
  • sloc: ansic: 270,865; cpp: 250,173; sh: 234; asm: 141; xml: 64; makefile: 7
file content (74 lines) | stat: -rw-r--r-- 1,242 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
/******
gserver.h
GameSpy C Engine SDK
  
Copyright 1999 GameSpy Industries, Inc

Suite E-204
2900 Bristol Street
Costa Mesa, CA 92626
(714)549-7689
Fax(714)549-0757

******

 Please see the GameSpy C Engine SDK documentation for more 
 information

******/

#include "goaceng.h"

#ifndef _GSERVER_H_
#define _GSERVER_H_

#ifdef __cplusplus
extern "C" {
#endif

#if defined(applec) || defined(THINK_C) || defined(__MWERKS__) && !defined(__KATANA__)
	#include "::hashtable.h"
#else
	#include "../hashtable.h"
#endif

struct GServerImplementation
{
	unsigned long ip;
	unsigned short port;
	short ping;
	GQueryType querytype;
	HashTable keyvals;
	HashTable keylist;

};

typedef struct
{
	char *key;
	char *value;
} GKeyValuePair;
/*
typedef struct
{
	char *key, *value;
} GKeyValuePair;
*/
typedef struct 
{
	KeyEnumFn EnumFn;
	void *instance;
	HashTable keylist;
} GEnumData;

void ServerFree(void *elem);
GServer ServerNew(unsigned long ip, unsigned short port, GQueryType qtype, HashTable keylist);
void ServerParseKeyVals(GServer server, char *keyvals);
int GStringHash(const void *elem, int numbuckets);
int GCaseInsensitiveCompare(const void *entry1, const void *entry2);
void GStringFree(void *elem);
#ifdef __cplusplus
}
#endif

#endif