Added doxygen comments and moved the initialization of child objects from
the constructor into ReadyToRun(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@496 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,7 +12,16 @@
|
|||||||
#include "Registrar.h"
|
#include "Registrar.h"
|
||||||
#include "TRoster.h"
|
#include "TRoster.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class Registrar
|
||||||
|
\brief The application class of the registrar.
|
||||||
|
|
||||||
|
Glues the registrar services together and dispatches the roster messages.
|
||||||
|
*/
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
|
/*! \brief Creates the registrar application class.
|
||||||
|
*/
|
||||||
Registrar::Registrar()
|
Registrar::Registrar()
|
||||||
: BApplication(kRegistrarSignature),
|
: BApplication(kRegistrarSignature),
|
||||||
fRoster(NULL),
|
fRoster(NULL),
|
||||||
@@ -20,16 +29,14 @@ Registrar::Registrar()
|
|||||||
fMIMEManager(NULL)
|
fMIMEManager(NULL)
|
||||||
{
|
{
|
||||||
FUNCTION_START();
|
FUNCTION_START();
|
||||||
// move the following code to ReadyToRun() once it works.
|
|
||||||
fRoster = new TRoster;
|
|
||||||
fClipboardHandler = new ClipboardHandler;
|
|
||||||
AddHandler(fClipboardHandler);
|
|
||||||
fMIMEManager = new MIMEManager;
|
|
||||||
fMIMEManager->Run();
|
|
||||||
FUNCTION_END();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
|
/*! \brief Frees all resources associated with the registrar.
|
||||||
|
|
||||||
|
All registrar services, that haven't been shut down earlier, are
|
||||||
|
terminated.
|
||||||
|
*/
|
||||||
Registrar::~Registrar()
|
Registrar::~Registrar()
|
||||||
{
|
{
|
||||||
FUNCTION_START();
|
FUNCTION_START();
|
||||||
@@ -42,6 +49,10 @@ Registrar::~Registrar()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MessageReceived
|
// MessageReceived
|
||||||
|
/*! \brief Overrides the super class version to dispatch roster specific
|
||||||
|
messages.
|
||||||
|
\param message The message to be handled
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
Registrar::MessageReceived(BMessage *message)
|
Registrar::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
@@ -100,24 +111,41 @@ Registrar::MessageReceived(BMessage *message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ReadyToRun
|
// ReadyToRun
|
||||||
|
/*! \brief Overrides the super class version to initialize the registrar
|
||||||
|
services.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
Registrar::ReadyToRun()
|
Registrar::ReadyToRun()
|
||||||
{
|
{
|
||||||
FUNCTION_START();
|
FUNCTION_START();
|
||||||
|
fRoster = new TRoster;
|
||||||
|
fClipboardHandler = new ClipboardHandler;
|
||||||
|
AddHandler(fClipboardHandler);
|
||||||
|
fMIMEManager = new MIMEManager;
|
||||||
|
fMIMEManager->Run();
|
||||||
|
FUNCTION_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
// QuitRequested
|
// QuitRequested
|
||||||
|
/*! \brief Overrides the super class version to avoid termination of the
|
||||||
|
registrar until the system shutdown.
|
||||||
|
*/
|
||||||
bool
|
bool
|
||||||
Registrar::QuitRequested()
|
Registrar::QuitRequested()
|
||||||
{
|
{
|
||||||
FUNCTION_START();
|
FUNCTION_START();
|
||||||
// The final registrar must not quit. At least not that easily. ;-)
|
// The final registrar must not quit. At least not that easily. ;-)
|
||||||
return BApplication::QuitRequested();
|
return BApplication::QuitRequested();
|
||||||
FUNCTION_END();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// main
|
// main
|
||||||
|
/*! \brief Creates and runs the registrar application.
|
||||||
|
|
||||||
|
The main thread is renamed.
|
||||||
|
|
||||||
|
\return 0.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user