summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.h53
1 files changed, 32 insertions, 21 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index cb7a83f..f4b3e0e 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -1,55 +1,60 @@
1/* 1/*
2 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 Copyright (C) The Opie Team <opie-devel@handhelds.org> 3              Copyright (C) The Opie Team <opie-devel@handhelds.org>
4 =. 4 =.
5 .=l. 5 .=l.
6 .>+-= 6           .>+-=
7_;:, .> :=|. This program is free software; you can 7 _;:,     .>    :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11- . .-<_> .<> Foundation; either version 2 of the License, 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13 .%`+i> _;_. 13    .%`+i>       _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that 14    .i_,=:_.      -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++= -. .` .: details. 20++=   -.     .`     .: details.
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_H_ 30#ifndef ODEVICE_H_
31#define ODEVICE_H_ 31#define ODEVICE_H_
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odevicebutton.h> 34#include <opie2/odevicebutton.h>
35#include <qpe/qpeapplication.h> /* for Transformation enum.. */ 35#include <qpe/qpeapplication.h> /* for Transformation enum.. */
36 36
37/* QT */ 37/* QT */
38#include <qnamespace.h> 38#include <qnamespace.h>
39#include <qobject.h> 39#include <qobject.h>
40#include <qstring.h> 40#include <qstring.h>
41
42
41#include <qstrlist.h> 43#include <qstrlist.h>
42#include <qwindowsystem_qws.h> 44#include <qwindowsystem_qws.h>
43 45
46
47class Sound;
48
44namespace Opie{ 49namespace Opie{
45namespace Core{ 50namespace Core{
46 51
47 class ODeviceData; 52 class ODeviceData;
48/** 53/**
49 * The available devices 54 * The available devices
50 */ 55 */
51enum OModel { 56enum OModel {
52 Model_Unknown, // = 0 57 Model_Unknown, // = 0
53 58
54 Model_Series_Mask = 0xff000000, 59 Model_Series_Mask = 0xff000000,
55 60
@@ -310,53 +315,59 @@ public:
310 void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); 315 void remapHeldAction ( int button, const OQCopMessage &qcopMessage );
311 316
312 /** 317 /**
313 * How long (in ms) you have to press a button for a "hold" action 318 * How long (in ms) you have to press a button for a "hold" action
314 */ 319 */
315 uint buttonHoldTime() const; 320 uint buttonHoldTime() const;
316 321
317signals: 322signals:
318 void buttonMappingChanged(); 323 void buttonMappingChanged();
319 324
320private slots: 325private slots:
321 void systemMessage ( const QCString &, const QByteArray & ); 326 void systemMessage ( const QCString &, const QByteArray & );
327 void playingStopped();
322 328
323protected: 329protected:
324 void addPreHandler(QWSServer::KeyboardFilter*aFilter); 330 void addPreHandler(QWSServer::KeyboardFilter*aFilter);
325 void remPreHandler(QWSServer::KeyboardFilter*aFilter); 331 void remPreHandler(QWSServer::KeyboardFilter*aFilter);
326 void reloadButtonMapping(); 332 void reloadButtonMapping();
333 void changeMixerForAlarm( int mixer, const char* file, Sound *snd);
334
327 /* ugly virtual hook */ 335 /* ugly virtual hook */
328 virtual void virtual_hook( int id, void* data ); 336 virtual void virtual_hook( int id, void* data );
329}; 337};
330 338
331class ODeviceData { 339class ODeviceData {
332 340
333 public: 341 public:
334 QString m_vendorstr; 342 QString m_vendorstr;
335 OVendor m_vendor; 343 OVendor m_vendor;
336 344
337 QString m_modelstr; 345 QString m_modelstr;
338 OModel m_model; 346 OModel m_model;
339 347
340 QString m_systemstr; 348 QString m_systemstr;
341 OSystem m_system; 349 OSystem m_system;
342 350
343 QString m_sysverstr; 351 QString m_sysverstr;
344 352
345 Transformation m_rotation; 353 Transformation m_rotation;
346 ODirection m_direction; 354 ODirection m_direction;
347 355
348 QValueList <ODeviceButton> *m_buttons; 356 QValueList <ODeviceButton> *m_buttons;
349 uint m_holdtime; 357 uint m_holdtime;
350 QStrList *m_cpu_frequencies; 358 QStrList *m_cpu_frequencies;
359
360 /* values for changeMixerForAlarm */
361 int m_sound, m_vol, m_mixer;
351}; 362};
352 363
353extern bool isQWS(); 364extern bool isQWS();
354extern QCString makeChannel ( const char *str ); 365extern QCString makeChannel ( const char *str );
355} 366}
356} 367}
357 368
358 369
359 370
360 371
361#endif 372#endif
362 373