summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
Unidiff
Diffstat (limited to 'libopie/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index ee01f0f..9dda68e 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -1,115 +1,119 @@
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 24
25 25
26class ODeviceData; 26class ODeviceData;
27 27
28enum OModel { 28enum OModel {
29 OMODEL_Unknown, 29 OMODEL_Unknown,
30 30
31 OMODEL_iPAQ_H31xx, 31 OMODEL_iPAQ_H31xx,
32 OMODEL_iPAQ_H36xx, 32 OMODEL_iPAQ_H36xx,
33 OMODEL_iPAQ_H37xx, 33 OMODEL_iPAQ_H37xx,
34 OMODEL_iPAQ_H38xx, 34 OMODEL_iPAQ_H38xx,
35 35
36 OMODEL_Zaurus_SL5000 36 OMODEL_Zaurus_SL5000
37}; 37};
38 38
39 enum OVendor { 39 enum OVendor {
40 OVENDOR_Unknown, 40 OVENDOR_Unknown,
41 41
42 OVENDOR_HP, 42 OVENDOR_HP,
43 OVENDOR_Sharp 43 OVENDOR_Sharp
44 }; 44 };
45 45
46enum OSystem { 46enum OSystem {
47 OSYSTEM_Unknown, 47 OSYSTEM_Unknown,
48 48
49 OSYSTEM_Familiar, 49 OSYSTEM_Familiar,
50 OSYSTEM_Zaurus, 50 OSYSTEM_Zaurus,
51 OSYSTEM_OpenZaurus 51 OSYSTEM_OpenZaurus
52}; 52};
53 53
54enum OLedState { 54enum OLedState {
55 OLED_Off, 55 OLED_Off,
56 OLED_On, 56 OLED_On,
57 OLED_BlinkSlow, 57 OLED_BlinkSlow,
58 OLED_BlinkFast 58 OLED_BlinkFast
59}; 59};
60 60
61 61
62class ODevice 62class ODevice
63{ 63{
64public: 64public:
65 65
66public: 66public:
67 static ODevice *inst ( ); 67 static ODevice *inst ( );
68 68
69 // system 69 // system
70 enum PowerButtonHandler { 70 enum PowerButtonHandler {
71 KERNEL, 71 KERNEL,
72 OPIE 72 OPIE
73 }; 73 };
74 74
75 virtual bool setPowerButtonHandler ( PowerButtonHandler h ); 75 virtual bool setPowerButtonHandler ( PowerButtonHandler h );
76 virtual bool suspend ( ); 76 virtual bool suspend ( );
77 77
78 virtual bool setDisplayStatus ( bool on );
79 virtual bool setDisplayBrightness ( int brightness );
80 virtual int displayBrightnessResolution ( ) const;
81
78// information 82// information
79 83
80 QString modelString ( ); 84 QString modelString ( );
81 OModel model ( ); 85 OModel model ( );
82 86
83 QString vendorString ( ); 87 QString vendorString ( );
84 OVendor vendor ( ); 88 OVendor vendor ( );
85 89
86 QString systemString ( ); 90 QString systemString ( );
87 OSystem system ( ); 91 OSystem system ( );
88 92
89 QString systemVersionString ( ); 93 QString systemVersionString ( );
90 94
91// input / output 95// input / output
92 96
93 virtual void alarmSound ( ); 97 virtual void alarmSound ( );
94 virtual void keySound ( ); 98 virtual void keySound ( );
95 virtual void touchSound ( ); 99 virtual void touchSound ( );
96 100
97 virtual uint hasLeds ( ) const; 101 virtual uint hasLeds ( ) const;
98 virtual OLedState led ( uint which ) const; 102 virtual OLedState led ( uint which ) const;
99 virtual bool setLed ( uint which, OLedState st ); 103 virtual bool setLed ( uint which, OLedState st );
100 104
101 virtual ~ODevice ( ); 105 virtual ~ODevice ( );
102 106
103protected: 107protected:
104 ODevice ( ); 108 ODevice ( );
105 virtual void init ( ); 109 virtual void init ( );
106 110
107 ODeviceData *d; 111 ODeviceData *d;
108 112
109private: 113private:
110 ODevice ( const ODevice & ); 114 ODevice ( const ODevice & );
111}; 115};
112 116
113#endif 117#endif
114 118
115 119