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 // INCLUDE FILES |
|
19 #include <telephonyvariant.hrh> |
|
20 #include "cphoneringingtonecontroller.h" |
|
21 #include "phonelogger.h" |
|
22 #include "cphoneringingtone.h" |
|
23 #include "tphonecmdparamringtone.h" |
|
24 #include "cphonecenrepproxy.h" |
|
25 #include "cphoneringingtoneplayer.h" |
|
26 #include "cphonettsplayer.h" |
|
27 |
|
28 |
|
29 bool m_EPhoneViewMuteRingToneOnAnswer_called; |
|
30 bool m_EPhoneViewStopRingTone_called; |
|
31 bool m_EPhoneViewMuteRingTone_called; |
|
32 bool m_EPhoneViewPlayRingTone_called; |
|
33 |
|
34 |
|
35 // ============================ MEMBER FUNCTIONS =============================== |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CPhoneRingingToneController::NewL |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 EXPORT_C CPhoneRingingToneController* CPhoneRingingToneController::NewL() |
|
42 { |
|
43 CPhoneRingingToneController* self = |
|
44 new ( ELeave ) CPhoneRingingToneController(); |
|
45 |
|
46 CleanupStack::PushL( self ); |
|
47 self->ConstructL(); |
|
48 CleanupStack::Pop( self ); |
|
49 |
|
50 return self; |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CPhoneRingingToneController::CPhoneRingingToneController |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 CPhoneRingingToneController::CPhoneRingingToneController() |
|
58 { |
|
59 m_EPhoneViewMuteRingToneOnAnswer_called = false; |
|
60 m_EPhoneViewStopRingTone_called = false; |
|
61 m_EPhoneViewMuteRingTone_called = false; |
|
62 m_EPhoneViewPlayRingTone_called = false; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CPhoneRingingToneController::ConstructL |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 void CPhoneRingingToneController::ConstructL() |
|
70 { |
|
71 |
|
72 |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // CPhoneRingingToneController::~CPhoneRingingToneController |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 CPhoneRingingToneController::~CPhoneRingingToneController() |
|
80 { |
|
81 |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CPhoneRingingToneController::PlayRingToneL |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 EXPORT_C void CPhoneRingingToneController::PlayRingToneL( |
|
89 TPhoneCommandParam* aCommandParam ) |
|
90 { |
|
91 |
|
92 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdRingTone ) |
|
93 { |
|
94 m_EPhoneViewPlayRingTone_called = true; |
|
95 } |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // CPhoneRingingToneController::PlayAudioRingTone |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CPhoneRingingToneController::PlayAudioRingTone( |
|
103 TInt aVolume, |
|
104 TProfileRingingType aRingingType ) |
|
105 { |
|
106 |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CPhoneRingingToneController::MuteRingingToneOnAnswer |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 EXPORT_C void CPhoneRingingToneController::MuteRingingToneOnAnswer() |
|
114 { |
|
115 m_EPhoneViewMuteRingToneOnAnswer_called = true; |
|
116 } |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // CPhoneRingingToneController::MuteRingingTone |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 EXPORT_C void CPhoneRingingToneController::MuteRingingTone() |
|
123 { |
|
124 m_EPhoneViewMuteRingTone_called = true; |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // CPhoneRingingToneController::StopPlaying |
|
129 // ----------------------------------------------------------------------------- |
|
130 // |
|
131 EXPORT_C void CPhoneRingingToneController::StopPlaying() |
|
132 { |
|
133 m_EPhoneViewStopRingTone_called = true; |
|
134 } |
|
135 |
|
136 // ----------------------------------------------------------------------------- |
|
137 // CPhoneRingingToneController::DoMuteRingingTone |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 void CPhoneRingingToneController::DoMuteRingingTone() |
|
141 { |
|
142 |
|
143 } |
|
144 |
|
145 // ----------------------------------------------------------------------------- |
|
146 // CPhoneRingingToneController::ConvertVideoRingingType |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 MPhoneVideoPlayer::TPlayMode CPhoneRingingToneController::ConvertVideoRingingType( |
|
150 TProfileRingingType aRingingType ) |
|
151 { |
|
152 MPhoneVideoPlayer::TPlayMode playMode; |
|
153 |
|
154 |
|
155 return playMode; |
|
156 } |
|
157 |
|
158 // ----------------------------------------------------------------------------- |
|
159 // CPhoneRingingToneController::SetVideoPlayer |
|
160 // ----------------------------------------------------------------------------- |
|
161 // |
|
162 void CPhoneRingingToneController::SetVideoPlayer( |
|
163 MPhoneVideoPlayer* aVideoPlayer ) |
|
164 { |
|
165 iVideoPlayer = aVideoPlayer; |
|
166 } |
|
167 |
|
168 // ----------------------------------------------------------------------------- |
|
169 // CPhoneRingingToneController::PlayVideoRingingTone |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 void CPhoneRingingToneController::PlayVideoRingingTone( |
|
173 const CPhoneRingingTone& aRingingTone, |
|
174 TInt aVolume, |
|
175 TProfileRingingType aRingingType, |
|
176 TBool aPersonalTone ) |
|
177 { |
|
178 |
|
179 } |
|
180 |
|
181 // ----------------------------------------------------------------------------- |
|
182 // CPhoneRingingToneController::HandleVideoPlayerError |
|
183 // ----------------------------------------------------------------------------- |
|
184 // |
|
185 void CPhoneRingingToneController::HandleVideoPlayerError( |
|
186 TPhoneVideoPlayerErrorEvent /*aEvent*/, |
|
187 TInt aError ) |
|
188 { |
|
189 |
|
190 } |
|
191 |
|
192 // ----------------------------------------------------------------------------- |
|
193 // CPhoneRingingToneController::HandleVideoPlayerInitComplete |
|
194 // ----------------------------------------------------------------------------- |
|
195 // |
|
196 void CPhoneRingingToneController::HandleVideoPlayerInitComplete() |
|
197 { |
|
198 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::HandleVideoPlayerInitComplete()" ); |
|
199 |
|
200 // cancel guarding timer |
|
201 //iTimer->Cancel(); |
|
202 |
|
203 } |
|
204 |
|
205 // ----------------------------------------------------------------------------- |
|
206 // CPhoneRingingToneController::HandleVideoPlayerPlayingComplete |
|
207 // ----------------------------------------------------------------------------- |
|
208 // |
|
209 void CPhoneRingingToneController::HandleVideoPlayerPlayingComplete() |
|
210 { |
|
211 //__LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::HandleVideoPlayerPlayingComplete()" ); |
|
212 } |
|
213 |
|
214 // ----------------------------------------------------------------------------- |
|
215 // CPhoneRingingToneController::PlayDefaultVideoAsync |
|
216 // ----------------------------------------------------------------------------- |
|
217 // |
|
218 void CPhoneRingingToneController::PlayDefaultVideoAsync() |
|
219 { |
|
220 |
|
221 } |
|
222 |
|
223 // ----------------------------------------------------------------------------- |
|
224 // CPhoneRingingToneController::ExtendedSecurity |
|
225 // ----------------------------------------------------------------------------- |
|
226 // |
|
227 TBool CPhoneRingingToneController::ExtendedSecurity() const |
|
228 { |
|
229 //__LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::ExtendedSecurity()" ); |
|
230 return EFalse; |
|
231 |
|
232 } |
|
233 |
|
234 // ----------------------------------------------------------------------------- |
|
235 // CPhoneRingingToneController::CoverUIPlayVideoRingingToneL |
|
236 // ----------------------------------------------------------------------------- |
|
237 // |
|
238 TBool CPhoneRingingToneController::CoverUIPlayVideoRingingToneL( |
|
239 const CPhoneRingingTone& aRingingTone ) |
|
240 { |
|
241 //__LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::CoverUIPlayVideoRingingToneL()" ); |
|
242 |
|
243 TBool showVideo( EFalse ); |
|
244 |
|
245 RBuf8 data; |
|
246 CleanupClosePushL( data ); |
|
247 data.CreateL( aRingingTone.FileName().Length() ); |
|
248 data.Copy( aRingingTone.FileName() ); |
|
249 /*TInt err = iMediatorSender->IssueCommand( |
|
250 EPhoneCmdCoverUiShowMultimediaRingingTone, |
|
251 data ); |
|
252 if ( err == KErrNone ) |
|
253 { |
|
254 showVideo = ETrue; |
|
255 iActiveCoverUICommand = ETrue; |
|
256 }*/ |
|
257 CleanupStack::PopAndDestroy(); //data |
|
258 |
|
259 return showVideo; |
|
260 } |
|
261 |
|
262 // ----------------------------------------------------------------------------- |
|
263 // CPhoneRingingToneController::ShowMultimediaRingingToneResponseL |
|
264 // ----------------------------------------------------------------------------- |
|
265 // |
|
266 void CPhoneRingingToneController::ShowMultimediaRingingToneResponseL( |
|
267 TInt aStatus ) |
|
268 { |
|
269 //__LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::ShowMultimediaRingingToneResponseL()" ); |
|
270 |
|
271 } |
|
272 |
|
273 |
|
274 |
|
275 // End of File |
|