Make UEFI boot-platform build again
[haiku.git] / src / servers / media / NotificationManager.h
blob7eab4681ad7b54269d1257fd2fb6183c8072098c
1 /*
2 * Copyright 2002, Marcus Overhagen. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef NOTIFICATION_MANAGER_H
6 #define NOTIFICATION_MANAGER_H
9 #include <Locker.h>
10 #include <MediaNode.h>
11 #include <Messenger.h>
13 #include "Queue.h"
14 #include "TList.h"
17 struct Notification {
18 BMessenger messenger;
19 media_node node;
20 int32 what;
21 team_id team;
24 class NotificationManager {
25 public:
26 NotificationManager();
27 ~NotificationManager();
29 void Dump();
31 void EnqueueMessage(BMessage* message);
33 void CleanupTeam(team_id team);
35 private:
36 void RequestNotifications(BMessage* message);
37 void CancelNotifications(BMessage* message);
38 void SendNotifications(BMessage* message);
40 void WorkerThread();
41 static int32 worker_thread(void* arg);
43 private:
44 Queue fNotificationQueue;
45 thread_id fNotificationThreadId;
46 BLocker fLocker;
47 List<Notification> fNotificationList;
50 #endif // NOTIFICATION_MANAGER_H