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,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
// Copyright (c) 2004 Waldemar Kornewald, [email protected]
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "PPPServer.h"
|
||||
#include "SimpleMessageFilter.h"
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
// the message constants that should be filtered
|
||||
static const uint32 *kPPPWhatValues = {
|
||||
// PPPS_CONNECT,
|
||||
0 // end-of-list
|
||||
};
|
||||
|
||||
|
||||
PPPServer::PPPServer()
|
||||
: BHandler("PPPServer")
|
||||
{
|
||||
be_app->AddHandler(this);
|
||||
fFilter = new SimpleMessageFilter(kPPPWhatValues, this);
|
||||
be_app->AddCommonFilter(fFilter);
|
||||
}
|
||||
|
||||
|
||||
PPPServer::~PPPServer()
|
||||
{
|
||||
be_app->RemoveHandler(this);
|
||||
be_app->RemoveCommonFilter(fFilter);
|
||||
delete fFilter;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PPPServer::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch(message->what) {
|
||||
// TODO: handle PPP stack messages
|
||||
|
||||
// TODO: handle requests from DialUpPreflet
|
||||
|
||||
default:
|
||||
BHandler::MessageReceived(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user