Added TRoster instance to the registrar application and dispatching of the application registration messages.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@410 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f9fd58cc75
commit
51d6b22ec1
@ -13,15 +13,18 @@
|
|||||||
#include "ClipboardHandler.h"
|
#include "ClipboardHandler.h"
|
||||||
#include "MIMEManager.h"
|
#include "MIMEManager.h"
|
||||||
#include "Registrar.h"
|
#include "Registrar.h"
|
||||||
|
#include "TRoster.h"
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
Registrar::Registrar()
|
Registrar::Registrar()
|
||||||
: BApplication(kRegistrarSignature),
|
: BApplication(kRegistrarSignature),
|
||||||
|
fRoster(NULL),
|
||||||
fClipboardHandler(NULL),
|
fClipboardHandler(NULL),
|
||||||
fMIMEManager(NULL)
|
fMIMEManager(NULL)
|
||||||
{
|
{
|
||||||
FUNCTION_START();
|
FUNCTION_START();
|
||||||
// move the following code to ReadyToRun() once it works.
|
// move the following code to ReadyToRun() once it works.
|
||||||
|
fRoster = new TRoster;
|
||||||
fClipboardHandler = new ClipboardHandler;
|
fClipboardHandler = new ClipboardHandler;
|
||||||
AddHandler(fClipboardHandler);
|
AddHandler(fClipboardHandler);
|
||||||
fMIMEManager = new MIMEManager;
|
fMIMEManager = new MIMEManager;
|
||||||
@ -36,6 +39,7 @@ FUNCTION_START();
|
|||||||
fMIMEManager->Quit();
|
fMIMEManager->Quit();
|
||||||
RemoveHandler(fClipboardHandler);
|
RemoveHandler(fClipboardHandler);
|
||||||
delete fClipboardHandler;
|
delete fClipboardHandler;
|
||||||
|
delete fRoster;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MessageReceived
|
// MessageReceived
|
||||||
@ -62,6 +66,21 @@ FUNCTION_START();
|
|||||||
message->SendReply(&reply);
|
message->SendReply(&reply);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case B_REG_ADD_APP:
|
||||||
|
fRoster->HandleAddApplication(message);
|
||||||
|
break;
|
||||||
|
case B_REG_COMPLETE_REGISTRATION:
|
||||||
|
fRoster->HandleCompleteRegistration(message);
|
||||||
|
break;
|
||||||
|
case B_REG_IS_PRE_REGISTERED:
|
||||||
|
fRoster->HandleIsAppPreRegistered(message);
|
||||||
|
break;
|
||||||
|
case B_REG_REMOVE_PRE_REGISTERED_APP:
|
||||||
|
fRoster->HandleRemovePreRegApp(message);
|
||||||
|
break;
|
||||||
|
case B_REG_REMOVE_APP:
|
||||||
|
fRoster->HandleRemoveApp(message);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
BApplication::MessageReceived(message);
|
BApplication::MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
class ClipboardHandler;
|
class ClipboardHandler;
|
||||||
class MIMEManager;
|
class MIMEManager;
|
||||||
|
|
||||||
|
namespace BPrivate {
|
||||||
|
class TRoster;
|
||||||
|
};
|
||||||
|
|
||||||
class Registrar : public BApplication {
|
class Registrar : public BApplication {
|
||||||
public:
|
public:
|
||||||
Registrar();
|
Registrar();
|
||||||
@ -41,6 +45,7 @@ public:
|
|||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
BPrivate::TRoster *fRoster;
|
||||||
ClipboardHandler *fClipboardHandler;
|
ClipboardHandler *fClipboardHandler;
|
||||||
MIMEManager *fMIMEManager;
|
MIMEManager *fMIMEManager;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user