-rw-r--r-- | libopie/odevice.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 5009b91..ee01f0f 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -22,88 +22,94 @@ | |||
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | 24 | ||
25 | 25 | ||
26 | class ODeviceData; | 26 | class ODeviceData; |
27 | 27 | ||
28 | enum OModel { | 28 | enum 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 | ||
46 | enum OSystem { | 46 | enum 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 | ||
54 | enum OLedState { | 54 | enum 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 | ||
62 | class ODevice | 62 | class ODevice |
63 | { | 63 | { |
64 | public: | 64 | public: |
65 | 65 | ||
66 | public: | 66 | public: |
67 | static ODevice *inst ( ); | 67 | static ODevice *inst ( ); |
68 | 68 | ||
69 | // system | 69 | // system |
70 | enum PowerButtonHandler { | ||
71 | KERNEL, | ||
72 | OPIE | ||
73 | }; | ||
74 | |||
75 | virtual bool setPowerButtonHandler ( PowerButtonHandler h ); | ||
70 | virtual bool suspend ( ); | 76 | virtual bool suspend ( ); |
71 | 77 | ||
72 | // information | 78 | // information |
73 | 79 | ||
74 | QString modelString ( ); | 80 | QString modelString ( ); |
75 | OModel model ( ); | 81 | OModel model ( ); |
76 | 82 | ||
77 | QString vendorString ( ); | 83 | QString vendorString ( ); |
78 | OVendor vendor ( ); | 84 | OVendor vendor ( ); |
79 | 85 | ||
80 | QString systemString ( ); | 86 | QString systemString ( ); |
81 | OSystem system ( ); | 87 | OSystem system ( ); |
82 | 88 | ||
83 | QString systemVersionString ( ); | 89 | QString systemVersionString ( ); |
84 | 90 | ||
85 | // input / output | 91 | // input / output |
86 | 92 | ||
87 | virtual void alarmSound ( ); | 93 | virtual void alarmSound ( ); |
88 | virtual void keySound ( ); | 94 | virtual void keySound ( ); |
89 | virtual void touchSound ( ); | 95 | virtual void touchSound ( ); |
90 | 96 | ||
91 | virtual uint hasLeds ( ) const; | 97 | virtual uint hasLeds ( ) const; |
92 | virtual OLedState led ( uint which ) const; | 98 | virtual OLedState led ( uint which ) const; |
93 | virtual bool setLed ( uint which, OLedState st ); | 99 | virtual bool setLed ( uint which, OLedState st ); |
94 | 100 | ||
95 | virtual ~ODevice ( ); | 101 | virtual ~ODevice ( ); |
96 | 102 | ||
97 | protected: | 103 | protected: |
98 | ODevice ( ); | 104 | ODevice ( ); |
99 | virtual void init ( ); | 105 | virtual void init ( ); |
100 | 106 | ||
101 | ODeviceData *d; | 107 | ODeviceData *d; |
102 | 108 | ||
103 | private: | 109 | private: |
104 | ODevice ( const ODevice & ); | 110 | ODevice ( const ODevice & ); |
105 | }; | 111 | }; |
106 | 112 | ||
107 | #endif | 113 | #endif |
108 | 114 | ||
109 | 115 | ||