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:
Waldemar Kornewald
2004-04-01 11:12:36 +00:00
parent 29ed6a85c3
commit 60abfca048
7 changed files with 259 additions and 6 deletions
+48
View File
@@ -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);
}
}