Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index bbc32fa..96a41fc 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -210,98 +210,96 @@ struct default_button { | |||
210 | * like the Hardware used, LEDs, the Base Distribution and | 210 | * like the Hardware used, LEDs, the Base Distribution and |
211 | * hardware key mappings. | 211 | * hardware key mappings. |
212 | * | 212 | * |
213 | * @short A small class for device specefic options | 213 | * @short A small class for device specefic options |
214 | * @see QObject | 214 | * @see QObject |
215 | * @author Robert Griebl | 215 | * @author Robert Griebl |
216 | * @version 1.0 | 216 | * @version 1.0 |
217 | */ | 217 | */ |
218 | class ODevice : public QObject | 218 | class ODevice : public QObject |
219 | { | 219 | { |
220 | Q_OBJECT | 220 | Q_OBJECT |
221 | 221 | ||
222 | private: | 222 | private: |
223 | /* disable copy */ | 223 | /* disable copy */ |
224 | ODevice ( const ODevice & ); | 224 | ODevice ( const ODevice & ); |
225 | 225 | ||
226 | protected: | 226 | protected: |
227 | ODevice(); | 227 | ODevice(); |
228 | virtual void init(const QString&); | 228 | virtual void init(const QString&); |
229 | virtual void initButtons(); | 229 | virtual void initButtons(); |
230 | static void sendSuspendmsg(); | 230 | static void sendSuspendmsg(); |
231 | 231 | ||
232 | ODeviceData *d; | 232 | ODeviceData *d; |
233 | 233 | ||
234 | public: | 234 | public: |
235 | // sandman do we want to allow destructions? -zecke? | 235 | // sandman do we want to allow destructions? -zecke? |
236 | virtual ~ODevice(); | 236 | virtual ~ODevice(); |
237 | 237 | ||
238 | static ODevice *inst(); | 238 | static ODevice *inst(); |
239 | 239 | ||
240 | // information | 240 | // information |
241 | 241 | ||
242 | QString modelString() const; | 242 | QString modelString() const; |
243 | OModel model() const; | 243 | OModel model() const; |
244 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } | 244 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } |
245 | 245 | ||
246 | QString vendorString() const; | 246 | QString vendorString() const; |
247 | OVendor vendor() const; | 247 | OVendor vendor() const; |
248 | 248 | ||
249 | QString systemString() const; | 249 | QString systemString() const; |
250 | OSystem system() const; | 250 | OSystem system() const; |
251 | 251 | ||
252 | QString systemVersionString() const; | 252 | QString systemVersionString() const; |
253 | 253 | ||
254 | virtual Transformation rotation() const; | 254 | virtual Transformation rotation() const; |
255 | virtual ODirection direction() const; | 255 | virtual ODirection direction() const; |
256 | 256 | ||
257 | // system | 257 | // system |
258 | |||
259 | virtual bool setSoftSuspend ( bool on ); | ||
260 | virtual bool suspend(); | 258 | virtual bool suspend(); |
261 | 259 | ||
262 | virtual bool setDisplayStatus ( bool on ); | 260 | virtual bool setDisplayStatus ( bool on ); |
263 | virtual bool setDisplayBrightness ( int brightness ); | 261 | virtual bool setDisplayBrightness ( int brightness ); |
264 | virtual int displayBrightnessResolution() const; | 262 | virtual int displayBrightnessResolution() const; |
265 | virtual bool setDisplayContrast ( int contrast ); | 263 | virtual bool setDisplayContrast ( int contrast ); |
266 | virtual int displayContrastResolution() const; | 264 | virtual int displayContrastResolution() const; |
267 | 265 | ||
268 | // don't add new virtual methods, use this: | 266 | // don't add new virtual methods, use this: |
269 | // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; | 267 | // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; |
270 | // and in your subclass do overwrite | 268 | // and in your subclass do overwrite |
271 | // protected virtual int virtual_hook(int, void *) | 269 | // protected virtual int virtual_hook(int, void *) |
272 | // which is defined below | 270 | // which is defined below |
273 | 271 | ||
274 | // input / output | 272 | // input / output |
275 | virtual void playAlarmSound(); | 273 | virtual void playAlarmSound(); |
276 | virtual void playKeySound(); | 274 | virtual void playKeySound(); |
277 | virtual void playTouchSound(); | 275 | virtual void playTouchSound(); |
278 | 276 | ||
279 | virtual QValueList <OLed> ledList() const; | 277 | virtual QValueList <OLed> ledList() const; |
280 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 278 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
281 | virtual OLedState ledState ( OLed led ) const; | 279 | virtual OLedState ledState ( OLed led ) const; |
282 | virtual bool setLedState ( OLed led, OLedState st ); | 280 | virtual bool setLedState ( OLed led, OLedState st ); |
283 | 281 | ||
284 | virtual bool hasLightSensor() const; | 282 | virtual bool hasLightSensor() const; |
285 | virtual int readLightSensor(); | 283 | virtual int readLightSensor(); |
286 | virtual int lightSensorResolution() const; | 284 | virtual int lightSensorResolution() const; |
287 | 285 | ||
288 | virtual bool hasHingeSensor() const; | 286 | virtual bool hasHingeSensor() const; |
289 | virtual OHingeStatus readHingeSensor(); | 287 | virtual OHingeStatus readHingeSensor(); |
290 | 288 | ||
291 | const QStrList &allowedCpuFrequencies() const; | 289 | const QStrList &allowedCpuFrequencies() const; |
292 | bool setCurrentCpuFrequency(uint index); | 290 | bool setCurrentCpuFrequency(uint index); |
293 | 291 | ||
294 | /** | 292 | /** |
295 | * Returns the available buttons on this device. The number and location | 293 | * Returns the available buttons on this device. The number and location |
296 | * of buttons will vary depending on the device. Button numbers will be assigned | 294 | * of buttons will vary depending on the device. Button numbers will be assigned |
297 | * by the device manufacturer and will be from most preferred button to least preffered | 295 | * by the device manufacturer and will be from most preferred button to least preffered |
298 | * button. Note that this list only contains "user mappable" buttons. | 296 | * button. Note that this list only contains "user mappable" buttons. |
299 | * | 297 | * |
300 | * @todo Make method const and take care of calling initButtons or make that const too | 298 | * @todo Make method const and take care of calling initButtons or make that const too |
301 | * | 299 | * |
302 | */ | 300 | */ |
303 | const QValueList<ODeviceButton> &buttons(); | 301 | const QValueList<ODeviceButton> &buttons(); |
304 | 302 | ||
305 | /** | 303 | /** |
306 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 304 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
307 | * returns 0L | 305 | * returns 0L |