hlswmaster-ng/gamescanner.h

50 lines
836 B
C
Raw Normal View History

2006-02-02 16:55:44 +01:00
#ifndef _GAMESCANNER_H_
#define _GAMESCANNER_H_
#include "recvqueue.h"
#include "thread.h"
#include "config.h"
#include "modulelist.h"
#include "multisock.h"
#include "semaphore.h"
#include "list.h"
#include "netpkt.h"
#include "timerservice.h"
class GameScanner : public RecvQueue, public Thread {
public:
GameScanner(Config& conf, ModuleList& modList);
~GameScanner();
void scan();
NetPkt* getPkt();
int execute(void* arg);
protected:
GameScanner(const GameScanner& hs);
GameScanner& operator=(const GameScanner& hs);
private:
class ScanEvent : public Command {
public:
ScanEvent(GameScanner* gs) : gs(gs) {}
~ScanEvent() {}
void execute() { gs->scan(); }
private:
GameScanner* gs;
};
ModuleList& modList;
MultiSock* msock;
Semaphore* pktCount;
List<NetPkt> pktList;
};
#endif // _SCANNER_H_