Diffstat (limited to 'libopie2/opiecore/device/odevice_motorola_ezx.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_motorola_ezx.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_motorola_ezx.h b/libopie2/opiecore/device/odevice_motorola_ezx.h new file mode 100644 index 0000000..c0bd6c7 --- a/dev/null +++ b/libopie2/opiecore/device/odevice_motorola_ezx.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | =. (C) 2006 Michael 'Mickey' Lauer <mickey@Vanille.de> | ||
4 | .=l. | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This program is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; version 2 of the License. | ||
11 | ._= =} : | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This program is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
18 | ..}^=.= = ; Library General Public License for more | ||
19 | ++= -. .` .: details. | ||
20 | : = ...= . :.=- | ||
21 | -. .:....=;==+<; You should have received a copy of the GNU | ||
22 | -_. . . )=. = Library General Public License along with | ||
23 | -- :-=` this library; see the file COPYING.LIB. | ||
24 | If not, write to the Free Software Foundation, | ||
25 | Inc., 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | */ | ||
28 | |||
29 | #ifndef ODEVICE_MOTOROLA_EZX | ||
30 | #define ODEVICE_MOTOROLA_EZX | ||
31 | |||
32 | #include "odevice_abstractmobiledevice.h" | ||
33 | |||
34 | /* QT */ | ||
35 | #include <qfile.h> | ||
36 | #include <qwindowsystem_qws.h> | ||
37 | |||
38 | #ifndef ARRAY_SIZE | ||
39 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
40 | #endif | ||
41 | |||
42 | // Audio | ||
43 | // LED | ||
44 | // Power Management | ||
45 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | ||
46 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | ||
47 | #define APM_EVT_POWER_BUTTON (1 << 0) | ||
48 | |||
49 | // Vesa Standard | ||
50 | #define FB_BLANK_UNBLANK 0 | ||
51 | #define FB_BLANK_POWERDOWN 4 | ||
52 | |||
53 | namespace Opie { | ||
54 | namespace Core { | ||
55 | namespace Internal { | ||
56 | |||
57 | class Motorola_EZX : public OAbstractMobileDevice | ||
58 | { | ||
59 | Q_OBJECT | ||
60 | |||
61 | protected: | ||
62 | virtual void init(const QString&); | ||
63 | virtual void initButtons(); | ||
64 | //void initHingeSensor(); | ||
65 | |||
66 | protected slots: | ||
67 | //void hingeSensorTriggered(); | ||
68 | void systemMessage( const QCString &msg, const QByteArray & ); | ||
69 | |||
70 | public: | ||
71 | virtual bool setDisplayBrightness( int b ); | ||
72 | virtual bool setDisplayStatus( bool on ); | ||
73 | virtual int displayBrightnessResolution() const; | ||
74 | |||
75 | virtual void playAlarmSound(); | ||
76 | |||
77 | virtual QValueList <OLed> ledList() const; | ||
78 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | ||
79 | virtual OLedState ledState( OLed led ) const; | ||
80 | virtual bool setLedState( OLed led, OLedState st ); | ||
81 | |||
82 | virtual bool suspend(); | ||
83 | |||
84 | protected: | ||
85 | QString m_backlightdev; | ||
86 | OLedState m_leds[1]; | ||
87 | QFile m_hinge; | ||
88 | }; | ||
89 | |||
90 | struct ezx_button { | ||
91 | Qt::Key code; | ||
92 | char *utext; | ||
93 | char *pix; | ||
94 | char *fpressedservice; | ||
95 | char *fpressedaction; | ||
96 | char *fheldservice; | ||
97 | char *fheldaction; | ||
98 | }; | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | #endif | ||