summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
Side-by-side diff
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp108
1 files changed, 102 insertions, 6 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 9b2a954..8f954b1 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -55,3 +55,3 @@ class ODeviceData {
public:
- bool m_qwsserver;
+ bool m_qwsserver : 1;
@@ -272,2 +272,5 @@ void ODevice::init ( )
+/**
+ * This method initialises the button mapping
+ */
void ODevice::initButtons ( )
@@ -315,3 +318,13 @@ bool ODevice::setSoftSuspend ( bool /*soft*/ )
-
+/**
+ * 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 ( )
@@ -356,3 +369,5 @@ bool ODevice::suspend ( )
-
+/**
+ * This sets the display on or off
+ */
bool ODevice::setDisplayStatus ( bool on )
@@ -372,4 +387,9 @@ bool ODevice::setDisplayStatus ( bool on )
-bool ODevice::setDisplayBrightness ( int )
+/**
+ * This sets the display brightness
+ * @return success or failure
+ */
+bool ODevice::setDisplayBrightness ( int p)
{
+ Q_UNUSED( p )
return false;
@@ -382,2 +402,6 @@ int ODevice::displayBrightnessResolution ( ) const
+/**
+ * This returns the vendor as string
+ * @return Vendor as QString
+ */
QString ODevice::vendorString ( ) const
@@ -387,2 +411,6 @@ QString ODevice::vendorString ( ) const
+/**
+ * This returns the vendor as one of the values of OVendor
+ * @return OVendor
+ */
OVendor ODevice::vendor ( ) const
@@ -392,2 +420,6 @@ OVendor ODevice::vendor ( ) const
+/**
+ * This returns the model as a string
+ * @return A string representing the model
+ */
QString ODevice::modelString ( ) const
@@ -397,2 +429,5 @@ QString ODevice::modelString ( ) const
+/**
+ * This does return the OModel used
+ */
OModel ODevice::model ( ) const
@@ -402,2 +437,5 @@ OModel ODevice::model ( ) const
+/**
+ * This does return the systen name
+ */
QString ODevice::systemString ( ) const
@@ -407,2 +445,5 @@ QString ODevice::systemString ( ) const
+/**
+ * Return System as OSystem value
+ */
OSystem ODevice::system ( ) const
@@ -412,2 +453,5 @@ OSystem ODevice::system ( ) const
+/**
+ * @return the version string of the base system
+ */
QString ODevice::systemVersionString ( ) const
@@ -417,2 +461,5 @@ QString ODevice::systemVersionString ( ) const
+/**
+ * @return the current Transformation
+ */
Transformation ODevice::rotation ( ) const
@@ -422,2 +469,5 @@ Transformation ODevice::rotation ( ) const
+/**
+ * This plays an alarmSound
+ */
void ODevice::alarmSound ( )
@@ -432,2 +482,5 @@ void ODevice::alarmSound ( )
+/**
+ * This plays a key sound
+ */
void ODevice::keySound ( )
@@ -442,2 +495,5 @@ void ODevice::keySound ( )
+/**
+ * This plays a touch sound
+ */
void ODevice::touchSound ( )
@@ -453,3 +509,7 @@ void ODevice::touchSound ( )
-
+/**
+ * This method will return a list of leds
+ * available on this device
+ * @return a list of LEDs.
+ */
QValueList <OLed> ODevice::ledList ( ) const
@@ -459,2 +519,5 @@ QValueList <OLed> ODevice::ledList ( ) const
+/**
+ * This does return the state of the LEDs
+ */
QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
@@ -464,2 +527,5 @@ QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
+/**
+ * @return the state for a given OLed
+ */
OLedState ODevice::ledState ( OLed /*which*/ ) const
@@ -469,4 +535,12 @@ OLedState ODevice::ledState ( OLed /*which*/ ) const
-bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ )
+/**
+ * Set the state for a LED
+ * @param which Which OLed to use
+ * @param st The state to set
+ * @return success or failure
+ */
+bool ODevice::setLedState ( OLed which, OLedState st )
{
+ Q_UNUSED( which )
+ Q_UNUSED( st )
return false;
@@ -474,2 +548,5 @@ bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ )
+/**
+ * @return if the device has a light sensor
+ */
bool ODevice::hasLightSensor ( ) const
@@ -479,2 +556,5 @@ bool ODevice::hasLightSensor ( ) const
+/**
+ * @return a value from the light senso
+ */
int ODevice::readLightSensor ( )
@@ -484,2 +564,5 @@ int ODevice::readLightSensor ( )
+/**
+ * @return the light sensor resolution whatever that is ;)
+ */
int ODevice::lightSensorResolution ( ) const
@@ -489,2 +572,5 @@ int ODevice::lightSensorResolution ( ) const
+/**
+ * @return a list of hardware buttons
+ */
const QValueList <ODeviceButton> &ODevice::buttons ( )
@@ -496,2 +582,5 @@ const QValueList <ODeviceButton> &ODevice::buttons ( )
+/**
+ * @return The amount of time that would count as a hold
+ */
uint ODevice::buttonHoldTime ( ) const
@@ -501,2 +590,9 @@ uint ODevice::buttonHoldTime ( ) const
+/**
+ * This method return a ODeviceButton for a key code
+ * or 0 if no special hardware button is available for the device
+ *
+ * @return The devicebutton or 0l
+ * @see ODeviceButton
+ */
const ODeviceButton *ODevice::buttonForKeycode ( ushort code )