summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
Unidiff
Diffstat (limited to 'libopie/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 38f3787..be2a9c7 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -1,138 +1,145 @@
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_H31xx, 33 Model_iPAQ = ( 1 << 16 ),
34 Model_iPAQ_H36xx,
35 Model_iPAQ_H37xx,
36 Model_iPAQ_H38xx,
37 34
38 Model_Zaurus_SL5000 35 Model_iPAQ_H31xx = ( Model_iPAQ | 1 ),
36 Model_iPAQ_H36xx = ( Model_iPAQ | 2 ),
37 Model_iPAQ_H37xx = ( Model_iPAQ | 3 ),
38 Model_iPAQ_H38xx = ( Model_iPAQ | 4 ),
39
40 Model_Zaurus = ( 2 << 16 ),
41
42 Model_Zaurus_SL5000 = ( Model_Zaurus | 1 ),
39}; 43};
40 44
41 enum OVendor { 45 enum OVendor {
42 Vendor_Unknown, 46 Vendor_Unknown,
43 47
44 Vendor_HP, 48 Vendor_HP,
45 Vendor_Sharp 49 Vendor_Sharp
46 }; 50 };
47 51
48enum OSystem { 52enum OSystem {
49 System_Unknown, 53 System_Unknown,
50 54
51 System_Familiar, 55 System_Familiar,
52 System_Zaurus, 56 System_Zaurus,
53 System_OpenZaurus 57 System_OpenZaurus
54}; 58};
55 59
56enum OLedState { 60enum OLedState {
57 Led_Off, 61 Led_Off,
58 Led_On, 62 Led_On,
59 Led_BlinkSlow, 63 Led_BlinkSlow,
60 Led_BlinkFast 64 Led_BlinkFast
61}; 65};
62 66
63enum OLed { 67enum OLed {
64 Led_Mail, 68 Led_Mail,
65 Led_Power, 69 Led_Power,
66 Led_BlueTooth 70 Led_BlueTooth
67}; 71};
68 72
69enum OHardKey { 73enum OHardKey {
70 HardKey_Datebook = Qt::Key_F9, 74 HardKey_Datebook = Qt::Key_F9,
71 HardKey_Contacts = Qt::Key_F10, 75 HardKey_Contacts = Qt::Key_F10,
72 HardKey_Menu = Qt::Key_F11, 76 HardKey_Menu = Qt::Key_F11,
73 HardKey_Home = Qt::Key_F12, 77 HardKey_Home = Qt::Key_F12,
74 HardKey_Mail = Qt::Key_F14, 78 HardKey_Mail = Qt::Key_F14,
75 HardKey_Record = Qt::Key_F24, 79 HardKey_Record = Qt::Key_F24,
76 HardKey_Suspend = Qt::Key_F34, 80 HardKey_Suspend = Qt::Key_F34,
77 HardKey_Backlight = Qt::Key_F35, 81 HardKey_Backlight = Qt::Key_F35,
78}; 82};
79 83
80 84
81class ODevice 85class ODevice
82{ 86{
83private: 87private:
84 ODevice ( const ODevice & ); 88 ODevice ( const ODevice & );
85 89
86protected: 90protected:
87 ODevice ( ); 91 ODevice ( );
88 virtual void init ( ); 92 virtual void init ( );
89 93
90 ODeviceData *d; 94 ODeviceData *d;
91 95
92public: 96public:
93 virtual ~ODevice ( ); 97 virtual ~ODevice ( );
94 98
95 static ODevice *inst ( ); 99 static ODevice *inst ( );
96 100
97 101
98 102
99// information 103// information
100 104
101 QString modelString ( ) const; 105 QString modelString ( ) const;
102 OModel model ( ) const; 106 OModel model ( ) const;
103 107
104 QString vendorString ( ) const; 108 QString vendorString ( ) const;
105 OVendor vendor ( ) const; 109 OVendor vendor ( ) const;
106 110
107 QString systemString ( ) const; 111 QString systemString ( ) const;
108 OSystem system ( ) const; 112 OSystem system ( ) const;
109 113
110 QString systemVersionString ( ) const; 114 QString systemVersionString ( ) const;
111 115
112 // system 116 // system
113 117
114 virtual bool setSoftSuspend ( bool on ); 118 virtual bool setSoftSuspend ( bool on );
115 virtual bool suspend ( ); 119 virtual bool suspend ( );
116 120
117 virtual bool setDisplayStatus ( bool on ); 121 virtual bool setDisplayStatus ( bool on );
118 virtual bool setDisplayBrightness ( int brightness ); 122 virtual bool setDisplayBrightness ( int brightness );
119 virtual int displayBrightnessResolution ( ) const; 123 virtual int displayBrightnessResolution ( ) const;
120 124
121// input / output 125// input / output
122 126
123 virtual void alarmSound ( ); 127 virtual void alarmSound ( );
124 virtual void keySound ( ); 128 virtual void keySound ( );
125 virtual void touchSound ( ); 129 virtual void touchSound ( );
126 130
127 virtual QValueList <OLed> ledList ( ) const; 131 virtual QValueList <OLed> ledList ( ) const;
128 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 132 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
129 virtual OLedState ledState ( OLed led ) const; 133 virtual OLedState ledState ( OLed led ) const;
130 virtual bool setLedState ( OLed led, OLedState st ); 134 virtual bool setLedState ( OLed led, OLedState st );
131 135
136 virtual bool hasLightSensor ( ) const;
137 virtual int readLightSensor ( );
138
132 //virtual QValueList <int> keyList ( ) const; 139 //virtual QValueList <int> keyList ( ) const;
133}; 140};
134 141
135} 142}
136 143
137#endif 144#endif
138 145