hlswmaster-ng (now in c++)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
943 B

17 years ago
#ifndef _MODGAMESPY1_H_
#define _MODGAMESPY1_H_
#include "module.h"
16 years ago
#include "multisock.h"
#include "netpkt.h"
#include "gamelist.h"
#include "list.h"
#include "timerservice.h"
17 years ago
class ModGameSpy1 : public Module {
public:
17 years ago
ModGameSpy1();
~ModGameSpy1();
17 years ago
17 years ago
void scan(MultiSock* msock);
17 years ago
int parse(NetPkt* pkt, GameList* glist);
17 years ago
17 years ago
const char* getName() { return "GameSpy 1 protocol"; }
void gc();
17 years ago
private:
16 years ago
class MultiPart : private ListEntry<MultiPart> {
17 years ago
public:
MultiPart(NetPkt* pkt, int queryid, int subid);
16 years ago
~MultiPart();
17 years ago
NetPkt* pkt;
int queryid;
int subid;
long timeout;
};
17 years ago
class GcEvent : public Event {
public:
GcEvent(ModGameSpy1& mgs1) : mgs1(mgs1) {}
~GcEvent() {}
void execute() { mgs1.gc(); }
private:
ModGameSpy1& mgs1;
};
17 years ago
NetPkt* merge(NetPkt* pkt, int queryid, int subid);
int parse_real(NetPkt* pkt, GameList* glist, int gameid);
16 years ago
LockedList<MultiPart> list;
17 years ago
};
#endif // _MODGAMESPY1_H_