summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
Unidiff
Diffstat (limited to 'libopie/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 0c55ea0..dcdd4a8 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -1,164 +1,173 @@
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 <qobject.h> 23#include <qobject.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qnamespace.h> 25#include <qnamespace.h>
26 26
27#include <opie/odevicebutton.h> 27#include <opie/odevicebutton.h>
28 28
29#include <qpe/qpeapplication.h> /* for Transformation enum.. */ 29#include <qpe/qpeapplication.h> /* for Transformation enum.. */
30 30
31class ODeviceData; 31class ODeviceData;
32 32
33namespace Opie { 33namespace Opie {
34 34
35/** 35/**
36 * The available devices 36 * The available devices
37 */ 37 */
38enum OModel { 38enum OModel {
39 Model_Unknown, // = 0 39 Model_Unknown, // = 0
40 40
41 Model_Series_Mask = 0xff000000, 41 Model_Series_Mask = 0xff000000,
42 42
43 Model_iPAQ = ( 1 << 24 ), 43 Model_iPAQ = ( 1 << 24 ),
44 44
45 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), 45 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ),
46 Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), 46 Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ),
47 Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), 47 Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ),
48 Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), 48 Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ),
49 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), 49 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ),
50 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), 50 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ),
51 51
52 Model_Zaurus = ( 2 << 24 ), 52 Model_Zaurus = ( 2 << 24 ),
53 53
54 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), 54 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ),
55 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), 55 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ),
56 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), 56 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ),
57 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), 57 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ),
58 Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), 58 Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ),
59
60 Model_SIMpad = ( 3 << 24 ),
61
62 Model_SIMpad_All = ( Model_SIMpad | 0xffffff ),
63 Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ),
64 Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ),
65 Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ),
66 Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ),
59}; 67};
60 68
61/** 69/**
62 * The vendor of the device 70 * The vendor of the device
63 */ 71 */
64enum OVendor { 72enum OVendor {
65 Vendor_Unknown, 73 Vendor_Unknown,
66 74
67 Vendor_HP, 75 Vendor_HP,
68 Vendor_Sharp 76 Vendor_Sharp,
77 Vendor_SIEMENS,
69}; 78};
70 79
71/** 80/**
72 * The System used 81 * The System used
73 */ 82 */
74enum OSystem { 83enum OSystem {
75 System_Unknown, 84 System_Unknown,
76 85
77 System_Familiar, 86 System_Familiar,
78 System_Zaurus, 87 System_Zaurus,
79 System_OpenZaurus 88 System_OpenZaurus
80}; 89};
81 90
82enum OLedState { 91enum OLedState {
83 Led_Off, 92 Led_Off,
84 Led_On, 93 Led_On,
85 Led_BlinkSlow, 94 Led_BlinkSlow,
86 Led_BlinkFast 95 Led_BlinkFast
87}; 96};
88 97
89enum OLed { 98enum OLed {
90 Led_Mail, 99 Led_Mail,
91 Led_Power, 100 Led_Power,
92 Led_BlueTooth 101 Led_BlueTooth
93}; 102};
94 103
95enum OHardKey { 104enum OHardKey {
96 HardKey_Datebook = Qt::Key_F9, 105 HardKey_Datebook = Qt::Key_F9,
97 HardKey_Contacts = Qt::Key_F10, 106 HardKey_Contacts = Qt::Key_F10,
98 HardKey_Menu = Qt::Key_F11, 107 HardKey_Menu = Qt::Key_F11,
99 HardKey_Home = Qt::Key_F12, 108 HardKey_Home = Qt::Key_F12,
100 HardKey_Mail = Qt::Key_F13, 109 HardKey_Mail = Qt::Key_F13,
101 HardKey_Record = Qt::Key_F24, 110 HardKey_Record = Qt::Key_F24,
102 HardKey_Suspend = Qt::Key_F34, 111 HardKey_Suspend = Qt::Key_F34,
103 HardKey_Backlight = Qt::Key_F35, 112 HardKey_Backlight = Qt::Key_F35,
104}; 113};
105 114
106enum ODirection { 115enum ODirection {
107 CW = 0, 116 CW = 0,
108 CCW = 1, 117 CCW = 1,
109 Flip = 2, 118 Flip = 2,
110}; 119};
111 120
112/** 121/**
113 * A singleton which gives informations about device specefic option 122 * A singleton which gives informations about device specefic option
114 * like the Hardware used, LEDs, the Base Distribution and 123 * like the Hardware used, LEDs, the Base Distribution and
115 * hardware key mappings. 124 * hardware key mappings.
116 * 125 *
117 * 126 *
118 * @short A small class for device specefic options 127 * @short A small class for device specefic options
119 * @see QObject 128 * @see QObject
120 * @author Robert Griebl 129 * @author Robert Griebl
121 * @version 1.0 130 * @version 1.0
122 */ 131 */
123class ODevice : public QObject { 132class ODevice : public QObject {
124 Q_OBJECT 133 Q_OBJECT
125 134
126private: 135private:
127 /* disable copy */ 136 /* disable copy */
128 ODevice ( const ODevice & ); 137 ODevice ( const ODevice & );
129 138
130protected: 139protected:
131 ODevice ( ); 140 ODevice ( );
132 virtual void init ( ); 141 virtual void init ( );
133 virtual void initButtons ( ); 142 virtual void initButtons ( );
134 143
135 ODeviceData *d; 144 ODeviceData *d;
136 145
137public: 146public:
138 // sandman do we want to allow destructions? -zecke? 147 // sandman do we want to allow destructions? -zecke?
139 virtual ~ODevice ( ); 148 virtual ~ODevice ( );
140 149
141 150
142 static ODevice *inst ( ); 151 static ODevice *inst ( );
143 152
144// information 153// information
145 154
146 QString modelString ( ) const; 155 QString modelString ( ) const;
147 OModel model ( ) const; 156 OModel model ( ) const;
148 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 157 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
149 158
150 QString vendorString ( ) const; 159 QString vendorString ( ) const;
151 OVendor vendor ( ) const; 160 OVendor vendor ( ) const;
152 161
153 QString systemString ( ) const; 162 QString systemString ( ) const;
154 OSystem system ( ) const; 163 OSystem system ( ) const;
155 164
156 QString systemVersionString ( ) const; 165 QString systemVersionString ( ) const;
157 166
158 Transformation rotation ( ) const; 167 Transformation rotation ( ) const;
159 ODirection direction ( ) const; 168 ODirection direction ( ) const;
160 169
161// system 170// system
162 171
163 virtual bool setSoftSuspend ( bool on ); 172 virtual bool setSoftSuspend ( bool on );
164 virtual bool suspend ( ); 173 virtual bool suspend ( );