author | wimpie <wimpie> | 2005-01-09 00:32:10 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-09 00:32:10 (UTC) |
commit | e54346d28b19d3ac671802a25e8c03f346693291 (patch) (unidiff) | |
tree | 0f8d6561e24a7ba36fd8a6ab1869aa470e1fdb36 /noncore/settings/networksettings2/opietooth2/OTDevice.cpp | |
parent | 60a617583d0ccc793d9ea4465998d90ec208db58 (diff) | |
download | opie-e54346d28b19d3ac671802a25e8c03f346693291.zip opie-e54346d28b19d3ac671802a25e8c03f346693291.tar.gz opie-e54346d28b19d3ac671802a25e8c03f346693291.tar.bz2 |
Updated dependencies
NS2->app requires OT2Lib and NS2Lib
OT2Lib requires NS2Lib
Most plugins only require NS2Lib
Except
BTPlugin which requires als OT2Lib
Also renamed owarn -> odebug
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTDevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTDevice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTDevice.cpp b/noncore/settings/networksettings2/opietooth2/OTDevice.cpp index 62f17a0..c6f7d5e 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDevice.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTDevice.cpp | |||
@@ -94,25 +94,25 @@ bool OTDevice::attach(){ | |||
94 | return TRUE; | 94 | return TRUE; |
95 | } | 95 | } |
96 | 96 | ||
97 | bool OTDevice::detach(){ | 97 | bool OTDevice::detach(){ |
98 | 98 | ||
99 | if( needsAttach() && m_hciattachPid ) { | 99 | if( needsAttach() && m_hciattachPid ) { |
100 | if( m_hciattach ) { | 100 | if( m_hciattach ) { |
101 | delete m_hciattach; | 101 | delete m_hciattach; |
102 | m_hciattach = 0; | 102 | m_hciattach = 0; |
103 | } | 103 | } |
104 | 104 | ||
105 | if( kill( m_hciattachPid, 9) < 0 ) { | 105 | if( kill( m_hciattachPid, 9) < 0 ) { |
106 | owarn << "could not stop " << errno << oendl; | 106 | odebug << "could not stop " << errno << oendl; |
107 | emit error( tr( "Could not stop process" ) ); | 107 | emit error( tr( "Could not stop process" ) ); |
108 | return FALSE; | 108 | return FALSE; |
109 | } | 109 | } |
110 | m_hciattachPid = 0; | 110 | m_hciattachPid = 0; |
111 | emit isEnabled( m_deviceNr, 0 ); | 111 | emit isEnabled( m_deviceNr, 0 ); |
112 | m_deviceNr = -1; | 112 | m_deviceNr = -1; |
113 | } | 113 | } |
114 | 114 | ||
115 | return TRUE; | 115 | return TRUE; |
116 | } | 116 | } |
117 | 117 | ||
118 | bool OTDevice::isAttached()const{ | 118 | bool OTDevice::isAttached()const{ |
@@ -159,25 +159,25 @@ void OTDevice::slotStdOut(OProcess* proc, char* , int ) { | |||
159 | emit isEnabled( m_deviceNr, 1 ); | 159 | emit isEnabled( m_deviceNr, 1 ); |
160 | } | 160 | } |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | void OTDevice::slotStdErr(OProcess* proc, char* chars, int len) { | 164 | void OTDevice::slotStdErr(OProcess* proc, char* chars, int len) { |
165 | 165 | ||
166 | if(proc == m_hciattach && len >= 1 ){ | 166 | if(proc == m_hciattach && len >= 1 ){ |
167 | // collect output | 167 | // collect output |
168 | QCString string( chars, len+1 ); // \0 == +1 | 168 | QCString string( chars, len+1 ); // \0 == +1 |
169 | QString m_output; | 169 | QString m_output; |
170 | m_output.append( string.data() ); | 170 | m_output.append( string.data() ); |
171 | owarn << m_output << oendl; | 171 | odebug << m_output << oendl; |
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | pid_t OTDevice::getPidOfHCIAttach( void ) { | 175 | pid_t OTDevice::getPidOfHCIAttach( void ) { |
176 | 176 | ||
177 | if( needsAttach() ) { | 177 | if( needsAttach() ) { |
178 | // not yet attached -> perhaps now ? | 178 | // not yet attached -> perhaps now ? |
179 | // load /proc dir and check if command name contains hciattach | 179 | // load /proc dir and check if command name contains hciattach |
180 | QRegExp R("[0-9]+"); | 180 | QRegExp R("[0-9]+"); |
181 | QDir ProcDir( "/proc" ); | 181 | QDir ProcDir( "/proc" ); |
182 | QFileInfo FI; | 182 | QFileInfo FI; |
183 | QStringList EL = ProcDir.entryList( QDir::Dirs ); | 183 | QStringList EL = ProcDir.entryList( QDir::Dirs ); |
@@ -202,25 +202,25 @@ pid_t OTDevice::getPidOfHCIAttach( void ) { | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | return 0; | 206 | return 0; |
207 | } | 207 | } |
208 | 208 | ||
209 | void OTDevice::detectDeviceType( QString & Device, | 209 | void OTDevice::detectDeviceType( QString & Device, |
210 | QString & Mode, | 210 | QString & Mode, |
211 | unsigned long & Speed ) { | 211 | unsigned long & Speed ) { |
212 | 212 | ||
213 | // detect device type and determine parms | 213 | // detect device type and determine parms |
214 | owarn << "Detecting device" << oendl; | 214 | odebug << "Detecting device" << oendl; |
215 | switch ( ODevice::inst()->model() ) { | 215 | switch ( ODevice::inst()->model() ) { |
216 | case Model_iPAQ_H39xx: | 216 | case Model_iPAQ_H39xx: |
217 | Device = "/dev/tts/1"; | 217 | Device = "/dev/tts/1"; |
218 | Mode = "bcsp"; | 218 | Mode = "bcsp"; |
219 | Speed = 921600; | 219 | Speed = 921600; |
220 | NeedsAttach = 1; | 220 | NeedsAttach = 1; |
221 | break; | 221 | break; |
222 | 222 | ||
223 | case Model_iPAQ_H5xxx: | 223 | case Model_iPAQ_H5xxx: |
224 | Device = "/dev/tts/1"; | 224 | Device = "/dev/tts/1"; |
225 | Mode = "any"; | 225 | Mode = "any"; |
226 | Speed = 921600; | 226 | Speed = 921600; |