2009-08-07 12:15:42 +00:00
|
|
|
#ifndef ANNOUNCE_H
|
|
|
|
#define ANNOUNCE_H
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
typedef struct gamelistentry gamelistentry;
|
|
|
|
struct gamelistentry {
|
|
|
|
struct sockaddr_in netname;
|
2009-08-09 17:10:35 +00:00
|
|
|
char name[16];
|
2009-08-07 12:15:42 +00:00
|
|
|
};
|
|
|
|
|
2009-08-08 19:45:49 +00:00
|
|
|
int registergame(const char *playername, uint16_t port, const unsigned char version[4]);
|
2009-08-09 17:10:35 +00:00
|
|
|
void unregistergame(void);
|
2009-08-07 12:15:42 +00:00
|
|
|
|
2009-08-09 17:10:35 +00:00
|
|
|
int searchgames(void);
|
|
|
|
int find_more_games(void);
|
|
|
|
void stop_search(void);
|
|
|
|
|
|
|
|
int initannouncer(void);
|
|
|
|
void freeannouncer(void);
|
2009-08-07 12:15:42 +00:00
|
|
|
|
|
|
|
#define GAMELIST_MAXSIZE 10
|
|
|
|
|
|
|
|
extern gamelistentry gamelistentries[GAMELIST_MAXSIZE];
|
|
|
|
extern int gamelistsize;
|
|
|
|
|
|
|
|
#endif
|