author | zecke <zecke> | 2005-02-17 23:52:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-17 23:52:46 (UTC) |
commit | 9bf35a9978c8a9e8b9c2100abf9137ffefc73e17 (patch) (unidiff) | |
tree | f251c1697f2ed091d8f55eca7aa1b8f4a85c7889 /libopie2/opiecore/device/odevice_zaurus.h | |
parent | 87cbafeb59d0505b631be811bd96fb1d0b1df1f7 (diff) | |
download | opie-9bf35a9978c8a9e8b9c2100abf9137ffefc73e17.zip opie-9bf35a9978c8a9e8b9c2100abf9137ffefc73e17.tar.gz opie-9bf35a9978c8a9e8b9c2100abf9137ffefc73e17.tar.bz2 |
Add OAbstractMobileDevice with implementations for suspend and setDisplayStatus
Switch our implementations over to this partial implementation of ODevice
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index 80593ce..6e6ca46 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h | |||
@@ -21,25 +21,25 @@ | |||
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef ODEVICE_ZAURUS | 30 | #ifndef ODEVICE_ZAURUS |
31 | #define ODEVICE_ZAURUS | 31 | #define ODEVICE_ZAURUS |
32 | 32 | ||
33 | #include <opie2/odevice.h> | 33 | #include "odevice_abstractmobiledevice.h" |
34 | 34 | ||
35 | #ifndef ARRAY_SIZE | 35 | #ifndef ARRAY_SIZE |
36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | // _IO and friends are only defined in kernel headers ... | 39 | // _IO and friends are only defined in kernel headers ... |
40 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | 40 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) |
41 | #define OD_IO(type,number) OD_IOC(0,type,number,0) | 41 | #define OD_IO(type,number) OD_IOC(0,type,number,0) |
42 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) | 42 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) |
43 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) | 43 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) |
44 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) | 44 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) |
45 | 45 | ||
@@ -82,48 +82,47 @@ | |||
82 | #define SHARP_FL_IOCTL_STEP_CONTRAST 100 | 82 | #define SHARP_FL_IOCTL_STEP_CONTRAST 100 |
83 | #define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 | 83 | #define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 |
84 | #define SHARP_FL_IOCTL_GET_STEP 102 | 84 | #define SHARP_FL_IOCTL_GET_STEP 102 |
85 | 85 | ||
86 | // Vesa Standard | 86 | // Vesa Standard |
87 | #define FB_BLANK_UNBLANK 0 | 87 | #define FB_BLANK_UNBLANK 0 |
88 | #define FB_BLANK_POWERDOWN 4 | 88 | #define FB_BLANK_POWERDOWN 4 |
89 | 89 | ||
90 | namespace Opie { | 90 | namespace Opie { |
91 | namespace Core { | 91 | namespace Core { |
92 | namespace Internal { | 92 | namespace Internal { |
93 | 93 | ||
94 | class Zaurus : public ODevice | 94 | class Zaurus : public OAbstractMobileDevice |
95 | { | 95 | { |
96 | protected: | 96 | protected: |
97 | virtual void init(const QString&); | 97 | virtual void init(const QString&); |
98 | virtual void initButtons(); | 98 | virtual void initButtons(); |
99 | 99 | ||
100 | public: | 100 | public: |
101 | virtual bool setDisplayBrightness( int b ); | 101 | virtual bool setDisplayBrightness( int b ); |
102 | virtual bool setDisplayStatus( bool on ); | 102 | virtual bool setDisplayStatus( bool on ); |
103 | virtual int displayBrightnessResolution() const; | 103 | virtual int displayBrightnessResolution() const; |
104 | 104 | ||
105 | virtual void playAlarmSound(); | 105 | virtual void playAlarmSound(); |
106 | virtual void playKeySound(); | 106 | virtual void playKeySound(); |
107 | virtual void playTouchSound(); | 107 | virtual void playTouchSound(); |
108 | 108 | ||
109 | virtual QValueList <OLed> ledList() const; | 109 | virtual QValueList <OLed> ledList() const; |
110 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 110 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
111 | virtual OLedState ledState( OLed led ) const; | 111 | virtual OLedState ledState( OLed led ) const; |
112 | virtual bool setLedState( OLed led, OLedState st ); | 112 | virtual bool setLedState( OLed led, OLedState st ); |
113 | 113 | ||
114 | virtual bool hasHingeSensor() const; | 114 | virtual bool hasHingeSensor() const; |
115 | virtual OHingeStatus readHingeSensor() const; | 115 | virtual OHingeStatus readHingeSensor() const; |
116 | 116 | ||
117 | virtual bool suspend(); | ||
118 | virtual Transformation rotation() const; | 117 | virtual Transformation rotation() const; |
119 | virtual ODirection direction() const; | 118 | virtual ODirection direction() const; |
120 | 119 | ||
121 | protected: | 120 | protected: |
122 | virtual void buzzer( int snd ); | 121 | virtual void buzzer( int snd ); |
123 | 122 | ||
124 | OLedState m_leds[1]; | 123 | OLedState m_leds[1]; |
125 | bool m_embedix; | 124 | bool m_embedix; |
126 | }; | 125 | }; |
127 | 126 | ||
128 | struct z_button { | 127 | struct z_button { |
129 | Qt::Key code; | 128 | Qt::Key code; |