author | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
commit | a9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (unidiff) | |
tree | 13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/usb/usb_NNI.cpp | |
parent | 48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff) | |
download | opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2 |
CONTROL files : changed version string
NS2 many changes and first release of OT2
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.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NNI.cpp b/noncore/settings/networksettings2/usb/usb_NNI.cpp index 50c6e8d..600b771 100644 --- a/noncore/settings/networksettings2/usb/usb_NNI.cpp +++ b/noncore/settings/networksettings2/usb/usb_NNI.cpp | |||
@@ -1,61 +1,59 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include "usbedit.h" | 2 | #include "usbedit.h" |
3 | #include "usb_NNI.h" | 3 | #include "usb_NNI.h" |
4 | #include "usb_NN.h" | 4 | #include "usb_NN.h" |
5 | 5 | ||
6 | AUSB::AUSB( USBNetNode * PNN ) : ANetNodeInstance( PNN ) { | 6 | AUSB::AUSB( USBNetNode * PNN ) : ANetNodeInstance( PNN ) { |
7 | 7 | ||
8 | GUI = 0; | 8 | GUI = 0; |
9 | RT = 0; | 9 | RT = 0; |
10 | } | 10 | } |
11 | 11 | ||
12 | void AUSB::setSpecificAttribute( QString & , QString & ) { | 12 | void AUSB::setSpecificAttribute( QString & , QString & ) { |
13 | } | 13 | } |
14 | 14 | ||
15 | void AUSB::saveSpecificAttribute( QTextStream & ) { | 15 | void AUSB::saveSpecificAttribute( QTextStream & ) { |
16 | } | 16 | } |
17 | 17 | ||
18 | 18 | ||
19 | QWidget * AUSB::edit( QWidget * parent ) { | 19 | QWidget * AUSB::edit( QWidget * parent ) { |
20 | GUI = new USBEdit( parent ); | 20 | GUI = new USBEdit( parent ); |
21 | GUI->showData( Data ); | 21 | GUI->showData( Data ); |
22 | return GUI; | 22 | return GUI; |
23 | } | 23 | } |
24 | 24 | ||
25 | QString AUSB::acceptable( void ) { | 25 | QString AUSB::acceptable( void ) { |
26 | return ( GUI ) ? GUI->acceptable( ) : QString(); | 26 | return ( GUI ) ? GUI->acceptable( ) : QString(); |
27 | } | 27 | } |
28 | 28 | ||
29 | void AUSB::commit( void ) { | 29 | void 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 | ||
35 | short AUSB::generateFileEmbedded( const QString & ID, | 35 | short AUSB::generateFileEmbedded( SystemFile & SF, |
36 | const QString & Path, | ||
37 | QTextStream & TS, | ||
38 | long DevNr ) { | 36 | long DevNr ) { |
39 | 37 | ||
40 | QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); | 38 | QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); |
41 | short rvl, rvd; | 39 | short rvl, rvd; |
42 | 40 | ||
43 | rvl = 1; | 41 | rvl = 1; |
44 | 42 | ||
45 | if( ID == "interfaces" ) { | 43 | if( SF.name() == "interfaces" ) { |
46 | Log(("Generate USB for %s\n", ID.latin1() )); | 44 | Log(("Generate USB for %s\n", SF.name().latin1() )); |
47 | // generate mapping stanza for this interface | 45 | // generate mapping stanza for this interface |
48 | TS << " pre-up " | 46 | SF << " pre-up " |
49 | << QPEApplication::qpeDir() | 47 | << QPEApplication::qpeDir() |
50 | << "bin/setmacaddress.sh " | 48 | << "bin/setmacaddress.sh " |
51 | << NIC | 49 | << NIC |
52 | << " || true" | 50 | << " || true" |
53 | << endl; | 51 | << endl; |
54 | rvl = 0; | 52 | rvl = 0; |
55 | } | 53 | } |
56 | rvd = ANetNodeInstance::generateFileEmbedded( ID, Path, TS, DevNr ); | 54 | rvd = ANetNodeInstance::generateFileEmbedded(SF, DevNr ); |
57 | 55 | ||
58 | return (rvd == 2 || rvl == 2 ) ? 2 : | 56 | return (rvd == 2 || rvl == 2 ) ? 2 : |
59 | (rvd == 0 || rvl == 0 ) ? 0 : 1; | 57 | (rvd == 0 || rvl == 0 ) ? 0 : 1; |
60 | 58 | ||
61 | } | 59 | } |