35
|
1 |
/*
|
|
2 |
* Copyright (c) 2004, 2005 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: Controller for navi pane for Video Telephone application.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CVTUINAVIPANE_H
|
|
21 |
#define CVTUINAVIPANE_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <coedef.h>
|
|
26 |
#include <w32std.h>
|
|
27 |
#include <coecobs.h>
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CAknNavigationControlContainer;
|
|
31 |
class CAknNavigationDecorator;
|
|
32 |
class CVtUiNaviPaneControl;
|
|
33 |
class CVtUiMutedControl;
|
|
34 |
class CVtUiAppUi;
|
|
35 |
|
|
36 |
// CONSTANTS
|
|
37 |
|
|
38 |
// Minimum volume.
|
|
39 |
const TInt KVtUiVolumeMinimum = 0;
|
|
40 |
|
|
41 |
// Maximum volume.
|
|
42 |
const TInt KVtUiVolumeMaximum = 10;
|
|
43 |
|
|
44 |
// CLASS DECLARATION
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Controller for navi pane for Video Telephone application.
|
|
48 |
*
|
|
49 |
* @since Series 60 2.6
|
|
50 |
*/
|
|
51 |
class CVtUiNaviPane : public CActive
|
|
52 |
{
|
|
53 |
public: // Constructors and destructor
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Two-phased constructor.
|
|
57 |
* @param aNaviPane reference to navipane.
|
|
58 |
* @param aAppUi application UI.
|
|
59 |
*/
|
|
60 |
static CVtUiNaviPane* NewL(
|
|
61 |
CAknNavigationControlContainer& aNaviPane,
|
|
62 |
CVtUiAppUi& aAppUi );
|
|
63 |
|
|
64 |
/**
|
|
65 |
* C++ destructor.
|
|
66 |
*/
|
|
67 |
~CVtUiNaviPane();
|
|
68 |
|
|
69 |
public: // New functions
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Updates current speaker.
|
|
73 |
* @param aLoudspeaker Loudspeaker if ETrue, handset otherwise.
|
|
74 |
*/
|
|
75 |
void SetCurrentSpeaker(
|
|
76 |
const TBool aLoudspeaker );
|
|
77 |
|
|
78 |
/**
|
|
79 |
* Changes muted status.
|
|
80 |
* @param aStatus status.
|
|
81 |
*/
|
|
82 |
void SetMuted(
|
|
83 |
const TBool aStatus );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Updates call duration.
|
|
87 |
* @param aDuration current duration.
|
|
88 |
* @param aEnabled ETrue if call duration enabled.
|
|
89 |
*/
|
|
90 |
void SetCallDuration(
|
|
91 |
const TTimeIntervalSeconds& aDuration,
|
|
92 |
const TBool aEnabled );
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Commits changes. This method should be called after above
|
|
96 |
* Set* methods to make sure that display is up to date.
|
|
97 |
*/
|
|
98 |
void CommitL();
|
|
99 |
|
|
100 |
/**
|
|
101 |
* Gets speaker volume.
|
|
102 |
* @param aLoudspeaker ETrue if loudspeaker, EFalse if handset.
|
|
103 |
* @param aValue it will be updated to contain volume of the speaker.
|
|
104 |
*/
|
|
105 |
void GetSpeakerVolume(
|
|
106 |
const TBool aLoudspeaker,
|
|
107 |
TInt& aValue ) const;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Handles resource changes.
|
|
111 |
* @param aType type of change.
|
|
112 |
*/
|
|
113 |
void HandleResourceChange(
|
|
114 |
TInt aType );
|
|
115 |
|
|
116 |
protected: // From base classes
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Called by CActive when operation needs to be canceled.
|
|
120 |
*/
|
|
121 |
void DoCancel();
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Called by CActiveScheduler when operation has been
|
|
125 |
* finished.
|
|
126 |
*/
|
|
127 |
void RunL();
|
|
128 |
|
|
129 |
private:
|
|
130 |
|
|
131 |
/**
|
|
132 |
* C++ constructor.
|
|
133 |
* @param aNaviPane navipane instance.
|
|
134 |
* @param aAppUi application UI.
|
|
135 |
*/
|
|
136 |
CVtUiNaviPane(
|
|
137 |
CAknNavigationControlContainer& aNaviPane,
|
|
138 |
CVtUiAppUi& aAppUi );
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Symbian constructor.
|
|
142 |
*/
|
|
143 |
void ConstructL();
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Pushes indicators after timeout.
|
|
147 |
*/
|
|
148 |
void PushAfterTimeout();
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Pushes new decorator to navi pane replacing the
|
|
152 |
* previous one.
|
|
153 |
* @param aNew new to replace the old one.
|
|
154 |
*/
|
|
155 |
void PushL( CAknNavigationDecorator* aNew );
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Returns indicator that should be used currently.
|
|
159 |
* @return indicator to be shown.
|
|
160 |
*/
|
|
161 |
CAknNavigationDecorator* DefaultIndicator() const;
|
|
162 |
|
|
163 |
private:
|
|
164 |
|
|
165 |
// Slider types in navipane
|
|
166 |
enum TSliderControlType
|
|
167 |
{
|
|
168 |
ENone,
|
|
169 |
EZoom, // Zoom control visible
|
|
170 |
EVolume // Volume control visible
|
|
171 |
};
|
|
172 |
|
|
173 |
|
|
174 |
// Holds current slider type
|
|
175 |
TSliderControlType iSliderType;
|
|
176 |
|
|
177 |
// Ref to navi pane.
|
|
178 |
CAknNavigationControlContainer& iNaviPane;
|
|
179 |
|
|
180 |
// Ref to top navi pane element.
|
|
181 |
CAknNavigationDecorator* iCurrent;
|
|
182 |
|
|
183 |
// Owned controller for call duration
|
|
184 |
CAknNavigationDecorator* iMainIndicators;
|
|
185 |
|
|
186 |
// Reference to navi pane control.
|
|
187 |
CVtUiNaviPaneControl* iNaviPaneControl;
|
|
188 |
|
|
189 |
// Owned muted indicator.
|
|
190 |
CAknNavigationDecorator* iMutedIndicator;
|
|
191 |
|
|
192 |
// Reference to muted control.
|
|
193 |
CVtUiMutedControl* iMutedControl;
|
|
194 |
|
|
195 |
// Owned timer instance.
|
|
196 |
RTimer iTimer;
|
|
197 |
|
|
198 |
// ETrue if call duration was enabled.
|
|
199 |
TBool iOldCallDurationEnabled;
|
|
200 |
|
|
201 |
// ETrue if call duration is enabled.
|
|
202 |
TBool iCallDurationEnabled;
|
|
203 |
|
|
204 |
// ETrue if loudspeaker, EFalse if handset.
|
|
205 |
TBool iLoudspeaker;
|
|
206 |
|
|
207 |
// Old microphone status.
|
|
208 |
TBool iOldMicrophoneMuted;
|
|
209 |
|
|
210 |
// ETrue if microphone is muted.
|
|
211 |
TBool iMicrophoneMuted;
|
|
212 |
|
|
213 |
// Reference to application UI.
|
|
214 |
CVtUiAppUi& iAppUi;
|
|
215 |
};
|
|
216 |
|
|
217 |
#endif // CVtUiNaviPane_H
|
|
218 |
|
|
219 |
// End of File
|