summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice.cpp
authormickeyl <mickeyl>2005-01-23 21:35:29 (UTC)
committer mickeyl <mickeyl>2005-01-23 21:35:29 (UTC)
commitdd410f1eb69e68f04cf26b6d3e6bca88f0987f71 (patch) (side-by-side diff)
tree0f2b59bae4c326011783e9cdea0754e180ae0e27 /libopie2/opiecore/device/odevice.cpp
parent78e658cecc7521cf3932f5eb44d3f551d73f3181 (diff)
downloadopie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.zip
opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.tar.gz
opie-dd410f1eb69e68f04cf26b6d3e6bca88f0987f71.tar.bz2
remove setSoftSuspend() from ODevice. this is a left-over from the old days
Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index a824392..3d69614 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -233,53 +233,48 @@ void ODevice::initButtons()
qDebug ( "init Buttons" );
d->m_buttons = new QValueList <ODeviceButton>;
for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) {
default_button *db = default_buttons + i;
ODeviceButton b;
b. setKeycode ( db->code );
b. setUserText ( QObject::tr ( "Button", db->utext ));
b. setPixmap ( Resource::loadPixmap ( db->pix ));
b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction ));
b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction ));
d->m_buttons->append ( b );
}
reloadButtonMapping();
}
ODevice::~ODevice()
{
// we leak m_devicebuttons and m_cpu_frequency
// but it's a singleton and it is not so importantant
// -zecke
delete d;
}
-bool ODevice::setSoftSuspend ( bool /*soft*/ )
-{
- return false;
-}
-
//#include <linux/apm_bios.h>
#define APM_IOC_SUSPEND OD_IO( 'A', 2 )
/**
* This method will try to suspend the device
* It only works if the user is the QWS Server and the apm application
* is installed.
* It tries to suspend and then waits some time cause some distributions
* do have asynchronus apm implementations.
* This method will either fail and return false or it'll suspend the
* device and return once the device got woken up
*
* @return if the device got suspended
*/
bool ODevice::suspend()
{
if ( !isQWS( ) ) // only qwsserver is allowed to suspend
return false;
if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices
return false;
bool res = false;