summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index bccb449..5ee9cca 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -31,26 +31,27 @@ _;:, .> :=|. This program is free software; you can
31#define ODEVICE_H_ 31#define ODEVICE_H_
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odevicebutton.h> 34#include <opie2/odevicebutton.h>
35#include <qpe/qpeapplication.h> /* for Transformation enum.. */ 35#include <qpe/qpeapplication.h> /* for Transformation enum.. */
36 36
37/* QT */ 37/* QT */
38#include <qnamespace.h> 38#include <qnamespace.h>
39#include <qobject.h> 39#include <qobject.h>
40#include <qstring.h> 40#include <qstring.h>
41#include <qstrlist.h> 41#include <qstrlist.h>
42 42
43namespace Opie 43namespace Opie{
44{ 44namespace Core{
45
45 class ODeviceData; 46 class ODeviceData;
46/** 47/**
47 * The available devices 48 * The available devices
48 */ 49 */
49enum OModel { 50enum OModel {
50 Model_Unknown, // = 0 51 Model_Unknown, // = 0
51 52
52 Model_Series_Mask = 0xff000000, 53 Model_Series_Mask = 0xff000000,
53 54
54 Model_iPAQ = ( 1 << 24 ), 55 Model_iPAQ = ( 1 << 24 ),
55 56
56 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), 57 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ),
@@ -241,25 +242,25 @@ public:
241 242
242 virtual bool hasHingeSensor() const; 243 virtual bool hasHingeSensor() const;
243 virtual OHingeStatus readHingeSensor(); 244 virtual OHingeStatus readHingeSensor();
244 245
245 const QStrList &allowedCpuFrequencies() const; 246 const QStrList &allowedCpuFrequencies() const;
246 bool setCurrentCpuFrequency(uint index); 247 bool setCurrentCpuFrequency(uint index);
247 248
248 /** 249 /**
249 * Returns the available buttons on this device. The number and location 250 * Returns the available buttons on this device. The number and location
250 * of buttons will vary depending on the device. Button numbers will be assigned 251 * of buttons will vary depending on the device. Button numbers will be assigned
251 * by the device manufacturer and will be from most preferred button to least preffered 252 * by the device manufacturer and will be from most preferred button to least preffered
252 * button. Note that this list only contains "user mappable" buttons. 253 * button. Note that this list only contains "user mappable" buttons.
253 * 254 *
254 * @todo Make method const and take care of calling initButtons or make that const too 255 * @todo Make method const and take care of calling initButtons or make that const too
255 * 256 *
256 */ 257 */
257 const QValueList<ODeviceButton> &buttons(); 258 const QValueList<ODeviceButton> &buttons();
258 259
259 /** 260 /**
260 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it 261 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
261 * returns 0L 262 * returns 0L
262 */ 263 */
263 const ODeviceButton *buttonForKeycode ( ushort keyCode ); 264 const ODeviceButton *buttonForKeycode ( ushort keyCode );
264 265
265 /** 266 /**
@@ -305,28 +306,30 @@ class ODeviceData {
305 306
306 QString m_sysverstr; 307 QString m_sysverstr;
307 308
308 Transformation m_rotation; 309 Transformation m_rotation;
309 ODirection m_direction; 310 ODirection m_direction;
310 311
311 QValueList <ODeviceButton> *m_buttons; 312 QValueList <ODeviceButton> *m_buttons;
312 uint m_holdtime; 313 uint m_holdtime;
313 QStrList *m_cpu_frequencies; 314 QStrList *m_cpu_frequencies;
314}; 315};
315 316
316} 317}
318}
317 319
318static inline bool isQWS() 320static inline bool isQWS()
319{ 321{
320 return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; 322 return qApp ? ( qApp->type() == QApplication::GuiServer ) : false;
321} 323}
322 324
323static QCString makeChannel ( const char *str ) 325static QCString makeChannel ( const char *str )
324{ 326{
325 if ( str && !::strchr ( str, '/' )) 327 if ( str && !::strchr ( str, '/' ))
326 return QCString ( "QPE/Application/" ) + str; 328 return QCString ( "QPE/Application/" ) + str;
327 else 329 else
328 return str; 330 return str;
329} 331}
330 332
333
331#endif 334#endif
332 335