/* * Copyright 2002, Marcus Overhagen. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef APP_MANAGER_H #define APP_MANAGER_H #include #include #include class AppManager : BLocker { public: AppManager(); ~AppManager(); status_t RegisterTeam(team_id team, const BMessenger& messenger, sem_id* sync); status_t UnregisterTeam(team_id team); bool HasTeam(team_id team); team_id AddOnServerTeam(); status_t SendMessage(team_id team, BMessage* message); void Dump(); void UnlockGlobalSynchro(); private: void _CleanupTeam(team_id team); private: typedef std::map AppMap; AppMap fMap; sem_id fGlobalSynchro; }; #endif // APP_MANAGER_H