Initial checkin of skeleton net_server.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7136 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
// Copyright (c) 2004 Waldemar Kornewald, [email protected]
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include <Application.h>
|
||||
#include <Alert.h>
|
||||
|
||||
|
||||
static const char *kSignature = "application/x-obos.net_server";
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user