camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp
changeset 0 1ddebce53859
child 12 8c55c525d5d7
equal deleted inserted replaced
-1:000000000000 0:1ddebce53859
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Video Post-capture view class for Camera application*
       
    15 */
       
    16 
       
    17 
       
    18 // INCLUDE FILES
       
    19 
       
    20 #include <eikmenub.h>
       
    21 #include <StringLoader.h>
       
    22 #include <AknQueryDialog.h>
       
    23 #include <AiwCommon.hrh>
       
    24 #include <sendnorm.rsg>
       
    25 #include <sendui.h>
       
    26 #include <akntoolbar.h>
       
    27 #ifndef __WINS__
       
    28   //#include <SFIUtilsAppInterface.h>
       
    29   #include <aknnotewrappers.h>  // CAknInformationNote
       
    30 #endif
       
    31 
       
    32 #include <cameraapp.rsg>
       
    33 #include <vgacamsettings.rsg>
       
    34 
       
    35 #include "CamAppUiBase.h"
       
    36 #include "CamAppController.h"
       
    37 #include "CamVideoPostCaptureView.h"
       
    38 #include "CamPostCaptureContainer.h"
       
    39 #include "CamLogger.h"
       
    40 #include "CamAppUi.h"
       
    41 #include "CamAppUiBase.h"
       
    42 #include "CamUtility.h"
       
    43 #include "Cam.hrh"
       
    44 #include "camactivepalettehandler.h"
       
    45 #include "camoneclickuploadutility.h"
       
    46 #include "CameraUiConfigManager.h"
       
    47 
       
    48 
       
    49 
       
    50 //CONSTANTS
       
    51 
       
    52 // ========================= MEMBER FUNCTIONS ================================
       
    53 
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 // CCamVideoPostCaptureView::NewLC
       
    57 // Symbian OS two-phased constructor
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 CCamVideoPostCaptureView* CCamVideoPostCaptureView::NewLC( CCamAppController& aController )
       
    61     {
       
    62     CCamVideoPostCaptureView* self = 
       
    63         new( ELeave ) CCamVideoPostCaptureView( aController );
       
    64 
       
    65     CleanupStack::PushL( self );
       
    66     self->ConstructL();
       
    67 
       
    68     return self;
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // CCamVideoPostCaptureView destructor
       
    73 // 
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 CCamVideoPostCaptureView::~CCamVideoPostCaptureView()
       
    77     {     
       
    78     }
       
    79 
       
    80 // ---------------------------------------------------------------------------
       
    81 // CCamVideoPostCaptureView::Id
       
    82 // Returns UID of view
       
    83 // ---------------------------------------------------------------------------
       
    84 //
       
    85 TUid CCamVideoPostCaptureView::Id() const
       
    86     {
       
    87     return TUid::Uid( ECamViewIdVideoPostCapture );
       
    88     }
       
    89   
       
    90 // -----------------------------------------------------------------------------
       
    91 // CCamVideoPostCaptureView::HandleCommandL
       
    92 // Handle commands
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 void CCamVideoPostCaptureView::HandleCommandL( TInt aCommand )
       
    96     {
       
    97     switch ( aCommand )
       
    98         {
       
    99         case ECamCmdRenameVideo:
       
   100             {
       
   101             CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
       
   102             QueryRenameL( ECamControllerVideo );
       
   103 
       
   104             // inform the Media gallery of name change
       
   105             TRAPD( ignore,
       
   106                 appUi->HandleControllerEventL( ECamEventMediaFileChanged, KErrNone ) );
       
   107             if ( ignore )
       
   108                 {
       
   109                 // Do nothing (removes build warning)
       
   110                 }
       
   111             break;
       
   112             }
       
   113         case EAknSoftkeySelect: 
       
   114             {
       
   115             // In post-capture select key is disabled when embedded 
       
   116             if ( !iEmbedded )
       
   117                 {
       
   118                 CEikMenuBar* menuBar = MenuBar();
       
   119                 if ( menuBar )
       
   120                     {
       
   121                     menuBar->SetMenuTitleResourceId( ROID(R_CAM_VIDEO_POST_CAPTURE_OK_MENUBAR_ID));
       
   122                     menuBar->TryDisplayMenuBarL();
       
   123                     menuBar->SetMenuTitleResourceId( ROID(R_CAM_VIDEO_POST_CAPTURE_MENUBAR_ID));
       
   124                     }
       
   125                 CCamPostCaptureViewBase::HandleCommandL( aCommand );
       
   126                 }
       
   127             else
       
   128                 {
       
   129                 AppUi()->HandleCommandL( ECamCmdSelect );
       
   130                 }
       
   131             }
       
   132             break;
       
   133         case ECamCmdSend:
       
   134         case ECamCmdSendToCallerMultimedia:
       
   135         case ECamCmdQuickSend:
       
   136             {
       
   137             CCamPostCaptureViewBase::HandleCommandL( aCommand );
       
   138             }
       
   139             break;
       
   140         default:
       
   141             {
       
   142             PRINT1( _L("Camera => CCamVideoPostCaptureView::HandleCommandL default cmd (%d)"), aCommand )
       
   143             // Handle AIW commands
       
   144             TInt aiwServiceCmd = iAiwServiceHandler->ServiceCmdByMenuCmd( aCommand );
       
   145             if ( aiwServiceCmd != KAiwCmdNone )
       
   146                 {
       
   147                 PRINT1( _L("Camera => CCamVideoPostCaptureView::HandleCommandL default handle AIW cmd (%d)" ), aiwServiceCmd)
       
   148                 CAiwGenericParamList& inParams  = iAiwServiceHandler->InParamListL();
       
   149                 CAiwGenericParamList& outParams = iAiwServiceHandler->OutParamListL();
       
   150                 // Add file path to AIW parameters
       
   151                 TAiwVariant variant( iController.CurrentFullFileName() );
       
   152                 TAiwGenericParam param( EGenericParamFile, variant );
       
   153                 inParams.AppendL( param );
       
   154                 
       
   155                 // Don't add the mime type if uploading, since Share client 
       
   156                 // will figure it out from the file
       
   157                 if ( aiwServiceCmd != KAiwCmdUpload ) 
       
   158                     {
       
   159                     TAiwGenericParam param2( EGenericParamMIMEType, _L("video/*") );
       
   160                     inParams.AppendL( param2 );
       
   161                     }
       
   162 
       
   163                 iAiwServiceHandler->ExecuteMenuCmdL( aCommand, inParams, outParams, 0, this );
       
   164                 // we are 'embedding' Edit app
       
   165                 static_cast<CCamAppUiBase*>( AppUi() )->SetEmbedding( ETrue );
       
   166                 }
       
   167             else
       
   168                 {
       
   169                 CCamPostCaptureViewBase::HandleCommandL( aCommand );
       
   170                 }
       
   171             
       
   172             }
       
   173         }
       
   174     }
       
   175 
       
   176 // -----------------------------------------------------------------------------
       
   177 // CCamVideoPostCaptureView::DisplayDeleteNoteL()
       
   178 // Delete the current file
       
   179 // -----------------------------------------------------------------------------
       
   180 //
       
   181 TBool CCamVideoPostCaptureView::DisplayDeleteNoteL()
       
   182     {
       
   183     // Display the delete confirmation note
       
   184     TInt err = KErrNone;
       
   185     HBufC* confirmationText;
       
   186     confirmationText = StringLoader::LoadLC( R_CAM_VIDEO_POST_CAPTURE_DELETE_NOTE_TEXT );
       
   187     CAknQueryDialog* confirmationDialog = 
       
   188                             new( ELeave )CAknQueryDialog( *confirmationText );
       
   189     CleanupStack::PopAndDestroy( confirmationText );
       
   190     if ( confirmationDialog->ExecuteLD( R_CAM_VIDEO_POST_CAPTURE_DELETE_NOTE ) )
       
   191         {
       
   192         if ( iEmbedded )
       
   193             {
       
   194             BlankSoftkeysL();
       
   195             Cba()->DrawNow();
       
   196             SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_DELETE__SELECT );
       
   197             }
       
   198         err = iController.DeleteCurrentFile();
       
   199         if ( err ) 
       
   200             {
       
   201             User::Leave( err );
       
   202             }
       
   203         return ETrue;
       
   204         }                
       
   205     else
       
   206         {
       
   207         if ( iEmbedded )
       
   208             {
       
   209             BlankSoftkeysL();
       
   210             Cba()->DrawNow();
       
   211             SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_DELETE__SELECT );
       
   212             }
       
   213         return EFalse;
       
   214         }
       
   215     }
       
   216     
       
   217 // -----------------------------------------------------------------------------
       
   218 // CCamVideoPostCaptureView::DoActivateL()
       
   219 // Activate this view
       
   220 // -----------------------------------------------------------------------------
       
   221 //
       
   222 void CCamVideoPostCaptureView::DoActivateL(
       
   223         const TVwsViewId& aPreViewId,
       
   224         TUid aCustomMessageId,
       
   225         const TDesC8& aCustomMessage )
       
   226     {
       
   227     // Ensure the correct menu is used for the current mode.
       
   228     CEikMenuBar* menuBar = MenuBar();
       
   229     if ( menuBar )
       
   230         {
       
   231         menuBar->SetMenuTitleResourceId(
       
   232                 ROID( R_CAM_VIDEO_POST_CAPTURE_MENUBAR_ID ) );
       
   233         }
       
   234 
       
   235     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
       
   236 
       
   237     if ( iController.IsTouchScreenSupported() )
       
   238         {
       
   239         if ( appUi->IsSecondCameraEnabled() )
       
   240             {
       
   241             if ( iOneClickUploadUtility->OneClickUploadSupported() )
       
   242                 {
       
   243                 TInt resourceId = appUi->IsQwerty2ndCamera()? 
       
   244                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_LANDSCAPE_UPLOAD:
       
   245                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_PORTRAIT_UPLOAD; 
       
   246                 CreateAndSetToolbarL( resourceId );
       
   247                 }
       
   248             else
       
   249                 {
       
   250                 TInt resourceId = appUi->IsQwerty2ndCamera()? 
       
   251                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_LANDSCAPE:
       
   252                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_PORTRAIT; 
       
   253                 CreateAndSetToolbarL( resourceId );
       
   254                 }
       
   255             }
       
   256         else
       
   257             {
       
   258             if ( iOneClickUploadUtility->OneClickUploadSupported() )
       
   259                 {
       
   260                 CreateAndSetToolbarL( R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_UPLOAD );
       
   261                 }
       
   262             else
       
   263                 {
       
   264                 CreateAndSetToolbarL( R_CAM_VIDEO_POSTCAPTURE_TOOLBAR );
       
   265                 }
       
   266             }
       
   267         }
       
   268 
       
   269     iAiwServiceHandler->Reset();
       
   270     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ),
       
   271             R_CAM_SHARE_ON_OVI_INTEREST );
       
   272 
       
   273     CCamPostCaptureViewBase::DoActivateL(
       
   274             aPreViewId, aCustomMessageId, aCustomMessage );
       
   275 
       
   276     if ( !iController.IsTouchScreenSupported() )
       
   277         {
       
   278         TCamOrientation orientation = appUi->CamOrientation();
       
   279 
       
   280         CCamActivePaletteHandler* apHandler = appUi->APHandler();
       
   281         if( !iEmbedded && ( orientation == ECamOrientationCamcorder ||
       
   282                 orientation == ECamOrientationCamcorderLeft ) )
       
   283             {
       
   284             iContainer->CreateActivePaletteL();
       
   285             MActivePalette2UI* activePalette =
       
   286             appUi->APHandler()->ActivePalette();
       
   287 
       
   288             if(activePalette)
       
   289                 {
       
   290                 activePalette->SetGc();
       
   291                 }        
       
   292 
       
   293             // install still pre-capture items     
       
   294             apHandler->InstallAPItemsL( R_CAM_VIDEO_POST_CAPTURE_AP_ITEMS );
       
   295 
       
   296             // Hide Send or Send to caller
       
   297             ResetSendAvailabilityL( apHandler );
       
   298             apHandler->SetView( this );
       
   299 
       
   300             // Make AP visible
       
   301             appUi->SetAlwaysDrawPostCaptureCourtesyUI( ETrue );
       
   302             }
       
   303         else
       
   304             {   
       
   305             }
       
   306         }
       
   307     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ), 
       
   308             R_CAM_SET_AS_RING_TONE_INTEREST );
       
   309     }
       
   310 
       
   311 // ---------------------------------------------------------------------------
       
   312 // CCamVideoPostCaptureView::CCamVideoPostCaptureView
       
   313 // C++ constructor
       
   314 // ---------------------------------------------------------------------------
       
   315 //
       
   316 CCamVideoPostCaptureView::CCamVideoPostCaptureView( CCamAppController& aController )
       
   317     : CCamPostCaptureViewBase( aController )
       
   318     {
       
   319     }
       
   320 
       
   321 // ---------------------------------------------------------------------------
       
   322 // CCamVideoPostCaptureView::ConstructL
       
   323 // Symbian OS 2nd phase constructor
       
   324 // ---------------------------------------------------------------------------
       
   325 //
       
   326 void CCamVideoPostCaptureView::ConstructL()
       
   327     {
       
   328     PRINT( _L("Camera => CCamVideoPostCaptureView::ConstructL"))
       
   329     BaseConstructL( ROID(R_CAM_VIDEO_POST_CAPTURE_VIEW_ID));
       
   330     CCamPostCaptureViewBase::ConstructL();
       
   331 
       
   332     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ), R_CAM_SHARE_ON_OVI_INTEREST );
       
   333 
       
   334     PRINT( _L("Camera <= CCamVideoPostCaptureView::ConstructL"))
       
   335     }
       
   336 
       
   337 // ---------------------------------------------------------------------------
       
   338 // CCamVideoPostCaptureView::DoDeactivate
       
   339 // Deactivate this view
       
   340 // ---------------------------------------------------------------------------
       
   341 //
       
   342 void CCamVideoPostCaptureView::DoDeactivate()
       
   343     {
       
   344     CCamPostCaptureViewBase::DoDeactivate();
       
   345     }
       
   346 
       
   347 // ---------------------------------------------------------------------------
       
   348 // CCamVideoPostCaptureView::SetTitlePaneTextL
       
   349 // Set the view's title text
       
   350 // ---------------------------------------------------------------------------
       
   351 //
       
   352 void CCamVideoPostCaptureView::SetTitlePaneTextL()
       
   353     {
       
   354     TBool titleAlwaysShowsFileName = EFalse;
       
   355     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
   356 
       
   357     if ( appUi->CamOrientation() == ECamOrientationViewMode ||
       
   358               titleAlwaysShowsFileName )
       
   359         {
       
   360         appUi->SetTitleL( iController.CurrentImageName() );
       
   361         }
       
   362     }
       
   363 
       
   364 
       
   365 // ---------------------------------------------------------------------------
       
   366 // CCamVideoPostCaptureView::ProcessCommandL
       
   367 // Handling ECamCmdToggleActiveToolbar from any of the PostCaptureView's
       
   368 // either Image/Video. 
       
   369 // ---------------------------------------------------------------------------
       
   370 //
       
   371 void CCamVideoPostCaptureView::ProcessCommandL( TInt aCommand )
       
   372     {
       
   373     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
       
   374     TCamOrientation orientation = appUi->CamOrientation();
       
   375     if( orientation == ECamOrientationCamcorder || 
       
   376         orientation == ECamOrientationCamcorderLeft ||
       
   377 		orientation == ECamOrientationPortrait )
       
   378         {
       
   379         if ( aCommand == ECamCmdToggleActiveToolbar )
       
   380             {
       
   381             CCamPostCaptureViewBase::HandleCommandL( aCommand );
       
   382             }
       
   383          else
       
   384             {
       
   385 			CAknView::ProcessCommandL( aCommand );	            
       
   386             }
       
   387         }
       
   388     else 
       
   389         {
       
   390         if ( aCommand == EAknSoftkeyContextOptions )
       
   391             {
       
   392             iRockerKeyPress = ETrue;
       
   393             MenuBar()->SetContextMenuTitleResourceId( 
       
   394             				ROID(R_CAM_VIDEO_POST_CAPTURE_MENU_ID ) );
       
   395             MenuBar()->SetMenuType( CEikMenuBar::EMenuContext );
       
   396             MenuBar()->TryDisplayMenuBarL();
       
   397             MenuBar()->SetMenuType( CEikMenuBar::EMenuOptions );
       
   398             }
       
   399         else
       
   400             {
       
   401             CAknView::ProcessCommandL( aCommand );
       
   402             }
       
   403         
       
   404         }
       
   405     // CALL THE BASE CLASS
       
   406     
       
   407     }
       
   408     
       
   409 // ---------------------------------------------------------------------------
       
   410 // CCamVideoPostCaptureView::DynInitMenuPaneL
       
   411 // Changes MenuPane dynamically
       
   412 // ---------------------------------------------------------------------------
       
   413 //
       
   414 void CCamVideoPostCaptureView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
       
   415     {
       
   416     PRINT( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL"))
       
   417     
       
   418     if ( iAiwServiceHandler )
       
   419     	{
       
   420     	PRINT( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL aiw"))
       
   421 
       
   422     	// let AIW handle it's own submenus
       
   423     	if ( iAiwServiceHandler->HandleSubmenuL( *aMenuPane ) )
       
   424     		{
       
   425     		PRINT( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL aiw handle sub"))
       
   426     		return;
       
   427     		}
       
   428     	}
       
   429     
       
   430     CCamPostCaptureViewBase::DynInitMenuPaneL( aResourceId, aMenuPane );
       
   431     
       
   432     PRINT( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL A"))
       
   433     if ( iAiwServiceHandler && iAiwServiceHandler->IsAiwMenu( aResourceId ) )
       
   434         {
       
   435         PRINT1( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL res ID (%d)"),aResourceId )
       
   436         CAiwGenericParamList& paramList = iAiwServiceHandler->InParamListL();
       
   437         TAiwVariant variant( iController.CurrentFullFileName() );
       
   438         TAiwGenericParam param( EGenericParamFile, variant );
       
   439         paramList.AppendL( param );
       
   440         
       
   441         TAiwVariant variant2(  _L("video/*") );
       
   442         TAiwGenericParam param2( EGenericParamMIMEType, variant2 );
       
   443         paramList.AppendL( param2 );
       
   444         
       
   445         PRINT( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL C"))
       
   446         iAiwServiceHandler->InitializeMenuPaneL(
       
   447             *aMenuPane, 
       
   448             aResourceId, 
       
   449             ECamCmdAIWCommands, 
       
   450             paramList );
       
   451             
       
   452         PRINT( _L("Camera => CCamVideoPostCaptureView::DynInitMenuPaneL D"))     
       
   453         }
       
   454 
       
   455     TInt itemPos(0);
       
   456 
       
   457     if ( aResourceId == ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ) ||
       
   458          aResourceId == ROID( R_CAM_VIDEO_POST_CAPTURE_OK_MENU_ID ) )
       
   459         {
       
   460         TBool showSend = ETrue;
       
   461         TBool showSendToCaller = EFalse;
       
   462 
       
   463 /*#ifndef __WINS__
       
   464         if ( iSFIUtils->IsCLIValidL() )
       
   465             {
       
   466             showSend = EFalse;
       
   467             showSendToCaller = ETrue;
       
   468 
       
   469             if ( iController.IntegerSettingValue( ECamSettingItemVideoQuality ) 
       
   470                 == ECamVideoQualityHigh )
       
   471                 {
       
   472                 showSendToCaller = EFalse;
       
   473                 }
       
   474             }
       
   475 #endif*/
       
   476 
       
   477         if ( !iController.IsTouchScreenSupported() ||
       
   478              !iOneClickUploadUtility->OneClickUploadSupported() )
       
   479             {
       
   480             // In non-touch UI Send/Send to caller are always in AP.
       
   481             // No need for Options menu items.
       
   482 
       
   483             // If 1-click upload is not supported in touch UI, then there is
       
   484             // a send button in the fixed toolbar. There is no need to
       
   485             // have it in Options menu.
       
   486             showSend = EFalse;
       
   487             showSendToCaller = EFalse;
       
   488             }
       
   489 
       
   490         if( aMenuPane->MenuItemExists( ECamCmdSendToCallerMultimedia, itemPos ) )
       
   491             {
       
   492             aMenuPane->SetItemDimmed(
       
   493                 ECamCmdSendToCallerMultimedia, !showSendToCaller );
       
   494             }
       
   495 
       
   496         if( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) )
       
   497             {
       
   498             aMenuPane->SetItemDimmed(
       
   499                 ECamCmdSend, !showSend );
       
   500             }
       
   501 
       
   502         /*
       
   503          * MSK : ContextOptions --> We just hide Help and Exit from the Options Menu when
       
   504          *       the MSK is pressed in the postcapture still view
       
   505          *       iRockerKeyPress represents MSK key event in still postcapture view
       
   506          */
       
   507         if ( aMenuPane->MenuItemExists( EAknCmdHelp, itemPos ) &&
       
   508              aMenuPane->MenuItemExists( ECamCmdInternalExit, itemPos ) )
       
   509             {
       
   510             if ( iRockerKeyPress )
       
   511                 { // We hide Help and Exit
       
   512                 aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
       
   513                 aMenuPane->SetItemDimmed( ECamCmdInternalExit, ETrue );
       
   514                 iRockerKeyPress = EFalse;
       
   515                 }
       
   516             else
       
   517                 { // We show Help and Exit
       
   518                 aMenuPane->SetItemDimmed( EAknCmdHelp, EFalse );
       
   519                 aMenuPane->SetItemDimmed( ECamCmdInternalExit, EFalse );	
       
   520                 }
       
   521             }
       
   522         }
       
   523     }
       
   524 
       
   525 // ---------------------------------------------------------------------------
       
   526 // CCamVideoPostCaptureView::HandleNotifyL
       
   527 // Handles any notification caused by asynchronous ExecuteCommandL
       
   528 // or event.
       
   529 // ---------------------------------------------------------------------------
       
   530 //
       
   531 TInt CCamVideoPostCaptureView::HandleNotifyL(
       
   532     TInt /*aCmdId*/,
       
   533     TInt aEventId,
       
   534     CAiwGenericParamList& /*aEventParamList*/,
       
   535     const CAiwGenericParamList& /*aInParamList*/ )
       
   536     {
       
   537     //AIW fails to assign. eg. the contact is locked for being used now.    
       
   538     if ( aEventId == KAiwEventError && iController.IsAppUiAvailable() )
       
   539       {
       
   540       CCamAppUi* appUi =  static_cast<CCamAppUi*>( AppUi() );
       
   541       TRAP_IGNORE( appUi->HandleCameraErrorL( KErrInUse ) );
       
   542       }
       
   543     
       
   544     return 0;
       
   545     }
       
   546 
       
   547 // ---------------------------------------------------------------------------
       
   548 // CCamVideoPostCaptureView::DynInitToolbarL
       
   549 // Dynamically initialize toolbar contents
       
   550 // ---------------------------------------------------------------------------
       
   551 //
       
   552 void CCamVideoPostCaptureView::DynInitToolbarL( TInt aResourceId, 
       
   553                                                 CAknToolbar* aToolbar )
       
   554     {
       
   555     PRINT2( _L("Camera => CCamVideoPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar );
       
   556     (void)aResourceId; // remove compiler warning
       
   557 
       
   558     // fixed toolbar is used only with touch devices
       
   559     if ( iController.IsTouchScreenSupported() && iEmbedded && aToolbar )
       
   560         {
       
   561         // HideItem will not do anything if a button for the given
       
   562         // command ID is not found.
       
   563         aToolbar->HideItem( ECamCmdSend, ETrue, EFalse );
       
   564         aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse );
       
   565         aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
       
   566         aToolbar->HideItem( ECamCmdPlay, ETrue, EFalse );
       
   567         }
       
   568 
       
   569     PRINT2( _L("Camera <= CCamVideoPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar );
       
   570     }
       
   571 
       
   572     
       
   573 //  End of File