summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NNI.cpp
Unidiff
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 ) {
22 return GUI; 22 return GUI;
23} 23}
24 24
25QString AUSB::acceptable( void ) { 25QString AUSB::acceptable( void ) {
26 return ( GUI ) ? GUI->acceptable( ) : QString(); 26 return ( GUI ) ? GUI->acceptable( ) : QString();
27} 27}
28 28
29void AUSB::commit( void ) { 29void AUSB::commit( void ) {
30 if( GUI && GUI->commit( Data ) ) { 30 if( GUI && GUI->commit( Data ) ) {
31 setModified( 1 ); 31 setModified( 1 );
32 } 32 }
33} 33}
34 34
35bool AUSB::generateDataForCommonFile( SystemFile & S, long DevNr ) { 35bool AUSB::generateDataForCommonFile( SystemFile & S, long DevNr ) {
36 AsDevice * Dev = runtime()->device(); 36 AsDevice * Dev = runtime()->device();
37 QString NIC = Dev->genNic( DevNr ); 37 QString NIC = Dev->genNic( DevNr );
38 38
39 if( S.name() == "interfaces" ) { 39 if( S.name() == "interfaces" ) {
40 // generate mapping stanza for this interface 40 // generate mapping stanza for this interface
41 S << " pre-up " << QPEApplication::qpeDir() << "bin/setmacaddress.sh " << NIC << " || true" << endl; 41 S << " pre-up " << QPEApplication::qpeDir() << "bin/setmacaddress.sh " << NIC << " || true" << endl;
42 } 42 }
43 return 0; 43 return 0;
44} 44}
45 45
46bool AUSB::generateDeviceDataForCommonFile( SystemFile & S, long DevNr ) {
47 AsDevice * Dev = runtime()->device();
48 QString NIC = Dev->genNic( DevNr );
46 49
50 if( S.name() == "interfaces" ) {
51 // generate mapping stanza for this interface
52 S << "# check if " << NIC << " can be brought UP" << endl;
53 S << "mapping " << NIC << endl;
54 S << " script networksettings2-request" << endl << endl;
55 }
56 return 0;
57}