author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 18:12:57 +0300 | |
changeset 32 | 189d20c34778 |
parent 28 | 075425b8d9a4 |
child 33 | 11b6825f0862 |
permissions | -rw-r--r-- |
24 | 1 |
/* |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef RADIOUIENGINE_P_H_ |
|
19 |
#define RADIOUIENGINE_P_H_ |
|
20 |
||
21 |
// System includes |
|
22 |
#include <QScopedPointer> |
|
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
23 |
#include <QSharedPointer> |
24 | 24 |
|
25 |
// User includes |
|
26 |
#include "radio_global.h" |
|
27 |
#include "radioenginewrapperobserver.h" |
|
28 |
||
29 |
// Forward declarations |
|
30 |
class RadioUiEngine; |
|
31 |
class RadioEngineWrapper; |
|
32 |
class RadioStationModel; |
|
33 |
class RadioHistoryModel; |
|
34 |
class RadioPresetStorage; |
|
35 |
class RadioControlService; |
|
36 |
class RadioMonitorService; |
|
37 |
class RadioScannerEngine; |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
38 |
class QTimer; |
24 | 39 |
|
40 |
class RadioUiEnginePrivate : public RadioEngineWrapperObserver |
|
41 |
{ |
|
42 |
Q_DECLARE_PUBLIC( RadioUiEngine ) |
|
43 |
Q_DISABLE_COPY( RadioUiEnginePrivate ) |
|
44 |
||
45 |
public: |
|
46 |
||
47 |
RadioUiEnginePrivate( RadioUiEngine* engine ); |
|
48 |
virtual ~RadioUiEnginePrivate(); |
|
49 |
||
50 |
RadioUiEngine& api(); |
|
51 |
||
52 |
bool init(); |
|
53 |
||
54 |
void cancelSeeking(); |
|
55 |
||
56 |
RadioEngineWrapper& wrapper(); |
|
57 |
||
58 |
private: |
|
59 |
||
60 |
// from base class RadioEngineWrapperObserver |
|
61 |
||
62 |
void tunedToFrequency( uint frequency, int reason ); |
|
63 |
void radioStatusChanged( bool radioIsOn ); |
|
64 |
void rdsAvailabilityChanged( bool available ); |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
65 |
void increaseVolume(); |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
66 |
void decreaseVolume(); |
24 | 67 |
void volumeChanged( int volume ); |
68 |
void muteChanged( bool muted ); |
|
69 |
void audioRouteChanged( bool loudspeaker ); |
|
70 |
void antennaStatusChanged( bool connected ); |
|
71 |
void skipPrevious(); |
|
72 |
void skipNext(); |
|
73 |
||
74 |
// New functions |
|
75 |
||
76 |
/*! |
|
77 |
* Tunes to next or previous station |
|
78 |
*/ |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
79 |
uint skip( StationSkip::Mode mode, uint startFrequency = 0, const int reason = TuneReason::Skip ); |
24 | 80 |
|
81 |
private: // data |
|
82 |
||
83 |
/** |
|
84 |
* Pointer to the public class |
|
85 |
* Not own. |
|
86 |
*/ |
|
87 |
RadioUiEngine* q_ptr; |
|
88 |
||
89 |
QScopedPointer<RadioEngineWrapper> mEngineWrapper; |
|
90 |
||
91 |
QScopedPointer<RadioPresetStorage> mPresetStorage; |
|
92 |
||
93 |
QScopedPointer<RadioStationModel> mStationModel; |
|
94 |
||
95 |
QScopedPointer<RadioHistoryModel> mHistoryModel; |
|
96 |
||
97 |
QScopedPointer<RadioControlService> mControlService; |
|
98 |
||
99 |
QScopedPointer<RadioMonitorService> mMonitorService; |
|
100 |
||
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
101 |
QSharedPointer<RadioScannerEngine> mScannerEngine; |
24 | 102 |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
103 |
/** |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
104 |
* Power off timer |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
105 |
* Owned by public class by setting parent |
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
106 |
*/ |
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
107 |
QTimer* mPowerOffTimer; |
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
108 |
|
24 | 109 |
}; |
110 |
||
111 |
#endif // RADIOUIENGINE_P_H_ |