11299bfb2Sbeveloper /* 21299bfb2Sbeveloper * Copyright 2002, Marcus Overhagen. All rights reserved. 31299bfb2Sbeveloper * Distributed under the terms of the MIT License. 41299bfb2Sbeveloper */ 56fcead13SAxel Dörfler #ifndef APP_MANAGER_H 66fcead13SAxel Dörfler #define APP_MANAGER_H 752a38012Sejakowatz 852a38012Sejakowatz 96fcead13SAxel Dörfler #include <map> 106fcead13SAxel Dörfler 116fcead13SAxel Dörfler #include <Locker.h> 126fcead13SAxel Dörfler #include <Messenger.h> 136fcead13SAxel Dörfler 146fcead13SAxel Dörfler 156fcead13SAxel Dörfler class AppManager : BLocker { 1652a38012Sejakowatz public: 1752a38012Sejakowatz AppManager(); 1852a38012Sejakowatz ~AppManager(); 196396865dSbeveloper 206fcead13SAxel Dörfler status_t RegisterTeam(team_id team, 21*11c7bd86SDario Casalinuovo const BMessenger& messenger); 226fcead13SAxel Dörfler status_t UnregisterTeam(team_id team); 236fcead13SAxel Dörfler bool HasTeam(team_id team); 2428a06094Sbeveloper 259c3b4706SAxel Dörfler team_id AddOnServerTeam(); 266396865dSbeveloper 276fcead13SAxel Dörfler status_t SendMessage(team_id team, BMessage* message); 28359ac306Sbeveloper 29ced4130fSbeveloper void Dump(); 30ced4130fSbeveloper 31*11c7bd86SDario Casalinuovo void NotifyRosters(); 3253c3fa51SDario Casalinuovo 3352a38012Sejakowatz private: 346fcead13SAxel Dörfler void _CleanupTeam(team_id team); 356396865dSbeveloper 366396865dSbeveloper private: 376fcead13SAxel Dörfler typedef std::map<team_id, BMessenger> AppMap; 386fcead13SAxel Dörfler 396fcead13SAxel Dörfler AppMap fMap; 4052a38012Sejakowatz }; 4128a06094Sbeveloper 426fcead13SAxel Dörfler 436fcead13SAxel Dörfler #endif // APP_MANAGER_H 44