summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
Unidiff
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index dea24a8..9931684 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -109,132 +109,132 @@ ODevice::~ODevice ( )
109{ 109{
110 delete d; 110 delete d;
111} 111}
112 112
113QString ODevice::vendorString ( ) 113QString ODevice::vendorString ( )
114{ 114{
115 return d-> m_vendorstr; 115 return d-> m_vendorstr;
116} 116}
117 117
118OVendor ODevice::vendor ( ) 118OVendor ODevice::vendor ( )
119{ 119{
120 return d-> m_vendor; 120 return d-> m_vendor;
121} 121}
122 122
123QString ODevice::modelString ( ) 123QString ODevice::modelString ( )
124{ 124{
125 return d-> m_modelstr; 125 return d-> m_modelstr;
126} 126}
127 127
128OModel ODevice::model ( ) 128OModel ODevice::model ( )
129{ 129{
130 return d-> m_model; 130 return d-> m_model;
131} 131}
132 132
133QString ODevice::systemString ( ) 133QString ODevice::systemString ( )
134{ 134{
135 return d-> m_systemstr; 135 return d-> m_systemstr;
136} 136}
137 137
138OSystem ODevice::system ( ) 138OSystem ODevice::system ( )
139{ 139{
140 return d-> m_system; 140 return d-> m_system;
141} 141}
142 142
143void ODevice::alarmSound ( ) 143void ODevice::alarmSound ( )
144{ 144{
145#ifndef QT_QWS_EBX 145#ifndef QT_QWS_EBX
146#ifndef QT_NO_SOUND 146#ifndef QT_NO_SOUND
147 static Sound snd ( "alarm" ); 147 static Sound snd ( "alarm" );
148 148
149 if ( snd. isFinished ( )) 149 if ( snd. isFinished ( ))
150 snd. play ( ); 150 snd. play ( );
151#endif 151#endif
152#endif 152#endif
153} 153}
154 154
155void ODevice::keySound ( ) 155void ODevice::keySound ( )
156{ 156{
157#ifndef QT_QWS_EBX 157#ifndef QT_QWS_EBX
158#ifndef QT_NO_SOUND 158#ifndef QT_NO_SOUND
159 static Sound snd ( "keysound" ); 159 static Sound snd ( "keysound" );
160 160
161 if ( snd. isFinished ( )) 161 if ( snd. isFinished ( ))
162 snd. play ( ); 162 snd. play ( );
163#endif 163#endif
164#endif 164#endif
165} 165}
166 166
167void ODevice::touchSound ( ) 167void ODevice::touchSound ( )
168{ 168{
169 169
170#ifndef QT_QWS_EBX 170#ifndef QT_QWS_EBX
171#ifndef QT_NO_SOUND 171#ifndef QT_NO_SOUND
172 static Sound snd ( "touchsound" ); 172 static Sound snd ( "touchsound" );
173qDebug("touchSound"); 173//qDebug("touchSound");
174 if ( snd. isFinished ( )) { 174 if ( snd. isFinished ( )) {
175 snd. play ( ); 175 snd. play ( );
176 qDebug("sound should play"); 176 // qDebug("sound should play");
177 } 177 }
178#endif 178#endif
179#endif 179#endif
180} 180}
181 181
182uint ODevice::hasLeds ( ) const 182uint ODevice::hasLeds ( ) const
183{ 183{
184 return 0; 184 return 0;
185} 185}
186 186
187OLedState ODevice::led ( uint /*which*/ ) const 187OLedState ODevice::led ( uint /*which*/ ) const
188{ 188{
189 return OLED_Off; 189 return OLED_Off;
190} 190}
191 191
192bool ODevice::setLed ( uint /*which*/, OLedState /*st*/ ) 192bool ODevice::setLed ( uint /*which*/, OLedState /*st*/ )
193{ 193{
194 return false; 194 return false;
195} 195}
196 196
197 197
198 198
199 199
200//#if defined( QT_QWS_IPAQ ) // IPAQ 200//#if defined( QT_QWS_IPAQ ) // IPAQ
201 201
202 202
203void ODeviceIPAQ::init ( ) 203void ODeviceIPAQ::init ( )
204{ 204{
205 d-> m_vendorstr = "HP"; 205 d-> m_vendorstr = "HP";
206 d-> m_vendor = OVENDOR_HP; 206 d-> m_vendor = OVENDOR_HP;
207 207
208 QFile f ( "/proc/hal/model" ); 208 QFile f ( "/proc/hal/model" );
209 209
210 if ( f. open ( IO_ReadOnly )) { 210 if ( f. open ( IO_ReadOnly )) {
211 QTextStream ts ( &f ); 211 QTextStream ts ( &f );
212 212
213 d-> m_modelstr = "H" + ts. readLine ( ); 213 d-> m_modelstr = "H" + ts. readLine ( );
214 214
215 if ( d-> m_modelstr == "H3100" ) 215 if ( d-> m_modelstr == "H3100" )
216 d-> m_model = OMODEL_iPAQ_H31xx; 216 d-> m_model = OMODEL_iPAQ_H31xx;
217 else if ( d-> m_modelstr == "H3600" ) 217 else if ( d-> m_modelstr == "H3600" )
218 d-> m_model = OMODEL_iPAQ_H36xx; 218 d-> m_model = OMODEL_iPAQ_H36xx;
219 else if ( d-> m_modelstr == "H3700" ) 219 else if ( d-> m_modelstr == "H3700" )
220 d-> m_model = OMODEL_iPAQ_H37xx; 220 d-> m_model = OMODEL_iPAQ_H37xx;
221 else if ( d-> m_modelstr == "H3800" ) 221 else if ( d-> m_modelstr == "H3800" )
222 d-> m_model = OMODEL_iPAQ_H38xx; 222 d-> m_model = OMODEL_iPAQ_H38xx;
223 else 223 else
224 d-> m_model = OMODEL_Unknown; 224 d-> m_model = OMODEL_Unknown;
225 225
226 f. close ( ); 226 f. close ( );
227 } 227 }
228 228
229 if ( QFile::exists ( "/etc/familiar-version" )) { 229 if ( QFile::exists ( "/etc/familiar-version" )) {
230 d-> m_systemstr = "Familiar"; 230 d-> m_systemstr = "Familiar";
231 d-> m_system = OSYSTEM_Familiar; 231 d-> m_system = OSYSTEM_Familiar;
232 } 232 }
233 233
234 d-> m_leds [0] = OLED_Off; 234 d-> m_leds [0] = OLED_Off;
235} 235}
236 236
237#include <unistd.h> 237#include <unistd.h>
238#include <fcntl.h> 238#include <fcntl.h>
239#include <sys/ioctl.h> 239#include <sys/ioctl.h>
240#include <linux/soundcard.h> 240#include <linux/soundcard.h>