#ifndef _GAMELIST_H_ #define _GAMELIST_H_ #include "config.h" #include "netpkt.h" #include "gameentry.h" #include "timerservice.h" #include "list.h" class GameList { public: GameList(Config& conf); ~GameList(); void cleanup(); void addGame(int gameid, NetPkt* pkt, int port2 = 0); long getLastUpdate(); Iterator* createIterator(); protected: GameList(const GameList& gl); GameList& operator=(const GameList& gl); private: class CleanupEvent : public Event { public: CleanupEvent(GameList& gl) : gl(gl) {} ~CleanupEvent() {} void execute() { gl.cleanup(); } private: GameList& gl; }; List glist; long lastUpdate; }; #endif // _GAMELIST_H_