haiku/src/servers/media/AppManager.h
beveloper 359ac30644 Added automatic loading of physical input and output nodes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-25 21:16:53 +00:00

46 lines
857 B
C++

/*
* Copyright 2002, Marcus Overhagen. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "TMap.h"
class AppManager
{
public:
AppManager();
~AppManager();
status_t RegisterAddonServer(team_id);
status_t RegisterTeam(team_id, BMessenger);
status_t UnregisterTeam(team_id);
bool HasTeam(team_id);
void StartAddonServer();
void TerminateAddonServer();
team_id AddonServer();
status_t SendMessage(team_id team, BMessage *msg);
void Dump();
private:
void CleanupTeam(team_id);
void CleanupAddonServer();
void TeamDied(team_id team);
void RestartAddonServer();
static int32 bigbrother(void *self);
void BigBrother();
private:
team_id fAddonServer;
thread_id fBigBrother;
sem_id fQuit;
struct App {
team_id team;
BMessenger messenger;
};
Map<team_id, App> * fAppMap;
BLocker *fLocker;
};