From 96678694f8952f60d0a895cede2b621404b4bfb8 Mon Sep 17 00:00:00 2001 From: wimpie Date: Tue, 11 Jan 2005 21:42:31 +0000 Subject: Major rename of NodeCollection to NetworkSetup this commit is broken (missing symbols) --- (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp') diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp index 5c937a1..5c71a0a 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp @@ -5,8 +5,8 @@ #include "bluetoothBNEPrun.h" using Opietooth2::OTGateway; -using Opietooth2::OTPANConnection; -using Opietooth2::PANConnectionVector; +using Opietooth2::OTPANNetworkSetup; +using Opietooth2::PANNetworkSetupVector; BluetoothBNEPRun::BluetoothBNEPRun( ANetNodeInstance * NNI, BluetoothBNEPData & D ) : @@ -28,20 +28,20 @@ State_t BluetoothBNEPRun::detectState( void ) { need to detect - 1. for any PAN connection that is found if that + 1. for any PAN NetworkSetup that is found if that PAN is connected. if it is connected it is not available (since we do not manage IP settings and we are called to detect - the state we knwo that we do not have an UP connection) + the state we knwo that we do not have an UP NetworkSetup) - 2. if it not connected and we allow any connection we - are available or if that PAN connection is to a device + 2. if it not connected and we allow any NetworkSetup we + are available or if that PAN NetworkSetup is to a device with a correct address 3. if it is not connected and the address do not match or we do not accept any address, we are Unavailable but - not DOWN. I.e a new connection could perhaps be created + not DOWN. I.e a new NetworkSetup could perhaps be created */ @@ -53,15 +53,15 @@ State_t BluetoothBNEPRun::detectState( void ) { return Unavailable; } - // if there is a PAN connection that is UP but not + // if there is a PAN NetworkSetup that is UP but not // yet configured (no ifup) the we are available - return ( hasFreePANConnection() ) ? Available : Unknown; + return ( hasFreePANNetworkSetup() ) ? Available : Unknown; } -QString BluetoothBNEPRun::setMyState( NodeCollection * NC, Action_t A, bool ) { +QString BluetoothBNEPRun::setMyState( NetworkSetup * NC, Action_t A, bool ) { if( A == Activate ) { - if( hasFreePANConnection( 1 ) ) { + if( hasFreePANNetworkSetup( 1 ) ) { // we have now an assignedinterface } else { return QString("TODO : Start PAND"); @@ -89,17 +89,17 @@ bool BluetoothBNEPRun::handlesInterface( InterfaceInfo * I ) { return handlesInterface( I->Name ); } -bool BluetoothBNEPRun::hasFreePANConnection( bool Grab ) { +bool BluetoothBNEPRun::hasFreePANNetworkSetup( bool Grab ) { if( ! OT ) { OT = OTGateway::getOTGateway(); } - // load PAN connections - OTPANConnection * C; + // load PAN NetworkSetups + OTPANNetworkSetup * C; InterfaceInfo * Run; InterfaceInfo * Candidate = 0; // reuse this interface - PANConnectionVector Conns = OT->getPANConnections(); + PANNetworkSetupVector Conns = OT->getPANNetworkSetups(); System & Sys = NSResources->system(); bool IsValid; @@ -112,14 +112,14 @@ bool BluetoothBNEPRun::hasFreePANConnection( bool Grab ) { // we allow all IsValid = 1; } else { - // is this PAN connection connecting to a Peer + // is this PAN NetworkSetup connecting to a Peer // we allow ? IsValid = 0; for ( QStringList::Iterator it = Data.BDAddress.begin(); it != Data.BDAddress.end(); ++ it ) { if( C->ConnectedTo == (*it) ) { - // this is a connection we could accept + // this is a NetworkSetup we could accept IsValid = 1; break; } @@ -135,11 +135,11 @@ bool BluetoothBNEPRun::hasFreePANConnection( bool Grab ) { continue; } - // is this PAN connection available to us ? + // is this PAN NetworkSetup available to us ? Run = Sys.findInterface( C->Device ); if( Run && Run->IsUp ) { - // this PAN connection is up + // this PAN NetworkSetup is up Log(("%s acceptable but unavailable\n", C->Device.latin1() )); // find others @@ -154,7 +154,7 @@ bool BluetoothBNEPRun::hasFreePANConnection( bool Grab ) { if( Candidate ) { if ( Grab ) { - netNode()->connection()->assignInterface( Candidate ); + netNode()->networkSetup()->assignInterface( Candidate ); } return 1; } -- cgit v0.9.0.2