-rw-r--r-- | libopie/odevice.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index c5342e1..c0b6efa 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -1,79 +1,78 @@ | |||
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 | #include <stdlib.h> | 20 | #include <stdlib.h> |
21 | #include <unistd.h> | 21 | #include <unistd.h> |
22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
23 | #include <sys/ioctl.h> | 23 | #include <sys/ioctl.h> |
24 | #include <signal.h> | 24 | #include <signal.h> |
25 | #include <sys/time.h> | 25 | #include <sys/time.h> |
26 | #ifndef QT_NO_SOUND | 26 | #ifndef QT_NO_SOUND |
27 | #include <linux/soundcard.h> | 27 | #include <linux/soundcard.h> |
28 | #endif | 28 | #endif |
29 | #include <math.h> | 29 | #include <math.h> |
30 | 30 | ||
31 | #include <qapplication.h> | ||
32 | 31 | ||
33 | #include <qfile.h> | 32 | #include <qfile.h> |
34 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
35 | #include <qpe/sound.h> | 34 | #include <qpe/sound.h> |
36 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
37 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
38 | #include <qpe/qcopenvelope_qws.h> | 37 | #include <qpe/qcopenvelope_qws.h> |
39 | 38 | ||
40 | #include "odevice.h" | 39 | #include "odevice.h" |
41 | 40 | ||
42 | #include <qwindowsystem_qws.h> | 41 | #include <qwindowsystem_qws.h> |
43 | 42 | ||
44 | #ifndef ARRAY_SIZE | 43 | #ifndef ARRAY_SIZE |
45 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 44 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
46 | #endif | 45 | #endif |
47 | 46 | ||
48 | // _IO and friends are only defined in kernel headers ... | 47 | // _IO and friends are only defined in kernel headers ... |
49 | 48 | ||
50 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | 49 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) |
51 | 50 | ||
52 | #define OD_IO(type,number) OD_IOC(0,type,number,0) | 51 | #define OD_IO(type,number) OD_IOC(0,type,number,0) |
53 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) | 52 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) |
54 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) | 53 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) |
55 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) | 54 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) |
56 | 55 | ||
57 | using namespace Opie; | 56 | using namespace Opie; |
58 | 57 | ||
59 | class ODeviceData { | 58 | class ODeviceData { |
60 | public: | 59 | public: |
61 | QString m_vendorstr; | 60 | QString m_vendorstr; |
62 | OVendor m_vendor; | 61 | OVendor m_vendor; |
63 | 62 | ||
64 | QString m_modelstr; | 63 | QString m_modelstr; |
65 | OModel m_model; | 64 | OModel m_model; |
66 | 65 | ||
67 | QString m_systemstr; | 66 | QString m_systemstr; |
68 | OSystem m_system; | 67 | OSystem m_system; |
69 | 68 | ||
70 | QString m_sysverstr; | 69 | QString m_sysverstr; |
71 | 70 | ||
72 | Transformation m_rotation; | 71 | Transformation m_rotation; |
73 | ODirection m_direction; | 72 | ODirection m_direction; |
74 | 73 | ||
75 | QValueList <ODeviceButton> *m_buttons; | 74 | QValueList <ODeviceButton> *m_buttons; |
76 | uint m_holdtime; | 75 | uint m_holdtime; |
77 | QStrList *m_cpu_frequencies; | 76 | QStrList *m_cpu_frequencies; |
78 | 77 | ||
79 | }; | 78 | }; |