haiku/src/servers/net/NetServer.cpp

77 lines
1.2 KiB
C++
Raw Normal View History

/*
* Copyright 2004-2005, Waldemar Kornewald <wkornew@gmx.net>
* Distributed under the terms of the MIT License.
*/
#include "NetServer.h"
#include <Application.h>
#include <Alert.h>
static const char *kSignature = NET_SERVER_SIGNATURE;
class NetServerApplication : public BApplication {
public:
NetServerApplication();
virtual void AboutRequested();
virtual void ReadyToRun();
// loads add-ons
virtual bool QuitRequested();
// unloads add-ons
};
int main()
{
new NetServerApplication();
be_app->Run();
delete be_app;
return 0;
}
NetServerApplication::NetServerApplication()
: BApplication(kSignature)
{
}
void
NetServerApplication::AboutRequested()
{
// the alert should not block because we might get _very_ important messages
(new BAlert("About...",
"OpenBeOS net_server\n\n"
"The net_server manages all userland tasks that "
"cannot be handled by the netstack.",
"Uhm...Cool?", NULL, NULL, B_WIDTH_AS_USUAL,
B_INFO_ALERT))->Go(NULL);
}
void
NetServerApplication::ReadyToRun()
{
// load integrated add-ons
// TODO: load add-on binaries
}
bool
NetServerApplication::QuitRequested()
{
// unload integrated add-ons
// TODO: unload add-on binaries
return true;
}