mmsharing/mmshui/src/musuiclipsharingcontroller.cpp
author Simon Howkins <simonh@symbian.org>
Mon, 22 Nov 2010 16:50:40 +0000
branchRCL_3
changeset 44 87ee154df721
parent 41 755f0370535b
permissions -rw-r--r--
Adjusted to avoid exports, etc, from a top-level bld.inf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  Application's UI class.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
#include "musuiclipsharingcontroller.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#include "musuicallbackservice.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include "musuieventobserver.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include "musuisharingobserver.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include "musuisendobserver.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include "musuiclipsharingobserver.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
#include "musuidialogutil.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
#include "musengclipsession.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
#include "mussettings.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
#include "mussettingskeys.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
#include "musuiresourcehandler.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
#include "musui.hrh"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
#include "muslogger.h" // debug logging
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
#include "musuiactivetimer.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
#include "musuigeneralview.h"
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
#include <musui.rsg>
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
#include <StringLoader.h>
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
#include <AknUtils.h>
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
#include <badesca.h>
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
#include <avkon.hrh>
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
// CONSTANTS
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
const TInt KMusTimeToCloseAfterClipEndedStandard  = 60 * 1000000; // 60 seconds
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
const TInt KMusTimeToCloseAfterClipEndedOpVariant =  1 * 1000000; //  1 second
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
CMusUiClipSharingController* CMusUiClipSharingController::NewL(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
                                MMusUiEventObserver& aEventObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
                                MMusUiSharingObserver& aSharingObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
        	                    MMusUiSendObserver& aSendObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
                                MMusUiClipSharingObserver& aClipObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
                                const TRect& aRect )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
    CMusUiClipSharingController* self =
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
            new( ELeave ) CMusUiClipSharingController( aEventObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
                                                       aSharingObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
                                                       aSendObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
                                                       aClipObserver );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
    CleanupStack::PushL( self );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
    self->ConstructL( aRect );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
    CleanupStack::Pop( self );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
    return self;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
CMusUiClipSharingController::~CMusUiClipSharingController()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::~CMusUiClipSharingController" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    delete iCloseTimer;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
    DeleteEngineSession();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
    delete iFileName;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::~CMusUiClipSharingController" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
CMusUiClipSharingController::CMusUiClipSharingController(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
                                MMusUiEventObserver& aEventObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
                                MMusUiSharingObserver& aSharingObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
                                MMusUiSendObserver& aSendObserver,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
                                MMusUiClipSharingObserver& aClipObserver )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
    :CMusUiSendController( aEventObserver, aSharingObserver, aSendObserver ),
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
    iClipObserver( aClipObserver )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
