13 files changed, 25 insertions, 25 deletions
diff --git a/noncore/settings/networksettings2/main.cpp b/noncore/settings/networksettings2/main.cpp index 8487e3e..973b4b7 100644 --- a/noncore/settings/networksettings2/main.cpp +++ b/noncore/settings/networksettings2/main.cpp | |||
@@ -30,37 +30,33 @@ OPIE_EXPORT_APP( OApplicationFactory<NetworkSettings> ) | |||
30 | 30 | ||
31 | // include Opietooth GUI | 31 | // include Opietooth GUI |
32 | #include <opietooth2/Opietooth.h> | 32 | #include <opietooth2/Opietooth.h> |
33 | using namespace Opietooth2; | 33 | using namespace Opietooth2; |
34 | 34 | ||
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qframe.h> | 37 | #include <qframe.h> |
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | 39 | ||
40 | int main( int argc, char * argv[] ) { | 40 | int main( int argc, char * argv[] ) { |
41 | int rv = 0; | 41 | int rv = 0; |
42 | int Action = ACT_GUI; | 42 | int Action = ACT_GUI; |
43 | // could be overruled by -qws | 43 | // could be overruled by -qws |
44 | QApplication::Type GuiType = QApplication::GuiClient; | 44 | QApplication::Type GuiType = QApplication::GuiClient; |
45 | 45 | ||
46 | #ifdef _WS_QWS_ | ||
47 | QPEApplication * TheApp; | 46 | QPEApplication * TheApp; |
48 | #else | ||
49 | QApplication * TheApp; | ||
50 | #endif | ||
51 | 47 | ||
52 | for ( int i = 1; i < argc; i ++ ) { | 48 | for ( int i = 1; i < argc; i ++ ) { |
53 | int rmv; | 49 | int rmv; |
54 | rmv = 0; | 50 | rmv = 0; |
55 | if( strcmp( argv[i], "--regen" ) == 0 ) { | 51 | if( strcmp( argv[i], "--regen" ) == 0 ) { |
56 | Action = ACT_REGEN; | 52 | Action = ACT_REGEN; |
57 | GuiType = QApplication::Tty; | 53 | GuiType = QApplication::Tty; |
58 | rmv = 1; | 54 | rmv = 1; |
59 | } else if( strcmp( argv[i], "--prompt" ) == 0 ) { | 55 | } else if( strcmp( argv[i], "--prompt" ) == 0 ) { |
60 | Action = ACT_PROMPT; | 56 | Action = ACT_PROMPT; |
61 | rmv = 1; | 57 | rmv = 1; |
62 | } else if( strcmp( argv[i], "--triggervpn" ) == 0 ) { | 58 | } else if( strcmp( argv[i], "--triggervpn" ) == 0 ) { |
63 | Action = ACT_VPN; | 59 | Action = ACT_VPN; |
64 | rmv = 1; | 60 | rmv = 1; |
65 | } else if( strcmp( argv[i], "--opietooth" ) == 0 ) { | 61 | } else if( strcmp( argv[i], "--opietooth" ) == 0 ) { |
66 | Action = ACT_OT; | 62 | Action = ACT_OT; |
@@ -71,44 +67,40 @@ int main( int argc, char * argv[] ) { | |||
71 | sizeof( char * ) * (argc-i-rmv) ); | 67 | sizeof( char * ) * (argc-i-rmv) ); |
72 | i --; | 68 | i --; |
73 | argc -= rmv; | 69 | argc -= rmv; |
74 | } | 70 | } |
75 | } | 71 | } |
76 | 72 | ||
77 | if( strstr( argv[0], "-request" ) ) { | 73 | if( strstr( argv[0], "-request" ) ) { |
78 | // called from system to request something | 74 | // called from system to request something |
79 | GuiType = QApplication::Tty; | 75 | GuiType = QApplication::Tty; |
80 | Action = ACT_REQUEST; | 76 | Action = ACT_REQUEST; |
81 | Log(("Request : %s\n", argv[1] )); | 77 | Log(("Request : %s\n", argv[1] )); |
82 | } else if( strstr( argv[0], "-opietooth" ) ) { | 78 | } else if( strstr( argv[0], "-opietooth" ) ) { |
83 | Action = ACT_OT; | 79 | Action = ACT_OT; |
84 | } | 80 | } |
85 | 81 | ||
86 | // Start Qt | 82 | // Start Qt |
87 | #ifdef _WS_QWS_ | ||
88 | // because QPEApplication does not handle GuiType well | 83 | // because QPEApplication does not handle GuiType well |
89 | if( GuiType == QApplication::Tty ) { | 84 | if( GuiType == QApplication::Tty ) { |
90 | // this cast is NOT correct but we do not use | 85 | // this cast is NOT correct but we do not use |
91 | // TheApp anymore ... | 86 | // TheApp anymore ... |
92 | TheApp = (QPEApplication *)new QApplication( argc, argv, GuiType ); | 87 | TheApp = (QPEApplication *)new QApplication( argc, argv, GuiType ); |
93 | } else { | 88 | } else { |
94 | TheApp = new QPEApplication( argc, argv, GuiType ); | 89 | TheApp = new QPEApplication( argc, argv, GuiType ); |
95 | } | 90 | } |
96 | #else | ||
97 | TheApp = new QApplication( argc, argv, GuiType ); | ||
98 | #endif | ||
99 | 91 | ||
100 | // init qt with app widget | 92 | // init qt with app widget |
101 | 93 | ||
102 | switch( Action ) { | 94 | switch( Action ) { |
103 | case ACT_REQUEST : | 95 | case ACT_REQUEST : |
104 | { NetworkSettingsData NS; | 96 | { NetworkSettingsData NS; |
105 | if( NS.canStart( argv[1] ) ) { | 97 | if( NS.canStart( argv[1] ) ) { |
106 | QStringList S; | 98 | QStringList S; |
107 | S << QPEApplication::qpeDir() + "/bin/networksettings2"; | 99 | S << QPEApplication::qpeDir() + "/bin/networksettings2"; |
108 | S << "networksettings2"; | 100 | S << "networksettings2"; |
109 | S << "--prompt"; | 101 | S << "--prompt"; |
110 | S << argv[1]; | 102 | S << argv[1]; |
111 | NSResources->system().execAsUser( S ); | 103 | NSResources->system().execAsUser( S ); |
112 | Log(("FAILED %s-cNN-allowed\n", argv[1] )); | 104 | Log(("FAILED %s-cNN-allowed\n", argv[1] )); |
113 | // if we come here , failed | 105 | // if we come here , failed |
114 | printf( "%s-cNN-disallowed", argv[1] ); | 106 | printf( "%s-cNN-disallowed", argv[1] ); |
@@ -138,37 +130,33 @@ int main( int argc, char * argv[] ) { | |||
138 | { ActivateVPN AVPN; | 130 | { ActivateVPN AVPN; |
139 | AVPN.exec(); | 131 | AVPN.exec(); |
140 | } | 132 | } |
141 | break; | 133 | break; |
142 | case ACT_GUI : | 134 | case ACT_GUI : |
143 | case ACT_OT : | 135 | case ACT_OT : |
144 | { QWidget * W; | 136 | { QWidget * W; |
145 | 137 | ||
146 | if( Action == ACT_OT ) { | 138 | if( Action == ACT_OT ) { |
147 | W = new OTMain( 0 ); | 139 | W = new OTMain( 0 ); |
148 | } else { | 140 | } else { |
149 | W = new NetworkSettings(0); | 141 | W = new NetworkSettings(0); |
150 | } | 142 | } |
151 | TheApp->setMainWidget( W ); | 143 | TheApp->setMainWidget( W ); |
152 | 144 | ||
153 | W->show(); | 145 | W->show(); |
154 | #ifdef _WS_QWS_ | ||
155 | W->showMaximized(); | 146 | W->showMaximized(); |
156 | #else | ||
157 | W->resize( W->sizeHint() ); | ||
158 | #endif | ||
159 | rv = TheApp->exec(); | 147 | rv = TheApp->exec(); |
160 | 148 | ||
161 | delete W; | 149 | delete W; |
162 | } | 150 | } |
163 | break; | 151 | break; |
164 | } | 152 | } |
165 | 153 | ||
166 | LogClose(); | 154 | LogClose(); |
167 | 155 | ||
168 | return rv; | 156 | return rv; |
169 | } | 157 | } |
170 | 158 | ||
171 | #endif | 159 | #endif |
172 | 160 | ||
173 | 161 | ||
174 | // main.cpp | 162 | // main.cpp |
diff --git a/noncore/settings/networksettings2/networksettings2/systemfile.cpp b/noncore/settings/networksettings2/networksettings2/systemfile.cpp index 82fd43a..8deef94 100644 --- a/noncore/settings/networksettings2/networksettings2/systemfile.cpp +++ b/noncore/settings/networksettings2/networksettings2/systemfile.cpp | |||
@@ -1,27 +1,27 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include <qfileinfo.h> | 3 | #include <qfileinfo.h> |
4 | #include <qmessagebox.h> | 4 | #include <qmessagebox.h> |
5 | #include <qfile.h> | 5 | #include <qfile.h> |
6 | #include <qtextstream.h> | 6 | #include <qtextstream.h> |
7 | 7 | ||
8 | #include "resources.h" | 8 | #include "resources.h" |
9 | #include "systemfile.h" | 9 | #include "systemfile.h" |
10 | 10 | ||
11 | #define TEMPLATEDIR "networktemplates/" | 11 | #define TEMPLATEDIR "NS2templates/" |
12 | QString TemplDir; | 12 | QString TemplDir; |
13 | 13 | ||
14 | SystemFile::SystemFile( const QString & N, | 14 | SystemFile::SystemFile( const QString & N, |
15 | const QString & P, | 15 | const QString & P, |
16 | bool KDI ){ | 16 | bool KDI ){ |
17 | Name = N; | 17 | Name = N; |
18 | Path = P; | 18 | Path = P; |
19 | InAppend = 0; | 19 | InAppend = 0; |
20 | F = 0; | 20 | F = 0; |
21 | // get template info | 21 | // get template info |
22 | { QString S; | 22 | { QString S; |
23 | QFileInfo FI; | 23 | QFileInfo FI; |
24 | 24 | ||
25 | // find location of templates | 25 | // find location of templates |
26 | TemplDir = QPEApplication::qpeDir() + "etc/" + TEMPLATEDIR; | 26 | TemplDir = QPEApplication::qpeDir() + "etc/" + TEMPLATEDIR; |
27 | FI.setFile( TemplDir ); | 27 | FI.setFile( TemplDir ); |
diff --git a/noncore/settings/networksettings2/opie-networksettings2.control b/noncore/settings/networksettings2/opie-networksettings2.control index 874833c..a79a740 100644 --- a/noncore/settings/networksettings2/opie-networksettings2.control +++ b/noncore/settings/networksettings2/opie-networksettings2.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-networksettings2 | 1 | Package: opie-networksettings2 |
2 | Files: bin/networksettings2 apps/Settings/networksettings2.desktop pics/networksettings2/*.png lib/libnetworksettings2.so* pics/networksettings2/Devices/*.png etc/NS2templates/* etc/NS2templates/*/* | 2 | Files: bin/networksettings2 apps/Settings/networksettings2.desktop pics/networksettings2/*.png lib/libnetworksettings2.so* pics/networksettings2/Devices/*.png etc/NS2templates/* etc/NS2templates/*/* bin/NS2SetMac.sh |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Maintainer: wim delvaux <wimpie@handhelds.org> | 5 | Maintainer: wim delvaux <wimpie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, libopietooth2 | 7 | Depends: task-opie-minimal, libopietooth2 |
8 | Description: Network settings. | 8 | Description: Network settings. |
9 | Replaces: opie-networksetup | 9 | Replaces: opie-networksetup |
10 | Version: $QPE_VERSION$EXTRAVERSION | 10 | Version: $QPE_VERSION$EXTRAVERSION |
diff --git a/noncore/settings/networksettings2/opietooth2/OTDevice.h b/noncore/settings/networksettings2/opietooth2/OTDevice.h index c2abb09..cf1c4b6 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDevice.h +++ b/noncore/settings/networksettings2/opietooth2/OTDevice.h | |||
@@ -3,34 +3,34 @@ | |||
3 | 3 | ||
4 | #include <qobject.h> | 4 | #include <qobject.h> |
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | 6 | ||
7 | #include <bluezlib.h> | 7 | #include <bluezlib.h> |
8 | 8 | ||
9 | #include <OTGateway.h> | 9 | #include <OTGateway.h> |
10 | 10 | ||
11 | // define if you want to use the process hciattach for detection | 11 | // define if you want to use the process hciattach for detection |
12 | // #define USEHCIPROC | 12 | // #define USEHCIPROC |
13 | 13 | ||
14 | class QTimerEvent; | 14 | class QTimerEvent; |
15 | 15 | ||
16 | namespace Opie { | 16 | namespace Opie { |
17 | namespace Core { | 17 | namespace Core { |
18 | class OProcess; | 18 | class OProcess; |
19 | } | 19 | }; |
20 | } | 20 | }; |
21 | 21 | ||
22 | namespace Opietooth2 { | 22 | namespace Opietooth2 { |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * Device takes care of attaching serial | 25 | * Device takes care of attaching serial |
26 | * devices to the blueZ stack. | 26 | * devices to the blueZ stack. |
27 | * After attaching it hciconfig ups it | 27 | * After attaching it hciconfig ups it |
28 | */ | 28 | */ |
29 | class OTDevice : public QObject { | 29 | class OTDevice : public QObject { |
30 | 30 | ||
31 | Q_OBJECT | 31 | Q_OBJECT |
32 | 32 | ||
33 | public: | 33 | public: |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Brings up the device. | 36 | * Brings up the device. |
diff --git a/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h b/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h index 8395f37..50f28fc 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h +++ b/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h | |||
@@ -90,19 +90,19 @@ public: | |||
90 | /** The address 00:00:00:FF:FF:FF */ | 90 | /** The address 00:00:00:FF:FF:FF */ |
91 | static const OTDeviceAddress local; | 91 | static const OTDeviceAddress local; |
92 | 92 | ||
93 | /** The address 00:00:00:00:00:00 */ | 93 | /** The address 00:00:00:00:00:00 */ |
94 | static const OTDeviceAddress any; | 94 | static const OTDeviceAddress any; |
95 | 95 | ||
96 | /** An address tagged as invalid */ | 96 | /** An address tagged as invalid */ |
97 | static const OTDeviceAddress invalid; | 97 | static const OTDeviceAddress invalid; |
98 | 98 | ||
99 | protected: | 99 | protected: |
100 | 100 | ||
101 | bdaddr_t BDaddr; | 101 | bdaddr_t BDaddr; |
102 | bool IsValid; | 102 | bool IsValid; |
103 | 103 | ||
104 | }; | 104 | }; |
105 | 105 | ||
106 | } | 106 | }; |
107 | 107 | ||
108 | #endif | 108 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.h b/noncore/settings/networksettings2/opietooth2/OTDriver.h index b54ffdf..f249cf7 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDriver.h +++ b/noncore/settings/networksettings2/opietooth2/OTDriver.h | |||
@@ -215,18 +215,18 @@ private: | |||
215 | QString Manufacturer; | 215 | QString Manufacturer; |
216 | OTDeviceAddress Address; | 216 | OTDeviceAddress Address; |
217 | QString Features; | 217 | QString Features; |
218 | QTimer * AutoClose; | 218 | QTimer * AutoClose; |
219 | 219 | ||
220 | int Dev_id,Fd,Type; | 220 | int Dev_id,Fd,Type; |
221 | bool IsUp; | 221 | bool IsUp; |
222 | int Iscan,Pscan,Auth,Encrypt; | 222 | int Iscan,Pscan,Auth,Encrypt; |
223 | 223 | ||
224 | // socket bound to this device | 224 | // socket bound to this device |
225 | OTHCISocket * Socket; | 225 | OTHCISocket * Socket; |
226 | 226 | ||
227 | // backpointer to opietooth system | 227 | // backpointer to opietooth system |
228 | OTGateway * OT; | 228 | OTGateway * OT; |
229 | }; | 229 | }; |
230 | 230 | ||
231 | } | 231 | }; |
232 | #endif | 232 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTIcons.h b/noncore/settings/networksettings2/opietooth2/OTIcons.h index ee10831..966ed24 100644 --- a/noncore/settings/networksettings2/opietooth2/OTIcons.h +++ b/noncore/settings/networksettings2/opietooth2/OTIcons.h | |||
@@ -36,19 +36,19 @@ public: | |||
36 | // returns all UUID that represent channels with network | 36 | // returns all UUID that represent channels with network |
37 | const UUIDVector & network() | 37 | const UUIDVector & network() |
38 | { return Networks; } | 38 | { return Networks; } |
39 | 39 | ||
40 | // set Sub to find icons in .../Icons dir | 40 | // set Sub to find icons in .../Icons dir |
41 | QPixmap loadPixmap( const QString &, bool Sub = 0 ); | 41 | QPixmap loadPixmap( const QString &, bool Sub = 0 ); |
42 | 42 | ||
43 | private: | 43 | private: |
44 | 44 | ||
45 | // first ist id, second is icon name | 45 | // first ist id, second is icon name |
46 | QMap<QString,QString> deviceIcons; | 46 | QMap<QString,QString> deviceIcons; |
47 | QMap<int,QString> serviceIcons; | 47 | QMap<int,QString> serviceIcons; |
48 | UUIDVector Modems; | 48 | UUIDVector Modems; |
49 | UUIDVector Networks; | 49 | UUIDVector Networks; |
50 | 50 | ||
51 | }; | 51 | }; |
52 | } | 52 | }; |
53 | 53 | ||
54 | #endif | 54 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.h b/noncore/settings/networksettings2/opietooth2/OTInquiry.h index f7bdeec..2682499 100644 --- a/noncore/settings/networksettings2/opietooth2/OTInquiry.h +++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.h | |||
@@ -161,18 +161,18 @@ private: | |||
161 | OTDriver * Driver; | 161 | OTDriver * Driver; |
162 | 162 | ||
163 | //QDateTime *startTime; | 163 | //QDateTime *startTime; |
164 | QTimer *InquiryTimeoutTimer; | 164 | QTimer *InquiryTimeoutTimer; |
165 | 165 | ||
166 | // std::deque<InquiryInfo> infoQueue; | 166 | // std::deque<InquiryInfo> infoQueue; |
167 | bool SuccessfullyStarted; | 167 | bool SuccessfullyStarted; |
168 | bool SuccessfullyEnded; | 168 | bool SuccessfullyEnded; |
169 | 169 | ||
170 | private slots: | 170 | private slots: |
171 | 171 | ||
172 | void slotInquiryTimeout(); | 172 | void slotInquiryTimeout(); |
173 | void slotHCIEvent(unsigned char eventCode, QByteArray buf); | 173 | void slotHCIEvent(unsigned char eventCode, QByteArray buf); |
174 | 174 | ||
175 | }; | 175 | }; |
176 | 176 | ||
177 | } | 177 | }; |
178 | #endif | 178 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTPeer.h b/noncore/settings/networksettings2/opietooth2/OTPeer.h index c09af15..9cd0dc7 100644 --- a/noncore/settings/networksettings2/opietooth2/OTPeer.h +++ b/noncore/settings/networksettings2/opietooth2/OTPeer.h | |||
@@ -117,19 +117,19 @@ private: | |||
117 | void updateServices(); | 117 | void updateServices(); |
118 | 118 | ||
119 | OTGateway * OT; | 119 | OTGateway * OT; |
120 | OTDeviceAddress Addr; | 120 | OTDeviceAddress Addr; |
121 | QString Name; | 121 | QString Name; |
122 | int Class; | 122 | int Class; |
123 | ServiceVector serviceList; | 123 | ServiceVector serviceList; |
124 | // -1 : don't know, 0 no, 1 yes | 124 | // -1 : don't know, 0 no, 1 yes |
125 | PeerState_t State; | 125 | PeerState_t State; |
126 | OTDriver * ConnectedTo; | 126 | OTDriver * ConnectedTo; |
127 | 127 | ||
128 | int ProbeFD; | 128 | int ProbeFD; |
129 | int ProbePhase; // see OTDriver | 129 | int ProbePhase; // see OTDriver |
130 | long ProbeTimeout; | 130 | long ProbeTimeout; |
131 | }; | 131 | }; |
132 | 132 | ||
133 | } | 133 | }; |
134 | 134 | ||
135 | #endif | 135 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h index e79e33d..86b5623 100644 --- a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h +++ b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h | |||
@@ -122,19 +122,19 @@ public: | |||
122 | 122 | ||
123 | private: | 123 | private: |
124 | 124 | ||
125 | AttrType type; | 125 | AttrType type; |
126 | 126 | ||
127 | union { | 127 | union { |
128 | OTSDPAttribute::int128_t * intVal; | 128 | OTSDPAttribute::int128_t * intVal; |
129 | OTSDPAttribute::uint128_t * uintVal; | 129 | OTSDPAttribute::uint128_t * uintVal; |
130 | OTUUID * uuidVal; | 130 | OTUUID * uuidVal; |
131 | bool boolVal; | 131 | bool boolVal; |
132 | QString * stringVal; // strings and urls | 132 | QString * stringVal; // strings and urls |
133 | AttributeVector * sequenceVal; // sequences and alternatives | 133 | AttributeVector * sequenceVal; // sequences and alternatives |
134 | } Value; | 134 | } Value; |
135 | 135 | ||
136 | }; | 136 | }; |
137 | 137 | ||
138 | } | 138 | }; |
139 | 139 | ||
140 | #endif | 140 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPService.h b/noncore/settings/networksettings2/opietooth2/OTSDPService.h index 4831df0..21d7344 100644 --- a/noncore/settings/networksettings2/opietooth2/OTSDPService.h +++ b/noncore/settings/networksettings2/opietooth2/OTSDPService.h | |||
@@ -57,19 +57,19 @@ public: | |||
57 | @param n The Rfcomm channel. | 57 | @param n The Rfcomm channel. |
58 | @ret true if an rfcomm channel was found, false otherwise. */ | 58 | @ret true if an rfcomm channel was found, false otherwise. */ |
59 | bool rfcommChannel(unsigned int &n); | 59 | bool rfcommChannel(unsigned int &n); |
60 | 60 | ||
61 | bool hasClassID(const OTUUID & uuid); | 61 | bool hasClassID(const OTUUID & uuid); |
62 | 62 | ||
63 | private: | 63 | private: |
64 | 64 | ||
65 | struct AttributeEntry { | 65 | struct AttributeEntry { |
66 | int id; | 66 | int id; |
67 | OTSDPAttribute * attr; | 67 | OTSDPAttribute * attr; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | QArray<AttributeEntry> attributeList; | 70 | QArray<AttributeEntry> attributeList; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | } | 73 | }; |
74 | 74 | ||
75 | #endif | 75 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTUUID.h b/noncore/settings/networksettings2/opietooth2/OTUUID.h index aebd9b9..97df114 100644 --- a/noncore/settings/networksettings2/opietooth2/OTUUID.h +++ b/noncore/settings/networksettings2/opietooth2/OTUUID.h | |||
@@ -41,18 +41,18 @@ public : | |||
41 | uint32_t toLong() | 41 | uint32_t toLong() |
42 | { return ((hi>>32) & 0xffffffff); } | 42 | { return ((hi>>32) & 0xffffffff); } |
43 | uint64_t toLongLong() | 43 | uint64_t toLongLong() |
44 | { return hi; } | 44 | { return hi; } |
45 | 45 | ||
46 | QString toString() const ; | 46 | QString toString() const ; |
47 | operator QString() const; | 47 | operator QString() const; |
48 | operator ::uuid_t() const; | 48 | operator ::uuid_t() const; |
49 | 49 | ||
50 | OTUUID & operator=( const OTUUID & other ) ; | 50 | OTUUID & operator=( const OTUUID & other ) ; |
51 | bool operator<( const OTUUID & other ) const; | 51 | bool operator<( const OTUUID & other ) const; |
52 | bool operator==(const OTUUID & uuid) const; | 52 | bool operator==(const OTUUID & uuid) const; |
53 | 53 | ||
54 | uint64_t hi; | 54 | uint64_t hi; |
55 | uint64_t lo; | 55 | uint64_t lo; |
56 | }; | 56 | }; |
57 | } | 57 | }; |
58 | #endif | 58 | #endif |
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp index f8824e0..0a46642 100644 --- a/noncore/settings/networksettings2/usb/usbrun.cpp +++ b/noncore/settings/networksettings2/usb/usbrun.cpp | |||
@@ -58,33 +58,45 @@ State_t USBRun::detectState( void ) { | |||
58 | handlesInterface( Run->Name ), | 58 | handlesInterface( Run->Name ), |
59 | Run->CardType, ARPHRD_ETHER, | 59 | Run->CardType, ARPHRD_ETHER, |
60 | ! Run->IsUp )); | 60 | ! Run->IsUp )); |
61 | 61 | ||
62 | if( handlesInterface( Run->Name ) && | 62 | if( handlesInterface( Run->Name ) && |
63 | Run->CardType == ARPHRD_ETHER && | 63 | Run->CardType == ARPHRD_ETHER && |
64 | ! Run->IsUp | 64 | ! Run->IsUp |
65 | ) { | 65 | ) { |
66 | // proper type, and Not UP -> free | 66 | // proper type, and Not UP -> free |
67 | return Off; | 67 | return Off; |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | return Unavailable; | 71 | return Unavailable; |
72 | } | 72 | } |
73 | 73 | ||
74 | QString USBRun::setMyState( NodeCollection *, Action_t , bool ) { | 74 | QString USBRun::setMyState( NodeCollection * NC, Action_t A, bool ) { |
75 | |||
76 | // nothing needs to be done to 'activate' or 'deactivate' | ||
77 | // a cable | ||
78 | |||
79 | // perhaps (later) we can figure out if the device is IN the | ||
80 | // cradle | ||
81 | if( A == Activate ) { | ||
82 | NC->setCurrentState( Available ); | ||
83 | } else if ( A == Deactivate ) { | ||
84 | NC->setCurrentState( Unavailable ); | ||
85 | } | ||
86 | |||
75 | return QString(); | 87 | return QString(); |
76 | } | 88 | } |
77 | 89 | ||
78 | // get interface that is free or assigned to us | 90 | // get interface that is free or assigned to us |
79 | InterfaceInfo * USBRun::getInterface( void ) { | 91 | InterfaceInfo * USBRun::getInterface( void ) { |
80 | 92 | ||
81 | System & S = NSResources->system(); | 93 | System & S = NSResources->system(); |
82 | InterfaceInfo * best = 0, * Run; | 94 | InterfaceInfo * best = 0, * Run; |
83 | QRegExp R( "usb[0-9abcdef]" ); | 95 | QRegExp R( "usb[0-9abcdef]" ); |
84 | 96 | ||
85 | for( QDictIterator<InterfaceInfo> It(S.interfaces()); | 97 | for( QDictIterator<InterfaceInfo> It(S.interfaces()); |
86 | It.current(); | 98 | It.current(); |
87 | ++It ) { | 99 | ++It ) { |
88 | Run = It.current(); | 100 | Run = It.current(); |
89 | if( handlesInterface( Run->Name ) && | 101 | if( handlesInterface( Run->Name ) && |
90 | Run->CardType == ARPHRD_ETHER | 102 | Run->CardType == ARPHRD_ETHER |