00001 #include "bluetoothBNEP_NN.h" 00002 #include "bluetoothBNEP_NNI.h" 00003 #include "bluetoothRFCOMM_NNI.h" 00004 00005 #include "netnodeinterface.h" 00006 00007 // 00008 // 00009 // BLUETOOTH PAN/NAP node 00010 // 00011 // 00012 00013 static const char * BluetoothBNEPNeeds[] = 00014 { 0 00015 }; 00016 00017 static const char * BluetoothBNEPProvides[] = 00018 { "device", 00019 0 00020 }; 00021 00025 BluetoothBNEPNetNode::BluetoothBNEPNetNode() : 00026 ANetNode(tr("Bluetooth PAN/NAP")) { 00027 InstanceCount = 7; // default 00028 } 00029 00033 BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ 00034 } 00035 00036 const QString BluetoothBNEPNetNode::nodeDescription(){ 00037 return tr("\ 00038 <p>Sets up a bluetooth link using the bluetooth Network profile.</p>\ 00039 <p>Use this to connect two computing devices.</p>\ 00040 " 00041 ); 00042 } 00043 00044 ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { 00045 return new ABluetoothBNEP( this ); 00046 } 00047 00048 const char ** BluetoothBNEPNetNode::needs( void ) { 00049 return BluetoothBNEPNeeds; 00050 } 00051 00052 const char ** BluetoothBNEPNetNode::provides( void ) { 00053 return BluetoothBNEPProvides; 00054 } 00055 00056 QString BluetoothBNEPNetNode::genNic( long nr ) { 00057 QString S; 00058 return S.sprintf( "bnep%ld", nr ); 00059 } 00060 00061 00062 void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { 00063 if( A == "interfacecount" ) { 00064 InstanceCount = V.toLong(); 00065 } 00066 } 00067 00068 void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { 00069 TS << "interfacecount=" 00070 << InstanceCount 00071 << endl; 00072 } 00073 00074 typedef Opie::Core::MakeTypelist<BluetoothBNEPNetNode, BluetoothRFCOMMNetNode>::Result BluetoothTypes; 00075 OPIE_NS2_PLUGIN( NetNodeInterface_T<BluetoothTypes> )
1.4.2