-rw-r--r-- | libopie/odevice.h | 63 |
1 files changed, 43 insertions, 20 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index ff578d8..45a790b 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -2,3 +2,3 @@ | |||
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 |
@@ -7,3 +7,3 @@ | |||
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, |
@@ -12,3 +12,3 @@ | |||
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 |
@@ -34,5 +34,8 @@ namespace Opie { | |||
34 | 34 | ||
35 | /** | ||
36 | * The available devices | ||
37 | */ | ||
35 | enum OModel { | 38 | enum OModel { |
36 | Model_Unknown, | 39 | Model_Unknown, // = 0 |
37 | 40 | ||
38 | Model_Series_Mask = 0xff000000, | 41 | Model_Series_Mask = 0xff000000, |
@@ -57,3 +60,6 @@ enum OModel { | |||
57 | 60 | ||
58 | enum OVendor { | 61 | /** |
62 | * The vendor of the device | ||
63 | */ | ||
64 | enum OVendor { | ||
59 | Vendor_Unknown, | 65 | Vendor_Unknown, |
@@ -62,4 +68,7 @@ enum OVendor { | |||
62 | Vendor_Sharp | 68 | Vendor_Sharp |
63 | }; | 69 | }; |
64 | 70 | ||
71 | /** | ||
72 | * The System used | ||
73 | */ | ||
65 | enum OSystem { | 74 | enum OSystem { |
@@ -96,6 +105,18 @@ enum OHardKey { | |||
96 | 105 | ||
106 | /** | ||
107 | * A singleton which gives informations about device specefic option | ||
108 | * like the Hardware used, LEDs, the Base Distribution and | ||
109 | * hardware key mappings. | ||
110 | * | ||
111 | * | ||
112 | * @short A small class for device specefic options | ||
113 | * @see QObject | ||
114 | * @author Robert Griebl | ||
115 | * @version 1.0 | ||
116 | */ | ||
97 | class ODevice : public QObject { | 117 | class ODevice : public QObject { |
98 | Q_OBJECT | 118 | Q_OBJECT |
99 | 119 | ||
100 | private: | 120 | private: |
121 | /* disable copy */ | ||
101 | ODevice ( const ODevice & ); | 122 | ODevice ( const ODevice & ); |
@@ -106,3 +127,3 @@ protected: | |||
106 | virtual void initButtons ( ); | 127 | virtual void initButtons ( ); |
107 | 128 | ||
108 | ODeviceData *d; | 129 | ODeviceData *d; |
@@ -110,4 +131,6 @@ protected: | |||
110 | public: | 131 | public: |
132 | // sandman do we want to allow destructions? -zecke? | ||
111 | virtual ~ODevice ( ); | 133 | virtual ~ODevice ( ); |
112 | 134 | ||
135 | |||
113 | static ODevice *inst ( ); | 136 | static ODevice *inst ( ); |
@@ -116,6 +139,6 @@ public: | |||
116 | 139 | ||
117 | QString modelString ( ) const; | 140 | QString modelString ( ) const; |
118 | OModel model ( ) const; | 141 | OModel model ( ) const; |
119 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | 142 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } |
120 | 143 | ||
121 | QString vendorString ( ) const; | 144 | QString vendorString ( ) const; |
@@ -130,3 +153,3 @@ public: | |||
130 | 153 | ||
131 | // system | 154 | // system |
132 | 155 | ||
@@ -138,5 +161,5 @@ public: | |||
138 | virtual int displayBrightnessResolution ( ) const; | 161 | virtual int displayBrightnessResolution ( ) const; |
139 | |||
140 | // input / output | ||
141 | 162 | ||
163 | // input / output | ||
164 | //FIXME playAlarmSound and al might be better -zecke | ||
142 | virtual void alarmSound ( ); | 165 | virtual void alarmSound ( ); |
@@ -161,3 +184,3 @@ public: | |||
161 | const QValueList<ODeviceButton> &buttons ( ); | 184 | const QValueList<ODeviceButton> &buttons ( ); |
162 | 185 | ||
163 | /** | 186 | /** |
@@ -177,3 +200,3 @@ public: | |||
177 | * default pass an empty string as \a qcopMessage. | 200 | * default pass an empty string as \a qcopMessage. |
178 | */ | 201 | */ |
179 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); | 202 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); |
@@ -185,8 +208,8 @@ public: | |||
185 | 208 | ||
186 | signals: | 209 | signals: |
187 | void buttonMappingChanged ( ); | 210 | void buttonMappingChanged ( ); |
188 | 211 | ||
189 | private slots: | 212 | private slots: |
190 | void systemMessage ( const QCString &, const QByteArray & ); | 213 | void systemMessage ( const QCString &, const QByteArray & ); |
191 | 214 | ||
192 | protected: | 215 | protected: |