void CMusUiClipSharingController::ConstructL( const TRect& aRect )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::ConstructL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
    CMusUiSendController::ConstructL(); // Base class construction
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
                            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
    iRect = aRect;  
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
    iSession = CMusEngClipSession::NewL( iRect,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
                                         *this,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
                                         *this,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
                                         *this,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
                                         iSipProfileId );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
    iSession->SetAudioRoutingObserver( this );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
    iSession->SetVolumeChangeObserver( this );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
    if ( iSession->AudioRoutingCanBeChanged() && !iSession->IsAudioRoutingHeadset() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
        iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
    if ( iVideoCodec && iVideoCodec->Length() > 0 )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
        iSession->SetSupportedVideoCodecListL( *iVideoCodec );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
   	iCallbackService->AsyncEventL( EMusUiAsyncStartMediaGallery );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
   	
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
   	iCloseTimer = CMusUiActiveTimer::NewL( this );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
   	
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::ConstructL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
void CMusUiClipSharingController::HandleAsyncEventL( TMusUiAsyncEvent aEventId )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleAsyncEventL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
    switch ( aEventId )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
        case EMusUiAsyncStartMediaGallery:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
            iTranscode = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
            iTranscodingGoing = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
            if ( !iSession )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
                iSession = CMusEngClipSession::NewL( iRect, 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
                                                     *this, 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
                                                     *this, 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
                                                     *this, 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
                                                     iSipProfileId );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
                iSession->SetAudioRoutingObserver( this );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
                        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
            // Do fetching guarded. If registration completes during fetching,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
            // there is no need to do anything.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
            iFileFetchingOngoing = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
            iClipObserver.RunFetchDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
            iFileFetchingOngoing = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
            TRAPD( error,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
                   iSession->SetClipL( *iFileName ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
            MUS_LOG_TDESC( "mus: [MUSUI ]     File name: ",
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
                           iFileName->Des() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
            if ( error == KErrNone)
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
				if ( iSession->AudioRoutingCanBeChanged() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
                    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
                    iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
                    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
                iClipEnded = EFalse;                   
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
                StartInvitationL();	
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
            else if ( error == KErrPermissionDenied )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
                MusUiDialogUtil::ShowInformationDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
                                        R_MUS_VIEW_DRM_INFO_SEND_FORBID );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
                DeleteEngineSession();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
                delete iFileName;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
                iFileName = NULL;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
 				iSession = CMusEngClipSession::NewL( iRect,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
                                                     *this,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
                                                     *this,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
                                                     *this,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
                                                     iSipProfileId );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
                iSession->SetAudioRoutingObserver( this );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
                if ( iSession->AudioRoutingCanBeChanged() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
                    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
                    iSession->EnableLoudspeakerL( ELoudspeakerEnabled, ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
                    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
                iCallbackService->AsyncEventL( EMusUiAsyncStartMediaGallery );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
            else
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
                HandleExitL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
                
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
        case EMusUiAsyncStartTranscoding:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
            // Parse Target Filename for the transcoding result
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
            // and start transcoding:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
            //iSession->TranscodeL( VideoFileNameL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
            // Show progress dialog:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
            //iObserver->ShowTranscodingProgressDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
            iTranscodingGoing = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
            }  
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
        default:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
            // Not clip specific, let the base class handle
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
            CMusUiSendController::HandleAsyncEventL( aEventId );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleAsyncEventL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
void CMusUiClipSharingController::DeleteEngineSession()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::DeleteEngineSession" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
    CMusUiSendController::DeleteEngineSession();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
    // Cancel transcoding
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
    if ( iSession && iTranscodingGoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
        MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::DeleteEngineSession:\
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
                            Canceling transcoding..." );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
        DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
                                R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
                     iSession->CancelTranscodeL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
    if ( iSession && iSession->IsAudioRoutingLoudSpeaker() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
	    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
	    iShowDialog = ETrue; 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   248
	    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   249
    delete iSession;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   250
    iSession = NULL;    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   251
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::DeleteEngineSession" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   252
	}
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   253
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   254
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   255
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   256
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   257
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   258
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   259
CMusEngMceOutSession* CMusUiClipSharingController::EngineOutSession()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   260
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   261
    return iSession; // Clip session is CMusEngMceOutSession
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   262
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   263
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   264
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   265
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   266
// Handles status changes specific to sending sharing types.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   267
// Calls base class version for status changes that are not sending specific. 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   268
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   269
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   270
void CMusUiClipSharingController::HandleChangedStatusL(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   271
                        TMusAvailabilityStatus aStatus )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   272
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   273
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleChangedStatusL" )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   274
   
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   275
    switch( aStatus )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   276
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   277
        case EMultimediaSharingAvailable:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   278
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   279
            MUS_LOG( "mus: [MUSUI ]     EMultimediaSharingAvailable" )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   280
            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   281
            if ( iSipRegistrationPending )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   282
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   283
                iSipRegistrationPending = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   284
            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   285
                // If fecth dialog is still open, there is no need to do anything
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   286
                if ( !iFileFetchingOngoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   287
                	{
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   288
                	iSipRegistrationPending = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   289
                    // Set callback service, Call StartInvitationL when wait dialog dismissed
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   290
                	TRAPD( err, iSharingObserver.SetWaitDialogCallbackL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   291
                	            &iWaitDialogCallback ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   292
                    // Dismiss pending wait note
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   293
            	    iSharingObserver.DismissWaitDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   294
            	    if ( err == KErrNotReady )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   295
            	        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   296
            	        StartInvitationL();	
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   297
            	        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   298
                	}
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   299
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   300
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   301
            }   
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   302
        default:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   303
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   304
            // Not clip specific, let the base class handle
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   305
            CMusUiSendController::HandleChangedStatusL( aStatus );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   306
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   307
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   308
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   309
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleChangedStatusL" )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   310
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   311
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   312
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   313
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   314
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   315
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   316
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   317
void CMusUiClipSharingController::InviteL( const TDesC& aRecipient )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   318
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   319
    MUS_LOG_TDESC( "mus: [MUSUI ]    -> CMusUiClipSharingController::InviteL:",
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   320
                            aRecipient );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   321
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   322
    // Registration must not be pending in this phase
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   323
    __ASSERT_ALWAYS( !iSipRegistrationPending, 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   324
                     iEventObserver.HandleError( KErrNotReady ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   325
                     
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   326
    delete iAddress;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   327
    iAddress = NULL;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   328
    iAddress = aRecipient.AllocL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   329
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   330
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   331
    TBool inviteProceeding = DoInviteL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   332
    if ( !inviteProceeding )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   333
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   334
        MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::InviteL, invite failed" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   335
        return;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   336
        }      
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   337
    if( iTranscode )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   338
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   339
        MUS_LOG( "mus: [MUSUI ]     Starting transcode..." );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   340
        iTranscode = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   341
      
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   342
        // Start transcoding
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   343
        iTranscodingGoing = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   344
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   345
        SetFileNameL( VideoFileNameL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   346
        TRAPD( err, iSession->TranscodeL( *iFileName ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   347
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   348
        if ( err != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   349
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   350
            MUS_LOG1( "mus: [MUSUI ]     Transcoding failed: %d", err );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   351
            iTranscodingGoing = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   352
            if ( iTranscodeDueUnknownRemoteCapas )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   353
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   354
                MUS_LOG( "mus: [MUSUI ]     Retry invite without transcoding" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   355
                // Still retry the clip without transcoding as other end might support current codec.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   356
                iVideoToBeSaved = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   357
                inviteProceeding = DoInviteL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   358
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   359
            else if ( err == KErrNotFound )  // No Video Editor Engine
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   360
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   361
                MusUiDialogUtil::ShowGlobalErrorDialogL(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   362
                    R_MUS_LIVE_SHARING_VIEW_NOTE_TRANSCODING_NOT_SUPPORTED );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   363
                DeleteEngineSession();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   364
                iVideoToBeSaved = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   365
                HandleExitL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   366
                inviteProceeding = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   367
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   368
            else
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   369
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   370
                // Unable to convert clip, if transc. leaves.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   371
                // After note return back to the media gallery.
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   372
                TranscodingFailed();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   373
                inviteProceeding = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   374
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   375
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   376
        else
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   377
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   378
            // Show progress dialog:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   379
            iClipObserver.ShowTranscodingProgressDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   380
            inviteProceeding = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   381
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   382
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   383
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   384
    if ( inviteProceeding )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   385
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   386
        SetConnectionInitialized( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   387
        ShowInvitingWaitDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   388
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   389
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   390
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::InviteL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   391
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   392
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   393
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   394
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   395
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   396
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   397
TBool CMusUiClipSharingController::DoInviteL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   398
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   399
    __ASSERT_ALWAYS( iAddress, User::Leave( KErrNotReady ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   400
    TRAPD( err, iSession->InviteL( *iAddress ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   401
    MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::DoInviteL: After TRAPD" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   402
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   403
    // If address is in wrong format, Manual Address Entry Dialog
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   404
    // is displayed
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   405
    if ( err != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   406
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   407
        DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   408
        MusUiDialogUtil::ShowGlobalErrorDialogL(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   409
                          R_MUS_LIVE_SHARING_VIEW_NOTE_INVITE_ERROR );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   410
        if ( ( ++iTriedInvitations < 2 )  && ( err == KErrArgument ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   411
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   412
            MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::DoInviteL: iTriedInvitations < 2" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   413
            iManualAddressTyped = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   414
            iResourceHandler->RequestKeypadL( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   415
            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   416
            // If the address has to be queried again...:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   417
            iTranscode = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   418
            
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   419
            MUS_LOG_TDESC( "mus: [MUSUI ]     CMusUiClipSharingController::DoInviteL: ",
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   420
                     iFileName->Des() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   421
                                               
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   422
            iSendObserver.ManualAddressEntryL( *iRemoteSipAddressProposal );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   423
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   424
        else
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   425
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   426
            MUS_LOG( "mus: [MUSUI ]     CMusUiLiveSharingController::DoInviteL: ++iTriedInvitations > 1" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   427
            DeleteEngineSession();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   428
            HandleExitL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   429
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   430
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   431
    return ( err == KErrNone );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   432
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   433
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   434
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   435
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   436
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   437
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   438
void CMusUiClipSharingController::HandleSliderValueChangeL( TInt aNewLevel )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   439
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   440
    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleSliderValueChangeL(%d)",
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   441
              aNewLevel )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   442
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   443
    __ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   444
    __ASSERT_ALWAYS( iConnectionEstablished, User::Leave( KErrNotReady ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   445
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   446
    iSession->SetPositionL( TTimeIntervalSeconds( aNewLevel ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   447
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   448
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleSliderValueChangeL" )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   449
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   450
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   451
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   452
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   453
void CMusUiClipSharingController::OfferToolbarEventL( TInt aCommand )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   454
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   455
    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::OfferToolbarEventL [%d]",
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   456
                            aCommand );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   457
                                                    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   458
    switch ( aCommand )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   459
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   460
        case EMusuiCmdToolbarPause:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   461
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   462
            HandleCommandL( EMusuiCmdViewPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   463
            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   464
                                                    EMusuiCmdToolbarUnPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   465
                                                    ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   466
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   467
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   468
        case EMusuiCmdToolbarUnPause:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   469
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   470
            HandleCommandL( EMusuiCmdViewContinue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   471
            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   472
                                                    EMusuiCmdToolbarPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   473
                                                    ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   474
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   475
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   476
        case EMusuiCmdToolbarFFRev:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   477
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   478
            iToolbarFFRevSelected = !iToolbarFFRevSelected; 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   479
            iClipObserver.SetDurationValue( iSession->DurationL().Int() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   480
            if ( iToolbarFFRevSelected )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   481
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   482
                iWasPlayingBeforeWinding = iSession->IsPlayingL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   483
                PauseL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   484
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   485
            else
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   486
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   487
                StopWindingL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   488
                if ( iWasPlayingBeforeWinding )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   489
                    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   490
                    PlayL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   491
                    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   492
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   493
//            iClipObserver.SetDurationVisible();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   494
            iSharingObserver.HighlightSelectedToolbarItem( EMusuiCmdToolbarFFRev );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   495
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   496
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   497
        default:    // Not clip specific, let the base class handle
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   498
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   499
            CMusUiEventController::OfferToolbarEventL( aCommand );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   500
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   501
            }    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   502
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   503
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   504
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::OfferToolbarEventL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   505
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   506
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   507
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   508
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   509
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   510
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   511
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   512
void CMusUiClipSharingController::HandleCommandL(TInt aCommand)
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   513
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   514
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::HandleCommandL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   515
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   516
    __ASSERT_ALWAYS( !ExitOccured(), User::Leave( KErrDied ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   517
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   518
    switch ( aCommand )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   519
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   520
        case EMusuiCmdViewPause:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   521
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   522
            PauseL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   523
            iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   524
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   525
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   526
        case EMusuiCmdViewContinue:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   527
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   528
            PlayL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   529
            iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPlay );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   530
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   531
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   532
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   533
        case EMusuiCmdViewReplay:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   534
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   535
            if( !MUS_NO_TOOLBAR )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   536
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   537
    			if (!AknLayoutUtils::PenEnabled())
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   538
    				{
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   539
    				iEventObserver.SetToolbarVisibility( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   540
            		}
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   541
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   542
                if ( ClipEnded() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   543
                    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   544
                    iEventObserver.SetToolbarVisibility( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   545
                    // Simulate press of play in toolbar
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   546
                    OfferToolbarEventL( EMusuiCmdToolbarUnPause );             
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   547
                    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   548
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   549
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   550
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   551
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   552
        case EMusuiCmdViewShareVideo:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   553
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   554
            PauseL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   555
            // TODO: Change to video sharing
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   556
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   557
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   558
        case EMusuiCmdViewShareImage:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   559
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   560
            PauseL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   561
            // TODO: Change to image sharing
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   562
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   563
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   564
        case EMusuiCmdViewShareLive:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   565
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   566
            // TODO: Change to live sharing
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   567
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   568
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   569
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   570
        case EMusuiCmdViewAudioNormal:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   571
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   572
            if( !MUS_NO_TOOLBAR )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   573
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   574
    			if (!AknLayoutUtils::PenEnabled())
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   575
    				{
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   576
    				iEventObserver.SetToolbarVisibility( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   577
            		}
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   578
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   579
            iSession->UnmuteL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   580
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   581
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   582
        case EMusuiCmdViewAudioMute:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   583
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   584
			if (!AknLayoutUtils::PenEnabled())
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   585
				{
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   586
				iEventObserver.SetToolbarVisibility( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   587
        		}
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   588
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   589
            iSession->MuteL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   590
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   591
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   592
        case EMusuiCmdViewFastForward:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   593
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   594
            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastForward" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   595
            if ( DoFastForwardingL( ETrue ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   596
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   597
                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconForward );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   598
                iClipObserver.SetPositionValueL( iSession->PositionL().Int() );
41
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   599
                iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   600
                		                                EMusuiCmdToolbarUnPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   601
                                                        ETrue );
33
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   602
                //iClipObserver.SetDurationVisible();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   603
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   604
            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastForward END" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   605
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   606
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   607
        case EMusuiCmdViewFastReverse:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   608
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   609
            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastReverse" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   610
            if ( DoFastRewindingL( ETrue ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   611
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   612
                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconRew );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   613
                iClipObserver.SetPositionValueL( iSession->PositionL().Int() );
41
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   614
                iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   615
                		                                EMusuiCmdToolbarUnPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   616
                                                        ETrue );
33
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   617
                //iClipObserver.SetDurationVisible();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   618
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   619
            MUS_LOG( "mus: [MUSUI ]     CMusUiClipSharingController::HandleCommandL: EMusuiCmdViewFastReverse END" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   620
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   621
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   622
        case EMusuiCmdViewFastForwardEnd:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   623
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   624
            if ( DoFastForwardingL( EFalse ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   625
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   626
                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   627
                PauseL();
41
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   628
                iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   629
                		                                EMusuiCmdToolbarPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   630
                                                        ETrue );
33
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   631
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   632
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   633
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   634
        case EMusuiCmdViewFastReverseEnd:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   635
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   636
            if ( DoFastRewindingL( EFalse ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   637
                {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   638
                iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   639
                PauseL();
41
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   640
                iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarUnPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   641
                		                                EMusuiCmdToolbarPause,
755f0370535b Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 33
diff changeset
   642
                                                        ETrue );
33
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   643
                }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   644
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   645
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   646
        default:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   647
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   648
            // Try more general handling
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   649
            CMusUiEventController::HandleCommandL( aCommand );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   650
            break;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   651
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   652
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   653
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   654
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::HandleCommandL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   655
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   656
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   657
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   658
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   659
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   660
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   661
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   662
void CMusUiClipSharingController::SetFileNameL( const TDesC& aFileName )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   663
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   664
    iFileName = aFileName.AllocL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   665
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   666
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   667
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   668
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   669
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   670
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   671
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   672
TBool CMusUiClipSharingController::ClipEnded()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   673
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   674
    return iClipEnded;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   675
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   676
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   677
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   678
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   679
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   680
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   681
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   682
TBool CMusUiClipSharingController::ClipMutedL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   683
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   684
    return iSession->IsMutedL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   685
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   686
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   687
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   688
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   689
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   690
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   691
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   692
TBool CMusUiClipSharingController::ClipContainsAudioL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   693
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   694
    if ( !iConnectionInitialized || !iSession )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   695
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   696
        return EFalse; // We cannot be sure yet
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   697
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   698
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   699
    return iSession->ContainsAudioL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   700
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   701
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   702
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   703
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   704
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   705
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   706
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   707
void CMusUiClipSharingController::CancelTranscodingL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   708
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   709
    if ( iSession && iTranscodingGoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   710
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   711
        iTranscodingGoing = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   712
        iSession->CancelTranscodeL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   713
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   714
    iVideoToBeSaved = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   715
    HandleExitL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   716
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   717
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   718
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   719
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   720
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   721
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   722
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   723
void CMusUiClipSharingController::StopWindingL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   724
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   725
    MUS_LOG( "mus: [MUSUI ] -> CMusUiClipSharingController::StopWindingL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   726
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   727
    if ( DoFastForwardingL( EFalse ) || DoFastRewindingL( EFalse ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   728
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   729
        iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   730
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   731
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   732
    MUS_LOG( "mus: [MUSUI ] <- CMusUiClipSharingController::StopWindingL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   733
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   734
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   735
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   736
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   737
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   738
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   739
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   740
TBool CMusUiClipSharingController::ToolbarFFRevSelected()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   741
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   742
    return iToolbarFFRevSelected;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   743
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   744
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   745
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   746
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   747
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   748
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   749
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   750
void CMusUiClipSharingController::TranscodingProgressedL( TInt aPercentage )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   751
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   752
    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingProgressedL ( %d )", aPercentage );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   753
    if ( aPercentage < KMusOneHundredPercent )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   754
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   755
        iTranscodingGoing = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   756
        iClipObserver.UpdateClipTranscodingPercentageL( aPercentage );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   757
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   758
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingProgressedL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   759
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   760
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   761
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   762
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   763
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   764
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   765
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   766
void CMusUiClipSharingController::TranscodingCompletedInitL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   767
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   768
    MUS_LOG( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   769
        "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompletedInitL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   770
    if ( iTranscodingGoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   771
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   772
        iVideoToBeSaved = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   773
        iTranscodingGoing = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   774
        iClipObserver.CancelTranscodingDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   775
        MusUiDialogUtil::ShowInformationDialogL( R_MUS_VIEW_NOTE_TRANSCODING_COMPLETE );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   776
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   777
    MUS_LOG( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   778
        "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompletedInitL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   779
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   780
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   781
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   782
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   783
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   784
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   785
void CMusUiClipSharingController::TranscodingCompletedFinalizeL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   786
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   787
    MUS_LOG( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   788
        "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompletedFinalizeL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   789
    SetConnectionInitialized( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   790
    if ( !iTranscodingGoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   791
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   792
        ShowInvitingWaitDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   793
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   794
    MUS_LOG( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   795
        "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompletedFinalizeL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   796
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   797
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   798
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   799
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   800
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   801
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   802
const TDesC& CMusUiClipSharingController::FormattedDurationString(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   803
                            const TTimeIntervalSeconds& aDurationSeconds,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   804
                            const TTimeIntervalSeconds& aPositionSeconds )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   805
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   806
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::FormattedDurationString" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   807
    _LIT( KDurationAndPositionSeparator, "/" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   808
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   809
    iDurationStringBuffer.SetLength( 0 );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   810
    TLocale locale;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   811
    _LIT( KZeroSymbol, "0" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   812
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   813
    TInt durationMinutes( 0 );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   814
    TInt durationSeconds( aDurationSeconds.Int() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   815
    if ( aDurationSeconds.Int() > ( KMusOneMinuteInSeconds - 1 ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   816
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   817
        durationMinutes = (int)( aDurationSeconds.Int() / KMusOneMinuteInSeconds );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   818
        durationSeconds = durationSeconds - ( durationMinutes * KMusOneMinuteInSeconds );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   819
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   820
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   821
    iDurationStringBuffer.AppendNum( durationMinutes );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   822
    iDurationStringBuffer.Append( locale.TimeSeparator( KMusLocaleMinutesAndSecondsSeparator ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   823
    if ( durationSeconds < KMusNumberValueTen )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   824
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   825
        iDurationStringBuffer.Append( KZeroSymbol );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   826
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   827
    iDurationStringBuffer.AppendNum( durationSeconds );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   828
    iDurationStringBuffer.Append( KDurationAndPositionSeparator );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   829
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   830
    TInt positionMinutes( 0 );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   831
    TInt positionSeconds( aPositionSeconds.Int() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   832
    if ( aPositionSeconds.Int() > ( KMusOneMinuteInSeconds - 1 ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   833
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   834
        positionMinutes = (int)( aPositionSeconds.Int() / KMusOneMinuteInSeconds );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   835
        positionSeconds = positionSeconds - ( positionMinutes * KMusOneMinuteInSeconds );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   836
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   837
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   838
    iDurationStringBuffer.AppendNum( positionMinutes );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   839
    iDurationStringBuffer.Append( locale.TimeSeparator( KMusLocaleMinutesAndSecondsSeparator ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   840
    if ( positionSeconds < KMusNumberValueTen )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   841
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   842
        iDurationStringBuffer.Append( KZeroSymbol );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   843
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   844
    iDurationStringBuffer.AppendNum( positionSeconds );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   845
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   846
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   847
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::FormattedDurationString" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   848
    return iDurationStringBuffer;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   849
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   850
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   851
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   852
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   853
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   854
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   855
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   856
void CMusUiClipSharingController::EndOfClip()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   857
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   858
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::EndOfClip" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   859
    iClipEnded = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   860
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   861
        TRAP_IGNORE( iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconStop ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   862
        if(!MUS_NO_TOOLBAR)
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   863
            {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   864
            iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   865
                                                    EMusuiCmdToolbarUnPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   866
                                                    ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   867
            }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   868
    iCloseTimer->Cancel();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   869
    iCloseTimer->After( iOperatorSpecificFunctionality ?
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   870
                                   KMusTimeToCloseAfterClipEndedOpVariant : 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   871
                                   KMusTimeToCloseAfterClipEndedStandard );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   872
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::EndOfClip" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   873
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   874
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   875
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   876
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   877
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   878
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   879
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   880
void CMusUiClipSharingController::TranscodingNeeded(TBool aDueUnknownRemoteCapabilities)
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   881
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   882
    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingNeeded, %d", 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   883
               aDueUnknownRemoteCapabilities);
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   884
    iTranscode = ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   885
    iTranscodeDueUnknownRemoteCapas = aDueUnknownRemoteCapabilities;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   886
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingNeeded" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   887
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   888
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   889
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   890
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   891
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   892
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   893
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   894
void CMusUiClipSharingController::TranscodingProgressed( TInt aPercentage )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   895
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   896
    MUS_LOG1( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingProgressed %d",
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   897
                            aPercentage );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   898
    TRAP_IGNORE( TranscodingProgressedL( aPercentage ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   899
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingProgressed" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   900
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   901
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   902
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   903
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   904
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   905
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   906
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   907
void CMusUiClipSharingController::TranscodingCompletedInit()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   908
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   909
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompleted" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   910
    TRAPD( error, TranscodingCompletedInitL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   911
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   912
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   913
        HandleError( error );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   914
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   915
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompleted" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   916
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   917
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   918
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   919
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   920
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   921
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   922
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   923
void CMusUiClipSharingController::TranscodingCompletedFinalize()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   924
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   925
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingCompleted" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   926
    TRAPD( error, TranscodingCompletedFinalizeL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   927
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   928
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   929
        HandleError( error );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   930
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   931
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingCompleted" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   932
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   933
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   934
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   935
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   936
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   937
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   938
void CMusUiClipSharingController::TranscodingFailed()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   939
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   940
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::TranscodingFailed" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   941
    iTranscodingGoing = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   942
    DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   943
    TRAP_IGNORE( iClipObserver.CancelTranscodingDialogL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   944
                 MusUiDialogUtil::ShowGlobalErrorModalDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   945
                                    R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   946
    DeleteEngineSession();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   947
    delete iFileName;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   948
    iFileName = NULL;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   949
    TRAPD( error,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   950
           iCallbackService->AsyncEventL( EMusUiAsyncStartMediaGallery ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   951
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   952
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   953
        HandleError( error );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   954
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   955
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::TranscodingFailed" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   956
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   957
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   958
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   959
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   960
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   961
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   962
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   963
void CMusUiClipSharingController::SessionRecipientNotFound()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   964
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   965
    MUS_LOG1( "mus: [MUSUI ]     -> CMusUiClipSharingController::SessionRecipientNotFound [%d]", iTriedInvitations );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   966
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   967
    // If the address has to be queried again...:
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   968
    iTranscode = EFalse;    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   969
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   970
    CMusUiSendController::SessionRecipientNotFound();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   971
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   972
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionRecipientNotFound" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   973
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   974
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   975
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   976
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   977
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   978
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   979
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   980
void CMusUiClipSharingController::SessionTerminated()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   981
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   982
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionTerminated" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   983
    DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   984
    if ( iTranscodingGoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   985
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   986
        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   987
                                R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   988
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   989
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   990
    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   991
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   992
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionTerminated" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   993
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   994
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   995
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   996
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   997
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   998
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   999
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1000
void CMusUiClipSharingController::SessionConnectionLost()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1001
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1002
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionConnectionLost" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1003
    DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1004
    TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1005
                            R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1006
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1007
    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1008
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1009
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionConnectionLost" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1010
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1011
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1012
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1013
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1014
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1015
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1016
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1017
void CMusUiClipSharingController::SessionFailed()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1018
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1019
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionFailed" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1020
    DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1021
    if ( iTranscodingGoing )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1022
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1023
        TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1024
                            R_MUS_VIEW_NOTE_UNABLE_TO_CONVERT ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1025
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1026
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1027
    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1028
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1029
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionFailed" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1030
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1031
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1032
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1033
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1034
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1035
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1036
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1037
void CMusUiClipSharingController::StreamIdle()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1038
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1039
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamIdle" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1040
    iClipObserver.InvalidVideoFrame( ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1041
    TRAPD( error, StreamIdleL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1042
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1043
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1044
        iEventObserver.HandleError( error );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1045
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1046
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamIdle" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1047
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1048
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1049
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1050
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1051
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1052
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1053
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1054
void CMusUiClipSharingController::StreamStreaming()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1055
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1056
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamStreaming" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1057
    iClipObserver.InvalidVideoFrame( EFalse );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1058
    TRAPD( error, StreamStreamingL() );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1059
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1060
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1061
        iEventObserver.HandleError( error );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1062
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1063
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamStreaming" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1064
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1065
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1066
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1067
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1068
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1069
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1070
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1071
void CMusUiClipSharingController::SessionTimeChanged(
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1072
                        const TTimeIntervalSeconds& aSeconds )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1073
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1074
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionTimeChanged" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1075
    TRAP_IGNORE( SessionTimeChangedL( aSeconds ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1076
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionTimeChanged" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1077
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1078
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1079
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1080
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1081
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1082
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1083
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1084
void CMusUiClipSharingController::InactivityTimeout()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1085
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1086
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::InactivityTimeout" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1087
    DismissWaitDialog();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1088
    TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1089
                            R_MUS_LIVE_SHARING_VIEW_NOTE_SERVICE_N_A ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1090
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1091
    TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1092
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1093
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::InactivityTimeout" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1094
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1095
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1096
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1097
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1098
// Called when predefined time elapsed 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1099
// after the clip had reached the end
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1100
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1101
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1102
void CMusUiClipSharingController::TimerComplete( CMusUiActiveTimer* /*aTimer*/ )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1103
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1104
    MUS_LOG( "mus: [MUSUI ]  Close time elapsed from clip ending => \
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1105
             closing session" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1106
    TRAP_IGNORE( HandleExitL() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1107
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1108
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1109
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1110
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1111
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1112
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1113
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1114
void CMusUiClipSharingController::StreamStreamingL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1115
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1116
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamStreamingL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1117
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1118
    if ( ConnectionEstablished() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1119
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1120
        iClipEnded = EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1121
        iCloseTimer->Cancel();    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1122
        iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPlay );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1123
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1124
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1125
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamStreamingL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1126
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1127
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1128
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1129
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1130
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1131
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1132
void CMusUiClipSharingController::StreamIdleL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1133
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1134
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::StreamIdleL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1135
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1136
    if ( ConnectionEstablished() )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1137
        {    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1138
        iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1139
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1140
        
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1141
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::StreamIdleL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1142
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1143
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1144
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1145
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1146
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1147
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1148
void CMusUiClipSharingController::SessionTimeChangedL( const TTimeIntervalSeconds& aSeconds )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1149
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1150
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionTimeChangedL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1151
    if ( aSeconds.Int() > -1 )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1152
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1153
        TTimeIntervalSeconds clipDuration = iSession->DurationL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1154
        TTimeIntervalSeconds clipPosition = iSession->PositionL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1155
                
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1156
        iSharingObserver.UpdateSessionTime( SessionTimeFormatted( aSeconds ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1157
        iClipObserver.UpdateClipPositionL( clipPosition.Int(),
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1158
                                          FormattedDurationString(  
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1159
                                                clipPosition, 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1160
                                                clipDuration ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1161
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1162
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionTimeChangedL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1163
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1164
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1165
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1166
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1167
// CMusUiClipSharingController::SessionEstablished()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1168
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1169
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1170
void CMusUiClipSharingController::SessionEstablished()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1171
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1172
    MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::SessionEstablished" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1173
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1174
    TRAPD( error, iResourceHandler->RequestVideoPlayerL( ETrue ) );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1175
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1176
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1177
        MUS_LOG1( "mus: [MUSUI ]     RequestVideoPlayerL leave code: %d", error )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1178
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1179
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1180
    // Duration setting visible
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1181
    TRAP( error, iClipObserver.SetDurationValue( iSession->DurationL().Int() ) )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1182
    if ( error != KErrNone )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1183
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1184
        HandleError( error );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1185
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1186
    iClipObserver.SetDurationVisible();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1187
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1188
    // General handling
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1189
    CMusUiSendController::SessionEstablished(); // Base class handling    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1190
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1191
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::SessionEstablished" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1192
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1193
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1194
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1195
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1196
// CMusUiClipSharingController::DoFastForwardingL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1197
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1198
//
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1199
TBool CMusUiClipSharingController::DoFastForwardingL( TBool aUseWinding )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1200
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1201
    if( iFastForward ^ aUseWinding ) 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1202
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1203
        iSession->FastForwardL( aUseWinding );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1204
        iFastForward = aUseWinding;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1205
        return ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1206
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1207
    return EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1208
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1209
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1210
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1211
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1212
// CMusUiClipSharingController::DoFastRewindingL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1213
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1214
//    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1215
TBool CMusUiClipSharingController::DoFastRewindingL( TBool aUseWinding )
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1216
    {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1217
    if( iFastRewind ^ aUseWinding ) 
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1218
        {
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1219
        iSession->FastRewindL( aUseWinding );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1220
        iFastRewind = aUseWinding;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1221
        return ETrue;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1222
        }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1223
    return EFalse;
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1224
    }
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1225
    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1226
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1227
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1228
// CMusUiClipSharingController::RewindFromEndL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1229
// -----------------------------------------------------------------------------
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1230
//    
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1231
void CMusUiClipSharingController::RewindFromEndL()
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1232
	{
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1233
	MUS_LOG( "mus: [MUSUI ]  -> CMusUiClipSharingController::RewindFromEndL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1234
    PauseL();
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1235
    iEventObserver.ShowNaviPaneIconL( EMusUiNaviIconPause );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1236
    iSharingObserver.ReplaceToolbarCommand( EMusuiCmdToolbarPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1237
                                            EMusuiCmdToolbarUnPause,
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1238
                                            ETrue );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1239
    MUS_LOG( "mus: [MUSUI ]  <- CMusUiClipSharingController::RewindFromEndL" );
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1240
	}
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1241
// End of file
bc78a40cd63c Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
  1242