summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
Unidiff
Diffstat (limited to 'libopie/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index be2a9c7..e07b91c 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -1,145 +1,146 @@
1/* This file is part of the OPIE libraries 1/* This file is part of the OPIE libraries
2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) 2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef _LIBOPIE_ODEVICE_H_ 20#ifndef _LIBOPIE_ODEVICE_H_
21#define _LIBOPIE_ODEVICE_H_ 21#define _LIBOPIE_ODEVICE_H_
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qnamespace.h> 24#include <qnamespace.h>
25 25
26class ODeviceData; 26class ODeviceData;
27 27
28namespace Opie { 28namespace Opie {
29 29
30enum OModel { 30enum OModel {
31 Model_Unknown, 31 Model_Unknown,
32 32
33 Model_iPAQ = ( 1 << 16 ), 33 Model_iPAQ = ( 1 << 16 ),
34 34
35 Model_iPAQ_H31xx = ( Model_iPAQ | 1 ), 35 Model_iPAQ_H31xx = ( Model_iPAQ | 1 ),
36 Model_iPAQ_H36xx = ( Model_iPAQ | 2 ), 36 Model_iPAQ_H36xx = ( Model_iPAQ | 2 ),
37 Model_iPAQ_H37xx = ( Model_iPAQ | 3 ), 37 Model_iPAQ_H37xx = ( Model_iPAQ | 3 ),
38 Model_iPAQ_H38xx = ( Model_iPAQ | 4 ), 38 Model_iPAQ_H38xx = ( Model_iPAQ | 4 ),
39 39
40 Model_Zaurus = ( 2 << 16 ), 40 Model_Zaurus = ( 2 << 16 ),
41 41
42 Model_Zaurus_SL5000 = ( Model_Zaurus | 1 ), 42 Model_Zaurus_SL5000 = ( Model_Zaurus | 1 ),
43}; 43};
44 44
45 enum OVendor { 45 enum OVendor {
46 Vendor_Unknown, 46 Vendor_Unknown,
47 47
48 Vendor_HP, 48 Vendor_HP,
49 Vendor_Sharp 49 Vendor_Sharp
50 }; 50 };
51 51
52enum OSystem { 52enum OSystem {
53 System_Unknown, 53 System_Unknown,
54 54
55 System_Familiar, 55 System_Familiar,
56 System_Zaurus, 56 System_Zaurus,
57 System_OpenZaurus 57 System_OpenZaurus
58}; 58};
59 59
60enum OLedState { 60enum OLedState {
61 Led_Off, 61 Led_Off,
62 Led_On, 62 Led_On,
63 Led_BlinkSlow, 63 Led_BlinkSlow,
64 Led_BlinkFast 64 Led_BlinkFast
65}; 65};
66 66
67enum OLed { 67enum OLed {
68 Led_Mail, 68 Led_Mail,
69 Led_Power, 69 Led_Power,
70 Led_BlueTooth 70 Led_BlueTooth
71}; 71};
72 72
73enum OHardKey { 73enum OHardKey {
74 HardKey_Datebook = Qt::Key_F9, 74 HardKey_Datebook = Qt::Key_F9,
75 HardKey_Contacts = Qt::Key_F10, 75 HardKey_Contacts = Qt::Key_F10,
76 HardKey_Menu = Qt::Key_F11, 76 HardKey_Menu = Qt::Key_F11,
77 HardKey_Home = Qt::Key_F12, 77 HardKey_Home = Qt::Key_F12,
78 HardKey_Mail = Qt::Key_F14, 78 HardKey_Mail = Qt::Key_F14,
79 HardKey_Record = Qt::Key_F24, 79 HardKey_Record = Qt::Key_F24,
80 HardKey_Suspend = Qt::Key_F34, 80 HardKey_Suspend = Qt::Key_F34,
81 HardKey_Backlight = Qt::Key_F35, 81 HardKey_Backlight = Qt::Key_F35,
82}; 82};
83 83
84 84
85class ODevice 85class ODevice
86{ 86{
87private: 87private:
88 ODevice ( const ODevice & ); 88 ODevice ( const ODevice & );
89 89
90protected: 90protected:
91 ODevice ( ); 91 ODevice ( );
92 virtual void init ( ); 92 virtual void init ( );
93 93
94 ODeviceData *d; 94 ODeviceData *d;
95 95
96public: 96public:
97 virtual ~ODevice ( ); 97 virtual ~ODevice ( );
98 98
99 static ODevice *inst ( ); 99 static ODevice *inst ( );
100 100
101 101
102 102
103// information 103// information
104 104
105 QString modelString ( ) const; 105 QString modelString ( ) const;
106 OModel model ( ) const; 106 OModel model ( ) const;
107 107
108 QString vendorString ( ) const; 108 QString vendorString ( ) const;
109 OVendor vendor ( ) const; 109 OVendor vendor ( ) const;
110 110
111 QString systemString ( ) const; 111 QString systemString ( ) const;
112 OSystem system ( ) const; 112 OSystem system ( ) const;
113 113
114 QString systemVersionString ( ) const; 114 QString systemVersionString ( ) const;
115 115
116 // system 116 // system
117 117
118 virtual bool setSoftSuspend ( bool on ); 118 virtual bool setSoftSuspend ( bool on );
119 virtual bool suspend ( ); 119 virtual bool suspend ( );
120 120
121 virtual bool setDisplayStatus ( bool on ); 121 virtual bool setDisplayStatus ( bool on );
122 virtual bool setDisplayBrightness ( int brightness ); 122 virtual bool setDisplayBrightness ( int brightness );
123 virtual int displayBrightnessResolution ( ) const; 123 virtual int displayBrightnessResolution ( ) const;
124 124
125// input / output 125// input / output
126 126
127 virtual void alarmSound ( ); 127 virtual void alarmSound ( );
128 virtual void keySound ( ); 128 virtual void keySound ( );
129 virtual void touchSound ( ); 129 virtual void touchSound ( );
130 130
131 virtual QValueList <OLed> ledList ( ) const; 131 virtual QValueList <OLed> ledList ( ) const;
132 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 132 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
133 virtual OLedState ledState ( OLed led ) const; 133 virtual OLedState ledState ( OLed led ) const;
134 virtual bool setLedState ( OLed led, OLedState st ); 134 virtual bool setLedState ( OLed led, OLedState st );
135 135
136 virtual bool hasLightSensor ( ) const; 136 virtual bool hasLightSensor ( ) const;
137 virtual int readLightSensor ( ); 137 virtual int readLightSensor ( );
138 virtual int lightSensorResolution ( ) const;
138 139
139 //virtual QValueList <int> keyList ( ) const; 140 //virtual QValueList <int> keyList ( ) const;
140}; 141};
141 142
142} 143}
143 144
144#endif 145#endif
145 146