2002-10-09 03:59:43 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2002, Marcus Overhagen. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
#include <List.h>
|
|
|
|
#include <Locker.h>
|
|
|
|
|
|
|
|
class AppManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AppManager();
|
|
|
|
~AppManager();
|
|
|
|
bool HasTeam(team_id);
|
|
|
|
status_t RegisterTeam(team_id, BMessenger);
|
|
|
|
status_t UnregisterTeam(team_id);
|
|
|
|
void BroadcastMessage(BMessage *msg, bigtime_t timeout);
|
|
|
|
void HandleBroadcastError(BMessage *, BMessenger &, team_id team, bigtime_t timeout);
|
|
|
|
status_t LoadState();
|
|
|
|
status_t SaveState();
|
|
|
|
private:
|
|
|
|
struct ListItem {
|
|
|
|
team_id team;
|
|
|
|
BMessenger messenger;
|
|
|
|
};
|
|
|
|
BList mList;
|
|
|
|
BLocker mLocker;
|
|
|
|
};
|