hlswmaster-ng/hlswserver.h

46 lines
827 B
C
Raw Normal View History

2006-02-02 16:55:44 +01:00
#ifndef _HLSWSERVER_H_
#define _HLSWSERVER_H_
#include <string.h>
#include "thread.h"
#include "config.h"
#include "gamelist.h"
2006-04-16 21:02:41 +02:00
#include "timerservice.h"
2006-03-05 02:28:19 +01:00
#include "netpkt.h"
#include "socket.h"
2006-02-06 20:58:32 +01:00
#include "mutex.h"
2006-02-02 16:55:44 +01:00
class HlswServer : public Thread {
public:
2006-02-20 21:58:59 +01:00
HlswServer(Config& conf, GameList& glist);
2006-02-02 16:55:44 +01:00
~HlswServer();
int execute(void* arg);
2006-02-20 21:58:59 +01:00
void rebuild(GameList& gl);
2006-03-05 02:28:19 +01:00
2006-02-02 16:55:44 +01:00
protected:
HlswServer(const HlswServer& hs);
HlswServer& operator=(const HlswServer& hs);
private:
2006-02-20 21:58:59 +01:00
class RebuildEvent : public Event {
public:
RebuildEvent(HlswServer& hs, GameList& gl) : hs(hs), gl(gl) {}
~RebuildEvent() {}
void execute() { hs.rebuild(gl); }
2006-03-05 02:28:19 +01:00
2006-02-20 21:58:59 +01:00
private:
HlswServer& hs;
GameList& gl;
};
2006-03-05 02:28:19 +01:00
2006-04-15 19:55:07 +02:00
void addGame(NetPkt* pkt, GameEntry* entry);
2006-02-02 16:55:44 +01:00
2006-04-15 19:55:07 +02:00
List<NetPkt>* pktlist;
2006-02-06 20:58:32 +01:00
Mutex mutex;
2006-04-15 19:55:07 +02:00
Socket* socket;
2006-02-02 16:55:44 +01:00
};
#endif // _HLSWSERVER_H_