- removed profiles, ppp_up, and some TODOs - simplified KPPPReportManager and reports API, KPPPInterface::Up()+Down(), and PPPInterfaceListener (also removed some features from the last one) - KPPPInterface now sends the last PPP_CONNECTION_REPORT message to every newly registered report receiver - added net_server to the build, but removed old net_server testing-stuff all changes are completely untested git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14338 a95241bf-73f2-0310-859d-f6bbb57e9c96
77 lines
1.2 KiB
C++
77 lines
1.2 KiB
C++
/*
|
|
* Copyright 2004-2005, Waldemar Kornewald <[email protected]>
|
|
* 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;
|
|
}
|