author | zecke <zecke> | 2005-02-17 23:52:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-17 23:52:46 (UTC) |
commit | 9bf35a9978c8a9e8b9c2100abf9137ffefc73e17 (patch) (unidiff) | |
tree | f251c1697f2ed091d8f55eca7aa1b8f4a85c7889 /libopie2/opiecore/device/odevice_simpad.cpp | |
parent | 87cbafeb59d0505b631be811bd96fb1d0b1df1f7 (diff) | |
download | opie-9bf35a9978c8a9e8b9c2100abf9137ffefc73e17.zip opie-9bf35a9978c8a9e8b9c2100abf9137ffefc73e17.tar.gz opie-9bf35a9978c8a9e8b9c2100abf9137ffefc73e17.tar.bz2 |
Add OAbstractMobileDevice with implementations for suspend and setDisplayStatus
Switch our implementations over to this partial implementation of ODevice
Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index d6c2c80..550da5e 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp | |||
@@ -311,49 +311,49 @@ void SIMpad::timerEvent ( QTimerEvent * ) | |||
311 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); | 311 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); |
312 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); | 312 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); |
313 | } | 313 | } |
314 | 314 | ||
315 | 315 | ||
316 | void SIMpad::playAlarmSound() | 316 | void SIMpad::playAlarmSound() |
317 | { | 317 | { |
318 | #ifndef QT_NO_SOUND | 318 | #ifndef QT_NO_SOUND |
319 | static Sound snd ( "alarm" ); | 319 | static Sound snd ( "alarm" ); |
320 | if(!snd.isFinished()) | 320 | if(!snd.isFinished()) |
321 | return; | 321 | return; |
322 | 322 | ||
323 | /* save as the Sound is static! */ | 323 | /* save as the Sound is static! */ |
324 | changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); | 324 | changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); |
325 | snd. play(); | 325 | snd. play(); |
326 | #endif | 326 | #endif |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | bool SIMpad::suspend() // Must override because SIMpad does NOT have apm | 330 | bool SIMpad::suspend() // Must override because SIMpad does NOT have apm |
331 | { | 331 | { |
332 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 332 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
333 | return false; | 333 | return false; |
334 | 334 | ||
335 | bool res = ODevice::suspend(); | 335 | bool res = OAbstractMobileDevice::suspend(); |
336 | 336 | ||
337 | /* | 337 | /* |
338 | * restore the screen content if we really | 338 | * restore the screen content if we really |
339 | * supended the device | 339 | * supended the device |
340 | */ | 340 | */ |
341 | if ( res ) | 341 | if ( res ) |
342 | updateAllWidgets(); | 342 | updateAllWidgets(); |
343 | 343 | ||
344 | return res; | 344 | return res; |
345 | } | 345 | } |
346 | 346 | ||
347 | bool SIMpad::setDisplayStatus ( bool on ) | 347 | bool SIMpad::setDisplayStatus ( bool on ) |
348 | { | 348 | { |
349 | qDebug( "ODevice for SIMpad: setDisplayStatus(%s)", on? "on" : "off" ); | 349 | qDebug( "ODevice for SIMpad: setDisplayStatus(%s)", on? "on" : "off" ); |
350 | 350 | ||
351 | return setCS3Bit(on, SIMPAD_DISPLAY_ON); | 351 | return setCS3Bit(on, SIMPAD_DISPLAY_ON); |
352 | } | 352 | } |
353 | 353 | ||
354 | 354 | ||
355 | bool SIMpad::setDisplayBrightness ( int bright ) | 355 | bool SIMpad::setDisplayBrightness ( int bright ) |
356 | { | 356 | { |
357 | qDebug( "ODevice for SIMpad: setDisplayBrightness( %d )", bright ); | 357 | qDebug( "ODevice for SIMpad: setDisplayBrightness( %d )", bright ); |
358 | bool res = false; | 358 | bool res = false; |
359 | int fd; | 359 | int fd; |