Diffstat (limited to 'libopie2/opiecore/device/odevice_abstractmobiledevice.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_abstractmobiledevice.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp b/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp index f3f6af5..fe5864b 100644 --- a/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp +++ b/libopie2/opiecore/device/odevice_abstractmobiledevice.cpp | |||
@@ -1,20 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2004, 2005 Holger Hans Peter Freyther <freyther@handhelds.org> | 3 | Copyright (C) 2004, 2005 Holger Hans Peter Freyther <freyther@handhelds.org> |
4 | Copyright (C) 2004, 2005 Michael 'mickey' Lauer <mickeyl@handhelds.org> | 4 | =. Copyright (C) 2004, 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> |
5 | Copyright (C) 2002, 2003 Robert Griebl <sandman@handhelds.org> | 5 | .=l. Copyright (C) 2002, 2003 Robert Griebl <sandman@handhelds.org> |
6 | |||
7 | |||
8 | =. | ||
9 | .=l. | ||
10 | .>+-= | 6 | .>+-= |
11 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
12 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
13 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
14 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
15 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
16 | ._= =} : or (at your option) any later version. | 12 | ._= =} : |
17 | .%`+i> _;_. | 13 | .%`+i> _;_. |
18 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
19 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
20 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
@@ -32,8 +28,10 @@ | |||
32 | */ | 28 | */ |
33 | 29 | ||
34 | #include "odevice_abstractmobiledevice.h" | 30 | #include "odevice_abstractmobiledevice.h" |
35 | 31 | ||
32 | #include <qpe/qcopenvelope_qws.h> | ||
33 | |||
36 | #include <sys/time.h> | 34 | #include <sys/time.h> |
37 | #include <sys/ioctl.h> | 35 | #include <sys/ioctl.h> |
38 | 36 | ||
39 | #include <time.h> | 37 | #include <time.h> |
@@ -63,9 +61,10 @@ bool OAbstractMobileDevice::suspend() { | |||
63 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 61 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
64 | return false; | 62 | return false; |
65 | 63 | ||
66 | bool res = false; | 64 | bool res = false; |
67 | ODevice::sendSuspendmsg(); | 65 | |
66 | QCopEnvelope( "QPE/System", "aboutToSuspend()" ); | ||
68 | 67 | ||
69 | struct timeval tvs, tvn; | 68 | struct timeval tvs, tvn; |
70 | ::gettimeofday ( &tvs, 0 ); | 69 | ::gettimeofday ( &tvs, 0 ); |
71 | 70 | ||
@@ -83,8 +82,10 @@ bool OAbstractMobileDevice::suspend() { | |||
83 | } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); | 82 | } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); |
84 | } | 83 | } |
85 | 84 | ||
86 | return res; | 85 | return res; |
86 | |||
87 | QCopEnvelope( "QPE/System", "returnFromSuspend()" ); | ||
87 | } | 88 | } |
88 | 89 | ||
89 | //#include <linux/fb.h> better not rely on kernel headers in userspace ... | 90 | //#include <linux/fb.h> better not rely on kernel headers in userspace ... |
90 | 91 | ||