The MessagingService is now a singleton. Added creation of the MessageDeliverer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11031 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c36e75d1cb
commit
35d70f9eca
@ -13,6 +13,7 @@
|
||||
|
||||
#include "ClipboardHandler.h"
|
||||
#include "EventQueue.h"
|
||||
#include "MessageDeliverer.h"
|
||||
#include "MessageEvent.h"
|
||||
#include "MessageRunnerManager.h"
|
||||
#include "MessagingService.h"
|
||||
@ -47,8 +48,7 @@ Registrar::Registrar(status_t *error)
|
||||
fMIMEManager(NULL),
|
||||
fEventQueue(NULL),
|
||||
fMessageRunnerManager(NULL),
|
||||
fSanityEvent(NULL),
|
||||
fMessagingService(NULL)
|
||||
fSanityEvent(NULL)
|
||||
{
|
||||
FUNCTION_START();
|
||||
}
|
||||
@ -64,7 +64,6 @@ Registrar::~Registrar()
|
||||
FUNCTION_START();
|
||||
Lock();
|
||||
fEventQueue->Die();
|
||||
delete fMessagingService;
|
||||
delete fMessageRunnerManager;
|
||||
delete fEventQueue;
|
||||
delete fSanityEvent;
|
||||
@ -216,6 +215,13 @@ Registrar::ReadyToRun()
|
||||
{
|
||||
FUNCTION_START();
|
||||
|
||||
// create message deliverer
|
||||
status_t error = MessageDeliverer::CreateDefault();
|
||||
if (error != B_OK) {
|
||||
FATAL(("Registrar::ReadyToRun(): Failed to create the message "
|
||||
"deliverer: %s\n", strerror(error)));
|
||||
}
|
||||
|
||||
// create event queue
|
||||
fEventQueue = new EventQueue(kEventQueueName);
|
||||
|
||||
@ -238,13 +244,10 @@ Registrar::ReadyToRun()
|
||||
BRoster::Private().SetTo(be_app_messenger, BMessenger(NULL, fMIMEManager));
|
||||
|
||||
// create the messaging service
|
||||
fMessagingService = new MessagingService;
|
||||
status_t error = fMessagingService->Init();
|
||||
error = MessagingService::CreateDefault();
|
||||
if (error != B_OK) {
|
||||
ERROR(("Registrar::ReadyToRun(): Failed to init messaging service "
|
||||
"(that's by design when running under R5): %s\n", strerror(error)));
|
||||
delete fMessagingService;
|
||||
fMessagingService = NULL;
|
||||
}
|
||||
|
||||
// create and schedule the sanity message event
|
||||
|
@ -33,7 +33,6 @@ class DiskDeviceManager;
|
||||
class EventQueue;
|
||||
class MessageEvent;
|
||||
class MessageRunnerManager;
|
||||
class MessagingService;
|
||||
class MIMEManager;
|
||||
|
||||
namespace BPrivate {
|
||||
@ -60,7 +59,6 @@ private:
|
||||
EventQueue *fEventQueue;
|
||||
MessageRunnerManager *fMessageRunnerManager;
|
||||
MessageEvent *fSanityEvent;
|
||||
MessagingService *fMessagingService;
|
||||
};
|
||||
|
||||
#endif // REGISTRAR_H
|
||||
|
Loading…
Reference in New Issue
Block a user