xref: /haiku/src/servers/media/AppManager.h (revision d7e489f80a82a0dc5974df1e780d7a908129bab4)
1 /*
2  * Copyright 2002, Marcus Overhagen. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include <List.h>
7 #include <Locker.h>
8 
9 class AppManager
10 {
11 public:
12 	AppManager();
13 	~AppManager();
14 	bool HasTeam(team_id);
15 	status_t RegisterTeam(team_id, BMessenger);
16 	status_t UnregisterTeam(team_id);
17 	void BroadcastMessage(BMessage *msg, bigtime_t timeout);
18 	void HandleBroadcastError(BMessage *, BMessenger &, team_id team, bigtime_t timeout);
19 	status_t LoadState();
20 	status_t SaveState();
21 private:
22 	struct ListItem {
23 		team_id team;
24 		BMessenger messenger;
25 	};
26 	BList 	mList;
27 	BLocker	mLocker;
28 };
29