File: gserver.h

package info (click to toggle)
openmohaa 0.82.1%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 34,192 kB
  • sloc: cpp: 315,720; ansic: 275,789; sh: 312; xml: 246; asm: 141; makefile: 7
file content (77 lines) | stat: -rw-r--r-- 1,495 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
75
76
77
/******
gserver.h
GameSpy C Engine SDK
  
Copyright 1999-2001 GameSpy Industries, Inc

18002 Skypark Circle
Irvine, California 92614
949.798.4200 (Tel)
949.798.4299 (Fax)
devsupport@gamespy.com

******

 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__) && !defined(__mips64)
    #include "::hashtable.h"
    #include "::nonport.h"
#else
    #include "../hashtable.h"
    #include "../nonport.h"
#endif

struct GServerImplementation
{
    goa_uint32 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(goa_uint32 ip, unsigned short port, GQueryType qtype, HashTable keylist);
GServer ServerNewData(char **fieldlist, int fieldcount, char *serverdata, 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