author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:28:06 +0300 | |
branch | RCL_3 |
changeset 41 | 755f0370535b |
parent 33 | bc78a40cd63c |
permissions | -rw-r--r-- |
33 | 1 |
/* |
2 |
* Copyright (c) 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: Application's UI class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#include "musuilivesharingcontroller.h" |
|
21 |
#include "musuicallbackservice.h" |
|
22 |
#include "musuieventobserver.h" |
|
23 |
#include "musuisharingobserver.h" |
|
24 |
#include "musuisendobserver.h" |
|
25 |
#include "musuilivesharingobserver.h" |
|
26 |
#include "musuidialogutil.h" |
|
27 |
#include "musenglivesession.h" |
|
28 |
#include "musuiresourcehandler.h" |
|
29 |
#include "musui.hrh" |
|
30 |
#include "mussettings.h" |
|
31 |
#include "mussettingskeys.h" |
|
32 |
#include "muslogger.h" // debug logging |
|
33 |
#include "musuigeneralview.h" |
|
34 |
#include "musuiactivetimer.h" |
|
35 |
||
36 |
#include <musui.rsg> |
|
37 |
#include <avkon.hrh> |
|
38 |
#include <StringLoader.h> |
|
39 |
||
40 |
#include <AknUtils.h> |
|
41 |
||
42 |
using namespace NMusResourceApi; |
|
43 |
using namespace MusSettingsKeys; |
|
44 |
||
45 |
const TInt KMusUiPauseResumeGuardPeriod = 500000; |
|
46 |
||
47 |
// ----------------------------------------------------------------------------- |
|
48 |
// |
|
49 |
// ----------------------------------------------------------------------------- |
|
50 |
// |
|
51 |
CMusUiLiveSharingController* CMusUiLiveSharingController::NewL( |
|
52 |
MMusUiEventObserver& aEventObserver, |
|
53 |
MMusUiSharingObserver& aSharingObserver, |
|
54 |
MMusUiSendObserver& aSendObserver, |
|
55 |
MMusUiLiveSharingObserver& aLiveObserver, |
|
56 |
const TRect& aRect ) |
|
57 |
{ |
|
58 |
CMusUiLiveSharingController* self = |
|
59 |
new( ELeave ) CMusUiLiveSharingController( aEventObserver, |
|
60 |
aSharingObserver, |
|
61 |
aSendObserver, |
|
62 |
aLiveObserver ); |
|
63 |
CleanupStack::PushL( self ); |
|
64 |
self->ConstructL( aRect ); |
|
65 |
CleanupStack::Pop( self ); |
|
66 |
return self; |
|
67 |
} |
|
68 |
||
69 |
||
70 |
// ----------------------------------------------------------------------------- |
|
71 |
// |
|
72 |
// ----------------------------------------------------------------------------- |
|
73 |
// |
|
74 |
CMusUiLiveSharingController::~CMusUiLiveSharingController() |
|
75 |
{ |
|
76 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::~CMusUiLiveSharingController" ); |
|
77 |
delete iSession; |
|
78 |
delete iPauseResumeGuardTimer; |
|
79 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::~CMusUiLiveSharingController" ); |
|
80 |
} |
|
81 |
||
82 |
||
83 |
// ----------------------------------------------------------------------------- |
|
84 |
// |
|
85 |
// ----------------------------------------------------------------------------- |
|
86 |
// |
|
87 |
CMusUiLiveSharingController::CMusUiLiveSharingController( |
|
88 |
MMusUiEventObserver& aEventObserver, |
|
89 |
MMusUiSharingObserver& aSharingObserver, |
|
90 |
MMusUiSendObserver& aSendObserver, |
|
91 |
MMusUiLiveSharingObserver& aLiveObserver ) |
|
92 |
: CMusUiSendController( aEventObserver, aSharingObserver, aSendObserver ), |
|
93 |
iLiveObserver( aLiveObserver ) |
|
94 |
{ |
|
95 |
} |
|
96 |
||
97 |
||
98 |
// ----------------------------------------------------------------------------- |
|
99 |
// |
|
100 |
// ----------------------------------------------------------------------------- |
|
101 |
// |
|
102 |
void CMusUiLiveSharingController::ConstructL( const TRect& aRect ) |
|
103 |
{ |
|
104 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::ConstructL" ); |
|
105 |
||
106 |
CMusUiSendController::ConstructL(); // Base class construction |
|
107 |
||
108 |
iSession = CMusEngLiveSession::NewL( VideoFileNameL(), |
|
109 |
aRect, |
|
110 |
*this, |
|
111 |
*this, |
|
112 |
*this, |
|
113 |
iSipProfileId ); |
|
114 |
||
115 |
iSession->SetAudioRoutingObserver( this ); |
|
116 |
iSession->SetVolumeChangeObserver( this ); |
|
117 |
||
118 |
if ( iSession->AudioRoutingCanBeChanged() && !iSession->IsAudioRoutingHeadset() ) |
|
119 |
{ |
|
120 |
iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue ); |
|
121 |
} |
|
122 |
||
123 |
if ( iVideoCodec && iVideoCodec->Length() > 0 ) |
|
124 |
{ |
|
125 |
iSession->SetSupportedVideoCodecListL( *iVideoCodec ); |
|
126 |
} |
|
127 |
||
128 |
iPauseResumeGuardTimer = CMusUiActiveTimer::NewL( NULL ); |
|
129 |
||
130 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::ConstructL" ); |
|
131 |
} |
|
132 |
||
133 |
||
134 |
// ----------------------------------------------------------------------------- |
|
135 |
// |
|
136 |
// ----------------------------------------------------------------------------- |
|
137 |
// |
|
138 |
void CMusUiLiveSharingController::PlayL() |
|
139 |
{ |
|
140 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::PlayL" ); |
|
141 |
||
142 |
CMusUiSendController::PlayL(); |
|
143 |
iEventObserver.ShowNaviPaneIconL( |
|
144 |
(!iDiskFull) ? RecordIcon() : EMusUiNaviIconRecordNot ); |
|
145 |
||
146 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::PlayL" ); |
|
147 |
} |
|
148 |
||
149 |
||
150 |
// ----------------------------------------------------------------------------- |
|
151 |
// When orientation changed , Camera instances has to be recreated inorder |
|
152 |
// to receive proper orientated frames. |
|
153 |
// ----------------------------------------------------------------------------- |
|
154 |
// |
|
155 |
void CMusUiLiveSharingController::RefreshCameraOrientationL() |
|
156 |
{ |
|
157 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::RefreshCameraOrientationL" ); |
|
158 |
||
159 |
if ( EngineSession() ){ |
|
160 |
EngineSession()->RefreshOrientationL(); |
|
161 |
} |
|
162 |
||
163 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::RefreshCameraOrientationL" ); |
|
164 |
} |
|
165 |
||
166 |
// ----------------------------------------------------------------------------- |
|
167 |
// |
|
168 |
// ----------------------------------------------------------------------------- |
|
169 |
// |
|
170 |
void CMusUiLiveSharingController::PauseL() |
|
171 |
{ |
|
172 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::PauseL" ); |
|
173 |
||
174 |
CMusUiSendController::PauseL(); |
|
175 |
iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause ); |
|
176 |
||
177 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::PauseL" ); |
|
178 |
} |
|
179 |
||
180 |
||
181 |
// ----------------------------------------------------------------------------- |
|
182 |
// |
|
183 |
// ----------------------------------------------------------------------------- |
|
184 |
// |
|
185 |
void CMusUiLiveSharingController::DeleteEngineSession() |
|
186 |
{ |
|
187 |
CMusUiSendController::DeleteEngineSession(); |
|
188 |
if ( iSession && iSession->IsAudioRoutingLoudSpeaker() ) |
|
189 |
{ |
|
190 |
iShowDialog = ETrue; |
|
191 |
} |
|
192 |
delete iSession; |
|
193 |
iSession = NULL; |
|
194 |
} |
|
195 |
||
196 |
||
197 |
// ----------------------------------------------------------------------------- |
|
198 |
// |
|
199 |
// ----------------------------------------------------------------------------- |
|
200 |
// |
|
201 |
CMusEngMceOutSession* CMusUiLiveSharingController::EngineOutSession() |
|
202 |
{ |
|
203 |
return iSession; // Live session is CMusEngMceOutSession |
|
204 |
} |
|
205 |
||
206 |
||
207 |
// ----------------------------------------------------------------------------- |
|
208 |
// |
|
209 |
// ----------------------------------------------------------------------------- |
|
210 |
// |
|
211 |
void CMusUiLiveSharingController::InviteL( const TDesC& aRecipient ) |
|
212 |
{ |
|
213 |
MUS_LOG_TDESC( "mus: [MUSUI ] -> CMusUiLiveSharingController::InviteL:", |
|
214 |
aRecipient ); |
|
215 |
||
216 |
// Registration must not be pending in this phase |
|
217 |
__ASSERT_ALWAYS( !iSipRegistrationPending, |
|
218 |
iEventObserver.HandleError( KErrNotReady ) ); |
|
219 |
||
220 |
delete iAddress; |
|
221 |
iAddress = NULL; |
|
222 |
iAddress = aRecipient.AllocL(); |
|
223 |
||
224 |
||
225 |
TRAPD( err, iSession->InviteL( aRecipient ) ); |
|
226 |
MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::InviteL: After TRAPD" ); |
|
227 |
||
228 |
// If address is in wrong format, Manual Address Entry Dialog |
|
229 |
// is displayed |
|
230 |
if ( err != KErrNone ) |
|
231 |
{ |
|
232 |
// Display the error message |
|
233 |
DismissWaitDialog(); |
|
234 |
if ( !ExitOccured() ) |
|
235 |
{ |
|
236 |
MusUiDialogUtil::ShowGlobalErrorDialogL( |
|
237 |
R_MUS_LIVE_SHARING_VIEW_NOTE_INVITE_ERROR ); |
|
238 |
} |
|
239 |
if ( ( ++iTriedInvitations < 2 ) && ( err == KErrArgument ) ) |
|
240 |
{ |
|
241 |
MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::InviteL: iTriedInvitations < 2" ); |
|
242 |
iManualAddressTyped = ETrue; |
|
243 |
iResourceHandler->RequestKeypadL( ETrue ); |
|
244 |
iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal ); |
|
245 |
return; |
|
246 |
} |
|
247 |
else |
|
248 |
{ |
|
249 |
MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::InviteL: ++iTriedInvitations > 1" ); |
|
250 |
HandleExitL(); |
|
251 |
return; |
|
252 |
} |
|
253 |
} |
|
254 |
||
255 |
SetConnectionInitialized( ETrue ); |
|
256 |
||
257 |
ShowInvitingWaitDialogL(); |
|
258 |
||
259 |
||
260 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::InviteL" ); |
|
261 |
} |
|
262 |
||
263 |
||
264 |
// ----------------------------------------------------------------------------- |
|
265 |
// |
|
266 |
// ----------------------------------------------------------------------------- |
|
267 |
// |
|
268 |
void CMusUiLiveSharingController::HandleSliderValueChangeL( TInt aNewLevel ) |
|
269 |
{ |
|
270 |
MUS_LOG1( "mus: [MUSUI ] -> CMusUiLiveSharingController::HandleSliderValueChangeL(%d)", |
|
271 |
aNewLevel ) |
|
272 |
||
273 |
__ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) ); |
|
274 |
__ASSERT_ALWAYS( iConnectionEstablished, User::Leave( KErrNotReady ) ); |
|
275 |
||
276 |
if ( iToolbarZoomSelected ) |
|
277 |
{ |
|
278 |
iSession->SetZoomL( aNewLevel ); |
|
279 |
iLiveObserver.SetZoomL( iSession->CurrentZoomL() ); |
|
280 |
} |
|
281 |
else |
|
282 |
{ |
|
283 |
iSession->SetBrightnessL( aNewLevel ); |
|
284 |
iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() ); |
|
285 |
} |
|
286 |
||
287 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::HandleSliderValueChangeL" ) |
|
288 |
} |
|
289 |
||
290 |
||
291 |
||
292 |
// ----------------------------------------------------------------------------- |
|
293 |
// |
|
294 |
// ----------------------------------------------------------------------------- |
|
295 |
// |
|
296 |
void CMusUiLiveSharingController::OfferToolbarEventL( TInt aCommand ) |
|
297 |
{ |
|
298 |
MUS_LOG1( "mus: [MUSUI ] -> CMusUiLiveSharingController::OfferToolbarEventL [%d]", |
|
299 |
aCommand ); |
|
300 |
||
301 |
iLiveObserver.SetZoomVisible( EFalse ); |
|
302 |
iLiveObserver.SetBrightnessVisible( EFalse ); |
|
303 |
||
304 |
switch ( aCommand ) |
|
305 |
{ |
|
306 |
case EMusuiCmdToolbarPauseLive: |
|
307 |
{ |
|
308 |
HandleCommandL( EMusuiCmdViewPause ); |
|
309 |
HandlePauseResumeInToolbar(); |
|
310 |
break; |
|
311 |
} |
|
312 |
||
313 |
case EMusuiCmdToolbarUnPauseLive: |
|
314 |
{ |
|
315 |
HandleCommandL( EMusuiCmdViewContinue ); |
|
316 |
HandlePauseResumeInToolbar(); |
|
317 |
break; |
|
318 |
} |
|
319 |
case EMusuiCmdToolbarZoom: |
|
320 |
{ |
|
321 |
iToolbarZoomSelected = !iToolbarZoomSelected; |
|
322 |
||
323 |
if ( iToolbarZoomSelected ) |
|
324 |
{ |
|
325 |
iLiveObserver.SetZoomValues( iSession->MinZoomL(), |
|
326 |
iSession->MaxZoomL() ); |
|
327 |
iLiveObserver.SetZoomL( iSession->CurrentZoomL() ); |
|
328 |
} |
|
329 |
||
330 |
iLiveObserver.SetZoomVisible( iToolbarZoomSelected ); |
|
331 |
iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarZoom ); |
|
332 |
||
333 |
break; |
|
334 |
} |
|
335 |
case EMusuiCmdToolbarBrightness: |
|
336 |
{ |
|
337 |
iToolbarBrightnessSelected = !iToolbarBrightnessSelected; |
|
338 |
||
339 |
if ( iToolbarBrightnessSelected ) |
|
340 |
{ |
|
341 |
MUS_LOG1( "mus: [MUSUI ] CMusUiLiveSharingController::OfferToolbarEventL: Brightness %d", |
|
342 |
iSession->CurrentBrightnessL() ); |
|
343 |
||
344 |
iLiveObserver.SetBrightnessValues( iSession->MinBrightnessL(), |
|
345 |
iSession->MaxBrightnessL() ); |
|
346 |
||
347 |
iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() ); |
|
348 |
} |
|
349 |
||
350 |
iLiveObserver.SetBrightnessVisible( iToolbarBrightnessSelected ); |
|
351 |
iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarBrightness ); |
|
352 |
||
353 |
break; |
|
354 |
} |
|
355 |
default: // Not live specific, let the base class handle |
|
356 |
{ |
|
357 |
CMusUiEventController::OfferToolbarEventL( aCommand ); |
|
358 |
break; |
|
359 |
} |
|
360 |
} |
|
361 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::OfferToolbarEventL" ); |
|
362 |
} |
|
363 |
||
364 |
||
365 |
// ----------------------------------------------------------------------------- |
|
366 |
// |
|
367 |
// ----------------------------------------------------------------------------- |
|
368 |
// |
|
369 |
void CMusUiLiveSharingController::HandleCommandL( TInt aCommand ) |
|
370 |
{ |
|
371 |
MUS_LOG1( "mus: [MUSUI ] -> CMusUiLiveSharingController::HandleCommandL [%d]", |
|
372 |
aCommand ); |
|
373 |
||
374 |
__ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) ); |
|
375 |
||
376 |
switch ( aCommand ) |
|
377 |
{ |
|
378 |
case EMusuiCmdViewPause: |
|
379 |
{ |
|
380 |
UserInitiatedCameraStateChangeL(EFalse); |
|
381 |
break; |
|
382 |
} |
|
383 |
case EMusuiCmdViewContinue: |
|
384 |
{ |
|
385 |
UserInitiatedCameraStateChangeL(ETrue); |
|
386 |
break; |
|
387 |
} |
|
388 |
||
389 |
case EMusuiCmdViewShareVideo: |
|
390 |
{ |
|
391 |
PauseL(); |
|
392 |
// TODO: Change to video sharing |
|
393 |
break; |
|
394 |
} |
|
395 |
case EMusuiCmdViewShareImage: |
|
396 |
{ |
|
397 |
PauseL(); |
|
398 |
// TODO: Change to image sharing |
|
399 |
break; |
|
400 |
} |
|
401 |
||
402 |
case EMusuiCmdToolbarZoom: |
|
403 |
{ |
|
404 |
iToolbarZoomSelected = ETrue; |
|
405 |
iToolbarBrightnessSelected = EFalse; |
|
406 |
iLiveObserver.SetZoomValues( iSession->MinZoomL(), |
|
407 |
iSession->MaxZoomL() ); |
|
408 |
iLiveObserver.SetZoomL( iSession->CurrentZoomL() ); |
|
409 |
||
410 |
iLiveObserver.SetZoomVisible( iToolbarZoomSelected ); |
|
411 |
break; |
|
412 |
} |
|
413 |
case EMusuiCmdViewMiddleSoftkeyOk: |
|
414 |
{ |
|
415 |
HandleMiddleSoftkeyOkL(); |
|
416 |
break; |
|
417 |
} |
|
418 |
||
419 |
case EMusuiCmdViewZoom: |
|
420 |
{ |
|
421 |
ZoomL(); |
|
422 |
break; |
|
423 |
} |
|
424 |
||
425 |
case EMusuiCmdViewZoomIn: |
|
426 |
{ |
|
427 |
iLiveObserver.SetZoomVisible( MUS_NO_TOOLBAR ? iZoomSelected : iToolbarZoomSelected ); |
|
428 |
iSession->ZoomInL(); |
|
429 |
iLiveObserver.SetZoomL( iSession->CurrentZoomL() ); |
|
430 |
break; |
|
431 |
} |
|
432 |
case EMusuiCmdViewZoomOut: |
|
433 |
{ |
|
434 |
iLiveObserver.SetZoomVisible( MUS_NO_TOOLBAR ? iZoomSelected : iToolbarZoomSelected ); |
|
435 |
iSession->ZoomOutL(); |
|
436 |
iLiveObserver.SetZoomL( iSession->CurrentZoomL() ); |
|
437 |
break; |
|
438 |
} |
|
439 |
||
440 |
case EMusuiCmdToolbarBrightness: |
|
441 |
{ |
|
442 |
iToolbarZoomSelected = EFalse; |
|
443 |
iToolbarBrightnessSelected = ETrue; |
|
444 |
iLiveObserver.SetBrightnessValues( iSession->MinBrightnessL(), |
|
445 |
iSession->MaxBrightnessL() ); |
|
446 |
iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() ); |
|
447 |
||
448 |
iLiveObserver.SetBrightnessVisible( iToolbarBrightnessSelected ); |
|
449 |
break; |
|
450 |
} |
|
451 |
case EMusuiCmdViewBrightness: |
|
452 |
{ |
|
453 |
BrightnessL(); |
|
454 |
break; |
|
455 |
} |
|
456 |
||
457 |
case EMusuiCmdViewIncreaseBrightness: |
|
458 |
{ |
|
459 |
iLiveObserver.SetBrightnessVisible( MUS_NO_TOOLBAR ? iBrightnessSelected : iToolbarBrightnessSelected ); |
|
460 |
iSession->IncreaseBrightnessL(); |
|
461 |
iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() ); |
|
462 |
break; |
|
463 |
} |
|
464 |
case EMusuiCmdViewDecreaseBrightness: |
|
465 |
{ |
|
466 |
iLiveObserver.SetBrightnessVisible( MUS_NO_TOOLBAR ? iBrightnessSelected : iToolbarBrightnessSelected ); |
|
467 |
iSession->DecreaseBrightnessL(); |
|
468 |
iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() ); |
|
469 |
break; |
|
470 |
} |
|
471 |
||
472 |
case EMusuiCmdRecord: |
|
473 |
{ |
|
474 |
// Show toolbar hidden while showing options menu |
|
475 |
iEventObserver.SetToolbarVisibility( ETrue ); |
|
476 |
||
477 |
if ( iDiskFull ) |
|
478 |
{ |
|
479 |
DiskFull(); |
|
480 |
} |
|
481 |
else |
|
482 |
{ |
|
483 |
iSession->RecordL( ETrue ); |
|
484 |
iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRecord ); |
|
485 |
} |
|
486 |
break; |
|
487 |
} |
|
488 |
case EMusuiCmdStopRecording: |
|
489 |
{ |
|
490 |
// Show toolbar hidden while showing options menu |
|
491 |
iEventObserver.SetToolbarVisibility( ETrue ); |
|
492 |
||
493 |
iSession->RecordL( EFalse ); |
|
494 |
iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRecordNot ); |
|
495 |
break; |
|
496 |
} |
|
497 |
||
498 |
default: |
|
499 |
{ |
|
500 |
// Try more general handling |
|
501 |
CMusUiEventController::HandleCommandL( aCommand ); |
|
502 |
break; |
|
503 |
} |
|
504 |
} |
|
505 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::HandleCommandL" ); |
|
506 |
} |
|
507 |
||
508 |
||
509 |
// ----------------------------------------------------------------------------- |
|
510 |
// |
|
511 |
// ----------------------------------------------------------------------------- |
|
512 |
// |
|
513 |
void CMusUiLiveSharingController::LevelIndicatorDismissed() |
|
514 |
{ |
|
515 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::LevelIndicatorDismissed" ); |
|
516 |
if ( MUS_NO_TOOLBAR ) |
|
517 |
{ |
|
518 |
iZoomSelected = EFalse; |
|
519 |
iBrightnessSelected = EFalse; |
|
520 |
TRAP_IGNORE( iSharingObserver.EnableMiddleSoftkeyL( IsLoudSpeakerEnabled() ? |
|
521 |
R_MUSUI_VIEW_OPS_MSK_IHF_OFF : |
|
522 |
R_MUSUI_VIEW_OPS_MSK_IHF_ON ) ); |
|
523 |
} |
|
524 |
else |
|
525 |
{ |
|
526 |
if ( iToolbarZoomSelected ) |
|
527 |
{ |
|
528 |
iToolbarZoomSelected = EFalse; |
|
529 |
if ( !AknLayoutUtils::PenEnabled() ) |
|
530 |
{ |
|
531 |
TRAP_IGNORE( iSharingObserver.HighlightSelectedToolbarItem(EMusuiCmdToolbarZoom) ); |
|
532 |
} |
|
533 |
} |
|
534 |
else if( iToolbarBrightnessSelected ) |
|
535 |
{ |
|
536 |
iToolbarBrightnessSelected = EFalse; |
|
537 |
if ( !AknLayoutUtils::PenEnabled() ) |
|
538 |
{ |
|
539 |
TRAP_IGNORE( iSharingObserver.HighlightSelectedToolbarItem(EMusuiCmdToolbarBrightness) ); |
|
540 |
} |
|
541 |
} |
|
542 |
||
543 |
} |
|
544 |
||
545 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::LevelIndicatorDismissed" ); |
|
546 |
} |
|
547 |
||
548 |
||
549 |
||
550 |
// ----------------------------------------------------------------------------- |
|
551 |
// |
|
552 |
// ----------------------------------------------------------------------------- |
|
553 |
// |
|
554 |
TMusUiNaviMediaDecorator CMusUiLiveSharingController::RecordIcon() |
|
555 |
{ |
|
556 |
MUS_LOG( "mus: [MUSUI ] CMusUiLiveSharingController::RecordIcon" ); |
|
557 |
||
558 |
return (iSession->IsRecording() == EFalse) ? |
|
559 |
EMusUiNaviIconRecordNot : |
|
560 |
EMusUiNaviIconRecord; |
|
561 |
} |
|
562 |
||
563 |
||
564 |
// ----------------------------------------------------------------------------- |
|
565 |
// |
|
566 |
// ----------------------------------------------------------------------------- |
|
567 |
// |
|
568 |
TBool CMusUiLiveSharingController::IsBrightnessSupported() |
|
569 |
{ |
|
570 |
if ( !iSession ) |
|
571 |
{ |
|
572 |
return EFalse; |
|
573 |
} |
|
574 |
TRAPD( error, iSession->SetBrightnessL( iSession->CurrentBrightnessL() ) ) |
|
575 |
return ( error == KErrNotSupported ) ? EFalse : ETrue; |
|
576 |
} |
|
577 |
||
578 |
||
579 |
// ----------------------------------------------------------------------------- |
|
580 |
// |
|
581 |
// ----------------------------------------------------------------------------- |
|
582 |
// |
|
583 |
TBool CMusUiLiveSharingController::IsDiskFull() |
|
584 |
{ |
|
585 |
return iDiskFull; |
|
586 |
} |
|
587 |
||
588 |
||
589 |
// ----------------------------------------------------------------------------- |
|
590 |
// |
|
591 |
// ----------------------------------------------------------------------------- |
|
592 |
// |
|
593 |
TBool CMusUiLiveSharingController::ToolbarZoomSelected() |
|
594 |
{ |
|
595 |
return iToolbarZoomSelected; |
|
596 |
} |
|
597 |
||
598 |
||
599 |
// ----------------------------------------------------------------------------- |
|
600 |
// |
|
601 |
// ----------------------------------------------------------------------------- |
|
602 |
// |
|
603 |
TBool CMusUiLiveSharingController::ToolbarBrightnessSelected() |
|
604 |
{ |
|
605 |
return iToolbarBrightnessSelected; |
|
606 |
} |
|
607 |
||
608 |
// ----------------------------------------------------------------------------- |
|
609 |
// |
|
610 |
// ----------------------------------------------------------------------------- |
|
611 |
// |
|
612 |
TBool CMusUiLiveSharingController::ZoomSelected() |
|
613 |
{ |
|
614 |
return iZoomSelected; |
|
615 |
} |
|
616 |
||
617 |
||
618 |
// ----------------------------------------------------------------------------- |
|
619 |
// |
|
620 |
// ----------------------------------------------------------------------------- |
|
621 |
// |
|
622 |
TBool CMusUiLiveSharingController::BrightnessSelected() |
|
623 |
{ |
|
624 |
return iBrightnessSelected; |
|
625 |
} |
|
626 |
||
627 |
||
628 |
// ----------------------------------------------------------------------------- |
|
629 |
// |
|
630 |
// ----------------------------------------------------------------------------- |
|
631 |
// |
|
41
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
632 |
void CMusUiLiveSharingController::ResetSelectedFlags() |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
633 |
{ |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
634 |
iToolbarZoomSelected = EFalse; |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
635 |
iToolbarBrightnessSelected = EFalse; |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
636 |
} |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
637 |
|
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
638 |
|
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
639 |
// ----------------------------------------------------------------------------- |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
640 |
// |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
641 |
// ----------------------------------------------------------------------------- |
755f0370535b
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
642 |
// |
33 | 643 |
void CMusUiLiveSharingController::ZoomL() |
644 |
{ |
|
645 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::ZoomL" ); |
|
646 |
iZoomSelected = ETrue; |
|
647 |
iLiveObserver.SetZoomValues( iSession->MinZoomL(), iSession->MaxZoomL() ); |
|
648 |
iLiveObserver.SetZoomL( iSession->CurrentZoomL() ); |
|
649 |
iLiveObserver.SetZoomVisible( ETrue ); |
|
650 |
||
651 |
if ( MUS_NO_TOOLBAR ) |
|
652 |
{ |
|
653 |
iSharingObserver.EnableMiddleSoftkeyL( R_MUSUI_VIEW_MSK_OK ); |
|
654 |
} |
|
655 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::ZoomL" ); |
|
656 |
} |
|
657 |
||
658 |
||
659 |
// ----------------------------------------------------------------------------- |
|
660 |
// |
|
661 |
// ----------------------------------------------------------------------------- |
|
662 |
// |
|
663 |
void CMusUiLiveSharingController::BrightnessL() |
|
664 |
{ |
|
665 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::BrightnessL" ); |
|
666 |
iBrightnessSelected = ETrue; |
|
667 |
iLiveObserver.SetBrightnessValues( iSession->MinBrightnessL(), |
|
668 |
iSession->MaxBrightnessL() ); |
|
669 |
iLiveObserver.SetBrightnessL( iSession->CurrentBrightnessL() ); |
|
670 |
iLiveObserver.SetBrightnessVisible( ETrue ); |
|
671 |
||
672 |
if ( MUS_NO_TOOLBAR ) |
|
673 |
{ |
|
674 |
iSharingObserver.EnableMiddleSoftkeyL( R_MUSUI_VIEW_MSK_OK ); |
|
675 |
} |
|
676 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::BrightnessL" ); |
|
677 |
} |
|
678 |
||
679 |
||
680 |
// ----------------------------------------------------------------------------- |
|
681 |
// |
|
682 |
// ----------------------------------------------------------------------------- |
|
683 |
// |
|
684 |
void CMusUiLiveSharingController::HandleMiddleSoftkeyOkL() |
|
685 |
{ |
|
686 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::HandleMiddleSoftkeyOkL" ); |
|
687 |
||
688 |
if ( iZoomSelected ) |
|
689 |
{ |
|
690 |
iZoomSelected = EFalse; |
|
691 |
iLiveObserver.SetZoomVisible( EFalse ); |
|
692 |
} |
|
693 |
else if ( iBrightnessSelected ) |
|
694 |
{ |
|
695 |
iZoomSelected = EFalse; |
|
696 |
iLiveObserver.SetBrightnessVisible( EFalse ); |
|
697 |
} |
|
698 |
||
699 |
iSharingObserver.EnableMiddleSoftkeyL( IsLoudSpeakerEnabled() ? |
|
700 |
R_MUSUI_VIEW_OPS_MSK_IHF_OFF : |
|
701 |
R_MUSUI_VIEW_OPS_MSK_IHF_ON ); |
|
702 |
||
703 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::HandleMiddleSoftkeyOkL" ); |
|
704 |
} |
|
705 |
||
706 |
// ----------------------------------------------------------------------------- |
|
707 |
// |
|
708 |
// ----------------------------------------------------------------------------- |
|
709 |
// |
|
710 |
void CMusUiLiveSharingController::ZoomInL() |
|
711 |
{ |
|
712 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::ZoomInL" ); |
|
713 |
iSession->ZoomInL(); |
|
714 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::ZoomInL" ); |
|
715 |
} |
|
716 |
||
717 |
||
718 |
// ----------------------------------------------------------------------------- |
|
719 |
// |
|
720 |
// ----------------------------------------------------------------------------- |
|
721 |
// |
|
722 |
void CMusUiLiveSharingController::ZoomOutL() |
|
723 |
{ |
|
724 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::ZoomOutL" ); |
|
725 |
iSession->ZoomOutL(); |
|
726 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::ZoomOutL" ); |
|
727 |
} |
|
728 |
||
729 |
||
730 |
// ----------------------------------------------------------------------------- |
|
731 |
// |
|
732 |
// ----------------------------------------------------------------------------- |
|
733 |
// |
|
734 |
void CMusUiLiveSharingController::IncreaseBrightnessL() |
|
735 |
{ |
|
736 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::IncreaseBrightnessL" ); |
|
737 |
iSession->IncreaseBrightnessL(); |
|
738 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::IncreaseBrightnessL" ); |
|
739 |
} |
|
740 |
||
741 |
||
742 |
// ----------------------------------------------------------------------------- |
|
743 |
// |
|
744 |
// ----------------------------------------------------------------------------- |
|
745 |
// |
|
746 |
void CMusUiLiveSharingController::DecreaseBrightnessL() |
|
747 |
{ |
|
748 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::DecreaseBrightnessL" ); |
|
749 |
iSession->DecreaseBrightnessL(); |
|
750 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::DecreaseBrightnessL" ); |
|
751 |
} |
|
752 |
||
753 |
||
754 |
// ----------------------------------------------------------------------------- |
|
755 |
// |
|
756 |
// ----------------------------------------------------------------------------- |
|
757 |
// |
|
758 |
void CMusUiLiveSharingController::DiskFull() |
|
759 |
{ |
|
760 |
// Update the icon: |
|
761 |
TRAP_IGNORE( iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRecordNot ); |
|
762 |
DismissWaitDialog(); |
|
763 |
// Saving ends when disk is full but streaming continues (user is notified) |
|
764 |
TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( R_MUS_VIEW_NOTE_MEMORY_LOW ) ) ); |
|
765 |
iDiskFull = ETrue; |
|
766 |
} |
|
767 |
||
768 |
// ----------------------------------------------------------------------------- |
|
769 |
// |
|
770 |
// ----------------------------------------------------------------------------- |
|
771 |
// |
|
772 |
void CMusUiLiveSharingController::OrientationRefreshEnded() |
|
773 |
{ |
|
774 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::OrientationRefreshEnded" ); |
|
775 |
iLiveObserver.DoRefreshView(); |
|
776 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::OrientationRefreshEnded" ); |
|
777 |
} |
|
778 |
||
779 |
// ----------------------------------------------------------------------------- |
|
780 |
// |
|
781 |
// ----------------------------------------------------------------------------- |
|
782 |
// |
|
783 |
void CMusUiLiveSharingController::SessionEstablished() |
|
784 |
{ |
|
785 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::SessionEstablished" ); |
|
786 |
||
787 |
iSessionEstablished = ETrue; |
|
788 |
||
789 |
TRAPD( error, iResourceHandler->RequestCameraL( ETrue ) ); |
|
790 |
if ( error != KErrNone ) |
|
791 |
{ |
|
792 |
MUS_LOG1( "mus: [MUSUI ] RequestCameraL leave code: %d", error ) |
|
793 |
} |
|
794 |
||
795 |
CMusUiSendController::SessionEstablished(); // Base class handling |
|
796 |
||
797 |
iVideoToBeSaved = ETrue; |
|
798 |
||
799 |
MusSettingsKeys::TAutoRecord autoRecordValue = EAutoRecordOff; |
|
800 |
TRAPD ( errAutoRecord, autoRecordValue = |
|
801 |
MultimediaSharingSettings::AutoRecordSettingL() ); |
|
802 |
if ( errAutoRecord != KErrNone ) |
|
803 |
{ |
|
804 |
MUS_LOG1( "mus: [MUSUI ] AutoRecordSettingL leave code: %d", errAutoRecord ) |
|
805 |
HandleError( errAutoRecord ); |
|
806 |
} |
|
807 |
||
808 |
if ( autoRecordValue != EAutoRecordOff ) |
|
809 |
{ |
|
810 |
TRAPD ( errRecordL, iSession->RecordL( ETrue ) ); |
|
811 |
if ( errRecordL != KErrNone ) |
|
812 |
{ |
|
813 |
MUS_LOG1( "mus: [MUSUI ] RecordL leave code: %d", errRecordL ) |
|
814 |
HandleError( errRecordL ); |
|
815 |
} |
|
816 |
} |
|
817 |
||
818 |
TRAP_IGNORE( iEventObserver.ShowNaviPaneIconL( RecordIcon() ) ) |
|
819 |
||
820 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::SessionEstablished" ); |
|
821 |
} |
|
822 |
||
823 |
||
824 |
// ----------------------------------------------------------------------------- |
|
825 |
// |
|
826 |
// ----------------------------------------------------------------------------- |
|
827 |
// |
|
828 |
void CMusUiLiveSharingController::SessionTerminated() |
|
829 |
{ |
|
830 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::SessionTerminated" ); |
|
831 |
iSessionEstablished = EFalse; |
|
832 |
if ( !ExitOccured() ) |
|
833 |
{ |
|
834 |
DismissWaitDialog(); |
|
835 |
||
836 |
TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) ); |
|
837 |
} |
|
838 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::SessionTerminated" ); |
|
839 |
} |
|
840 |
||
841 |
||
842 |
// ----------------------------------------------------------------------------- |
|
843 |
// |
|
844 |
// ----------------------------------------------------------------------------- |
|
845 |
// |
|
846 |
void CMusUiLiveSharingController::SessionConnectionLost() |
|
847 |
{ |
|
848 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::SessionConnectionLost" ); |
|
849 |
iSessionEstablished = EFalse; |
|
850 |
DismissWaitDialog(); |
|
851 |
if ( !ExitOccured() ) |
|
852 |
{ |
|
853 |
TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( |
|
854 |
R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) ); |
|
855 |
} |
|
856 |
||
857 |
TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) ); |
|
858 |
||
859 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::SessionConnectionLost" ); |
|
860 |
} |
|
861 |
||
862 |
||
863 |
// ----------------------------------------------------------------------------- |
|
864 |
// |
|
865 |
// ----------------------------------------------------------------------------- |
|
866 |
// |
|
867 |
void CMusUiLiveSharingController::SessionFailed() |
|
868 |
{ |
|
869 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::SessionFailed" ); |
|
870 |
iSessionEstablished = EFalse; |
|
871 |
if ( !ExitOccured() ) |
|
872 |
{ |
|
873 |
DismissWaitDialog(); |
|
874 |
||
875 |
TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) ); |
|
876 |
} |
|
877 |
||
878 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::SessionFailed" ); |
|
879 |
} |
|
880 |
||
881 |
||
882 |
// ----------------------------------------------------------------------------- |
|
883 |
// |
|
884 |
// ----------------------------------------------------------------------------- |
|
885 |
// |
|
886 |
void CMusUiLiveSharingController::StreamIdle() |
|
887 |
{ |
|
888 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::StreamIdle" ); |
|
889 |
DismissWaitDialog(); |
|
890 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::StreamIdle" ); |
|
891 |
} |
|
892 |
||
893 |
||
894 |
// ----------------------------------------------------------------------------- |
|
895 |
// |
|
896 |
// ----------------------------------------------------------------------------- |
|
897 |
// |
|
898 |
void CMusUiLiveSharingController::StreamStreaming() |
|
899 |
{ |
|
900 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::StreamStreaming" ); |
|
901 |
//DismissWaitDialog(); |
|
902 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::StreamStreaming" ); |
|
903 |
} |
|
904 |
||
905 |
||
906 |
// ----------------------------------------------------------------------------- |
|
907 |
// |
|
908 |
// ----------------------------------------------------------------------------- |
|
909 |
// |
|
910 |
void CMusUiLiveSharingController::SessionTimeChanged( |
|
911 |
const TTimeIntervalSeconds& aSeconds ) |
|
912 |
{ |
|
913 |
if ( aSeconds.Int() > -1 ) |
|
914 |
{ |
|
915 |
iSharingObserver.UpdateSessionTime( SessionTimeFormatted( aSeconds ) ); |
|
916 |
} |
|
917 |
} |
|
918 |
||
919 |
||
920 |
// ----------------------------------------------------------------------------- |
|
921 |
// |
|
922 |
// ----------------------------------------------------------------------------- |
|
923 |
// |
|
924 |
void CMusUiLiveSharingController::InactivityTimeout() |
|
925 |
{ |
|
926 |
MUS_LOG( "mus: [MUSUI ] -> CMusUiLiveSharingController::InactivityTimeout" ); |
|
927 |
DismissWaitDialog(); |
|
928 |
if ( !ExitOccured() ) |
|
929 |
{ |
|
930 |
TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( |
|
931 |
R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A ) ); |
|
932 |
} |
|
933 |
||
934 |
TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) ); |
|
935 |
||
936 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::InactivityTimeout" ); |
|
937 |
} |
|
938 |
||
939 |
// ----------------------------------------------------------------------------- |
|
940 |
// Determines whether Session established or not |
|
941 |
// ----------------------------------------------------------------------------- |
|
942 |
// |
|
943 |
TBool CMusUiLiveSharingController::IsSessionEstablished() |
|
944 |
{ |
|
945 |
return iSessionEstablished; |
|
946 |
} |
|
947 |
||
948 |
// ----------------------------------------------------------------------------- |
|
949 |
// |
|
950 |
// ----------------------------------------------------------------------------- |
|
951 |
// |
|
952 |
void CMusUiLiveSharingController::HandlePauseResumeInToolbar() |
|
953 |
{ |
|
954 |
TBool isPlaying( EFalse ); |
|
955 |
TRAP_IGNORE( isPlaying = IsPlayingL() ) |
|
956 |
if ( isPlaying ) |
|
957 |
{ |
|
958 |
iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnPauseLive, |
|
959 |
EMusuiCmdToolbarPauseLive, |
|
960 |
ETrue ); |
|
961 |
} |
|
962 |
else |
|
963 |
{ |
|
964 |
iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPauseLive, |
|
965 |
EMusuiCmdToolbarUnPauseLive, |
|
966 |
ETrue ); |
|
967 |
} |
|
968 |
} |
|
969 |
||
970 |
// ----------------------------------------------------------------------------- |
|
971 |
// Workaround for problem at lower level (encoder side) which causes crash |
|
972 |
// if several sequential pause/resumes are done too rapidly. Discard state change |
|
973 |
// attempt if it occurs too quickly after previous state change. |
|
974 |
// ----------------------------------------------------------------------------- |
|
975 |
// |
|
976 |
void CMusUiLiveSharingController::UserInitiatedCameraStateChangeL( TBool aEnable ) |
|
977 |
{ |
|
978 |
MUS_LOG1( "mus: [MUSUI ] -> CMusUiLiveSharingController::UserInitiatedCameraStateChangeL, enable:", |
|
979 |
aEnable ); |
|
980 |
||
981 |
if ( iPauseResumeGuardTimer->IsActive() ){ |
|
982 |
MUS_LOG( "mus: [MUSUI ] <- State change ignored as guard timer is running!" ); |
|
983 |
return; |
|
984 |
} |
|
985 |
||
986 |
if ( aEnable ) |
|
987 |
{ |
|
988 |
PlayL(); |
|
989 |
} |
|
990 |
else |
|
991 |
{ |
|
992 |
PauseL(); |
|
993 |
} |
|
994 |
||
995 |
iPauseResumeGuardTimer->After( KMusUiPauseResumeGuardPeriod ); |
|
996 |
||
997 |
MUS_LOG( "mus: [MUSUI ] <- CMusUiLiveSharingController::UserInitiatedCameraStateChangeL" ); |
|
998 |
} |
|
999 |
||
1000 |
||
1001 |
// End of file |
|
1002 |