2002-09-30 04:12:11 +04:00
|
|
|
|
|
|
|
class Queue;
|
|
|
|
|
2002-10-02 16:01:37 +04:00
|
|
|
class NotificationManager
|
2002-09-30 04:12:11 +04:00
|
|
|
{
|
|
|
|
public:
|
2002-10-02 16:01:37 +04:00
|
|
|
NotificationManager();
|
|
|
|
~NotificationManager();
|
2002-10-02 05:08:54 +04:00
|
|
|
|
|
|
|
void EnqueueMessage(BMessage *msg);
|
|
|
|
|
|
|
|
void CleanupTeam(team_id team);
|
2002-09-30 04:12:11 +04:00
|
|
|
|
2002-10-02 05:08:54 +04:00
|
|
|
private:
|
2002-09-30 04:12:11 +04:00
|
|
|
void RequestNotifications(BMessage *msg);
|
|
|
|
void CancelNotifications(BMessage *msg);
|
|
|
|
void SendNotifications(BMessage *msg);
|
|
|
|
|
|
|
|
void BroadcastMessages(BMessage *msg);
|
|
|
|
void WorkerThread();
|
|
|
|
static int32 worker_thread(void *arg);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Queue * fNotificationQueue;
|
|
|
|
thread_id fNotificationThreadId;
|
2002-10-02 05:08:54 +04:00
|
|
|
BLocker * fLocker;
|
2002-09-30 04:12:11 +04:00
|
|
|
};
|