summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NNI.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usb_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usb_NNI.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NNI.cpp b/noncore/settings/networksettings2/usb/usb_NNI.cpp
index 4729416..6fcd6d5 100644
--- a/noncore/settings/networksettings2/usb/usb_NNI.cpp
+++ b/noncore/settings/networksettings2/usb/usb_NNI.cpp
@@ -22,25 +22,36 @@ QWidget * AUSB::edit( QWidget * parent ) {
return GUI;
}
QString AUSB::acceptable( void ) {
return ( GUI ) ? GUI->acceptable( ) : QString();
}
void AUSB::commit( void ) {
if( GUI && GUI->commit( Data ) ) {
setModified( 1 );
}
}
bool AUSB::generateDataForCommonFile( SystemFile & S, long DevNr ) {
AsDevice * Dev = runtime()->device();
QString NIC = Dev->genNic( DevNr );
if( S.name() == "interfaces" ) {
// generate mapping stanza for this interface
S << " pre-up " << QPEApplication::qpeDir() << "bin/setmacaddress.sh " << NIC << " || true" << endl;
}
return 0;
}
+bool AUSB::generateDeviceDataForCommonFile( SystemFile & S, long DevNr ) {
+ AsDevice * Dev = runtime()->device();
+ QString NIC = Dev->genNic( DevNr );
+ if( S.name() == "interfaces" ) {
+ // generate mapping stanza for this interface
+ S << "# check if " << NIC << " can be brought UP" << endl;
+ S << "mapping " << NIC << endl;
+ S << " script networksettings2-request" << endl << endl;
+ }
+ return 0;
+}