From b0019ad8b4a0d69dfd98fe4aa599600746eac20f Mon Sep 17 00:00:00 2001 From: alwin Date: Thu, 19 Feb 2004 11:38:19 +0000 Subject: when going to suspend, a QCopEnvelope message will send ( "QPE/System","aboutSuspend()" ) --- (limited to 'libopie2') diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 72b9ac7..7d67efe 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -1,27 +1,27 @@ /* -                 This file is part of the Opie Project -              Copyright (C) The Opie Team + This file is part of the Opie Project + Copyright (C) The Opie Team =. .=l. -           .>+-= - _;:,     .>    :=|. This program is free software; you can -.> <`_,   >  .   <= redistribute it and/or modify it under -:`=1 )Y*s>-.--   : the terms of the GNU Library General Public -.="- .-=="i,     .._ License as published by the Free Software - - .   .-<_>     .<> Foundation; either version 2 of the License, -     ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU -..}^=.=       =       ; Library General Public License for more -++=   -.     .`     .: details. - :     =  ...= . :.=- - -.   .:....=;==+<; You should have received a copy of the GNU -  -_. . .   )=.  = Library General Public License along with -    --        :-=` this library; see the file COPYING.LIB. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -186,7 +186,8 @@ bool ODevice::suspend() return false; bool res = false; - + ODevice::sendSuspendmsg(); + struct timeval tvs, tvn; ::gettimeofday ( &tvs, 0 ); @@ -620,3 +621,8 @@ void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) void ODevice::virtual_hook(int, void* ){ } + +void ODevice::sendSuspendmsg() +{ + QCopEnvelope ( "QPE/System", "aboutSuspend()" ); +} diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 791ccb3..bccb449 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -1,27 +1,27 @@ /* -                 This file is part of the Opie Project -              Copyright (C) The Opie Team + This file is part of the Opie Project + Copyright (C) The Opie Team =. .=l. -           .>+-= - _;:,     .>    :=|. This program is free software; you can -.> <`_,   >  .   <= redistribute it and/or modify it under -:`=1 )Y*s>-.--   : the terms of the GNU Library General Public -.="- .-=="i,     .._ License as published by the Free Software - - .   .-<_>     .<> Foundation; either version 2 of the License, -     ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU -..}^=.=       =       ; Library General Public License for more -++=   -.     .`     .: details. - :     =  ...= . :.=- - -.   .:....=;==+<; You should have received a copy of the GNU -  -_. . .   )=.  = Library General Public License along with -    --        :-=` this library; see the file COPYING.LIB. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -181,6 +181,7 @@ protected: ODevice(); virtual void init(); virtual void initButtons(); + static void sendSuspendmsg(); ODeviceData *d; diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index 4397b78..31b9297 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp @@ -1,27 +1,27 @@ /* -                 This file is part of the Opie Project -              Copyright (C) The Opie Team + This file is part of the Opie Project + Copyright (C) The Opie Team =. .=l. -           .>+-= - _;:,     .>    :=|. This program is free software; you can -.> <`_,   >  .   <= redistribute it and/or modify it under -:`=1 )Y*s>-.--   : the terms of the GNU Library General Public -.="- .-=="i,     .._ License as published by the Free Software - - .   .-<_>     .<> Foundation; either version 2 of the License, -     ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU -..}^=.=       =       ; Library General Public License for more -++=   -.     .`     .: details. - :     =  ...= . :.=- - -.   .:....=;==+<; You should have received a copy of the GNU -  -_. . .   )=.  = Library General Public License along with -    --        :-=` this library; see the file COPYING.LIB. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -326,6 +326,7 @@ bool SIMpad::suspend() // Must override because SIMpad does NOT have apm return false; bool res = false; + ODevice::sendSuspendmsg(); struct timeval tvs, tvn; ::gettimeofday ( &tvs, 0 ); diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 8bff770..9d23a12 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -1,27 +1,27 @@ /* -                 This file is part of the Opie Project -              Copyright (C) The Opie Team + This file is part of the Opie Project + Copyright (C) The Opie Team =. .=l. -           .>+-= - _;:,     .>    :=|. This program is free software; you can -.> <`_,   >  .   <= redistribute it and/or modify it under -:`=1 )Y*s>-.--   : the terms of the GNU Library General Public -.="- .-=="i,     .._ License as published by the Free Software - - .   .-<_>     .<> Foundation; either version 2 of the License, -     ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU -..}^=.=       =       ; Library General Public License for more -++=   -.     .`     .: details. - :     =  ...= . :.=- - -.   .:....=;==+<; You should have received a copy of the GNU -  -_. . .   )=.  = Library General Public License along with -    --        :-=` this library; see the file COPYING.LIB. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -566,6 +566,7 @@ bool Zaurus::suspend() return false; bool res = false; + ODevice::sendSuspendmsg(); struct timeval tvs, tvn; ::gettimeofday ( &tvs, 0 ); -- cgit v0.9.0.2