author | ocheong <ocheong> | 2003-10-09 10:39:30 (UTC) |
---|---|---|
committer | ocheong <ocheong> | 2003-10-09 10:39:30 (UTC) |
commit | c37ffc2854d1c968eb28d4ae185b5c64877c6e9d (patch) (unidiff) | |
tree | a8754364ee281b1decff519bf723723b5057ee2f | |
parent | 67f75e91f3fa7f21df2e19749a6ad53e9d237f8b (diff) | |
download | opie-c37ffc2854d1c968eb28d4ae185b5c64877c6e9d.zip opie-c37ffc2854d1c968eb28d4ae185b5c64877c6e9d.tar.gz opie-c37ffc2854d1c968eb28d4ae185b5c64877c6e9d.tar.bz2 |
Added definitions for Yopy model, vendor, and hardkeys.
-rw-r--r-- | libopie/odevice.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index d8ad135..2a5e494 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -10,175 +10,188 @@ | |||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef _LIBOPIE_ODEVICE_H_ | 21 | #ifndef _LIBOPIE_ODEVICE_H_ |
22 | #define _LIBOPIE_ODEVICE_H_ | 22 | #define _LIBOPIE_ODEVICE_H_ |
23 | 23 | ||
24 | #include <qobject.h> | 24 | #include <qobject.h> |
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | #include <qnamespace.h> | 26 | #include <qnamespace.h> |
27 | #include <qstrlist.h> | 27 | #include <qstrlist.h> |
28 | 28 | ||
29 | #include <opie/odevicebutton.h> | 29 | #include <opie/odevicebutton.h> |
30 | 30 | ||
31 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ | 31 | #include <qpe/qpeapplication.h> /* for Transformation enum.. */ |
32 | 32 | ||
33 | class ODeviceData; | 33 | class ODeviceData; |
34 | 34 | ||
35 | namespace Opie { | 35 | namespace Opie { |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * The available devices | 38 | * The available devices |
39 | */ | 39 | */ |
40 | enum OModel { | 40 | enum OModel { |
41 | Model_Unknown, // = 0 | 41 | Model_Unknown, // = 0 |
42 | 42 | ||
43 | Model_Series_Mask = 0xff000000, | 43 | Model_Series_Mask = 0xff000000, |
44 | 44 | ||
45 | Model_iPAQ = ( 1 << 24 ), | 45 | Model_iPAQ = ( 1 << 24 ), |
46 | 46 | ||
47 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), | 47 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), |
48 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), | 48 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), |
49 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), | 49 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), |
50 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), | 50 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), |
51 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), | 51 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), |
52 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), | 52 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), |
53 | 53 | ||
54 | Model_Zaurus = ( 2 << 24 ), | 54 | Model_Zaurus = ( 2 << 24 ), |
55 | 55 | ||
56 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), | 56 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), |
57 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), | 57 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), |
58 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), | 58 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), |
59 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), | 59 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), |
60 | Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), | 60 | Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), |
61 | 61 | ||
62 | Model_SIMpad = ( 3 << 24 ), | 62 | Model_SIMpad = ( 3 << 24 ), |
63 | 63 | ||
64 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), | 64 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), |
65 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), | 65 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), |
66 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ), | 66 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ), |
67 | Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ), | 67 | Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ), |
68 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ), | 68 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ), |
69 | 69 | ||
70 | Model_Ramses = ( 4 << 24 ), | 70 | Model_Ramses = ( 4 << 24 ), |
71 | 71 | ||
72 | Model_Ramses_All = ( Model_Ramses | 0xffffff ), | 72 | Model_Ramses_All = ( Model_Ramses | 0xffffff ), |
73 | Model_Ramses_MNCI = ( Model_Ramses | 0x000001 ), | 73 | Model_Ramses_MNCI = ( Model_Ramses | 0x000001 ), |
74 | |||
75 | Model_Yopy = ( 5 << 24 ), | ||
76 | |||
77 | Model_Yopy_All = ( Model_Yopy | 0xffffff ), | ||
78 | Model_Yopy_3000 = ( Model_Yopy | 0x000001 ), | ||
79 | Model_Yopy_3500 = ( Model_Yopy | 0x000002 ), | ||
80 | Model_Yopy_3700 = ( Model_Yopy | 0x000003 ), | ||
81 | |||
74 | }; | 82 | }; |
75 | 83 | ||
76 | /** | 84 | /** |
77 | * The vendor of the device | 85 | * The vendor of the device |
78 | */ | 86 | */ |
79 | enum OVendor { | 87 | enum OVendor { |
80 | Vendor_Unknown, | 88 | Vendor_Unknown, |
81 | 89 | ||
82 | Vendor_HP, | 90 | Vendor_HP, |
83 | Vendor_Sharp, | 91 | Vendor_Sharp, |
84 | Vendor_SIEMENS, | 92 | Vendor_SIEMENS, |
85 | Vendor_MundN, | 93 | Vendor_MundN, |
94 | Vendor_GMate, | ||
86 | }; | 95 | }; |
87 | 96 | ||
88 | /** | 97 | /** |
89 | * The System used | 98 | * The System used |
90 | */ | 99 | */ |
91 | enum OSystem { | 100 | enum OSystem { |
92 | System_Unknown, | 101 | System_Unknown, |
93 | 102 | ||
94 | System_Familiar, | 103 | System_Familiar, |
95 | System_Zaurus, | 104 | System_Zaurus, |
96 | System_OpenZaurus | 105 | System_OpenZaurus, |
106 | System_Linupy, | ||
97 | }; | 107 | }; |
98 | 108 | ||
99 | enum OLedState { | 109 | enum OLedState { |
100 | Led_Off, | 110 | Led_Off, |
101 | Led_On, | 111 | Led_On, |
102 | Led_BlinkSlow, | 112 | Led_BlinkSlow, |
103 | Led_BlinkFast | 113 | Led_BlinkFast |
104 | }; | 114 | }; |
105 | 115 | ||
106 | enum OLed { | 116 | enum OLed { |
107 | Led_Mail, | 117 | Led_Mail, |
108 | Led_Power, | 118 | Led_Power, |
109 | Led_BlueTooth | 119 | Led_BlueTooth |
110 | }; | 120 | }; |
111 | 121 | ||
112 | enum OHardKey { | 122 | enum OHardKey { |
113 | HardKey_Datebook = Qt::Key_F9, | 123 | HardKey_Datebook = Qt::Key_F9, |
114 | HardKey_Contacts = Qt::Key_F10, | 124 | HardKey_Contacts = Qt::Key_F10, |
115 | HardKey_Menu = Qt::Key_F11, | 125 | HardKey_Menu = Qt::Key_F11, |
116 | HardKey_Home = Qt::Key_F12, | 126 | HardKey_Home = Qt::Key_F12, |
117 | HardKey_Mail = Qt::Key_F13, | 127 | HardKey_Mail = Qt::Key_F13, |
118 | HardKey_Record = Qt::Key_F24, | 128 | HardKey_Record = Qt::Key_F24, |
119 | HardKey_Suspend = Qt::Key_F34, | 129 | HardKey_Suspend = Qt::Key_F34, |
120 | HardKey_Backlight = Qt::Key_F35, | 130 | HardKey_Backlight = Qt::Key_F35, |
131 | HardKey_Action = Qt::Key_F10, | ||
132 | HardKey_OK = Qt::Key_F11, | ||
133 | HardKey_End = Qt::Key_F12, | ||
121 | }; | 134 | }; |
122 | 135 | ||
123 | enum ODirection { | 136 | enum ODirection { |
124 | CW = 0, | 137 | CW = 0, |
125 | CCW = 1, | 138 | CCW = 1, |
126 | Flip = 2, | 139 | Flip = 2, |
127 | }; | 140 | }; |
128 | 141 | ||
129 | /** | 142 | /** |
130 | * A singleton which gives informations about device specefic option | 143 | * A singleton which gives informations about device specefic option |
131 | * like the Hardware used, LEDs, the Base Distribution and | 144 | * like the Hardware used, LEDs, the Base Distribution and |
132 | * hardware key mappings. | 145 | * hardware key mappings. |
133 | * | 146 | * |
134 | * @short A small class for device specefic options | 147 | * @short A small class for device specefic options |
135 | * @see QObject | 148 | * @see QObject |
136 | * @author Robert Griebl | 149 | * @author Robert Griebl |
137 | * @version 1.0 | 150 | * @version 1.0 |
138 | */ | 151 | */ |
139 | class ODevice : public QObject { | 152 | class ODevice : public QObject { |
140 | Q_OBJECT | 153 | Q_OBJECT |
141 | 154 | ||
142 | private: | 155 | private: |
143 | /* disable copy */ | 156 | /* disable copy */ |
144 | ODevice ( const ODevice & ); | 157 | ODevice ( const ODevice & ); |
145 | 158 | ||
146 | protected: | 159 | protected: |
147 | ODevice ( ); | 160 | ODevice ( ); |
148 | virtual void init ( ); | 161 | virtual void init ( ); |
149 | virtual void initButtons ( ); | 162 | virtual void initButtons ( ); |
150 | 163 | ||
151 | ODeviceData *d; | 164 | ODeviceData *d; |
152 | 165 | ||
153 | public: | 166 | public: |
154 | // sandman do we want to allow destructions? -zecke? | 167 | // sandman do we want to allow destructions? -zecke? |
155 | virtual ~ODevice ( ); | 168 | virtual ~ODevice ( ); |
156 | 169 | ||
157 | static ODevice *inst ( ); | 170 | static ODevice *inst ( ); |
158 | 171 | ||
159 | // information | 172 | // information |
160 | 173 | ||
161 | QString modelString ( ) const; | 174 | QString modelString ( ) const; |
162 | OModel model ( ) const; | 175 | OModel model ( ) const; |
163 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | 176 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } |
164 | 177 | ||
165 | QString vendorString ( ) const; | 178 | QString vendorString ( ) const; |
166 | OVendor vendor ( ) const; | 179 | OVendor vendor ( ) const; |
167 | 180 | ||
168 | QString systemString ( ) const; | 181 | QString systemString ( ) const; |
169 | OSystem system ( ) const; | 182 | OSystem system ( ) const; |
170 | 183 | ||
171 | QString systemVersionString ( ) const; | 184 | QString systemVersionString ( ) const; |
172 | 185 | ||
173 | Transformation rotation ( ) const; | 186 | Transformation rotation ( ) const; |
174 | ODirection direction ( ) const; | 187 | ODirection direction ( ) const; |
175 | 188 | ||
176 | // system | 189 | // system |
177 | 190 | ||
178 | virtual bool setSoftSuspend ( bool on ); | 191 | virtual bool setSoftSuspend ( bool on ); |
179 | virtual bool suspend ( ); | 192 | virtual bool suspend ( ); |
180 | 193 | ||
181 | virtual bool setDisplayStatus ( bool on ); | 194 | virtual bool setDisplayStatus ( bool on ); |
182 | virtual bool setDisplayBrightness ( int brightness ); | 195 | virtual bool setDisplayBrightness ( int brightness ); |
183 | virtual int displayBrightnessResolution ( ) const; | 196 | virtual int displayBrightnessResolution ( ) const; |
184 | virtual bool setDisplayContrast ( int contrast ); | 197 | virtual bool setDisplayContrast ( int contrast ); |