Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:39:00 +0200
branchRCL_3
changeset 10 8c55c525d5d7
parent 9 792dfc98fb3b
child 11 d486e5e3cc9a
Revision: 201009 Kit: 201010
camerauis/cameraapp/build/cameraapp.inf
camerauis/cameraapp/build/iconlist.txt
camerauis/cameraapp/conf/cameraapp.confml
camerauis/cameraapp/conf/cameraapp_101FFA86.crml
camerauis/cameraapp/generic/GsCamcorderPlugin/src/CamLocationSettingContainer.cpp
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamdefaultnamesettingpage.cpp
camerauis/cameraapp/generic/common/data/CamSettings.ra
camerauis/cameraapp/generic/common/data/CamSettingsV2.ra
camerauis/cameraapp/generic/common/data/CamStillCaptureCamcorder.ra
camerauis/cameraapp/generic/common/data/CamVideoCaptureCamcorder.ra
camerauis/cameraapp/generic/common/inc/Cam.hrh
camerauis/cameraapp/generic/common/inc/CamCaptureSetupListBox.h
camerauis/cameraapp/generic/common/inc/CamCaptureSetupListItemDrawer.h
camerauis/cameraapp/generic/common/inc/CamSettingsInternal.hrh
camerauis/cameraapp/generic/common/inc/CameraappPrivateCRKeys.h
camerauis/cameraapp/generic/common/src/CamCaptureSetupListBox.cpp
camerauis/cameraapp/generic/common/src/CamCaptureSetupListItemDrawer.cpp
camerauis/cameraapp/generic/common/src/CamStaticSettingsModel.cpp
camerauis/cameraapp/generic/common/src/CamUtility.cpp
camerauis/cameraapp/generic/data/nhdcamsettings.rss
camerauis/cameraapp/generic/data/resource_inc/CamActivePalette.ra
camerauis/cameraapp/generic/data/resource_inc/CamBurstCapture.ra
camerauis/cameraapp/generic/data/resource_inc/CamBurstCaptureV2.ra
camerauis/cameraapp/generic/data/resource_inc/CamSceneSetup.ra
camerauis/cameraapp/generic/data/resource_inc/CamSceneSetupV2.ra
camerauis/cameraapp/generic/data/resource_inc/CamStillCapturePortrait.ra
camerauis/cameraapp/generic/data/resource_inc/CamStillCaptureViewMode.ra
camerauis/cameraapp/generic/data/resource_inc/CamVideoCapturePortrait.ra
camerauis/cameraapp/generic/data/resource_inc/CamVideoCaptureViewMode.ra
camerauis/cameraapp/generic/data/vgacamsettings.rss
camerauis/cameraapp/generic/icons/qgn_bg_lcam_vid_postcap_play.svg
camerauis/cameraapp/generic/icons/qgn_bg_lcam_vid_postcap_play_pressed.svg
camerauis/cameraapp/generic/icons/qgn_indi_cam4_tb_oneclick_active.svg
camerauis/cameraapp/generic/icons/qgn_indi_cam4_tb_oneclick_dimmed.svg
camerauis/cameraapp/generic/inc/CamAppController.h
camerauis/cameraapp/generic/inc/CamAppUi.h
camerauis/cameraapp/generic/inc/CamCaptureSetupContainer.h
camerauis/cameraapp/generic/inc/CamCaptureSetupControlHandler.h
camerauis/cameraapp/generic/inc/CamCaptureSetupSlider.h
camerauis/cameraapp/generic/inc/CamCaptureSetupViewBase.h
camerauis/cameraapp/generic/inc/CamContainerBase.h
camerauis/cameraapp/generic/inc/CamInfoListBox.h
camerauis/cameraapp/generic/inc/CamInfoListBoxContainer.h
camerauis/cameraapp/generic/inc/CamPostCaptureContainer.h
camerauis/cameraapp/generic/inc/CamSceneListBox.h
camerauis/cameraapp/generic/inc/CamSettingsModel.h
camerauis/cameraapp/generic/inc/CamShootingModeContainer.h
camerauis/cameraapp/generic/inc/CamStillUserSceneSetupView.h
camerauis/cameraapp/generic/inc/cameracontroller/camimagedecoder.h
camerauis/cameraapp/generic/inc/cameracontroller/camsnapshot.h
camerauis/cameraapp/generic/inc/camoneclickuploadutility.h
camerauis/cameraapp/generic/src/CamAppController.cpp
camerauis/cameraapp/generic/src/CamAppui.cpp
camerauis/cameraapp/generic/src/CamBurstCaptureArray.cpp
camerauis/cameraapp/generic/src/CamBurstThumbnailView.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupControlHandler.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupSlider.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp
camerauis/cameraapp/generic/src/CamContainerBase.cpp
camerauis/cameraapp/generic/src/CamImageSaveActive.cpp
camerauis/cameraapp/generic/src/CamInfoListBox.cpp
camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp
camerauis/cameraapp/generic/src/CamPostCaptureContainer.cpp
camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp
camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp
camerauis/cameraapp/generic/src/CamSceneListBox.cpp
camerauis/cameraapp/generic/src/CamSettingsModel.cpp
camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp
camerauis/cameraapp/generic/src/CamStandbyContainer.cpp
camerauis/cameraapp/generic/src/CamStillPostCaptureView.cpp
camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp
camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp
camerauis/cameraapp/generic/src/CamStillUserSceneSetupView.cpp
camerauis/cameraapp/generic/src/CamUserSceneSetupContainer.cpp
camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp
camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp
camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp
camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp
camerauis/cameraapp/generic/src/cameracontroller/camimagedecoder.cpp
camerauis/cameraapp/generic/src/cameracontroller/camsnapshot.cpp
camerauis/cameraapp/generic/src/camfolderutility.cpp
camerauis/cameraapp/generic/src/camoneclickuploadutility.cpp
camerauis/cameraapp/loc/cam.loc
--- a/camerauis/cameraapp/build/cameraapp.inf	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/build/cameraapp.inf	Mon Mar 15 12:39:00 2010 +0200
@@ -80,6 +80,7 @@
 PRJ_EXTENSIONS
 
 START EXTENSION s60/mifconv
+OPTION SOURCEDIR ../generic/icons
 OPTION TARGETFILE cameraapp.mif
 OPTION HEADERFILE cameraapp.mbg
 OPTION SOURCEFILE iconlist.txt
--- a/camerauis/cameraapp/build/iconlist.txt	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/build/iconlist.txt	Mon Mar 15 12:39:00 2010 +0200
@@ -156,3 +156,9 @@
 -c8,1 qgn_indi_cam4_quality_hd.svg
 -c8,1 qgn_indi_cam4_quality_9mp_high.svg
 -c8,1 qgn_indi_cam4_quality_6mp_high.svg
+-c8,1 qgn_indi_cam4_tb_oneclick_active.svg
+-c8,1 qgn_indi_cam4_tb_oneclick_dimmed.svg
+-c8,1 qgn_indi_media_fullscreen_play.svg
+-c8,8 qgn_bg_lcam_vid_postcap_play.svg
+-c8,8 qgn_bg_lcam_vid_postcap_play_pressed.svg
+-c8,1 qgn_indi_mg_tb_edit.svg
\ No newline at end of file
Binary file camerauis/cameraapp/conf/cameraapp.confml has changed
Binary file camerauis/cameraapp/conf/cameraapp_101FFA86.crml has changed
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/CamLocationSettingContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/CamLocationSettingContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -613,7 +613,7 @@
     TInt layoutCount = iDescLayoutArray.Count();
     TRgb color; 
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 );    
+    AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
 
     if ( layoutCount < count )
         {
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamdefaultnamesettingpage.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamdefaultnamesettingpage.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -87,7 +87,15 @@
             // Show the editor dialog                
             TBool editorRet = EFalse;  
             // Trap this to make sure the orientation is reverted back to normal   
+            if ( Cba() )
+              {
+              Cba()->MakeVisible( EFalse );
+              }
             TRAPD( leaveErr, editorRet = ShowEditorDialogL() )
+            if ( Cba() )
+              {              
+              Cba()->MakeVisible( ETrue );                          
+              }
             if ( !editorRet )
                 {
                 // redraw listbox to update radio button when cancel is pressed 
--- a/camerauis/cameraapp/generic/common/data/CamSettings.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/data/CamSettings.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -159,6 +159,31 @@
         };
     }
 
+//ME:START
+RESOURCE CBA R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT
+    {
+    flags = EEikButtonGroupAddToStack | EEikCbaFlagTransparent;
+    buttons =
+        {
+        CBA_BUTTON
+            {
+            id=EAknSoftkeySelect;
+            txt = text_softkey_ok;
+            },
+        CBA_BUTTON
+            {
+            id=EAknSoftkeyCancel;
+            txt = text_softkey_cancel;
+            },
+        CBA_BUTTON
+            {
+            id = ECamMSKCmdAppChange;
+            txt = qtn_msk_change;
+            }
+        };
+    }
+//ME:END
+
 //----------------------------------------------------
 //
 //    R_CAM_SOFTKEYS_OPTIONS_BACK__CAPTURE
--- a/camerauis/cameraapp/generic/common/data/CamSettingsV2.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/data/CamSettingsV2.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -157,6 +157,33 @@
         };
     }
 
+
+//ME:START
+RESOURCE CBA R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT
+    {
+    flags = EEikButtonGroupAddToStack | EEikCbaFlagTransparent;
+    buttons =
+        {
+        CBA_BUTTON
+            {            
+            id=EAknSoftkeySelect;
+            txt = text_softkey_ok;
+            },
+        CBA_BUTTON
+            {
+            id=EAknSoftkeyCancel;
+            txt = text_softkey_cancel;
+            },
+        CBA_BUTTON
+            {
+            id = ECamMSKCmdAppChange;
+            txt = qtn_msk_change;
+            }
+        };
+    }
+//ME:END
+
+
 //----------------------------------------------------
 //
 //    R_CAM_SOFTKEYS_OPTIONS_BACK__CAPTURE
--- a/camerauis/cameraapp/generic/common/data/CamStillCaptureCamcorder.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/data/CamStillCaptureCamcorder.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -861,7 +861,7 @@
     {
     menubar = r_cam_still_post_capture_menubar_camcorder;
     cba = r_cam_softkeys_back;
-    toolbar = r_cam_still_postcapture_toolbar;
+    toolbar = r_cam_postcapture_common_toolbar;
     }
 
 // ---------------------------------------------------------
@@ -916,6 +916,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
         MENU_ITEM
             {
             command = ECamCmdRenameImage;
--- a/camerauis/cameraapp/generic/common/data/CamVideoCaptureCamcorder.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/data/CamVideoCaptureCamcorder.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -912,7 +912,7 @@
     menubar = r_cam_video_post_capture_menubar_camcorder;
     //cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
     cba = r_cam_softkeys_options_back_toggletoolbar;
-    toolbar = r_cam_video_postcapture_toolbar;
+    toolbar = r_cam_postcapture_common_toolbar;
     }
 
 // ---------------------------------------------------------
@@ -961,6 +961,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
         MENU_ITEM
             {
             command = ECamCmdRenameVideo;
--- a/camerauis/cameraapp/generic/common/inc/Cam.hrh	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/Cam.hrh	Mon Mar 15 12:39:00 2010 +0200
@@ -138,6 +138,7 @@
   ECamCmdPrintIntent,
   ECamCmdPrintPlugin,
   ECamCmdOneClickUpload,
+  ECamCmdSetUserDefault, 
   
   ECamCmdCaptureSetupLightSensitivityUser,
   
--- a/camerauis/cameraapp/generic/common/inc/CamCaptureSetupListBox.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/CamCaptureSetupListBox.h	Mon Mar 15 12:39:00 2010 +0200
@@ -53,6 +53,7 @@
 #else
                                  ,MCamAppController& aController
 #endif //CAMERAAPP_PLUGIN_BUILD
+                                 ,TBool aSkinnedBackGround = EFalse
                                 );
 
         /**
@@ -104,7 +105,7 @@
         */
         void HandlePointerEventL(const TPointerEvent& aPointerEvent);
 
-
+        
 	private:    // Data
 
         // observer that handles the control's update events
@@ -117,6 +118,9 @@
 #else
         MCamAppController& iController;
 #endif //CAMERAAPP_PLUGIN_BUILD		
+
+    protected:    // Data
+        TBool iSkinnedBackGround;
 	};
 
 #endif // CAMCAPTURESETUPLISTBOX_H
--- a/camerauis/cameraapp/generic/common/inc/CamCaptureSetupListItemDrawer.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/CamCaptureSetupListItemDrawer.h	Mon Mar 15 12:39:00 2010 +0200
@@ -45,7 +45,7 @@
         * @param aListBoxModel reference to a list box model used to access item data
         * @return pointer to the newly created object
         */
-        static CCamCaptureSetupListItemDrawer* NewL( MCamListboxModel& aListBoxModel );        
+        static CCamCaptureSetupListItemDrawer* NewL( MCamListboxModel& aListBoxModel, TBool aFullySkinned = EFalse );        
 
         /**
         * Destructor.
@@ -68,7 +68,7 @@
         * @since 2.8
 		* @param aListBoxModel reference to a list box model used to access item data
         */
-        CCamCaptureSetupListItemDrawer( MCamListboxModel& aListBoxModel );
+        CCamCaptureSetupListItemDrawer( MCamListboxModel& aListBoxModel, TBool aFullySkinned = EFalse );
 
 		/**
         * Second phase construction
@@ -131,6 +131,13 @@
         void DrawItemRect( const TRect& aActualItemRect ) const;
 
         /**
+        * Draws a rectangle for an item.
+        * @since 2.8
+        * @param the rectangular area to be drawn.
+        */
+        void DrawTransparentItemRect( const TRect& aActualItemRect ) const;
+
+        /**
         * Read list layout
         */
         void ReadLayout();
@@ -162,6 +169,8 @@
         TAknTextComponentLayout   iTxtWithRbLayout;
         TAknWindowComponentLayout iBmpWithRbLayout;
         TAknWindowComponentLayout iHighlightLayout;
+        // Drawing mode
+        TBool iFullySkinned;
 	};
 
 #endif      // CAMCAPTURESETUPLISTITEMDRAWER_H
--- a/camerauis/cameraapp/generic/common/inc/CamSettingsInternal.hrh	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/CamSettingsInternal.hrh	Mon Mar 15 12:39:00 2010 +0200
@@ -83,6 +83,9 @@
   ECamSettingItemDefaultAlbumId,
   ECamSettingItemDefaultAlbumName,
   ECamSettingItemRecLocation,
+  //Photo and video editor support
+  ECamSettingItemPhotoEditorSupport,    // Support for photo editor
+  ECamSettingItemVideoEditorSupport,    // Support for video editor
   ECamSettingItemStaticCommonRangeMax,    // Range marker for static common settings
   // -----------------------------------------------------
 
@@ -99,6 +102,7 @@
   ECamSettingItemUserSceneImageSharpness,
   ECamSettingItemUserSceneColourSaturation,
   ECamSettingItemUserSceneLightSensitivity, // shared key is "UserSceneLightSensitivity"
+  ECamSettingItemUserSceneDefault,          // shared key is "UserSceneDefault"
   ECamSettingItemUserSceneRangeMax,         // Range marker for user scene settings
 
   ECamSettingItemUserSceneReset,            // This needs to be out of the range as it is not stored
@@ -590,6 +594,8 @@
   (const TUint16* const)_S16("ItemDefaultAlbumId"),
   (const TUint16* const)_S16("ItemDefaultAlbumName"),
   (const TUint16* const)_S16("ItemRecLocation"),
+  (const TUint16* const)_S16("ItemPhotoEditorSupport"),
+  (const TUint16* const)_S16("ItemVideoEditorSupport"),
   (const TUint16* const)_S16("ItemStaticCommonRangeMax"),
   // -----------------------------------------------------
   (const TUint16* const)_S16("ItemUserSceneRangeMin"),
@@ -603,6 +609,7 @@
   (const TUint16* const)_S16("ItemUserSceneImageSharpness"),
   (const TUint16* const)_S16("ItemUserSceneColourSaturation"),
   (const TUint16* const)_S16("ItemUserSceneLightSensitivity"),
+  (const TUint16* const)_S16("ItemUserSceneDefault"), 
   (const TUint16* const)_S16("ItemUserSceneRangeMax"),
   (const TUint16* const)_S16("ItemUserSceneReset"),
   // -----------------------------------------------------
--- a/camerauis/cameraapp/generic/common/inc/CameraappPrivateCRKeys.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/CameraappPrivateCRKeys.h	Mon Mar 15 12:39:00 2010 +0200
@@ -62,6 +62,7 @@
 const TUint32 KCamCrUserSceneImageSharpness = 0x27;
 const TUint32 KCamCrUserSceneColourSaturation = 0x28;
 const TUint32 KCamCrUserSceneLightSensitivity = 0x29;
+const TUint32 KCamCrUserSceneDefault        = 0x2A; 
 
 const TUint32 KCamCrPhotoRotation 			= 0x30;
 const TUint32 KCamCrVideoStabilisation		= 0x31;
@@ -87,7 +88,9 @@
 const TUint32 KCamCrImageToolbarItems        = 0x58;
 const TUint32 KCamCrImageToolbarDefaultItems = 0x59;
 
-
+//Support for Photo and Video editor
+const TUint32 KCamCrPhotoEditorSupport = 0x5A;
+const TUint32 KCamCrVideoEditorSupport = 0x5B;
 
 // =========================================================
 // Cameraapp variant settings file
--- a/camerauis/cameraapp/generic/common/src/CamCaptureSetupListBox.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/src/CamCaptureSetupListBox.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -39,8 +39,9 @@
 #else
                                                   ,MCamAppController& aController
 #endif //CAMERAAPP_PLUGIN_BUILD
+                                                  ,TBool aSkinnedBackGround
                                                  )
-: iSettingObserver( aObserver ), iController( aController )
+: iSettingObserver( aObserver ), iController( aController ), iSkinnedBackGround( aSkinnedBackGround )
     {
     iBorder = TGulBorder::ENone;
     }
@@ -69,7 +70,8 @@
                                                   Rect()
              								      );
     CCamCaptureSetupListItemDrawer* itemDrawer = 
-                                CCamCaptureSetupListItemDrawer::NewL( *model );
+                                CCamCaptureSetupListItemDrawer::NewL( *model, iSkinnedBackGround );
+    //ME:END
 
                                 
     itemDrawer->SetParentControl( aParent );
--- a/camerauis/cameraapp/generic/common/src/CamCaptureSetupListItemDrawer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/src/CamCaptureSetupListItemDrawer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -54,6 +54,10 @@
 // CONSTANTS
 static const TInt KRadioButtonSelectedIconIndex = 0;
 static const TInt KRadioButtonUnselectedIconIndex = 1;
+//ME:START
+const TUint32 KToolbarExtensionBgColor = 0x00000000;
+const TInt KToolBarExtensionBgAlpha = 0x7F;
+//ME:END
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -63,11 +67,13 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
+//ME:START
 CCamCaptureSetupListItemDrawer* 
-CCamCaptureSetupListItemDrawer::NewL( MCamListboxModel& aListBoxModel )
+CCamCaptureSetupListItemDrawer::NewL( MCamListboxModel& aListBoxModel, TBool aFullySkinned )
     {
     CCamCaptureSetupListItemDrawer* self = new( ELeave ) 
-                    CCamCaptureSetupListItemDrawer( aListBoxModel );               
+                    CCamCaptureSetupListItemDrawer( aListBoxModel, aFullySkinned );               
+//ME:END
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -96,8 +102,8 @@
 // -----------------------------------------------------------------------------
 //
 CCamCaptureSetupListItemDrawer
-::CCamCaptureSetupListItemDrawer( MCamListboxModel& aListBoxModel )
-  : iModel( aListBoxModel )
+::CCamCaptureSetupListItemDrawer( MCamListboxModel& aListBoxModel, TBool aFullySkinned )
+  : iModel( aListBoxModel ),iFullySkinned( aFullySkinned )
     {
 	}
 
@@ -220,8 +226,20 @@
         }
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
     // Draw unhighlighted rectangle that encapsulates the item text and bitmap.
-	DrawItemRect( aActualItemRect );       
+    
+    //ME:START
+    PRINT1( _L("Camera <> CCamCaptureSetupListItemDrawer::DrawActualItem iFullySkinned=%d"), iFullySkinned );
 
+    if( iFullySkinned )
+        {
+        DrawItemRect( aActualItemRect );       
+        }
+    else
+        {
+        DrawTransparentItemRect( aActualItemRect );               
+        }	
+    //ME:END
+	
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST   
    	if ( transApi )
    	    {
@@ -273,6 +291,11 @@
         layoutText.LayoutText( aActualItemRect, iTxtLayout );  
         // ...Pass the text to be drawn, into the text layout object
         // ...and draw it.    
+        if( !iFullySkinned )
+            {
+            color=KRgbWhite;       
+            }
+
         layoutText.DrawText( *iGc, iModel.ItemText( aItemIndex ), 
                              ETrue, color );
         // Draw the bitmap.
@@ -304,6 +327,11 @@
         layoutText.LayoutText( aActualItemRect, iTxtWithRbLayout );
         // ...Pass the text to be drawn, into the text layout object
         // ...and draw it.    
+        if( !iFullySkinned )
+            {
+            color=KRgbWhite;       
+            }
+
         layoutText.DrawText( *iGc, iModel.ItemText( aItemIndex ), ETrue, color );
 
         // Draw the bitmap.
@@ -444,6 +472,37 @@
     }
 
 
+//ME:START
+// ---------------------------------------------------------
+// CCamCaptureSetupListItemDrawer::DrawItemRect
+// Draws a rectangle for an item.
+// ---------------------------------------------------------
+//
+void CCamCaptureSetupListItemDrawer::DrawTransparentItemRect( 
+        const TRect& aActualItemRect ) // the rectangular area to be drawn
+        const
+        {
+        const CCoeControl* control = iParentControl;
+        
+        if ( control )
+            {
+            iGc->SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+            iGc->SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
+            iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
+            iGc->DrawRect( aActualItemRect );            
+            // Reset the brush after use (otherwise anything drawn
+            // after the viewfinder will also show viewfinder frames)    
+            iGc->SetDrawMode( CGraphicsContext::EDrawModePEN );
+            TSize penSize( 1, 1 );
+            iGc->SetPenSize( penSize );
+            iGc->SetPenStyle( CGraphicsContext::EDottedPen );
+            iGc->SetPenColor( KRgbWhite );
+            iGc->SetBrushStyle( CGraphicsContext::ENullBrush );
+            iGc->DrawRect( aActualItemRect );                    
+            }
+        }
+//ME:END
+
 // ---------------------------------------------------------
 // CCamCaptureSetupListItemDrawer::DrawItemRect
 // Draws a rectangle for an item.
--- a/camerauis/cameraapp/generic/common/src/CamStaticSettingsModel.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/src/CamStaticSettingsModel.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -681,10 +681,7 @@
 
       case ECamSettingItemImageToolbarItems:        crKey = KCamCrImageToolbarItems;        break;
       case ECamSettingItemImageToolbarDefaultItems: crKey = KCamCrImageToolbarDefaultItems; break;
-      case ECamSettingItemContinuousAutofocus: 
-          crKey = KCamCrContinuousAutofocus;
-          break;
-
+      case ECamSettingItemContinuousAutofocus:      crKey = KCamCrContinuousAutofocus;      break;
       default:                                      CamPanic( ECamPanicUnknownSettingItem );
                                                     break;
       }
@@ -732,6 +729,8 @@
       case ECamSettingItemDefaultAlbumId:     crKey = KCamCrDefaultAlbumId;     break;
       case ECamSettingItemDefaultAlbumName:   crKey = KCamCrDefaultAlbumTitle;  break;
       case ECamSettingItemRecLocation:        crKey = KCamCrPhotoStoreLocation; break;
+      case ECamSettingItemPhotoEditorSupport: crKey = KCamCrPhotoEditorSupport; break;
+      case ECamSettingItemVideoEditorSupport: crKey = KCamCrVideoEditorSupport; break;
       default:                                CamPanic( ECamPanicUnknownSettingItem );
                                               break;
       }
@@ -753,6 +752,7 @@
       case ECamSettingItemUserSceneImageSharpness:    crKey = KCamCrUserSceneImageSharpness;    break;
       case ECamSettingItemUserSceneColourSaturation:  crKey = KCamCrUserSceneColourSaturation;  break;
       case ECamSettingItemUserSceneLightSensitivity:  crKey = KCamCrUserSceneLightSensitivity;  break;
+      case ECamSettingItemUserSceneDefault:           crKey = KCamCrUserSceneDefault;           break; 
       default:                                        CamPanic( ECamPanicUnknownSettingItem );
                                                       break;
       }
--- a/camerauis/cameraapp/generic/common/src/CamUtility.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/common/src/CamUtility.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -1058,8 +1058,10 @@
       
       if ( configManager->IsContrastSupported() )
           User::LeaveIfError( aArray.Append( R_CAM_PHOTO_USER_SCENE_SETUP_LIST_CONTRAST_DATA ) );
-
-      User::LeaveIfError( aArray.Append( R_CAM_PHOTO_USER_SCENE_SETUP_LIST_RESET_DATA        ) );
+      
+      User::LeaveIfError( aArray.Append( R_CAM_PHOTO_USER_SCENE_SETUP_LIST_SET_USER_DEFAULT ) ); 
+            
+      User::LeaveIfError( aArray.Append( R_CAM_PHOTO_USER_SCENE_SETUP_LIST_RESET_DATA ) );
       break;
       }
     // -----------------------------------------------------
--- a/camerauis/cameraapp/generic/data/nhdcamsettings.rss	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/nhdcamsettings.rss	Mon Mar 15 12:39:00 2010 +0200
@@ -361,6 +361,32 @@
     buf = qtn_lcam_scene_nightport_ex;
     }
 
+//-----------------------------------------------------------------------------
+//
+//    r_qtn_lcam_tt_image_editor
+//    Tooltip for "Image editor" button in postcapture view.
+//    Uses string defined in cam.loc
+//
+//-----------------------------------------------------------------------------
+//	
+RESOURCE TBUF r_qtn_lcam_tt_image_editor
+	{
+	buf = qtn_lcam_tt_image_editor;
+	}
+
+//-----------------------------------------------------------------------------
+//
+//    r_qtn_lcam_tt_video_editor
+//    Tooltip for "Video editor" button in postcapture view.
+//    Uses string defined in cam.loc
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_qtn_lcam_tt_video_editor
+	{
+	buf = qtn_lcam_tt_video_editor;
+	}
+	
 /**************************************
 *         Other structures            *
 **************************************/
@@ -1002,6 +1028,13 @@
     bmbSkinIdMajor = EAknsMajorGeneric;
     bmbSkinIdMinor = EAknsMinorGenericQgnIndiCam4TbMark;
     }
+	
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_cam_ext_qgn_indi_cam4_tb_edit
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric;
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiMgTbEdit; //We are reusing the media gallery skinid 
+    }
+
 
 //----------------------------------------------------
 //   
@@ -1615,6 +1648,123 @@
 
 //----------------------------------------------------
 //   
+//    r_cam_postcapture_common_toolbar
+//    Toolbar for post-capture views( Primary/Secondary Still/Video views)
+//
+//----------------------------------------------------
+//
+
+RESOURCE AVKON_TOOLBAR r_cam_postcapture_common_toolbar
+    {
+    lines = 3;
+    flags = KAknToolbarFixed | KAknToolbarTransparent | KAknToolbarNoBackground;
+    items =
+        {
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdSend;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_send;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_send_mask;
+                        helptxt = qtn_lcam_tt_send;
+                        extension = r_cam_ext_qgn_indi_cam4_send;
+                        }
+                    };
+                };
+            },
+			TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdEdit;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_mg_tb_edit;
+                        bmpmask = EMbmCameraappQgn_indi_mg_tb_edit_mask;
+                        helptxt = ""; // Tooltip is set at run-time
+                        extension = r_cam_ext_qgn_indi_cam4_tb_edit;
+                        }
+                    };
+                };
+            },
+            TBAR_CTRL
+                {
+                type = EAknCtButton;
+                id = ECamCmdPhotos;
+                control = AVKON_BUTTON
+                    {
+                    flags = KAknButtonNoFrame;
+                    states =
+                        {
+                        AVKON_BUTTON_STATE
+                            {
+                            bmpfile = CAMERAAPP_BITMAP_FILE;
+                            bmpid = EMbmCameraappQgn_indi_cam4_tb_goto_gallery; 
+                            bmpmask = EMbmCameraappQgn_indi_cam4_tb_goto_gallery_mask;
+                            helptxt = qtn_lcam_tt_go_to_photos;
+                            extension = r_cam_ext_qgn_indi_cam4_tb_goto_photos;
+                            }
+                        };
+                    };
+                },
+		TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdOneClickUpload;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
+                        helptxt = ""; // Tooltip is set at run-time
+                        // extension = r_cam_ext_qgn_indi_cam4_tb_upload;
+                        }
+                    };
+                };
+            },		
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdDelete;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_delete;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_delete_mask;
+                        helptxt = qtn_lcam_tt_delete;
+                        extension = r_cam_ext_qgn_indi_cam4_delete;
+                        }
+                    };
+                };
+            }
+        };
+    }
+	
+//----------------------------------------------------
+//   
 //    r_cam_still_postcapture_toolbar
 //    Toolbar and toolbar extension for still post-capture view
 //
@@ -1734,8 +1884,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -1958,8 +2108,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2033,8 +2183,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2521,8 +2671,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2744,8 +2894,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2819,8 +2969,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2985,8 +3135,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -3105,11 +3255,50 @@
             serviceCmd          = KAiwCmdUpload;
             serviceClass        = KAiwClassBase;
             contentType         = "image/*";
-            defaultProvider = 0x2000BB53; //KShareAppUidVal;
+            defaultProvider 	= 0x2002CC1F; //KShareAppUidVal;
             maxProviders        = 1;
             }
         };
     }
+// -----------------------------------------------------------------------------
+//
+// r_cam_aiw_view_interest
+// AIW interest structure for view (Share settings view)
+//
+// -----------------------------------------------------------------------------
+RESOURCE AIW_INTEREST r_cam_aiw_view_interest
+    {
+    items=
+        {
+        AIW_CRITERIA_ITEM // SHARE_AIW
+            {
+            id = KAiwCmdView;
+            serviceCmd = KAiwCmdView;
+            contentType = "*";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//
+// r_cam_aiw_edit_interest
+// AIW interest structure for edit
+//
+// -----------------------------------------------------------------------------
+RESOURCE AIW_INTEREST r_cam_aiw_edit_interest
+    {
+    items=
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = KAiwCmdEdit;
+            serviceCmd = KAiwCmdEdit;
+            contentType = "*";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
 //----------------------------------------------------
 //   
 //    qtn_lcam_tb_turn_sequence_off
--- a/camerauis/cameraapp/generic/data/resource_inc/CamActivePalette.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamActivePalette.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -69,7 +69,7 @@
 RESOURCE CAM_AP_POST_CAPTURE_ITEM r_cam_ap_one_click_upload
     {
     text = ""; // Updated at run-time
-    bitmap_id = EMbmCameraappQgn_indi_cam4_tb_upload;
+    bitmap_id = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
     }
 
 // End of File
--- a/camerauis/cameraapp/generic/data/resource_inc/CamBurstCapture.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamBurstCapture.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -915,6 +915,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
         MENU_ITEM
             {
             command = ECamCmdPhotos;
--- a/camerauis/cameraapp/generic/data/resource_inc/CamBurstCaptureV2.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamBurstCaptureV2.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -915,6 +915,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
         MENU_ITEM
             {
             command = ECamCmdPhotos;
--- a/camerauis/cameraapp/generic/data/resource_inc/CamSceneSetup.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamSceneSetup.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -1008,6 +1008,34 @@
 
 //----------------------------------------------------
 //   
+//    r_cam_photo_user_scene_setup_list_set_user_default
+//    The data for the set user default item in the 
+//    photo user scene setup list
+//
+//----------------------------------------------------
+//    
+RESOURCE CAM_USER_SCENE_SETUP_LIST_ITEM_DATA r_cam_photo_user_scene_setup_list_set_user_default
+    {
+    id = ECamSettingItemUserSceneDefault;
+    text = qtn_lcam_set_user_default;
+    user_scene_setup_list_item_values =
+        {
+        CAM_USER_SCENE_SETUP_LIST_ITEM_VALUE
+            {
+            id = ECamSettNo;
+            text = qtn_lcam_set_user_default_no;
+            },
+
+        CAM_USER_SCENE_SETUP_LIST_ITEM_VALUE
+            {
+            id = ECamSettYes;
+            text = qtn_lcam_set_user_default_yes;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
 //    r_cam_photo_user_scene_setup_list_reset_data
 //    The data for the reset data item in the 
 //    photo user scene setup list
--- a/camerauis/cameraapp/generic/data/resource_inc/CamSceneSetupV2.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamSceneSetupV2.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -1001,6 +1001,34 @@
             }
         };
     }
+    
+//----------------------------------------------------
+//   
+//    r_cam_photo_user_scene_setup_list_set_user_default
+//    The data for the set user default item in the 
+//    photo user scene setup list
+//
+//----------------------------------------------------
+//    
+RESOURCE CAM_USER_SCENE_SETUP_LIST_ITEM_DATA r_cam_photo_user_scene_setup_list_set_user_default
+    {
+    id = ECamSettingItemUserSceneDefault;
+    text = qtn_lcam_set_user_default;
+    user_scene_setup_list_item_values =
+        {
+        CAM_USER_SCENE_SETUP_LIST_ITEM_VALUE
+            {
+            id = ECamSettNo;
+            text = qtn_lcam_set_user_default_no;
+            },
+
+        CAM_USER_SCENE_SETUP_LIST_ITEM_VALUE
+            {
+            id = ECamSettYes;
+            text = qtn_lcam_set_user_default_yes;
+            }
+        };
+    }
 
 //----------------------------------------------------
 //   
--- a/camerauis/cameraapp/generic/data/resource_inc/CamStillCapturePortrait.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamStillCapturePortrait.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -367,7 +367,7 @@
             command = KAiwCmdAssign;
             txt     = qtn_lcam_use_image_postcapture_menu;
             cascade = AIW_INTELLIGENT_CASCADE_ID;
-            },            
+            },
         MENU_ITEM
             {
             command = ECamCmdShareOnOvi;
@@ -375,6 +375,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
          MENU_ITEM
             {
             command = ECamCmdRenameImage;
--- a/camerauis/cameraapp/generic/data/resource_inc/CamStillCaptureViewMode.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamStillCaptureViewMode.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -237,6 +237,13 @@
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
+            },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
             },       
         MENU_ITEM
             {
--- a/camerauis/cameraapp/generic/data/resource_inc/CamVideoCapturePortrait.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamVideoCapturePortrait.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -612,6 +612,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
         MENU_ITEM
             {
             command = ECamCmdRenameVideo;
--- a/camerauis/cameraapp/generic/data/resource_inc/CamVideoCaptureViewMode.ra	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamVideoCaptureViewMode.ra	Mon Mar 15 12:39:00 2010 +0200
@@ -567,6 +567,13 @@
             // No submenu, only 1 provider acccepted.
             txt     = "";
             },
+        MENU_ITEM // SHARE_AIW
+            {
+            command = KAiwCmdView;
+            // AIW provider fills the menu item title.
+            // No submenu, only 1 provider acccepted.
+            txt     = "";
+            },
         MENU_ITEM
             {
             command = EAknCmdHelp;
--- a/camerauis/cameraapp/generic/data/vgacamsettings.rss	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/data/vgacamsettings.rss	Mon Mar 15 12:39:00 2010 +0200
@@ -362,7 +362,32 @@
     buf = qtn_lcam_scene_nightport_ex_v2;
     }
 
+//-----------------------------------------------------------------------------
+//
+//    r_qtn_lcam_tt_image_editor
+//    Tooltip for "Image editor" button in postcapture view.
+//    Uses string defined in cam.loc
+//
+//-----------------------------------------------------------------------------
+//	
+RESOURCE TBUF r_qtn_lcam_tt_image_editor
+	{
+	buf = qtn_lcam_tt_image_editor;
+	}
 
+//-----------------------------------------------------------------------------
+//
+//    r_qtn_lcam_tt_video_editor
+//    Tooltip for "Video editor" button in postcapture view.
+//    Uses string defined in cam.loc
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_qtn_lcam_tt_video_editor
+	{
+	buf = qtn_lcam_tt_video_editor;
+	}
+	
 /**************************************
 *         Other structures            *
 **************************************/
@@ -1004,6 +1029,13 @@
     bmbSkinIdMajor = EAknsMajorGeneric;
     bmbSkinIdMinor = EAknsMinorGenericQgnIndiCam4TbMark;
     }
+	
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_cam_ext_qgn_indi_cam4_tb_edit
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric;
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiMgTbEdit; //We are reusing the media gallery skinid 
+    }
+
 
 //----------------------------------------------------
 //   
@@ -1616,6 +1648,123 @@
 
 //----------------------------------------------------
 //   
+//    r_cam_postcapture_common_toolbar
+//    Toolbar for post-capture views( Primary/Secondary Still/Video views)
+//
+//----------------------------------------------------
+//
+
+RESOURCE AVKON_TOOLBAR r_cam_postcapture_common_toolbar
+    {
+    lines = 3;
+    flags = KAknToolbarFixed | KAknToolbarTransparent | KAknToolbarNoBackground;
+    items =
+        {
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdSend;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_send;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_send_mask;
+                        helptxt = qtn_lcam_tt_send;
+                        extension = r_cam_ext_qgn_indi_cam4_send;
+                        }
+                    };
+                };
+            },
+			TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdEdit;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_mg_tb_edit;
+                        bmpmask = EMbmCameraappQgn_indi_mg_tb_edit_mask;
+                        helptxt = ""; // Tooltip is set at run-time
+                        extension = r_cam_ext_qgn_indi_cam4_tb_edit;
+                        }
+                    };
+                };
+            },
+            TBAR_CTRL
+                {
+                type = EAknCtButton;
+                id = ECamCmdPhotos;
+                control = AVKON_BUTTON
+                    {
+                    flags = KAknButtonNoFrame;
+                    states =
+                        {
+                        AVKON_BUTTON_STATE
+                            {
+                            bmpfile = CAMERAAPP_BITMAP_FILE;
+                            bmpid = EMbmCameraappQgn_indi_cam4_tb_goto_gallery; 
+                            bmpmask = EMbmCameraappQgn_indi_cam4_tb_goto_gallery_mask;
+                            helptxt = qtn_lcam_tt_go_to_photos;
+                            extension = r_cam_ext_qgn_indi_cam4_tb_goto_photos;
+                            }
+                        };
+                    };
+                },
+		TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdOneClickUpload;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
+                        helptxt = ""; // Tooltip is set at run-time
+                        // extension = r_cam_ext_qgn_indi_cam4_tb_upload;
+                        }
+                    };
+                };
+            },		
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = ECamCmdDelete;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonNoFrame;
+                states =
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = CAMERAAPP_BITMAP_FILE;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_delete;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_delete_mask;
+                        helptxt = qtn_lcam_tt_delete;
+                        extension = r_cam_ext_qgn_indi_cam4_delete;
+                        }
+                    };
+                };
+            }
+        };
+    }
+	
+//----------------------------------------------------
+//   
 //    r_cam_still_postcapture_toolbar
 //    Toolbar and toolbar extension for still post-capture view
 //
@@ -1735,8 +1884,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -1959,8 +2108,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2034,8 +2183,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2522,8 +2671,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2745,8 +2894,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2820,8 +2969,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -2986,8 +3135,8 @@
                     AVKON_BUTTON_STATE
                         {
                         bmpfile = CAMERAAPP_BITMAP_FILE;
-                        bmpid = EMbmCameraappQgn_indi_cam4_tb_upload;
-                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_upload_mask;
+                        bmpid = EMbmCameraappQgn_indi_cam4_tb_oneclick_active;
+                        bmpmask = EMbmCameraappQgn_indi_cam4_tb_oneclick_active_mask;
                         helptxt = ""; // Tooltip is set at run-time
                         extension = r_cam_ext_qgn_indi_cam4_tb_upload;
                         }
@@ -3106,11 +3255,52 @@
             serviceCmd          = KAiwCmdUpload;
             serviceClass        = KAiwClassBase;
             contentType         = "image/*";
-            defaultProvider = 0x2000BB53; //KShareAppUidVal;
+            defaultProvider     = 0x2002CC1F; //KShareAppUidVal;
             maxProviders        = 1;
             }
         };
     }
+// -----------------------------------------------------------------------------
+//
+// r_cam_aiw_view_interest
+// AIW interest structure for view (Share settings view)
+//
+// -----------------------------------------------------------------------------
+RESOURCE AIW_INTEREST r_cam_aiw_view_interest
+    {
+    items=
+        {
+        AIW_CRITERIA_ITEM // SHARE_AIW
+            {
+            id = KAiwCmdView;
+            serviceCmd = KAiwCmdView;
+            contentType = "*";
+            defaultProvider     = 0x2002CC1F; //KShareAppUidVal;	    
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//
+// r_cam_aiw_edit_interest
+// AIW interest structure for edit
+//
+// -----------------------------------------------------------------------------
+RESOURCE AIW_INTEREST r_cam_aiw_edit_interest
+    {
+    items=
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = KAiwCmdEdit;
+            serviceCmd = KAiwCmdEdit;
+            contentType = "*";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+	
 //----------------------------------------------------
 //   
 //    qtn_lcam_tb_turn_sequence_off
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraapp/generic/icons/qgn_bg_lcam_vid_postcap_play.svg	Mon Mar 15 12:39:00 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="140"
+   height="92"
+   id="svg2">
+  <defs
+     id="defs4" />
+  <g
+     id="layer1">
+    <rect
+       width="140"
+       height="92"
+       rx="10"
+       ry="10"
+       x="0"
+       y="0"
+       id="rect3774"
+       style="fill:#000000;fill-opacity:0.5;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraapp/generic/icons/qgn_bg_lcam_vid_postcap_play_pressed.svg	Mon Mar 15 12:39:00 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="140"
+   height="92"
+   id="svg2">
+  <defs
+     id="defs4" />
+  <g
+     id="layer1">
+    <rect
+       width="140"
+       height="92"
+       rx="10"
+       ry="10"
+       x="0"
+       y="0"
+       id="rect3774"
+       style="fill:#000000;fill-opacity:0.25;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraapp/generic/icons/qgn_indi_cam4_tb_oneclick_active.svg	Mon Mar 15 12:39:00 2010 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" [
+	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1" baseProfile="tiny"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+	 x="0px" y="0px" width="22px" height="22px" viewBox="0 0 22 22" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="22" height="22"/>
+<path fill-opacity="0.4" d="M13.78,9.069l-4.018,2.224l3.801,2.188c0.482-0.298,1.226-0.73,2.546-0.609
+	c2.452,0.227,3.588,2.416,3.372,4.113c-0.274,2.17-2.104,3.539-4.374,3.131c-2.61-0.467-2.894-3.035-2.894-3.035l-4.926-2.678
+	c0,0-0.861,0.442-2.056,0.406c-2.319-0.072-3.516-2.017-3.491-3.754C1.764,9.38,3.032,7.562,5.184,7.515
+	c1.458-0.033,2.08,0.478,2.176,0.55l4.698-2.511c0.072-1.47,1.506-3.335,3.622-3.335c2.476,0,3.851,1.817,3.851,3.718
+	c0,2.009-1.472,3.659-3.587,3.659C14.832,9.595,13.78,9.069,13.78,9.069z M7.216,13.553l5.619,2.881c0,2.045,1.603,2.966,2.87,2.966
+	c1.9,0,2.836-1.325,2.952-2.583c0.132-1.435-1.04-3.107-2.978-3.085c-1.256,0.016-1.864,0.753-1.864,0.753l-5.452-2.869V10.97
+	l5.571-2.833c0.216,0.215,0.668,0.666,1.938,0.645c1.434-0.023,2.785-1.291,2.785-2.761c0-1.4-1.04-2.929-2.797-2.941
+	c-1.781-0.011-3.05,1.148-3.013,3.121L7.324,9.033C6.93,8.705,6.516,8.405,5.369,8.405c-1.937,0-2.991,1.655-2.869,3.085
+	c0.144,1.685,1.584,2.553,2.541,2.577C6.582,14.104,7.216,13.553,7.216,13.553z"/>
+<path fill="#FFFFFF" d="M7.239,13.553l5.62,2.881c0,2.045,1.602,2.966,2.869,2.966c1.9,0,2.837-1.325,2.952-2.583
+	c0.132-1.435-1.04-3.107-2.977-3.085c-1.255,0.016-1.865,0.753-1.865,0.753l-5.452-2.869V10.97l5.571-2.833
+	c0.216,0.215,0.669,0.666,1.938,0.645c1.434-0.023,2.785-1.291,2.785-2.761c0-1.4-1.04-2.929-2.798-2.941
+	c-1.78-0.011-3.049,1.148-3.013,3.121L7.347,9.033C6.954,8.705,6.54,8.405,5.392,8.405c-1.938,0-2.991,1.655-2.869,3.085
+	c0.143,1.685,1.583,2.553,2.541,2.577C6.605,14.104,7.239,13.553,7.239,13.553z"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraapp/generic/icons/qgn_indi_cam4_tb_oneclick_dimmed.svg	Mon Mar 15 12:39:00 2010 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" [
+	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1" baseProfile="tiny"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+	 x="0px" y="0px" width="22px" height="22px" viewBox="0 0 22 22" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="22" height="22"/>
+<path fill="#FFFFFF" d="M7.281,13.595l5.62,2.881c0,2.045,1.602,2.966,2.869,2.966c1.9,0,2.838-1.325,2.953-2.583
+	c0.131-1.435-1.041-3.107-2.977-3.085c-1.256,0.016-1.865,0.753-1.865,0.753l-5.452-2.869v-0.646L14,8.179
+	c0.215,0.215,0.668,0.666,1.938,0.645c1.434-0.022,2.785-1.29,2.785-2.761c0-1.4-1.041-2.929-2.799-2.941
+	c-1.779-0.011-3.049,1.148-3.012,3.12L7.389,9.075C6.995,8.747,6.582,8.447,5.434,8.447c-1.938,0-2.991,1.655-2.869,3.085
+	c0.143,1.685,1.583,2.553,2.541,2.577C6.647,14.146,7.281,13.595,7.281,13.595z"/>
+<path fill-opacity="0.2" d="M13.822,9.11l-4.019,2.225l3.802,2.188c0.482-0.298,1.225-0.73,2.545-0.609
+	c2.453,0.227,3.588,2.416,3.373,4.113c-0.275,2.17-2.104,3.539-4.375,3.131c-2.609-0.467-2.893-3.035-2.893-3.035l-4.927-2.678
+	c0,0-0.861,0.442-2.056,0.406c-2.319-0.072-3.516-2.017-3.491-3.754c0.023-1.675,1.291-3.492,3.443-3.539
+	c1.458-0.033,2.08,0.478,2.176,0.549L12.1,5.596c0.072-1.47,1.506-3.335,3.621-3.335c2.477,0,3.852,1.817,3.852,3.718
+	c0,2.009-1.473,3.659-3.588,3.659C14.873,9.638,13.822,9.11,13.822,9.11z M7.257,13.595l5.62,2.881c0,2.045,1.602,2.966,2.869,2.966
+	c1.9,0,2.836-1.325,2.953-2.583c0.131-1.435-1.041-3.107-2.979-3.085c-1.256,0.016-1.863,0.753-1.863,0.753l-5.453-2.869v-0.646
+	l5.572-2.833c0.215,0.215,0.668,0.666,1.938,0.645c1.434-0.022,2.785-1.29,2.785-2.761c0-1.4-1.041-2.929-2.797-2.941
+	c-1.781-0.011-3.051,1.148-3.014,3.12L7.365,9.075C6.972,8.747,6.558,8.447,5.41,8.447c-1.937,0-2.991,1.655-2.869,3.085
+	c0.144,1.685,1.584,2.553,2.541,2.577C6.623,14.146,7.257,13.595,7.257,13.595z"/>
+</svg>
--- a/camerauis/cameraapp/generic/inc/CamAppController.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamAppController.h	Mon Mar 15 12:39:00 2010 +0200
@@ -1955,7 +1955,9 @@
     * @return Camera orientation value.
     */
     static TCamImageOrientation MapSensorOrientatio2CamOrientation( 
-        const TSensrvOrientationData::TSensrvDeviceOrientation& aSensorOrientation, TCamImageOrientation aLastImageOrientation);
+        const TSensrvOrientationData::TSensrvDeviceOrientation& aSensorOrientation, 
+        TCamImageOrientation aLastImageOrientation, 
+        TCamActiveCamera aActiveCamera );
         
     /**
     * Mapping from camera orientation data type to bitmap orientation type.
@@ -2162,7 +2164,7 @@
 		* @return remaining time
 		*/       
 		TTimeIntervalMicroSeconds 
-			CalculateVideoTimeRemainingL(const TCamMediaStorage 
+			CalculateVideoTimeRemainingL( TCamMediaStorage 
 										aStorage = ECamMediaStorageCurrent);
         /**
         * Sets orientation of the application to CCamera
@@ -2200,6 +2202,12 @@
          * Toggles between highest 16:9 and 4:3 quality levels.
          */
         TBool ToggleWideScreenQuality( TBool aWide );             
+
+        /**
+         * Returns the value of iSaveStarted
+         */
+        TBool IsSaveStarted();
+        
   private:
 
     // -----------------------------------------------------
--- a/camerauis/cameraapp/generic/inc/CamAppUi.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamAppUi.h	Mon Mar 15 12:39:00 2010 +0200
@@ -617,7 +617,19 @@
         * @return ETrue if the application has pretended to exit, else EFalse 
         */
         TBool IsInPretendExit() const;
-
+        
+        /**
+        * Indicates whether or not the application was in a simulated exit situation
+        * @return ETrue if the application had pretended to exit, else EFalse 
+        */
+        TBool ReturningFromPretendExit() const; 
+        
+        /**
+        * Indicates whether or not the application started the first time
+        * @return ETrue if the application booted first time, else EFalse 
+        */
+        TBool IsFirstBoot() const; 
+                
         /**
         * Returns whether an MMC removed note is pending
         * @since 3.0
@@ -989,6 +1001,20 @@
         * @return ETrue if all memories are full or unavailable
         **/
         TBool AllMemoriesFullOrUnavailable() const;
+        
+        /**
+        * Checks the availability of memory on the currently selected 
+        * mediastorage for capturing images or video, result saved
+        * in iMemoryAvailableForCapturing
+        **/
+        void CheckMemoryAvailableForCapturing();
+        
+        /**
+        * Returns the previously saved availability of memory
+        * @return ETrue if memory available for capturing
+        **/
+        TBool IsMemoryAvailableForCapturing() const;
+        
 
             
     private: // New functions
@@ -1656,6 +1682,7 @@
         // running in the background. The app should behave slightly differently when we 
         // are next brought to the foreground.
         TBool iPretendExit;
+        TBool iReturningFromPretendExit; 
 
         // flag to indicate whether we are currently embedding another application
         TBool iEmbedding;
@@ -1776,6 +1803,8 @@
 
 		TInt iLandscapeScreenMode;
         TInt iPortraitScreenMode;
+        
+        TBool iMemoryAvailableForCapturing;
         };
 
 // ===========================================================================
--- a/camerauis/cameraapp/generic/inc/CamCaptureSetupContainer.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamCaptureSetupContainer.h	Mon Mar 15 12:39:00 2010 +0200
@@ -56,7 +56,8 @@
               CCamAppController&              aController, 
               CAknView&                       aView,
               CCamCaptureSetupControlHandler& aControlHandler,
-              const TRect&                    aRect  );
+              const TRect&                    aRect,
+              TBool aFullScreenVF=ETrue );
         
     /**
     * Destructor.
@@ -152,11 +153,6 @@
     */
     TRect TouchLayout();
     
-    /**
-    * Enters viewfinder mode either in image or videomode
-    * depending current visible view. Also starts idle timer.
-    */
-    void ReserveAndStartVF();
     
   // -----------------------------------------------------
   // Constructors
@@ -172,7 +168,8 @@
     CCamCaptureSetupContainer( 
         CCamAppController& aController,
         CAknView& aView,
-        CCamCaptureSetupControlHandler& aControlHandler );
+        CCamCaptureSetupControlHandler& aControlHandler,
+        TBool aFullScreenVF = ETrue );
 
     /**
     * Symbian OS 2nd phase constructor.
@@ -207,6 +204,8 @@
     TInt iListBoxWidth;
     
     TBool iActivateOnTouchRelease;
+
+    TBool iFullScreenVF;
     MTouchFeedback* iFeedback; // not own
     TRect iLayoutAreaRect; 
   };
--- a/camerauis/cameraapp/generic/inc/CamCaptureSetupControlHandler.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamCaptureSetupControlHandler.h	Mon Mar 15 12:39:00 2010 +0200
@@ -70,7 +70,8 @@
         * @since 2.8
         * @return A pointer to the new control
         */
-        CCoeControl* CreateCaptureSetupControlL( const CCoeControl* aParent );
+        CCoeControl* CreateCaptureSetupControlL( const CCoeControl* aParent,
+               TBool aSkinnedBackGround = EFalse  );
 
         /**
         * From MCamSettingValueObserver
--- a/camerauis/cameraapp/generic/inc/CamCaptureSetupSlider.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamCaptureSetupSlider.h	Mon Mar 15 12:39:00 2010 +0200
@@ -40,6 +40,7 @@
 public:
     virtual ~CCamSliderLegend();
 
+    CCamSliderLegend( TBool aFullySkinned=EFalse );
     /**
     * Constructs the layout information for a text object
     * @since 5.0
@@ -83,6 +84,7 @@
 	TAknLayoutRect iIconRect;
 	CFbsBitmap* iBitmap;
 	CFbsBitmap* iMask;
+    TBool iFullySkinned;
     };
 
 
@@ -102,7 +104,8 @@
         static CCamCaptureSetupSlider* NewL( const CCoeControl* aParent, 
                                              MCamSettingValueObserver* aObserver,
                                              TCamSettingItemIds aSettingType,
-                                             TInt aSteps );
+                                             TInt aSteps,
+                                             TBool aFullySkinned=EFalse );
         
         /**
         * Destructor.
@@ -189,7 +192,7 @@
         */
         CCamCaptureSetupSlider( MCamSettingValueObserver* aObserver, 
                                 TCamSettingItemIds aSettingType,
-                                TInt aSteps );
+                                TInt aSteps, TBool aFullySkinned=EFalse );
 
         /**
         * By default Symbian 2nd phase constructor is private.
@@ -301,6 +304,8 @@
         
         // number of slider steps
         TInt iSteps;
+        // Drawing mode
+        TBool iFullySkinned;
     };
 
 #endif      // __CCAMCAPTURESETUPSLIDER_H   
--- a/camerauis/cameraapp/generic/inc/CamCaptureSetupViewBase.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamCaptureSetupViewBase.h	Mon Mar 15 12:39:00 2010 +0200
@@ -114,7 +114,7 @@
           * Sets the iInfoListBoxActive flag
           * @param aActive What to set iInfoListBoxActive to
           */
-        void SetInfoListBoxMode(TBool aActive);        
+        void SetInfoListBoxMode(TBool aActive, TBool aFullySkinned=EFalse);        
         
          /**
           * Sets the iCaptureSetupModeActive flag
@@ -152,7 +152,7 @@
         * @param aSetupCommand The command that initiated capture setup mode, used to 
         *                        determine the required control type
         */
-        virtual void SwitchToCaptureSetupModeL(  TInt aSetupCommand );
+        virtual void SwitchToCaptureSetupModeL( TInt aSetupCommand, TBool aFullScreenVF=ETrue );
 
         /**
         * Exit capture setup mode.
@@ -190,7 +190,7 @@
         * @param aMode
         * @since 3.0
         */
-        virtual void SwitchToInfoListBoxL( TCamInfoListBoxMode aMode );        
+        virtual void SwitchToInfoListBoxL( TCamInfoListBoxMode aMode, TBool aFullySkinned=EFalse );        
 
         /**
         * Handle InfoListBox item selection
@@ -221,6 +221,7 @@
         */
         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
 
+        void CaptureSetupModeSelection();
     private:
 
         /**
@@ -280,6 +281,7 @@
         // Purpose of current instance of iInfoListBoxContainer
         TCamInfoListBoxMode iInfoListBoxMode;                
         
+        TBool iForceAvkonCBA;
     private:   // data
 
         // Handler for the capture setup control
--- a/camerauis/cameraapp/generic/inc/CamContainerBase.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamContainerBase.h	Mon Mar 15 12:39:00 2010 +0200
@@ -289,6 +289,12 @@
     * @since 9.1 ( checking for scan codes )
     */               
     TBool IsSecondaryCameraCaptureKey( const TKeyEvent& aKeyEvent ) const ;    
+    /**
+    * Enters viewfinder mode either in image or videomode
+    * depending current visible view. Also starts idle timer.
+    */
+    void ReserveAndStartVF();
+    
   // -------------------------------------------------------
   // Constructors
   protected: 
--- a/camerauis/cameraapp/generic/inc/CamInfoListBox.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamInfoListBox.h	Mon Mar 15 12:39:00 2010 +0200
@@ -53,7 +53,8 @@
         				 const CCoeControl* aParent,
         				 RPointerArray<HBufC>& aSummaryTitleTextArray,
         				 RPointerArray<HBufC>& aSummaryDescriptionTextArray,
-        				 TInt aResourceId );
+        				 TInt aResourceId,
+        				 TBool aSkinnedBackGround = EFalse );
     
     private:
         
--- a/camerauis/cameraapp/generic/inc/CamInfoListBoxContainer.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamInfoListBoxContainer.h	Mon Mar 15 12:39:00 2010 +0200
@@ -72,7 +72,11 @@
                                                  TInt aListBoxResource,
                                                  TInt aSummaryResource,
                                                  TInt aSettingValue, 
-                                                 TInt aTitleResource );
+                                                 TInt aTitleResource,
+                                                 TBool aSkinnedBackGround = ETrue );
+        
+        //ME:END
+
 
         /**
         * Destructor.
@@ -100,7 +104,7 @@
         */
         CCamInfoListBoxContainer(   CCamAppController& aController,
                                     CAknView& aView,
-                                    TInt aSettingValue );
+                                    TInt aSettingValue, TBool aSkinnedBackGround = EFalse );
 
     public: 
         
@@ -241,6 +245,8 @@
         TBool iActivateOnTouchRelease;
 
         MTouchFeedback* iFeedback; // not own 
+
+        TBool iSkinnedBackGround;        
         
     };
     
--- a/camerauis/cameraapp/generic/inc/CamPostCaptureContainer.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamPostCaptureContainer.h	Mon Mar 15 12:39:00 2010 +0200
@@ -135,7 +135,13 @@
         * Called when battery pane has changed and redraw is needed
         * @since 3.1
         */		
-		void BatteryPaneUpdated();	        
+		void BatteryPaneUpdated();
+		
+	    /**
+	    * From CoeControl
+    	* @param aPointerEvent the pointer event to handle
+	    */
+		void HandlePointerEventL(const TPointerEvent& aPointerEvent);
 
     protected: // Functions from base classes
         /**
@@ -177,6 +183,20 @@
 	TBool iCheckForFileNameChange;
     
 	TBool iUpdatingBatteryPane; //Needed for drawing black background behind battery pane in Video mode
+	
+	// Play icon bitmaps
+	CFbsBitmap* iPlayIcon;
+	CFbsBitmap* iPlayIconMask;
+	
+	CFbsBitmap* iPlayIconBg;
+	CFbsBitmap* iPlayIconBgMask;
+	
+	CFbsBitmap* iPlayIconBgPressed;
+	CFbsBitmap* iPlayIconBgPressedMask;
+	
+	//Bools to control play button feedback
+	TBool iPlayIconPressed;
+	TBool iDraggedInAlready;
     };
 
 #endif
--- a/camerauis/cameraapp/generic/inc/CamSceneListBox.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamSceneListBox.h	Mon Mar 15 12:39:00 2010 +0200
@@ -43,7 +43,8 @@
         * C++ default constructor.
         */
         CCamSceneListBox( TCamCameraMode aMode, MCamSettingValueObserver* aObserver,
-        					CCamAppController& aController);
+        					CCamAppController& aController,
+        					TBool aFullySkinned=ETrue );
 
         /**
         * By default Symbian 2nd phase constructor is private.
--- a/camerauis/cameraapp/generic/inc/CamSettingsModel.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamSettingsModel.h	Mon Mar 15 12:39:00 2010 +0200
@@ -346,6 +346,11 @@
   public:
 
     /*
+    * Sets user scene setting to default if user has once selected
+    */
+	void SetUserSceneDefault(); 
+    
+	/*
     * Gets the handle to the settings model, which is used inturn by the
     * plugin to call the interfaces for performing needed actions.
     */
--- a/camerauis/cameraapp/generic/inc/CamShootingModeContainer.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamShootingModeContainer.h	Mon Mar 15 12:39:00 2010 +0200
@@ -74,6 +74,25 @@
                                                  TBool aUserBaseScenes = EFalse );
 
         /**
+        * Symbian OS two-phased constructor
+        * @since 2.8
+        * @param aRect Frame rectangle for container.
+        * @param aView Reference to the view containing this container
+        * @param aMode Current capture mode
+        * @param aController reference to CCamAppControllerBase instance
+        * @param aUserBaseScenes Specifies whether this list should
+        * display the base scenes for the user scene.
+        * @param aFullySkinned Specifies whether this list should
+        * be displayed as transparent or skinned background.
+        */
+        static CCamShootingModeContainer* NewL( const TRect& aRect, 
+                                                 TBool aFullySkinned,
+                                                 CAknView& aView,
+                                                 TCamCameraMode aMode,
+                                                 CCamAppController& aController,
+                                                 TBool aUserBaseScenes );        
+        
+        /**
         * Destructor.
         * @since 2.8
         */
@@ -99,7 +118,8 @@
         CCamShootingModeContainer( TCamCameraMode aMode, 
                                     CCamAppController& aController,
                                     CAknView& aView,
-                                    TBool aUserBaseScenes );
+                                    TBool aUserBaseScenes,
+                                    TBool aFullySkinned=ETrue );
 
     public: // New functions
         /**
@@ -265,6 +285,8 @@
       // Specifies whether or not the scene list is for 
       // the user base scenes
       TBool iUserBaseScenes;
+
+      TBool iFullySkinned;
       // Array of bitmaps for the large summary icon
       RPointerArray<CFbsBitmap> iSummaryBitmapArray;        
       // Array of all shooting mode titles
--- a/camerauis/cameraapp/generic/inc/CamStillUserSceneSetupView.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamStillUserSceneSetupView.h	Mon Mar 15 12:39:00 2010 +0200
@@ -93,7 +93,7 @@
         * @param aMode
         * @since 3.0
         */
-        void SwitchToInfoListBoxL( TCamInfoListBoxMode aMode ); 
+        void SwitchToInfoListBoxL( TCamInfoListBoxMode aMode, TBool aFullySkinned=EFalse );        
         
         /**
         * From CCamCaptureSetupViewBase
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camimagedecoder.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camimagedecoder.h	Mon Mar 15 12:39:00 2010 +0200
@@ -48,7 +48,7 @@
     *        KErrNone if all went as planned.
     * @param aBitmap Decoded bitmap. NULL if errors in decoding.
     */
-    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap ) = 0;
+    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask ) = 0;
 
   };
   
@@ -100,6 +100,8 @@
   public:
 
     void StartConversionL( CCamBufferShare* aBuffer );
+    
+    void StartIconConversionL( TDesC* aFilePath );
 
   private:
 
@@ -158,6 +160,7 @@
     HBufC8*          iThumbnailData;
 
     CFbsBitmap*    iDecodedBitmap;
+    CFbsBitmap*    iDecodedMask;
     CImageDecoder* iDecoder;    
     
     TInt           iRetryCounter;
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camsnapshot.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camsnapshot.h	Mon Mar 15 12:39:00 2010 +0200
@@ -84,7 +84,7 @@
     /**
     * @see MCamImageDecoderObserver
     */
-    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap );
+    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask );
 
   // -------------------------------------------------------
   // from MCamBitmapScalerObserver
--- a/camerauis/cameraapp/generic/inc/camoneclickuploadutility.h	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/camoneclickuploadutility.h	Mon Mar 15 12:39:00 2010 +0200
@@ -22,15 +22,25 @@
 
 #include <e32std.h>
 
+#include "CamSettingsInternal.hrh"
+#include "camimagedecoder.h"
+
+
 class CAiwServiceHandler;
+class AknToolbar;
+class CGulIcon;
 
+class CFbsBitmap;
+class CCamImageDecoder;
+class MCamImageDecoderObserver;
 
 /**
  *  Helper class for implementing one-click upload support
  *
  *  @since S60 v5.0
  */
-class CCamOneClickUploadUtility : public CBase
+class CCamOneClickUploadUtility : public CBase,
+                                  public MCamImageDecoderObserver
     {
 public:
     /**
@@ -72,12 +82,36 @@
     * @return Tooltip text
     */
     const TDesC& ButtonTooltipL();
-
+    
+    /**
+     * Get the current one click icon
+     */
+    void UpdateUploadIcon( CAknToolbar *aToolbar, TCamCameraMode aMode );
+    
+    /**
+     * From MCamImageDecoderObserver
+     */
+    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, 
+                               const CFbsBitmap* aMask );    
+    
 private:
     void ConstructL();
     void CheckVersionL();
     void InitializeAiwL();
     CCamOneClickUploadUtility();
+    
+    /**
+    * Obtains the path for icon to be used. 
+    * @param aMode the current camera mode
+    * @param aPath descriptor containing the path of icon to be used 
+    */
+    void CurrentIconPathL( TCamCameraMode aMode, TDes& aPath ); 
+
+    /**
+    * Decodes / starts decoding of icon to be used.
+    * @param aPath descriptor containing the path of icon to be used 
+    */
+    void DecodeIconL( TDesC* aPath );
 
 private: // Data
 
@@ -85,11 +119,18 @@
 
     // Own
     CAiwServiceHandler* iAiwServiceHandler;
+    
+    CFbsBitmap*    iDecodedBitmap;
+    CCamImageDecoder* iDecoder;    
+
+    TFileName iIconFileName;
+    CFbsBitmap* iIconImage;
+    CFbsBitmap* iIconMask;
+    
+    CAknToolbar* iToolbar;
 
     // Own
     HBufC* iTooltip;
     };
 
-
 #endif // CAMONECLICKUPLOADUTILITY_H
-
--- a/camerauis/cameraapp/generic/src/CamAppController.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamAppController.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -5642,6 +5642,10 @@
 void CCamAppController::GenerateNextVideoFilePathL( TBool aForcePhoneMem )
   {
   PRINT1( _L( "Camera => CCamAppController::GenerateNextVideoFilePathL, force phone mem:%d" ), aForcePhoneMem )    
+  if( aForcePhoneMem )
+    {
+    ForceUsePhoneMemoryL( ETrue );
+    }
   TInt store = IntegerSettingValue( ECamSettingItemVideoMediaStorage ); 
   
   TBuf<KMaxExtension> extension;        
@@ -5937,9 +5941,9 @@
          OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMAPPCONTROLLER_HANDLESAVEEVENT, "e_CAM_APP_PREP_FOR_NEXT_SHOT 1" ); //CCORAPP_PREP_FOR_NEXT_SHOT_START      
          HandleCaptureCompletion();
          NotifyControllerObservers( ECamEventCaptureComplete, KErrNone );
+         iSaveStarted = ETrue;
          NotifyControllerObservers( ECamEventSaveComplete );
          iCaptureRequested = EFalse;
-         iSaveStarted = ETrue;
          OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMAPPCONTROLLER_HANDLESAVEEVENT, "e_CAM_APP_PREP_FOR_NEXT_SHOT 0" ); //CCORAPP_PREP_FOR_NEXT_SHOT_END
          OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMAPPCONTROLLER_HANDLESAVEEVENT, "e_CAM_PRI_SHOT_TO_SHOT 0" ); //CCORAPP_PRI_SHOT_TO_SHOT_END   
          }
@@ -6180,9 +6184,15 @@
     {
     PRINT( _L("Camera <> CCamAppController: status in KErrNone..") );
     __ASSERT_ALWAYS( aBitmap, CamPanic( ECamPanicNullPointer ) );
-
+    
+    // The secondary camera postcapture snapshot is rotated here. 
+    // Due to the viewfinder mirroring along the landscape axis the 
+    // portrait (or upside down portrait) postcapture snapshot would 
+    // otherwise be upside down.
+    // This affects the snapshot seen in postcapture view.
+   
     if( iInfo.iActiveCamera == ECamActiveCameraSecondary &&
-        iCaptureOrientation == ECamOrientation90 &&
+        iCaptureOrientation == ECamOrientation180 &&
         ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) )
         {
         PRINT( _L( "Camera <> Rotate portrait secondary camera snapshot image 180 degrees" ) )
@@ -6329,6 +6339,11 @@
           NotifyControllerObservers( ECamEventImageData );  
           }
         PRINT1( _L("Camera <> CCamAppController::HandleImageCaptureEventL array count:%d"), BurstCaptureArray()->Count() );  
+
+        // Snapshots are rotated here if necessary, so that the thumbnails created by 
+        // ThumbNailManager accurately represent the actual images.
+        // This affects the thumbnails seen in Photos.
+        
         // check if snapshot bitmap needs to be rotated before creating a thumbnail from it
         TBool rotate( ( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) || 
                       iInfo.iActiveCamera == ECamActiveCameraSecondary ) &&
@@ -7404,6 +7419,10 @@
 
     if ( KSensrvChannelTypeIdOrientationData == aChannel.GetChannelInfo().iChannelType )
         {
+        // Rotation is used in primary camera whenever the feature is enabled by user.
+        // A rotation is always set for secondary camera in portrait and upside down
+        // portrait orientations due to the the viewfinder mirroring along the landscape axis.
+        // This affects the final JPEG file.
         TBool rotate( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) 
                       || iInfo.iActiveCamera == ECamActiveCameraSecondary );
 
@@ -7414,7 +7433,9 @@
             aChannel.GetData( orientationPackage );
 
             iImageOrientation =
-                MapSensorOrientatio2CamOrientation( orientationData.iDeviceOrientation, iLastImageOrientation );
+                MapSensorOrientatio2CamOrientation( orientationData.iDeviceOrientation, 
+                                                    iLastImageOrientation, 
+                                                    iInfo.iActiveCamera );
             }
         else
             {
@@ -7529,13 +7550,17 @@
 //
 TCamImageOrientation 
 CCamAppController::MapSensorOrientatio2CamOrientation( 
-    const TSensrvOrientationData::TSensrvDeviceOrientation& aSensorOrientation, TCamImageOrientation aLastImageOrientation )
+    const TSensrvOrientationData::TSensrvDeviceOrientation& aSensorOrientation, TCamImageOrientation aLastImageOrientation,
+    TCamActiveCamera aActiveCamera )
     {
     PRINT1 ( _L("Camera => CCamAppController::MapSensorOrientatio2CamOrientation aSensorOrientation: %d"), aSensorOrientation );   
 
     TCamImageOrientation cameraOrientation( ECamOrientation0 );
 
-    switch( aSensorOrientation )
+    // Primary camera rotation
+    if ( aActiveCamera == ECamActiveCameraPrimary ) 
+      {
+      switch( aSensorOrientation )
         {        
         case TSensrvOrientationData::EOrientationDisplayUpwards:
             // If coming from upside down portrait...
@@ -7594,6 +7619,24 @@
             PRINT( _L("Camera <> Unexpected orientation value") );
             break;
         }
+      }
+    // Secondary camera rotations
+    else if ( aActiveCamera == ECamActiveCameraSecondary )
+      {
+      if ( aSensorOrientation == TSensrvOrientationData::EOrientationDisplayUp ) // Portrait
+        {
+        cameraOrientation = ECamOrientation180; 
+        }
+      else if ( aSensorOrientation == TSensrvOrientationData::EOrientationDisplayDown )  // Upside down portrait
+        {
+        cameraOrientation = ECamOrientation180;
+        }
+      else
+        {
+        cameraOrientation = ECamOrientation0;
+        }
+      }
+      
     PRINT1( _L("Camera <= CCamAppController::MapSensorOrientatio2CamOrientation, return [%s]"), 
             KCamOrientationNames[cameraOrientation] );
 
@@ -7601,7 +7644,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// MapSensorOrientatio2CamOrientation
+// MapCamOrientation2RotationAngle
 // ---------------------------------------------------------------------------
 //
 CBitmapRotator::TRotationAngle 
@@ -10170,10 +10213,18 @@
 // ---------------------------------------------------------------------------
 //
 TTimeIntervalMicroSeconds
-CCamAppController::CalculateVideoTimeRemainingL(const TCamMediaStorage aStorage)
+CCamAppController::CalculateVideoTimeRemainingL( TCamMediaStorage aStorage )
   {
   RFs& fs = CEikonEnv::Static()->FsSession();
   TInt drive = 0;
+  // Check if setting the new video path is pending. The path may not have been 
+  // set if camera controller was busy or video mode not initialized. This 
+  // happens e.g. while in Settings menu.
+  // If yes, use the storage media that is going to be used next.
+  if( iSetNewPathnamesPending != ECamMediaStorageNone )
+    {
+    aStorage = iSetNewPathnamesPending;
+    }
   if(aStorage == ECamMediaStorageCurrent)
 	{
   const TDesC& filename = CurrentVideoFileName();
@@ -11087,5 +11138,14 @@
     return qualityChanged;
     }
 
+// ---------------------------------------------------------------------------
+// CCamAppController::IsSaveStarted
+// 
+// ---------------------------------------------------------------------------
+//
+TBool CCamAppController::IsSaveStarted()
+    {
+    return iSaveStarted;    
+    }
 //  End of File  
 
--- a/camerauis/cameraapp/generic/src/CamAppui.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamAppui.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -1941,6 +1941,8 @@
         }
       iFirstVFStart = EFalse;
       
+      PRINT( _L( "Camera <> CCamAppUi::HandleCameraEventL updating CBA") );
+      UpdateCba();
       break;              
       }
       // -----------------------------------------------------
@@ -1952,6 +1954,12 @@
           {
           iController.StopViewFinderEcam();
           }
+        // Check if currently selected storagemedia has available memory for next capturing
+        // unless incoming call has stopped recording
+        if ( !iController.InCallOrRinging() && !iController.InVideocallOrRinging() )
+            {
+            CheckMemoryAvailableForCapturing();
+            }
         break;              
         }
     // -----------------------------------------------------        
@@ -1976,6 +1984,7 @@
           {
           //load settings in case they were changed via GS	
           iController.LoadStaticSettingsL( IsEmbedded() );
+          iStillCaptureView->UpdateToolbarIconsL(); 
           // and check the availability of the memory to be used
           iController.CheckMemoryToUseL();
           }    
@@ -2513,6 +2522,12 @@
     case ECamEventSaveComplete:
         {
         PRINT( _L( "Camera <> case ECamEventSaveComplete" ) )
+        // Check if currently selected storagemedia has available memory for next capturing
+        // unless saving just started
+        if( !iController.IsSaveStarted() )
+            {
+            CheckMemoryAvailableForCapturing();
+            }
         if ( ECamImageCaptureSingle == iImageMode )
             {
             if( iController.CaptureKeyPressedWhileImageSaving() && 
@@ -2637,7 +2652,9 @@
          
         if ( aStatus != KErrInUse &&
              iPreCaptureMode == ECamPreCapCaptureSetup ||
-             iPreCaptureMode == ECamPreCapSceneSetting )
+             iPreCaptureMode == ECamPreCapSceneSetting
+             || iPreCaptureMode == ECamPreCapGenericSetting
+            )
             {
             // VF settings does not go to standby state, VF is stopped instead
             // Screen saver releases resources
@@ -2676,7 +2693,8 @@
       
       // VF settings does not go to standby state, VF is stopped instead
       if ( aStatus == KErrInUse || iPreCaptureMode != ECamPreCapCaptureSetup &&
-           iPreCaptureMode != ECamPreCapSceneSetting )  
+           iPreCaptureMode != ECamPreCapSceneSetting   
+           && iPreCaptureMode != ECamPreCapGenericSetting )
            {
            PRINT( _L( "Camera <> CCamAppUi::HandleStandbyEventL: Set standby status..") );
            SetStandbyStatus( aStatus );
@@ -2968,6 +2986,8 @@
         case EEventFocusGained:
           {            
           PRINT( _L("Camera <> CCamAppUi::HandleWsEventL: case EEventFocusGained") );
+          iReturningFromPretendExit = iPretendExit; 
+          
           TBool uiOverride = iController.UiConfigManagerPtr() && iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported();
           
           if ( !iSendAsInProgress )
@@ -3075,7 +3095,8 @@
                   // by the user.
                   iController.LoadStaticSettingsL( IsEmbedded() );
                   }
-                    
+              PRINT( _L("Camera <> CCamAppUi::HandleWsEvent ECamEventFocusGained calling UpdateToolbarIconsL") );      
+              if ( iPretendExit ) 
               iStillCaptureView->UpdateToolbarIconsL();
               if( !uiOverride )
                   {
@@ -3257,22 +3278,8 @@
           // force side pane and active palette to update if simulating app 
           // launch this has to be done after the call to TrySwitchViewL() to 
           // ensure that IsBurstEnabled() returns the correct value.
-          if ( returningFromPretendExit )
-              {
-            /*if ( iController.UiConfigManagerPtr() && 
-                 iController.UiConfigManagerPtr()->IsLocationSupported() )
-                {
-                // If record location setting is on, start location trail,
-                // provided, primary camera and pre-capture view
-                if ( ECamLocationOn == iController.IntegerSettingValue( ECamSettingItemRecLocation ) 
-                     && ECamActiveCameraPrimary == ActiveCamera() 
-            	     && ECamViewStatePreCapture == iViewState 
-            	   )
-                    {
-                  	iController.StartLocationTrailL();
-                    }
-                }*/ 
-          
+          if ( iReturningFromPretendExit ) 
+              {            
             iCamSidePane->SetCaptureMode( iMode );
             // The active palette is always switched on when simulating 
             // app launch
@@ -3285,7 +3292,7 @@
                 }
             }
 
-          if ( uiOverride && ( returningFromPretendExit || iFirstBoot ) )
+          if ( uiOverride && ( iReturningFromPretendExit || iFirstBoot ) ) 
               {
               SetActivePaletteVisibility( EFalse );               	
               }
@@ -4304,106 +4311,117 @@
     PRINT( _L("Camera => CCamAppUi::CheckMemoryL") );
     TBool capture = ETrue;
 
-   TCamMediaStorage  storeToCheck = ECamMediaStorageCurrent;
-
-   if ( ECamControllerVideo == iController.CurrentMode() &&
-        ECamMediaStorageCard == iController.IntegerSettingValue( ECamSettingItemVideoMediaStorage ) &&
-        IsMemoryFullOrUnavailable( ECamMediaStorageCard ) )
-    	{
-    	storeToCheck =  ECamMediaStorageCard; 
-    	}
-    if(AllMemoriesFullOrUnavailable())
-    	{
-    	HBufC* text = StringLoader::LoadLC(R_NOTE_TEXT_ALLMEMORY_FULL);
-    	TInt ret = ShowOOMNoteL( *text, EFalse);
-    	capture = EFalse;
-    	CleanupStack::PopAndDestroy(text);
-    	}
-    else if(IsMemoryFullOrUnavailable( storeToCheck ))
-		{
-		HBufC* text = StringLoader::LoadLC(R_NOTE_TEXT_MEMORY_FULL);
-		CAknStaticNoteDialog* note = new( ELeave ) CAknStaticNoteDialog;
-		note->PrepareLC( R_CAM_OOM_NOTE_OK_CANCEL);
-		note->SetTextL( *text );
-		iController.StopIdleTimer();
-		TInt ret = note->RunDlgLD();
-		CleanupStack::PopAndDestroy( text );
-		if(EAknSoftkeyOk == ret)
-			{
-			//when memoryDialog showed, redraw background
-			if ( IsDirectViewfinderActive() )
-			  {
-			  TRAP_IGNORE( HandleCommandL( ECamCmdRedrawScreen ) );
-			  }
+    if ( IsMemoryAvailableForCapturing() )
+        {
+        capture = ETrue; 
+        }
+    else 
+        {   
+        TCamMediaStorage  storeToCheck = ECamMediaStorageCurrent;
+
+        if ( ECamControllerVideo == iController.CurrentMode() &&
+            ECamMediaStorageCard == iController.
+                IntegerSettingValue( ECamSettingItemVideoMediaStorage ) &&
+            IsMemoryFullOrUnavailable( ECamMediaStorageCard ) )
+            {
+            storeToCheck =  ECamMediaStorageCard; 
+            }
+        if(AllMemoriesFullOrUnavailable())
+            {
+            HBufC* text = StringLoader::LoadLC(R_NOTE_TEXT_ALLMEMORY_FULL);
+            TInt ret = ShowOOMNoteL( *text, EFalse);
+            capture = EFalse;
+            CleanupStack::PopAndDestroy(text);
+            }
+        else if(IsMemoryFullOrUnavailable( storeToCheck ))
+            {
+            HBufC* text = StringLoader::LoadLC(R_NOTE_TEXT_MEMORY_FULL);
+            CAknStaticNoteDialog* note = new( ELeave ) CAknStaticNoteDialog;
+            note->PrepareLC( R_CAM_OOM_NOTE_OK_CANCEL);
+            note->SetTextL( *text );
+            iController.StopIdleTimer();
+            TInt ret = note->RunDlgLD();
+            CleanupStack::PopAndDestroy( text );
+            if(EAknSoftkeyOk == ret)
+                {
+                //when memoryDialog showed, redraw background
+                if ( IsDirectViewfinderActive() )
+                    {
+                    TRAP_IGNORE( HandleCommandL( ECamCmdRedrawScreen ) );
+                    }
       
-			TInt supportedMemTypes = 0;
-			TCamMediaStorage currentLocation;
-			TInt key = ( ECamControllerVideo == iMode )
-			? ECamSettingItemVideoMediaStorage
-					: ECamSettingItemPhotoMediaStorage;
-
-			if ( iMMCRemoveNoteRequiredOnCapture )
-				{
-				iMMCRemoveNoteRequiredOnCapture = EFalse;
-				currentLocation = static_cast<TCamMediaStorage>( 
-									iController.
-										IntegerSettingValueUnfiltered( key ) );
-				}
-			else
-				{
-				currentLocation = static_cast<TCamMediaStorage>( 
-									iController.IntegerSettingValue( key ) );
-				}
-			if(currentLocation != ECamMediaStoragePhone && 
-				!IsMemoryFullOrUnavailable(ECamMediaStoragePhone))
-				{
-				supportedMemTypes |= AknCommonDialogsDynMem::EMemoryTypePhone;
-				}
-			if(currentLocation != ECamMediaStorageCard && 
-				!IsMemoryFullOrUnavailable(ECamMediaStorageCard))
-				{
-				supportedMemTypes |= AknCommonDialogsDynMem::EMemoryTypeMMCExternal;
-				}
-			if(currentLocation != ECamMediaStorageMassStorage && 
-				!IsMemoryFullOrUnavailable(ECamMediaStorageMassStorage))
-				{
-				supportedMemTypes |= 
-						AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage;
-				}
-			
-			CAknMemorySelectionDialogMultiDrive* memoryDialog = 
-							CAknMemorySelectionDialogMultiDrive::NewL(
-											   ECFDDialogTypeSelect,
-											   R_CAM_MEMORY_SELECT_DIALOG,
-											   EFalse,
-											   supportedMemTypes );
-			TDriveNumber driveNumber = static_cast<TDriveNumber>(KErrNotFound);    
-			CAknCommonDialogsBase::TReturnKey result = 
-								memoryDialog->ExecuteL( driveNumber );
-			 		 
-			if ( result != CAknCommonDialogsBase::TReturnKey(
-								CAknCommonDialogsBase::ERightSoftkey) )
-				 {
-				 DriveInfo::TDefaultDrives memVal = 
-				 	static_cast<DriveInfo::TDefaultDrives>(
-				 		CamUtility::GetDriveTypeFromDriveNumber(driveNumber));
-				 TInt settingValue = 
-				 	CamUtility::MapFromSettingsListMemory( memVal );
-				 iController.SetIntegerSettingValueL(key,settingValue);
-				 }
-			else
-				{
-				//No impl.
-				}
-			capture = EFalse;
-			}
-    	else
-    		{
-    		capture = EFalse;
-    		}
-		iController.StartIdleTimer();
-		}
-    
+                TInt supportedMemTypes = 0;
+                TCamMediaStorage currentLocation;
+                TInt key = ( ECamControllerVideo == iMode )
+                        ? ECamSettingItemVideoMediaStorage
+                        : ECamSettingItemPhotoMediaStorage;
+
+                if ( iMMCRemoveNoteRequiredOnCapture )
+                    {
+                    iMMCRemoveNoteRequiredOnCapture = EFalse;
+                    currentLocation = static_cast<TCamMediaStorage>( 
+                                        iController.
+                                        IntegerSettingValueUnfiltered( key ) );
+                    }
+                else
+                    {
+                    currentLocation = static_cast<TCamMediaStorage>( 
+                                iController.IntegerSettingValue( key ) );
+                    }
+                if(currentLocation != ECamMediaStoragePhone && 
+                    !IsMemoryFullOrUnavailable(ECamMediaStoragePhone))
+                    {
+                    supportedMemTypes |= 
+                        AknCommonDialogsDynMem::EMemoryTypePhone;
+                    }
+                if(currentLocation != ECamMediaStorageCard && 
+                    !IsMemoryFullOrUnavailable(ECamMediaStorageCard))
+                    {
+                    supportedMemTypes |= 
+                        AknCommonDialogsDynMem::EMemoryTypeMMCExternal;
+                    }
+                if(currentLocation != ECamMediaStorageMassStorage && 
+                    !IsMemoryFullOrUnavailable(ECamMediaStorageMassStorage))
+                    {
+                    supportedMemTypes |= 
+                        AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage;
+                    }
+
+                CAknMemorySelectionDialogMultiDrive* memoryDialog = 
+                        CAknMemorySelectionDialogMultiDrive::NewL(
+                                                ECFDDialogTypeSelect,
+                                                R_CAM_MEMORY_SELECT_DIALOG,
+                                                EFalse,
+                                                supportedMemTypes );
+                TDriveNumber driveNumber = static_cast<TDriveNumber>(KErrNotFound);    
+                CAknCommonDialogsBase::TReturnKey result = 
+                                memoryDialog->ExecuteL( driveNumber );
+
+                if ( result != CAknCommonDialogsBase::TReturnKey(
+                                CAknCommonDialogsBase::ERightSoftkey) )
+                    {
+                    DriveInfo::TDefaultDrives memVal = 
+                        static_cast<DriveInfo::TDefaultDrives>(
+                        CamUtility::GetDriveTypeFromDriveNumber(driveNumber));
+                    TInt settingValue = 
+                        CamUtility::MapFromSettingsListMemory( memVal );
+                    iController.SetIntegerSettingValueL(key,settingValue);
+                    }
+                else
+                    {
+                    //No impl.
+                    }
+                capture = EFalse;
+                }
+            else
+                {
+                capture = EFalse;
+                }
+                iController.StartIdleTimer();
+
+            UpdateCba(); // Make sure that softkeys are visible.
+            }
+        }
     PRINT1( _L("Camera <= CCamAppUi::CheckMemoryL, capture ok: %d"), capture );
     OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMAPPUI_CHECKMEMORYL, 
     			"e_CCamAppUi_CheckMemoryL 0" );
@@ -5984,6 +6002,26 @@
     return iPretendExit;
     }  
 
+// ---------------------------------------------------------
+// CCamAppUi::ReturningFromPretendExit
+// Indicates whether or not the application was in a simulated exit situation
+// ---------------------------------------------------------
+// 
+TBool CCamAppUi::ReturningFromPretendExit() const
+    {
+    return iReturningFromPretendExit;
+    }
+
+// ---------------------------------------------------------
+// CCamAppUi::IsFirstBoot
+// Indicates whether or not the application started the first time
+// ---------------------------------------------------------
+// 
+TBool CCamAppUi::IsFirstBoot() const
+    {
+    return iFirstBoot;
+    }
+	
 // ---------------------------------------------------------------------------
 // CCamAppUi::SendCameraAppToBackgroundL
 // Sends the camera application to the background, to pretend we're closing
@@ -8137,7 +8175,8 @@
                   ( iMode == ECamControllerImage && iView == iStillCaptureView ) ) &&
                 ( iPreCaptureMode != ECamPreCapCaptureSetup ) && 
                 ( iPreCaptureMode != ECamPreCapGenericSetting ) && 
-                ( iPreCaptureMode != ECamPreCapSceneSetting ) )
+                ( iPreCaptureMode != ECamPreCapSceneSetting ) && 
+                ( iPreCaptureMode != ECamPreCapStandby ) )
                 {
                 fixedToolbar->SetToolbarVisibility( ETrue );
                 }
@@ -8150,7 +8189,8 @@
             {
             if( (iPreCaptureMode != ECamPreCapCaptureSetup) && 
                 (iPreCaptureMode != ECamPreCapGenericSetting) && 
-                (iPreCaptureMode != ECamPreCapSceneSetting ) )
+                (iPreCaptureMode != ECamPreCapSceneSetting) && 
+                (iPreCaptureMode != ECamPreCapStandby) )
                 {
                 fixedToolbar->SetToolbarVisibility( ETrue );
                 }
@@ -8455,4 +8495,39 @@
     {
     iViewFinderInTransit = aInTransit;
     }
+    
+// -----------------------------------------------------------------------------
+// CCamAppUi::CheckMemoryAvailableForCapturing
+// -----------------------------------------------------------------------------
+//
+void 
+CCamAppUi::CheckMemoryAvailableForCapturing()
+	{
+    PRINT( _L("Camera => CCamAppUi::CheckMemoryAvailableForCapturing") )
+    OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMAPPUI_CHECKMEMORYAVAILABLEFORCAPTURING, "e_CCamAppUi_CheckMemoryAvailableForCapturing 1" );
+    if ( ( ECamControllerVideo == iController.CurrentMode() ||
+           ECamControllerVideo == iController.TargetMode() ) &&
+           ECamMediaStorageCard == iController.
+                IntegerSettingValue( ECamSettingItemVideoMediaStorage ) )
+        {
+        iMemoryAvailableForCapturing = !IsMemoryFullOrUnavailable( ECamMediaStorageCard );
+        }
+    else
+        {
+        iMemoryAvailableForCapturing = !IsMemoryFullOrUnavailable( ECamMediaStorageCurrent );
+        }
+    OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMAPPUI_CHECKMEMORYAVAILABLEFORCAPTURING, "e_CCamAppUi_CheckMemoryAvailableForCapturing 0" );
+    PRINT1( _L("Camera <= CCamAppUi::CheckMemoryAvailableForCapturing iMemoryAvailableForCapturing:%d"), iMemoryAvailableForCapturing )
+    }    
+
+// -----------------------------------------------------------------------------
+// CCamAppUi::IsMemoryAvailableForCapturing
+// -----------------------------------------------------------------------------
+//    
+TBool 
+CCamAppUi::IsMemoryAvailableForCapturing() const
+    {
+    return iMemoryAvailableForCapturing;
+    }
+        
 //  End of File
--- a/camerauis/cameraapp/generic/src/CamBurstCaptureArray.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamBurstCaptureArray.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -386,6 +386,12 @@
         ret = iImageSaveActive.DeleteFile( iBurstItems[aItemIndex]->FileName(), saveRequested );
 
         PRINT1( _L("Camera <> CCamBurstCaptureArray::SetDeleted iImageSaveActive.DeleteFile() returned %d" ), ret );
+        if ( ret == KErrInUse ) 
+          {
+          User::After( 700000 );
+          ret = iImageSaveActive.DeleteFile( iBurstItems[aItemIndex]->FileName(), saveRequested );
+          PRINT1( _L("Camera <> CCamBurstCaptureArray::SetDeleted iImageSaveActive.DeleteFile() Retry Delete returned %d" ), ret );
+          }
         // file might have already been deleted and that's ok so ignore -NotFound errors
         if( ret == KErrNone || ret == KErrNotFound || ret == KErrPathNotFound )
             {
--- a/camerauis/cameraapp/generic/src/CamBurstThumbnailView.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamBurstThumbnailView.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -719,7 +719,9 @@
             R_CAM_SET_AS_CALL_IMAGE_INTEREST );
     iAiwServiceHandler->AttachMenuL( R_CAM_BURST_THUMBNAIL_MENU, 
             R_CAM_SHARE_ON_OVI_INTEREST );
-            
+    // SHARE_AIW
+    iAiwServiceHandler->AttachMenuL( R_CAM_BURST_THUMBNAIL_MENU,
+                                     R_CAM_AIW_VIEW_INTEREST );
     
     static_cast<CCamAppUiBase*>( AppUi() )->PushDefaultNaviPaneL();
     PERF_EVENT_END_L2( EPerfEventBurstThumbnailViewActivation );
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -47,6 +47,8 @@
 // CONSTANTS
 
 const TUint KCameraEventInterest = ECamCameraEventClassVfData;
+const TUint32 KToolbarExtensionBgColor = 0x00000000;
+const TInt KToolBarExtensionBgAlpha = 0x7F;
 
 // ===========================================================================
 // MEMBER FUNCTIONS 
@@ -60,12 +62,13 @@
                               CCamAppController& aController, 
                               CAknView& aView,
                               CCamCaptureSetupControlHandler& aControlHandler,
-                              const TRect& aRect )
+                              const TRect& aRect, TBool aFullScreenVF )
     {
     CCamCaptureSetupContainer* self = new( ELeave ) CCamCaptureSetupContainer( 
                                                              aController, 
                                                              aView,
-                                                             aControlHandler );
+                                                             aControlHandler,
+                                                             aFullScreenVF );
     CleanupStack::PushL( self );
     self->ConstructL( aRect );
     CleanupStack::Pop( self );
@@ -116,10 +119,17 @@
             fixedToolbar->SetToolbarVisibility( EFalse );
             }
         }
+    iViewFinding = iControlHandler.ControlUsesViewFinder();
     
-    iCaptureSetupControl = iControlHandler.CreateCaptureSetupControlL( this );
+    if( iViewFinding )
+        {
+        iCaptureSetupControl = iControlHandler.CreateCaptureSetupControlL( this, !iFullScreenVF );
+        }
+    else
+        {
+        iCaptureSetupControl = iControlHandler.CreateCaptureSetupControlL( this, ETrue );        
+        }
     iCaptureSetupControl->SetContainerWindowL( *this );
-    iViewFinding = iControlHandler.ControlUsesViewFinder();
 
     // If the control requires a viewfinder then add it
     if ( iViewFinding )
@@ -251,10 +261,12 @@
 CCamCaptureSetupContainer::CCamCaptureSetupContainer( 
                              CCamAppController& aController, 
                              CAknView& aView,
-                             CCamCaptureSetupControlHandler& aControlHandler )
+                             CCamCaptureSetupControlHandler& aControlHandler,
+                             TBool aFullScreenVF )
 : CCamContainerBase( aController, aView ), 
 iControlHandler( aControlHandler ),
-iActivateOnTouchRelease(EFalse)
+iActivateOnTouchRelease(EFalse),
+iFullScreenVF(aFullScreenVF)
     {
     }
 
@@ -303,7 +315,14 @@
         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
         gc.SetBrushColor( TRgb::Color16MA( 0 ) );
         gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        if( iFullScreenVF )
+            {
+            gc.DrawRect( aRect );
+            }
+        else
+            {
         gc.DrawRect( iViewFinderRectLayout.Rect() );
+            }
         
         // Reset the brush after use (otherwise anything drawn
         // after the viewfinder will also show viewfinder frames)
@@ -316,7 +335,25 @@
                                             EAknsCIQsnTextColorsCG6 );
     if ( CamUtility::IsNhdDevice() )
         {
-        iTitleTextRectLayout.DrawText( gc, *iTitleText, ETrue, color );
+        if( appUi->IsDirectViewfinderActive() &&
+            iViewFinding && iFullScreenVF )
+            {
+            gc.SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );            
+            gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+            gc.DrawRect( TRect( iLayoutAreaRect.iTl.iX,
+                                iLayoutAreaRect.iTl.iY,
+                                iLayoutAreaRect.iBr.iX,
+                                iTitleTextRectLayout.TextRect().iBr.iY ) );
+            
+            gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+            
+            color=TRgb( KRgbWhite );
+            iTitleTextRectLayout.DrawText( gc, *iTitleText, ETrue, color );
+            }
+        else
+            {
+            iTitleTextRectLayout.DrawText( gc, *iTitleText, ETrue, color );
+            }
         }
     else
         { 
@@ -732,51 +769,6 @@
     }
 */
 
-// ---------------------------------------------------------
-// CCamCaptureSetupContainer::ReserveAndStartVF
-// ---------------------------------------------------------
-//
-void CCamCaptureSetupContainer::ReserveAndStartVF()
-    {
-    PRINT ( _L("Camera => CCamCaptureSetupContainer::ReserveAndStartVF") );
-    TCamCameraMode mode = iController.CurrentMode();
-    if(iController.IsAppUiAvailable())
-        {
-        TVwsViewId currentViewId;
-        CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
-        appUi->GetActiveViewId( currentViewId );
-        switch ( currentViewId.iViewUid.iUid )
-            {
-            case ECamViewIdPhotoUserSceneSetup:
-            case ECamViewIdStillPreCapture:
-                {
-                mode = ECamControllerImage;
-                }
-                break;
-            case ECamViewIdVideoPreCapture:
-                {
-                mode = ECamControllerVideo;
-                }
-                break;
-            default:
-                {
-                //Assume imagemode if view cannot be determined.
-                if(mode==ECamControllerIdle)
-                    {
-                    mode = ECamControllerImage;                
-                    }
-                }
-                break;
-            }
-        }
-    //Don't reserve camera and start viewfinder if shutting down.
-    if(mode!=ECamControllerShutdown)
-        {
-        iController.EnterViewfinderMode( mode );
-        iController.StartIdleTimer();
-        }
-    PRINT ( _L("Camera <= CCamCaptureSetupContainer::ReserveAndStartVF") );        
-    }
 // </CAMERAAPP_CAPI_V2_MIGRATION>
 
 // End of File  
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupControlHandler.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupControlHandler.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -67,7 +67,8 @@
 // Ownership is transferred to the calling class.
 // -----------------------------------------------------------------------------
 //
-CCoeControl* CCamCaptureSetupControlHandler::CreateCaptureSetupControlL( const CCoeControl* aParent )
+CCoeControl* CCamCaptureSetupControlHandler::CreateCaptureSetupControlL( const CCoeControl* aParent,
+        TBool aSkinnedBackGround )
     {
     // create a new control determined by iSettingType.
     // set self as observer
@@ -84,7 +85,7 @@
 			{
 			// create and return a slider control
             CCamCaptureSetupSlider* captureSetupControl = 
-					CCamCaptureSetupSlider::NewL( aParent, this, iSettingType, 0 );
+					CCamCaptureSetupSlider::NewL( aParent, this, iSettingType, 0, aSkinnedBackGround );
             CleanupStack::PushL( captureSetupControl );                    
             captureSetupControl->InitializeL
                 ( iController.IntegerSettingValue( iSettingType ) );
@@ -101,7 +102,7 @@
 				// create and return a radio-button listbox    
 				CCamCaptureSetupListBox* captureSetupControl = 
 						new( ELeave ) CCamCaptureSetupListBox( this,
-										iController ); 
+										iController, aSkinnedBackGround ); 
 
 				CleanupStack::PushL( captureSetupControl );
 				captureSetupControl->ConstructL( aParent, resourceId, iSettingType );
@@ -289,9 +290,7 @@
 //
 TBool CCamCaptureSetupControlHandler::ControlUsesViewFinder() const
     {
-    return ( ( iSettingType != ECamSettingItemDynamicPhotoFlash ) &&
-        ( iSettingType != ECamSettingItemUserSceneFlash ) &&
-        ( iSettingType != ECamSettingItemDynamicSelfTimer ));
+    return ETrue;
     }
 
 
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupSlider.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupSlider.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -63,6 +63,8 @@
 const TInt KEVMinus10Ind = 6;
 const TInt KEVMinus15Ind = 7;
 const TInt KEVMinus20Ind = 8;
+const TUint32 KToolbarExtensionBgColor = 0x00000000;
+const TInt KToolBarExtensionBgAlpha = 0x7F;
 
 
 
@@ -83,6 +85,11 @@
   PRINT( _L("Camera <= ~CCamSliderLegend") );
   }
 
+CCamSliderLegend::CCamSliderLegend( TBool aFullySkinned )
+: iFullySkinned( aFullySkinned )
+    {    
+    }
+
 // ---------------------------------------------------------
 // CCamSliderLegend::Draw
 // Draws the legend 
@@ -93,10 +100,16 @@
     if ( iItem == ECamSliderLegendItemText )
         {
         TRgb color;
+        if( iFullySkinned )
+            {
         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
         AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors,
                                                 EAknsCIQsnTextColorsCG6 );
-
+            }
+        else
+            {            
+            color=KRgbWhite;
+            }
         iPosition.DrawText( aGc, iText->Des(), ETrue, color );
         }
     else
@@ -179,8 +192,9 @@
 //
 CCamCaptureSetupSlider::CCamCaptureSetupSlider( MCamSettingValueObserver* aObserver,
                                                 TCamSettingItemIds aSettingType,
-                                                TInt aSteps ) 
-: iSettingObserver( aObserver ), iSettingType( aSettingType ), iSteps( aSteps )
+                                                TInt aSteps,
+                                                TBool aFullySkinned ) 
+: iSettingObserver( aObserver ), iSettingType( aSettingType ), iSteps( aSteps ), iFullySkinned( aFullySkinned )
     {
     }
 
@@ -305,10 +319,13 @@
 CCamCaptureSetupSlider* CCamCaptureSetupSlider::NewL( const CCoeControl* aParent, 
                                                       MCamSettingValueObserver* aObserver,
                                                       TCamSettingItemIds aSettingItem,
-                                                      TInt aSteps )
+                                                      TInt aSteps,
+                                                      TBool aFullySkinned )
     {
     CCamCaptureSetupSlider* self = 
-        new( ELeave ) CCamCaptureSetupSlider( aObserver, aSettingItem, aSteps );
+        new( ELeave ) CCamCaptureSetupSlider( aObserver, aSettingItem, aSteps,
+                aFullySkinned );
+    //ME:END    
     CleanupStack::PushL( self );
     self->ConstructL( aParent );
     CleanupStack::Pop( self );
@@ -397,9 +414,28 @@
     {
     CWindowGc& gc = SystemGc();
 
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    MAknsControlContext *cc = AknsDrawUtils::ControlContext( iParentControl ); 
-    AknsDrawUtils::Background( skin, cc, iParentControl, gc, Rect() );
+    if( iFullySkinned )
+        {
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        MAknsControlContext *cc = AknsDrawUtils::ControlContext( iParentControl ); 
+        AknsDrawUtils::Background( skin, cc, iParentControl, gc, Rect() );
+        }
+    else
+        {
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
+        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        gc.DrawRect( Rect() );            
+        // Reset the brush after use (otherwise anything drawn
+        // after the viewfinder will also show viewfinder frames)    
+        gc.SetDrawMode( CGraphicsContext::EDrawModePEN );
+        TSize penSize( 1, 1 );
+        gc.SetPenSize( penSize );
+        gc.SetPenStyle( CGraphicsContext::EDottedPen );
+        gc.SetPenColor( KRgbWhite );
+        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+        gc.DrawRect( Rect() );                            
+        }
     
     // STEP 1: Draw the legend text
     TInt count = iLegendArray.Count();
@@ -671,7 +707,7 @@
     // Read all EV entries from the resource file and construct them with layout
     for ( TInt i = 0; i < count; i++ )
         {
-        CCamSliderLegend* legend = new ( ELeave ) CCamSliderLegend;
+        CCamSliderLegend* legend = new ( ELeave ) CCamSliderLegend( iFullySkinned );
         CleanupStack::PushL( legend );
         switch ( i )
             {
@@ -784,7 +820,7 @@
     // and construct them with layout
     for ( TInt i = 0; i < count; i++ )
         {
-        CCamSliderLegend* legend = new ( ELeave ) CCamSliderLegend;
+        CCamSliderLegend* legend = new ( ELeave ) CCamSliderLegend( iFullySkinned );
         CleanupStack::PushL( legend );
         switch ( i )
             {
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -97,14 +97,9 @@
         case ECamCmdCaptureSetupBrightnessVideo:
         case ECamCmdCaptureSetupContrastVideo:
         case ECamCmdCaptureSetupImageSharpnessStill:
-            {
-            SwitchToCaptureSetupModeL( aCommand );
-            }
-            break;
         case ECamCmdCaptureSetupFlashStill:
         case ECamCmdCaptureSetupSelfTimer:
             {
-            iController.ExitViewfinderMode( ECamControllerImage );
             SwitchToCaptureSetupModeL( aCommand );
             }
             break;
@@ -183,31 +178,19 @@
             //lint -fallthrough
         case EAknSoftkeyOk:
             {
-            if ( iCaptureSetupModeActive && iCaptureSetupControlHandler )
-                {
-                TCamSettingItemIds iSettingItemId = iCaptureSetupControlHandler->SettingType();
-                if ( iSettingItemId == ECamSettingItemDynamicSelfTimer )
-                    {
-                    iController.SetSlideInSelfTimerPreview(EFalse);
-                    }
-
-                iController.CommitPreviewChanges();
-                // fallthrough to exit CaptureSetup mode
-                }
-            if( appUi && appUi->APHandler()->AccessedViaAP() )
-               {
-               if( !userSceneActive)
-                	{
-                	appUi->APHandler()->APOperationComplete();
-                	}
-               ExitAllModesL();
-               }
+            CaptureSetupModeSelection();
+                
             }
             break;
         case ECamMSKCmdAppChange:
         case EAknSoftkeySelect:
             {
-            if ( iSceneSettingContainer )
+            if ( iCaptureSetupModeActive && iCaptureSetupControlHandler )
+                {
+                CaptureSetupModeSelection();
+                // fallthrough to exit CaptureSetup mode
+                }
+            else if ( iSceneSettingContainer )
                 {
                 
                 if ( iSceneSettingContainer->UserSceneHighlighted() )
@@ -357,7 +340,7 @@
 // ---------------------------------------------------------------------------
 //
 CCamCaptureSetupViewBase::CCamCaptureSetupViewBase( CCamAppController& aController )
-    : CCamViewBase( aController )
+    : CCamViewBase( aController ),iForceAvkonCBA(EFalse)
     {
     }
 
@@ -512,6 +495,12 @@
             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
             }
             break;
+        case ECamCmdSetUserDefault:
+            { 
+            settingItemId = ECamSettingItemUserSceneDefault;
+            iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
+            }
+            break;
         default:
             {
             User::Leave( KErrNotSupported );
@@ -552,7 +541,7 @@
 // Enter capture setup mode
 // ---------------------------------------------------------------------------
 //
-void CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( TInt aSetupCommand )
+void CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( TInt aSetupCommand, TBool aFullScreenVF )
     {
     __ASSERT_DEBUG( !iCaptureSetupControlHandler && !iCaptureSetupContainer, CamPanic( ECamPanicResourceLeak ) );
 
@@ -568,7 +557,7 @@
         AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, rect );
         }
     iCaptureSetupContainer = CCamCaptureSetupContainer::NewL( iController, 
-                                   *this, *iCaptureSetupControlHandler, rect );
+                                   *this, *iCaptureSetupControlHandler, rect, aFullScreenVF );
     iCaptureSetupContainer->SetMopParent( this ); 
     appUi->AddToStackL( *this, iCaptureSetupContainer );
     iCaptureSetupContainer->ActivateL();
@@ -719,7 +708,7 @@
 // Show InfoListBox
 // ---------------------------------------------------------------------------
 //
-void CCamCaptureSetupViewBase::SwitchToInfoListBoxL( TCamInfoListBoxMode /* aMode */ )
+void CCamCaptureSetupViewBase::SwitchToInfoListBoxL( TCamInfoListBoxMode aMode, TBool aFullySkinned )
     {
     // Cleanup the view correctly if a leave occurs
     CleanupStack::PushL( TCleanupItem( CleanupInfoListBox, this ) );
@@ -729,7 +718,7 @@
     iInfoListBoxContainer->ActivateL();
     // UpdateCbaL need this boolean to be set in
     // order to return the correct CBA
-    SetInfoListBoxMode(ETrue);
+    SetInfoListBoxMode(ETrue, aFullySkinned);
     UpdateCbaL();
     SetTitlePaneTextL();
     appUi->PushDefaultNaviPaneL();
@@ -971,6 +960,37 @@
     }
 
 
+void CCamCaptureSetupViewBase::CaptureSetupModeSelection()
+    {
+    
+    TUid view = Id();
+    
+    TBool userSceneActive = ( view.iUid == ECamViewIdPhotoUserSceneSetup );
+    
+    CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
+    
+    if ( iCaptureSetupModeActive && iCaptureSetupControlHandler )
+        {
+        TCamSettingItemIds iSettingItemId = iCaptureSetupControlHandler->SettingType();
+        if ( iSettingItemId == ECamSettingItemDynamicSelfTimer )
+            {
+            iController.SetSlideInSelfTimerPreview(EFalse);
+            }
+    
+        iController.CommitPreviewChanges();    
+        // fallthrough to exit CaptureSetup mode
+        }
+    if( appUi && appUi->APHandler()->AccessedViaAP() )
+       {
+       if( !userSceneActive)
+            {
+            appUi->APHandler()->APOperationComplete();
+            }
+       ExitAllModesL();
+       }
+    
+    }
+
 // ---------------------------------------------------------------------------
 // CCamCaptureSetupViewBase::DynInitMenuPaneL
 // Dynamically initialise the options menu
@@ -1047,7 +1067,7 @@
 // Sets the iInfoListBoxActive flag
 // ---------------------------------------------------------------------------
 //
-void CCamCaptureSetupViewBase::SetInfoListBoxMode( TBool aActive )
+void CCamCaptureSetupViewBase::SetInfoListBoxMode( TBool aActive, TBool aFullySkinned )
     {
     // We need to inform the AppUi
     iInfoListBoxActive = aActive;
--- a/camerauis/cameraapp/generic/src/CamContainerBase.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamContainerBase.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -892,4 +892,50 @@
     return control; 
     }
 
+// ---------------------------------------------------------
+// CCamCaptureSetupContainer::ReserveAndStartVF
+// ---------------------------------------------------------
+//
+void CCamContainerBase::ReserveAndStartVF()
+    {
+    PRINT ( _L("Camera => CCamContainerBase::ReserveAndStartVF") );
+    TCamCameraMode mode = iController.CurrentMode();
+    if(iController.IsAppUiAvailable())
+        {
+        TVwsViewId currentViewId;
+        CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
+        appUi->GetActiveViewId( currentViewId );
+        switch ( currentViewId.iViewUid.iUid )
+            {
+            case ECamViewIdPhotoUserSceneSetup:
+            case ECamViewIdStillPreCapture:
+                {
+                mode = ECamControllerImage;
+                }
+                break;
+            case ECamViewIdVideoPreCapture:
+                {
+                mode = ECamControllerVideo;
+                }
+                break;
+            default:
+                {
+                //Assume imagemode if view cannot be determined.
+                if(mode==ECamControllerIdle)
+                    {
+                    mode = ECamControllerImage;                
+                    }
+                }
+                break;
+            }
+        }
+    //Don't reserve camera and start viewfinder if shutting down.
+    if(mode!=ECamControllerShutdown)
+        {
+        iController.EnterViewfinderMode( mode );
+        iController.StartIdleTimer();
+        }
+    PRINT ( _L("Camera <= CCamContainerBase::ReserveAndStartVF") );        
+    }
+
 // End of File  
--- a/camerauis/cameraapp/generic/src/CamImageSaveActive.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamImageSaveActive.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -1017,7 +1017,6 @@
         // the thumbnail is created using the imagefile    
         if ( !err )
             {
-            snapshot->SetDisplayMode( EColor64K );    
             TRAP( err, iSnapArray.AppendL( snapshot ) );            
             if ( !err ) 
                 {
--- a/camerauis/cameraapp/generic/src/CamInfoListBox.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamInfoListBox.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -49,7 +49,8 @@
 								   const CCoeControl* aParent,
         						RPointerArray<HBufC>& aSummaryTitleTextArray,
         				 		RPointerArray<HBufC>& aSummaryDescriptionTextArray,
-        				 		TInt aResourceId )
+        				 		TInt aResourceId,
+        				 		TBool aSkinnedBackGround )
 	{
 	iBorder = TGulBorder::ENone;
 
@@ -59,7 +60,7 @@
              									aSummaryDescriptionTextArray, aResourceId, Rect() );
 
     CCamCaptureSetupListItemDrawer* itemDrawer = 
-                                CCamCaptureSetupListItemDrawer::NewL( *model );
+                                CCamCaptureSetupListItemDrawer::NewL( *model, aSkinnedBackGround );
 
                                 
     itemDrawer->SetParentControl( aParent );
--- a/camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -41,6 +41,8 @@
 const TInt KInfoTooltipDelay = 0; // time (milliseconds) delay when showing the tooltip
 const TInt KInfoTooltipDisplayTime = 5000; // maximum time (milliseconds) the tooltip is displayed
 const TInt KExplTxtGranularity = 6;
+const TUint32 KToolbarExtensionBgColor = 0x00000000;
+const TInt KToolBarExtensionBgAlpha = 0x7F;
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -55,12 +57,14 @@
                                                             TInt aListBoxResource,
                                                             TInt aSummaryResource,
                                                             TInt aSettingValue,
-                                                            TInt aTitleResource  )
+                                                            TInt aTitleResource,
+                                                            TBool aSkinnedBackGround )
     {
     CCamInfoListBoxContainer* self = 
                   new( ELeave ) CCamInfoListBoxContainer(  aController,
                                                            aView,
-                                                           aSettingValue );
+                                                           aSettingValue,
+                                                           aSkinnedBackGround );
     CleanupStack::PushL( self );
     self->ConstructL( aRect, aListBoxResource, aSummaryResource, aTitleResource);
     CleanupStack::Pop( self );
@@ -142,7 +146,8 @@
 
     // Construct the listbox
     iListBox =  new( ELeave ) CCamInfoListBox( this, iController );                           
-    iListBox->ConstructL( iController, this, iTitleArray, iDescArray, aListBoxResource );
+    iListBox->ConstructL( iController, this, iTitleArray, iDescArray, aListBoxResource,
+            iSkinnedBackGround );
     iListBox->DisableSingleClick( ETrue );
 
     // Highlight the currently active setting value
@@ -252,12 +257,14 @@
 //
 CCamInfoListBoxContainer::CCamInfoListBoxContainer(     CCamAppController& aController,
                                                         CAknView& aView,
-                                                        TInt aSettingValue )
+                                                        TInt aSettingValue,
+                                                        TBool aSkinnedBackGround )
 : CCamContainerBase( aController, aView ), iSettingValue( aSettingValue ),
 iTooltipController(NULL),
 iShowTooltip(EFalse),
 iTooltipIndex(-1),
-iActivateOnTouchRelease(EFalse)
+iActivateOnTouchRelease(EFalse),
+iSkinnedBackGround(aSkinnedBackGround)
 
     {
     }
@@ -329,12 +336,44 @@
 	CWindowGc& gc = SystemGc();
     if ( CamUtility::IsNhdDevice() )
         {
+        TRgb color;
+        if( iSkinnedBackGround )
+            {
         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
         AknsDrawUtils::Background( skin, iBgContext, gc, aRect );
         // draw the title text   
-        TRgb color;
         AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors,
                                                 EAknsCIQsnTextColorsCG6 );
+            }
+        else
+            {
+            // Fill control with transparency bg colour
+            gc.SetPenStyle( CGraphicsContext::ENullPen );
+            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+            color = TRgb( 0,0 );
+            gc.SetBrushColor( color );
+            gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+            gc.DrawRect( aRect );
+            gc.SetBrushColor( color );
+            gc.DrawRect( iTitleTextRectLayout.TextRect() );            
+            // Reset the brush after use (otherwise anything drawn
+            // after the viewfinder will also show viewfinder frames)
+
+            gc.SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
+            gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+            gc.DrawRect( TRect( iLayoutAreaRect.iTl.iX,
+                                iLayoutAreaRect.iTl.iY,
+                                iLayoutAreaRect.iBr.iX,
+                                iTitleTextRectLayout.TextRect().iBr.iY ) );
+            
+            gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+            
+
+            CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );            
+            appUi->StatusPane()->MakeVisible( EFalse );
+            
+            color = TRgb( KRgbWhite );
+            }
         iTitleTextRectLayout.DrawText( gc, *iListboxTitle, ETrue, color );        
         }
     else
@@ -430,6 +469,10 @@
             aPointerEvent.iPosition.iX,
             aPointerEvent.iPosition.iY );
     iListBox->HandlePointerEventL(aPointerEvent);
+    if( !iController.IsViewFinding() && !iSkinnedBackGround )
+        {
+        ReserveAndStartVF();        
+        }
     /*TInt oldListItemIndex = -1;
     TInt newListItemIndex = -1;
     TBool handleItemActivation = EFalse;
@@ -665,8 +708,15 @@
                             AknLayoutScalable_Apps::main_cset_list_pane( 1 ) ); 
         }
  
+    if( !iSkinnedBackGround )
+        {
+        iTitleTextRectLayout.LayoutText( iLayoutAreaRect,  AknLayoutScalable_Apps::main_cset_text_pane_t1( 0 ) );
+        }    
+    else
+        {    
     iTitleTextRectLayout.LayoutText( iLayoutAreaRect, 
                            AknLayoutScalable_Apps::main_cam_set_pane_t1( 3 ) );
+        }
     
     return wholeListboxLayoutRect.Rect();
     }
--- a/camerauis/cameraapp/generic/src/CamPostCaptureContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPostCaptureContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -27,7 +27,10 @@
 #include <cameraapp.rsg>
 #include <vgacamsettings.rsg>
 #include <aknlayoutscalable_apps.cdl.h>
-#include <layoutmetadata.cdl.h>            
+#include <layoutmetadata.cdl.h>
+#include <cameraapp.mbg>
+
+#include <touchfeedback.h> 
 
 #include "CamPanic.h"
 #include "CamAppUi.h"
@@ -74,6 +77,36 @@
 
   iController.RemoveControllerObserver( this );
   delete iBatteryPaneController;
+  if(iPlayIcon)
+      {
+      delete iPlayIcon;
+      iPlayIcon = NULL;
+      }
+  if(iPlayIconMask)
+        {
+        delete iPlayIconMask;
+        iPlayIconMask = NULL;
+        }
+  if(iPlayIconBg)
+        {
+        delete iPlayIconBg;
+        iPlayIconBg = NULL;
+        }
+  if(iPlayIconBgMask)
+        {
+        delete iPlayIconBgMask;
+        iPlayIconBgMask = NULL;
+        }
+  if(iPlayIconBgPressed)
+        {
+        delete iPlayIconBgPressed;
+        iPlayIconBgPressed = NULL;
+        }
+  if(iPlayIconBgPressedMask)
+        {
+        delete iPlayIconBgPressedMask;
+        iPlayIconBgPressedMask = NULL;
+        }
   PRINT( _L("Camera <= ~CCamPostCaptureContainer" ))
   }
   
@@ -101,7 +134,49 @@
       // Still mode - processing text needed  
       PrepareProcessingTextL( ETrue );
       } 
-
+    if ( iView.Id().iUid == ECamViewIdVideoPostCapture )
+        {
+        _LIT(KResName, "z:\\resource\\apps\\cameraapp.mif");
+        TSize playIconSize( 140, 92);
+        AknIconUtils::CreateIconL(
+                 iPlayIcon,
+                 iPlayIconMask,
+                 KResName(),
+                 EMbmCameraappQgn_indi_media_fullscreen_play,
+                 EMbmCameraappQgn_indi_media_fullscreen_play_mask);
+        AknIconUtils::SetSize(iPlayIcon,playIconSize,EAspectRatioPreserved);
+        AknIconUtils::SetSize(iPlayIconMask,playIconSize,EAspectRatioPreserved);
+        
+        //!!Please don't remove this commented section
+        /*TSize playIconSize(40,40);
+        AknIconUtils::CreateIconL(
+                 iPlayIcon,
+                 iPlayIconMask,
+                 KResName(),
+                 EMbmCameraappQgn_indi_cam4_tb_play,
+                 EMbmCameraappQgn_indi_cam4_tb_play_mask);
+        AknIconUtils::SetSize(iPlayIcon,playIconSize,EAspectRatioPreserved);
+        AknIconUtils::SetSize(iPlayIconMask,playIconSize,EAspectRatioPreserved);
+        
+        TSize playIconBgSize(140,92);
+        AknIconUtils::CreateIconL(
+                 iPlayIconBg,
+                 iPlayIconBgMask,
+                 KResName(),
+                 EMbmCameraappQgn_bg_lcam_vid_postcap_play,
+                 EMbmCameraappQgn_bg_lcam_vid_postcap_play_mask);
+        AknIconUtils::SetSize(iPlayIconBg,playIconBgSize,EAspectRatioPreserved);
+        AknIconUtils::SetSize(iPlayIconBgMask,playIconBgSize,EAspectRatioPreserved);
+        AknIconUtils::CreateIconL(
+                 iPlayIconBgPressed,
+                 iPlayIconBgPressedMask,
+                 KResName(),
+                 EMbmCameraappQgn_bg_lcam_vid_postcap_play_pressed,
+                 EMbmCameraappQgn_bg_lcam_vid_postcap_play_pressed_mask);
+        AknIconUtils::SetSize(iPlayIconBgPressed,playIconBgSize,EAspectRatioPreserved);
+        AknIconUtils::SetSize(iPlayIconBgPressedMask,playIconBgSize,EAspectRatioPreserved);*/
+        }
+    
     // Make sure fixed toolbar is on top of this window
     DrawableWindow()->SetOrdinalPosition( KCamPostCaptureWindowOrdinalPos );
     }
@@ -301,6 +376,34 @@
 	        iNaviCounterControl->DrawNaviCtr( gc );
 	        }
 	     }
+	 
+	 if ( iView.Id().iUid == ECamViewIdVideoPostCapture )
+	     {
+         TSize playIconSize(140,92);
+	     TRect playIconRect(containerRect.Center() - TPoint(70,46),playIconSize);
+	     TRect playIconSourceRect(0,0,140,92);
+         
+	     //!!Please don't remove this commented section
+	     /*TSize playIconSize(40,40);
+         TRect playIconRect(containerRect.Center() - TPoint(20,20),playIconSize);
+         TRect playIconSourceRect(0,0,40,40);
+         
+         TSize playIconBgSize(140,92);
+	     TRect playIconBgRect(containerRect.Center() - TPoint(70,46),playIconBgSize);
+	     TRect playIconBgSourceRect(0,0,140,92);
+         
+	     if(iPlayIconPressed)
+	         {
+             gc.BitBltMasked(playIconBgRect.iTl,iPlayIconBgPressed,playIconBgSourceRect,iPlayIconBgPressedMask,EFalse);
+	         }
+	     else
+	         {
+             gc.BitBltMasked(playIconBgRect.iTl,iPlayIconBg,playIconBgSourceRect,iPlayIconBgMask,EFalse);
+	         }*/
+	     
+	     gc.BitBltMasked(playIconRect.iTl,iPlayIcon,playIconSourceRect,iPlayIconMask,EFalse);
+                 
+         }
      }
 
 // ----------------------------------------------------
@@ -637,4 +740,49 @@
   PRINT( _L("Camera <= CCamPostCaptureContainer::HandleAppEvent") );
   }
 
+// -----------------------------------------------------------------------------
+// CCamPostCaptureContainer::HandlePointerEventL
+//
+// Handles pointer events; From CCoeControl
+// -----------------------------------------------------------------------------    
+//  
+void CCamPostCaptureContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {
+    if ( iView.Id().iUid == ECamViewIdVideoPostCapture )
+        {
+        TRect containerRect = Rect();
+        TRect playIconRect(containerRect.Center() - TPoint(35,23), TSize(70,46));
+        if( playIconRect.Contains(aPointerEvent.iPosition) )
+            {
+            if ( aPointerEvent.iType == TPointerEvent::EButton1Down || aPointerEvent.iType == TPointerEvent::EDrag)  
+                {
+                if(!iDraggedInAlready)
+                    {
+                    MTouchFeedback* feedback = MTouchFeedback::Instance(); 
+                    if ( feedback )
+                        {
+                        feedback->InstantFeedback( ETouchFeedbackBasicButton );        
+                        }
+                    iDraggedInAlready = ETrue;
+                    iPlayIconPressed = ETrue;
+                    DrawNow();
+                    }
+                }
+            else if(aPointerEvent.iType == TPointerEvent::EButton1Up )
+                {
+                iPlayIconPressed = EFalse;
+                iDraggedInAlready = ETrue;
+                //feedback->InstantFeedback( ETouchFeedbackBasicButton );
+                iView.HandleCommandL(ECamCmdPlay);
+                }
+            }
+        else
+            {
+            iDraggedInAlready = EFalse;
+            iPlayIconPressed = EFalse;
+            DrawNow();
+            }
+        }
+    }
+	
 // End of File  
--- a/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -143,16 +143,17 @@
             inCall = iSFIUtils->IsCLIValidL();
 #endif	            */
             //use both inCall and InCallOrRinging() conditions to make sure if it is in call state
-            if ( /*inCall &&*/ iController.InCallOrRinging() )
-                {
-#ifndef __WINS__
-                DoInCallSendL();
-#endif
-                }
-            else
-                {
+// In-Call-Send no longer used
+//            if ( /*inCall &&*/ iController.InCallOrRinging() )
+//                {
+//#ifndef __WINS__
+//                DoInCallSendL();
+//#endif
+//                }
+//            else
+//                {
                 DoSendAsL();                    	
-                }    
+//                }    
             }
             break;
 
@@ -214,6 +215,35 @@
             StartAddToAlbumOperationL();
             }
             break;
+        case KAiwCmdEdit:
+        case ECamCmdEdit:
+            {
+            CAiwGenericParamList& inputParams = iAiwServiceHandler->InParamListL();
+            TPtrC currentFullFileName(iController.CurrentFullFileName());
+            TAiwGenericParam param( EGenericParamFile, TAiwVariant(currentFullFileName));
+            inputParams.AppendL( param );
+            
+            
+            TAiwVariant param2Variant;
+            if(Id().iUid == ECamViewIdVideoPostCapture)
+                {
+                param2Variant.Set(_L("video/*"));
+                }
+            else
+                {
+                param2Variant.Set(_L("image/jpeg"));
+                }
+            TAiwGenericParam param2( EGenericParamMIMEType, param2Variant );
+            inputParams.AppendL( param2 );
+
+            iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdEdit, inputParams, iAiwServiceHandler->OutParamListL());        
+            }
+            break;
+        case KAiwCmdView: // SHARE_AIW
+            {
+            iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdView, iAiwServiceHandler->InParamListL(), iAiwServiceHandler->OutParamListL());        
+            }
+            break;
         default:
             {
             CCamViewBase::HandleCommandL( aCommand );
@@ -324,10 +354,13 @@
                   CAknToolbar* fixedToolbar = Toolbar();
                   if ( fixedToolbar )
                       {
-                      fixedToolbar->SetItemDimmed( ECamCmdPhotos, EFalse, ETrue );
+                      /*fixedToolbar->SetItemDimmed( ECamCmdPhotos, EFalse, ETrue );
+                      fixedToolbar->SetItemDimmed( ECamCmdEdit, EFalse, ETrue );
                       fixedToolbar->SetItemDimmed( ECamCmdDelete, EFalse, ETrue );
                       fixedToolbar->SetItemDimmed( ECamCmdOneClickUpload, EFalse, ETrue );
-                      fixedToolbar->SetItemDimmed( ECamCmdSend, EFalse, ETrue );
+                      fixedToolbar->SetItemDimmed( ECamCmdSend, EFalse, ETrue );*/
+                      fixedToolbar->SetDimmed(EFalse);
+                      fixedToolbar->DrawNow();
                       }
                   }
               }
@@ -450,10 +483,11 @@
                 CAknToolbar* fixedToolbar = Toolbar();
                 if ( fixedToolbar )
                     {
-                    fixedToolbar->SetItemDimmed( ECamCmdPhotos, ETrue, ETrue );
+                    /*fixedToolbar->SetItemDimmed( ECamCmdPhotos, ETrue, ETrue );
                     fixedToolbar->SetItemDimmed( ECamCmdDelete, ETrue, ETrue );
                     fixedToolbar->SetItemDimmed( ECamCmdOneClickUpload, ETrue, ETrue );
-                    fixedToolbar->SetItemDimmed( ECamCmdSend, ETrue, ETrue );
+                    fixedToolbar->SetItemDimmed( ECamCmdEdit, ETrue, ETrue );
+                    fixedToolbar->SetItemDimmed( ECamCmdSend, ETrue, ETrue );*/
                     }
                 }
             }
@@ -518,6 +552,8 @@
 
     CCamAppUi* appui = static_cast<CCamAppUi*>( AppUi() );
 
+    iAiwServiceHandler->AttachL(R_CAM_AIW_EDIT_INTEREST);
+    
     CCamViewBase::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
 
     // fixed toolbar is used only with touch devices
@@ -534,8 +570,12 @@
             else
                 {
                 fixedToolbar->SetToolbarObserver( this );
-                fixedToolbar->SetToolbarVisibility( ETrue );   
                 UpdateToolbarIconsL();
+                if(Id().iUid != ECamViewIdVideoPostCapture)
+                    {
+                    fixedToolbar->SetDimmed(ETrue);
+                    }
+                fixedToolbar->SetToolbarVisibility( ETrue );
                 }
             }
         }
@@ -613,6 +653,12 @@
     CCamViewBase::DoDeactivate();
 
     iController.RemoveControllerObserver( this );
+    CAknToolbar* fixedToolbar = Toolbar();
+    if(fixedToolbar)
+        {
+        fixedToolbar->SetToolbarVisibility( EFalse );
+        }
+    
     PRINT( _L( "Camera <= CCamPostCaptureViewBase::DoDeactivate" ) );    
     }
 
@@ -636,7 +682,13 @@
             {
             aMenuPane->SetItemDimmed( ECamCmdAddToAlbum, ETrue );
             }
-        } 
+        }
+    // Hide menu item, if Share not available
+    if ( !iOneClickUploadUtility->OneClickUploadSupported() && 
+         aMenuPane->MenuItemExists( KAiwCmdView, itemPos ) )
+        {
+        aMenuPane->SetItemDimmed( KAiwCmdView, ETrue );
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -801,9 +853,12 @@
     if ( aApHandler )
         {
         //use both inCall and InCallOrRinging() conditions to make sure if it is in call state
-        aApHandler->SetItemVisible( ECamCmdSend, !( /*inCall &&*/ iController.InCallOrRinging() ) );
-        aApHandler->SetItemVisible( ECamCmdSendToCallerMultimedia, ( /*inCall &&*/ iController.InCallOrRinging() ) );
-
+        
+        // In-Call-Send no longer used. Always use ECamCmdSend regardless of phone call state.
+        //aApHandler->SetItemVisible( ECamCmdSend, !( /*inCall &&*/ iController.InCallOrRinging() ) );
+        //aApHandler->SetItemVisible( ECamCmdSendToCallerMultimedia, ( /*inCall &&*/ iController.InCallOrRinging() ) );
+        aApHandler->SetItemVisible( ECamCmdSend, ETrue );
+        
         TBool uploadSupported = EFalse;
         if ( iOneClickUploadUtility &&
              iOneClickUploadUtility->OneClickUploadSupported() )
@@ -928,18 +983,33 @@
                     state->SetHelpTextL( *tooltipText );
                     CleanupStack::PopAndDestroy( tooltipText );    
                     }    
-                } 
+                }
             button = dynamic_cast<CAknButton*>(
                     toolbar->ControlOrNull( ECamCmdOneClickUpload ) );
-            if ( button )
+            if ( button && iOneClickUploadUtility->OneClickUploadSupported())
                 {
                CAknButtonState* state = button->State();
                if ( state )
                    {
                    state->SetHelpTextL(
                            iOneClickUploadUtility->ButtonTooltipL() );
+                                      
                    }
                }
+            button = dynamic_cast<CAknButton*>(toolbar->ControlOrNull( ECamCmdEdit ));
+            if( button )
+                {
+                CAknButtonState* state = button->State();
+                if( state )
+                    {
+                    TInt resource = (Id().iUid == ECamViewIdStillPostCapture)?
+                                    R_QTN_LCAM_TT_IMAGE_EDITOR:
+                                    R_QTN_LCAM_TT_VIDEO_EDITOR;
+                    HBufC* helpText = StringLoader::LoadLC( resource );
+                    state->SetHelpTextL(*helpText);
+                    CleanupStack::PopAndDestroy(helpText);
+                    }
+                } 
            }
         }
     PRINT( _L("Camera <= CCamPostCaptureViewBase::UpdateToolbarIconsL") );    
--- a/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -387,7 +387,8 @@
             StartViewFinder();
             }
         }
-                                    
+    // Check if currently selected storagemedia has available memory for next capturing
+    appUi->CheckMemoryAvailableForCapturing();                                   
     
     // <CAMERAAPP_CAPI_V2_MIGRATION/>
     // if ( iController.EngineState() == ECamEngineStillCapturePrepared ||
@@ -1362,7 +1363,9 @@
     // Need to update appui viewstate
     PRINT( _L("Camera <> CCamPreCaptureViewBase::ExitStandbyModeL: emit ECamCmdSwitchToPrecapture" ) )
     appUi->HandleCommandL( ECamCmdSwitchToPrecapture );
-    
+    // Check if currently selected storagemedia has available memory for next capturing
+    appUi->CheckMemoryAvailableForCapturing();      
+        
     if ( uiOverride )
         {
         appUi->SetActivePaletteVisibility( EFalse );    
--- a/camerauis/cameraapp/generic/src/CamSceneListBox.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamSceneListBox.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -37,8 +37,9 @@
 */
 CCamSceneListBox::CCamSceneListBox( TCamCameraMode            aMode,
                                     MCamSettingValueObserver* aObserver,
-                                    CCamAppController&        aController )
-  : CCamCaptureSetupListBox( aObserver, aController ), 
+                                    CCamAppController&        aController,
+                                    TBool aFullySkinned )
+  : CCamCaptureSetupListBox( aObserver, aController, aFullySkinned ), 
     iMode( aMode )
   {
   }
@@ -65,7 +66,7 @@
                                     Rect() );
 
   CCamCaptureSetupListItemDrawer* itemDrawer = 
-      CCamCaptureSetupListItemDrawer::NewL( *model );
+      CCamCaptureSetupListItemDrawer::NewL( *model, iSkinnedBackGround );
 
 
   itemDrawer->SetParentControl( aParent );
--- a/camerauis/cameraapp/generic/src/CamSettingsModel.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamSettingsModel.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -137,6 +137,7 @@
         }
     iStaticModel->ResetSettingItem( KCamCrUserSceneContrast );
     iStaticModel->ResetSettingItem( KCamCrUserSceneImageSharpness );
+    iStaticModel->ResetSettingItem( KCamCrUserSceneDefault ); 
 
     // Reload the static user scene settings
     iUserSceneSettings.ResetAndDestroy();
@@ -397,7 +398,7 @@
     // If there is only one setting changed other than scene mode setting 
     // and if the Dynamic Scene mode is "User Scene" we update the new setting
     // value to the camera dynamic settings
-    if ( !userSceneModeSettingChanged )
+    if ( !userSceneModeSettingChanged && settingId != ECamSettingItemUserSceneDefault ) 
       {
       TInt scene = IntegerSettingValue( ECamSettingItemDynamicPhotoScene );
       // If user scene is the currently active photo scene then activate the
@@ -733,9 +734,9 @@
     // The model registers with the AppUi which is created after the model.
     // Registration is done here so we can guarantee that the AppUi has 
     // been created.
-    CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>
-                                            ( iEnv->AppUi() );
-    appUi->AddBurstModeObserverL(  this );
+    
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() ); 
+    appUi->AddBurstModeObserverL( this );
 
     // Free all memory currently used by the static settings.
     UnloadStaticSettings();
@@ -746,6 +747,10 @@
                     iUserSceneSettings
                    );
     iStaticModel->LoadStaticSettingsL( aIsEmbedded );
+    if ( appUi->ReturningFromPretendExit() || appUi->IsFirstBoot() )
+      {
+      SetUserSceneDefault(); 
+      }
 
     PRINT(_L("Camera <= CCamSettingsModel::LoadStaticSettingsL" ))
 
@@ -1289,16 +1294,21 @@
                  
 	    if ( iUiConfigManager->IsFaceTrackingSupported() ) // FT supported
          {      
-         if ( ECamSceneScenery == aSceneId || ECamSceneSports == aSceneId )
+         if ( ECamSceneScenery == aSceneId ||
+              ECamSceneSports == aSceneId ||
+              ECamSceneMacro == aSceneId)
             {
-            if ( ECamSceneScenery != iPreviousSceneMode && ECamSceneSports != iPreviousSceneMode ) // <- DATAMAKE
+            if ( ECamSceneScenery != iPreviousSceneMode && 
+                 ECamSceneSports != iPreviousSceneMode &&
+                 ECamSceneMacro != iPreviousSceneMode )
                {	
                iPreviousFaceTrack = TCamSettingsOnOff( IntegerSettingValue( ECamSettingItemFaceTracking ) );	
                }
             SetIntegerSettingValueL( ECamSettingItemFaceTracking, ECamSettOff );	
             }
          else if ( ( ECamSceneScenery == iPreviousSceneMode ||
-                     ECamSceneSports == iPreviousSceneMode ) &&
+                     ECamSceneSports == iPreviousSceneMode ||
+                     ECamSceneMacro == iPreviousSceneMode ) &&
                    ( ECamSettOff == TCamSettingsOnOff( IntegerSettingValue( ECamSettingItemFaceTracking ) ) ) )
              {
              SetIntegerSettingValueL( ECamSettingItemFaceTracking, iPreviousFaceTrack );
@@ -2305,7 +2315,9 @@
       return;	
       }
    TInt activeScene = IntegerSettingValue( ECamSettingItemDynamicPhotoScene );	
-   if ( ECamSceneScenery == activeScene || ECamSceneSports == activeScene ) 	
+   if ( ECamSceneScenery == activeScene ||
+        ECamSceneSports == activeScene ||
+        ECamSceneMacro == activeScene) 	
       {
       PRINT( _L("Camera <> CCamSettingsModel::StoreFaceTrackingValue(), Scenery or Sports mode" ) )		      	      	
       if ( iPreviousFaceTrack != TCamSettingsOnOff( IntegerSettingValue( ECamSettingItemFaceTracking ) ) )
@@ -2374,5 +2386,40 @@
     CopySettingsL(iUserSceneSettings, iUserSceneSettingsBackup);   
     }
 
+// ---------------------------------------------------------------------------
+// CCamSettingsModel::SetUserSceneDefault
+//
+// Set userScene as default 
+// ---------------------------------------------------------------------------
+// 
+void CCamSettingsModel::SetUserSceneDefault()
+    {
+    PRINT( _L("Camera => CCamSettingsModel::SetUserSceneDefault ") );
+    TInt settingsCount = iDynamicPhotoIntSettings.Count();
+    TInt userVal;
+    for ( TInt i = 0; i < settingsCount; ++i )
+       {
+       if ( iDynamicPhotoIntSettings[i]->iItemId == ECamSettingItemDynamicPhotoScene )
+         {
+         TInt sceneSetCount = iUserSceneSettings.Count();
+         for ( TInt j = 0; j < sceneSetCount; ++j )
+             {
+             if ( iUserSceneSettings[j]->iItemId == ECamSettingItemUserSceneDefault )
+                 {
+                 userVal = iUserSceneSettings[j]->iValueId;
+                 }
+             }
+         if ( userVal )
+             {
+             PRINT1( _L("Camera <> CCamSettingsModel::SetUserSceneDefault set userVal= %d"), userVal);
+             iDynamicPhotoIntSettings[i]->iValueId = ECamSceneUser;
+             ActivateUserSceneSettingsL();
+             }
+         
+         }
+       }
+    
+    PRINT( _L("Camera <= CCamSettingsModel::SetUserSceneDefault ") );
+    }
 // ===========================================================================
 // end of File  
--- a/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -43,6 +43,8 @@
 const TInt KInfoTooltipDelay = 0; // time (milliseconds) delay when showing the tooltip
 const TInt KInfoTooltipDisplayTime = 5000; // maximum time (milliseconds) the tooltip is displayed
 const TInt KExplTxtGranularity = 6;
+const TUint32 KToolbarExtensionBgColor = 0x00000000;
+const TInt KToolBarExtensionBgAlpha = 0x7F;
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -69,6 +71,27 @@
   return self;
   }
 
+
+CCamShootingModeContainer* 
+CCamShootingModeContainer::NewL( const TRect& aRect, 
+                                        TBool aFullySkinned,
+                                         CAknView& aView,
+                                         TCamCameraMode aMode,
+                                         CCamAppController& aController,
+                                         TBool aUserBaseScenes )
+    {
+    CCamShootingModeContainer* self = 
+        new( ELeave ) CCamShootingModeContainer( aMode, 
+                                                 aController,
+                                                 aView, 
+                                                 aUserBaseScenes,
+                                                 aFullySkinned );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
 // ---------------------------------------------------------------------------
 // CCamShootingModeContainer::~CCamShootingModeContainer
 // Destructor
@@ -155,7 +178,7 @@
         }                      
 
     // construct the listbox
-	iListBox =	new( ELeave ) CCamSceneListBox( iMode, this, iController );                           
+	iListBox =	new( ELeave ) CCamSceneListBox( iMode, this, iController, iFullySkinned );                           
 	iListBox->ConstructL( iController, this, iTitleArray, iDescArray, 
 	                      iUserBaseScenes  );	
 	iListBox->InitializeL( iController.IntegerSettingValue( scene ) );
@@ -315,11 +338,13 @@
         TCamCameraMode aMode,
         CCamAppController& aController,
         CAknView& aView,
-        TBool aUserBaseScenes )
+        TBool aUserBaseScenes,
+        TBool aFullySkinned )
 : CCamContainerBase( aController, aView ),
     iListBox( NULL ),
     iMode( aMode ), 
     iUserBaseScenes( aUserBaseScenes ),
+    iFullySkinned( aFullySkinned ),
     iTooltipController( NULL ),
     iListboxTitle( NULL ),
     iTooltipIndex( -1 ),
@@ -498,11 +523,35 @@
     CWindowGc& gc = SystemGc();
     if ( CamUtility::IsNhdDevice() )
         {
+        TRgb color;
+        if( iFullySkinned )
+            {
         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
         AknsDrawUtils::Background( skin, iBgContext, gc, aRect );
-        TRgb color;
         AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors,
                                                 EAknsCIQsnTextColorsCG6 );  
+            }
+        else
+            {            
+            // Fill control with transparency bg colour
+            gc.SetPenStyle( CGraphicsContext::ENullPen );
+            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+            color = TRgb( 0,0 );
+            gc.SetBrushColor( color );
+            gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+            gc.DrawRect( aRect );
+            gc.SetBrushColor( color );
+            gc.DrawRect( iTitleTextRectLayout.TextRect() );            
+            gc.SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
+            gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+            gc.DrawRect( TRect( iLayoutAreaRect.iTl.iX,
+                                iLayoutAreaRect.iTl.iY,
+                                iLayoutAreaRect.iBr.iX,
+                                iTitleTextRectLayout.TextRect().iBr.iY ) );
+            
+            gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+            color = TRgb( KRgbWhite );
+            }
         iTitleTextRectLayout.DrawText( gc, *iListboxTitle, ETrue, color ); 
         }
     else
--- a/camerauis/cameraapp/generic/src/CamStandbyContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStandbyContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -316,7 +316,7 @@
     else
         {
         // set text label as blank
-        TRAP_IGNORE( iText->SetTextL( KNullDesC ) );
+        //TRAP_IGNORE( iText->SetTextL( KNullDesC ) );
         
         // cancel timer if active
         if ( iForegroundTimer->IsActive() )
--- a/camerauis/cameraapp/generic/src/CamStillPostCaptureView.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStillPostCaptureView.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -28,6 +28,7 @@
 #include <AknQueryDialog.h>
 #include <AiwCommon.hrh>
 #include <akntoolbar.h>
+#include <aknbutton.h>
 #include "CamUtility.h"
 
 #include "Cam.hrh"
@@ -137,12 +138,14 @@
             }
             break;
         case ECamCmdSendToCallerMultimedia:
+/* In-Call-Send no longer used, skip to case ECamQuickSend.
             {
 #ifndef __WINS__
             DoInCallSendL();
 #endif
             }
             break;
+*/
     case ECamCmdQuickSend:
       {
 /*#ifndef __WINS__
@@ -285,7 +288,7 @@
                     ROID(R_CAM_STILL_POST_CAPTURE_MENUBAR_ID));
             }
         }
-    if ( iController.IsTouchScreenSupported() )
+    /*if ( iController.IsTouchScreenSupported() )
         {
         if ( appUi->IsSecondCameraEnabled() )
             {
@@ -294,7 +297,7 @@
                 TInt resourceId = appUi->IsQwerty2ndCamera()? 
                               R_CAM_STILL_POSTCAPTURE_TOOLBAR_LANDSCAPE_UPLOAD:
                               R_CAM_STILL_POSTCAPTURE_TOOLBAR_PORTRAIT_UPLOAD; 
-                CreateAndSetToolbarL( resourceId );
+                //CreateAndSetToolbarL( resourceId );
                 }
             else
                 {
@@ -317,13 +320,14 @@
                         R_CAM_STILL_POSTCAPTURE_TOOLBAR );                   
                 }
             }
-        }
+        }*/
 
+    iAiwServiceHandler->Reset();
     CCamPostCaptureViewBase::DoActivateL(
             aPreViewId, aCustomMessageId, aCustomMessage );
 
     PERF_EVENT_END_L2( EPerfEventStillPostCaptureViewActivation );    
-    iAiwServiceHandler->Reset();
+    //iAiwServiceHandler->Reset();
     // attach interest for PRINT from Active Toolbar
     iAiwServiceHandler->AttachL( R_CAM_MOVE_TO_STILL_IMAGE_INTEREST_AT );
 
@@ -333,6 +337,10 @@
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID),
             R_CAM_SHARE_ON_OVI_INTEREST );
 
+    // SHARE_AIW
+    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID),
+            R_CAM_AIW_VIEW_INTEREST );
+    
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), 
             R_CAM_SET_AS_CALL_IMAGE_INTEREST ); 
     OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPOSTCAPTUREVIEW_DOACTIVATEL, "e_CCamStillPostCaptureView_DoActivateL 0" );
@@ -422,6 +430,9 @@
     CCamPostCaptureViewBase::ConstructL();
   
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_SHARE_ON_OVI_INTEREST );
+    // SHARE_AIW
+    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_AIW_VIEW_INTEREST );
+    
 	iRockerKeyPress = EFalse;
     }
 
@@ -569,7 +580,12 @@
             aMenuPane->SetItemDimmed(
                 ECamCmdSendToCallerMultimedia, !showSendToCaller );
             }
-
+        
+        if(iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport))
+            {
+            showSend = ETrue;
+            }
+        
         if ( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) )
             {
             aMenuPane->SetItemDimmed(
@@ -632,14 +648,49 @@
     PRINT2( _L("Camera => CCamStillPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar );
     (void)aResourceId; //remove compiler warning
 
-    if( iEmbedded && aToolbar && iController.IsTouchScreenSupported() )
+    if( aToolbar && iController.IsTouchScreenSupported() )
         {
         // HideItem will not do anything if a button for the given
         // command ID is not found.
-        aToolbar->HideItem( ECamCmdSend, ETrue, EFalse );
-        aToolbar->HideItem( ECamCmdPhotos, ETrue, EFalse );
-        aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
-        aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse );
+		if( iEmbedded )
+			{
+			aToolbar->HideItem( ECamCmdSend, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdEdit, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdPhotos, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse );
+			}
+		else
+			{
+            if(iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport))
+                {
+                aToolbar->RemoveItem( ECamCmdSend );
+                CAknButton* editButton = dynamic_cast<CAknButton*>(aToolbar->ControlOrNull( ECamCmdEdit ));
+                if( editButton )
+                    {
+                    CAknButtonState* state = editButton->State();
+                    if( state )
+                        {
+                        HBufC* helpText = StringLoader::LoadLC( R_QTN_LCAM_TT_IMAGE_EDITOR );
+                        state->SetHelpTextL(*helpText);
+                        CleanupStack::PopAndDestroy(helpText);
+                        }
+                    }
+                }
+            else
+                {
+                aToolbar->RemoveItem( ECamCmdEdit );
+                }
+            
+            if(iOneClickUploadUtility->OneClickUploadSupported())
+                {
+                aToolbar->RemoveItem( ECamCmdPhotos );
+                }
+            else
+                {
+                aToolbar->RemoveItem( ECamCmdOneClickUpload );
+                }
+			}
         }
     
     PRINT2( _L("Camera <= CCamStillPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar );
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -616,8 +616,16 @@
           }
         }
 #endif // __WINS__
-    }
-
+      }
+  else
+      {
+      // in case AF is not supported, check memory here before capturing
+      if ( !iController.IsViewFinding() || !appui->CheckMemoryL() )
+          {
+          return EKeyWasConsumed; 
+          }         
+      }
+      
   if( iXenonFlashSupported
    && !appui->IsSecondCameraEnabled()
    && !MSKCapture
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -164,7 +164,6 @@
         	}
         case ECamCmdCaptureImage:
             {
-      	    OstTrace0( CAMERAAPP_PERFORMANCE, DUP9_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_AF_LOCK 1" );
       	    OstTrace0( CAMERAAPP_PERFORMANCE, DUP10_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHUTTER_RELEASE_LAG 1" );
       	    if ( iController.IsViewFinding() && appUi->CheckMemoryL() &&
                 !iController.CaptureModeTransitionInProgress() &&
@@ -190,6 +189,8 @@
                     && iController.UiConfigManagerPtr()->IsAutoFocusSupported()
                     && !iController.CurrentSceneHasForcedFocus() )
                     {
+                    // Next trace should be just before "e_CAM_PRI_SHUTTER_RELEASE_LAG 1", but only when AF is supported
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP9_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_AF_LOCK 1" );
                     if( iController.CurrentOperation() == ECamNoOperation )
                         {
                         iController.SetAfNeeded( ETrue );
@@ -197,6 +198,16 @@
                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP7_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_AF 1" );
                     iController.StartAutoFocus();
                     }
+                else // AF not needed, capture will start next
+                    {
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP11_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_SHOT_TO_SNAPSHOT 1" );
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP12_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SNAPSHOT 1" );
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP13_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SAVE 1" );
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP14_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SHOT 1" );
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP15_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_SHOT_TO_STILL 1" );
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP16_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_CAPTURE_START 1" );
+                    OstTrace0( CAMERAAPP_PERFORMANCE, DUP17_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SERIAL_SHOOTING 1" );
+                    }
             	TKeyEvent keyEvent;
             	appUi->StartCaptureL( keyEvent );
 
@@ -338,7 +349,7 @@
 
     SetMenuBar();
     
-    if ( iContinueInBackground )
+    if ( iContinueInBackground && !iStandbyModeActive )
         {
         // make sure that CCamAppController is in view finder mode
         if ( iController.CurrentImageMode() == ECamImageCaptureNone )
@@ -679,7 +690,7 @@
   // if the view is in capture setup mode
   else if ( iCaptureSetupModeActive )
       {
-      SetSoftKeysL( R_AVKON_SOFTKEYS_OK_CANCEL__OK );
+      SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
       }
   // if the view is in scene settings mode
   else if ( iSceneSettingModeActive )
@@ -696,7 +707,14 @@
     }
   else if( iInfoListBoxActive )
   	{
-  	SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE );
+    if( !iForceAvkonCBA )
+        {
+        SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT );    
+        }
+    else
+        {
+        SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE );    
+        }    
   	}
   else if (  ( operation == ECamFocusing || operation == ECamFocused  || operation == ECamFocusFailed )
          && !iController.CurrentSceneHasForcedFocus() )
@@ -1031,6 +1049,7 @@
     TInt summaryResource;
     TInt initialValue;
     TInt titleResource;
+    TBool skinnedbackground = EFalse;
     
     switch( aMode )
     		{
@@ -1071,6 +1090,7 @@
     				    }
     				titleResource = R_CAM_LIGHT_SENSITIVITY_TITLE;   					    				
  					modeSelected = ETrue;
+ 					skinnedbackground = EFalse;
     				}
     				break;
     		
@@ -1085,8 +1105,11 @@
                                                              		iController,
                                                              		listBoxResource,
                                                              		summaryResource,
-                                                             		initialValue, titleResource );		
+                                                             		initialValue, titleResource,
+                                                             		skinnedbackground );		
+				
 				iInfoListBoxContainer->DrawableWindow()->SetOrdinalPosition(-1); 
+				iInfoListBoxContainer->SetMopParent( this ); 
 				iInfoListBoxMode = aMode;          
 				iSettingModeTitleResourceId = titleResource;                                                   					
 
@@ -1100,14 +1123,16 @@
         		}
     		// Remove the view's main container, and add the capture setup 
     		// control associated with the input command to the container stack.
-    		CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode );
+    		CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode, skinnedbackground );
 
     		// only remove the capture setup menu container after 
     		// the switch completes successfully
     		RemoveCaptureSetupMenuContainers();
-
+    		if( skinnedbackground )
+    		    {
     		// Stop the viewfinder
     		StopViewFinder();    		    	        
+    		    }
     		}
     }
 
--- a/camerauis/cameraapp/generic/src/CamStillUserSceneSetupView.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStillUserSceneSetupView.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -195,7 +195,7 @@
 // CCamStillUserSceneSetupView::SwitchToInfoListBoxL
 // ---------------------------------------------------------------------------
 //
-void CCamStillUserSceneSetupView::SwitchToInfoListBoxL( TCamInfoListBoxMode aMode )
+void CCamStillUserSceneSetupView::SwitchToInfoListBoxL( TCamInfoListBoxMode aMode, TBool aFullySkinned )
     {   
     CCamAppUi* appUi = static_cast<CCamAppUi*>( iCoeEnv->AppUi() );  	
 
@@ -246,7 +246,12 @@
                 listBoxResource,
                 summaryResource,
                 initialValue,
-                titleResource );		
+                titleResource,
+                aFullySkinned);		
+        if( !aFullySkinned )
+            {
+            StartViewFinder();
+            }
         iInfoListBoxMode = aMode;          
         iSettingModeTitleResourceId = titleResource;                                                   										    			
 
@@ -254,7 +259,7 @@
 
         // Remove the view's main container, and add the capture setup 
         // control associated with the input command to the container stack.
-        CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode );        
+        CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode, aFullySkinned );        
         }
     }
     
--- a/camerauis/cameraapp/generic/src/CamUserSceneSetupContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupContainer.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -391,6 +391,11 @@
             commandId = ECamCmdCaptureSetupLightSensitivityUser;
             }
             break;
+        case ECamSettingItemUserSceneDefault: 
+            {
+            commandId = ECamCmdSetUserDefault;
+            }
+            break;
         default:
             {
             CamPanic( ECamPanicCaptureSetupMenuUnknownItem );
--- a/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -25,6 +25,7 @@
 
 #include "CamPreCaptureContainerBase.h"
 
+#include <eiksoftkeypostingtransparency.h>
 #include <eikbtgpc.h>
 #include <avkon.rsg>
 #include <StringLoader.h>
@@ -88,6 +89,23 @@
             userSceneSetup->UpdateListItems();
             break;
             }
+        case ECamCmdSetUserDefault:  
+            {
+            TInt currentVal = iController.IntegerSettingValue( ECamSettingItemUserSceneDefault );
+            if ( currentVal )
+              {
+              currentVal = ECamSettNo; 
+              }
+            else
+              {
+              currentVal = ECamSettYes;
+              }
+            TRAP_IGNORE( iController.SetIntegerSettingValueL( ECamSettingItemUserSceneDefault, currentVal) );
+            CCamUserSceneSetupContainer* userSceneSetup = static_cast<CCamUserSceneSetupContainer*>( iContainer );
+            userSceneSetup->UpdateListItems();  
+            userSceneSetup->UpdateDisplayL();
+            }
+            break;
         case ECamCmdUserSceneReset:
             {
             DisplayResetUserSceneDlgL();
@@ -113,7 +131,7 @@
             break;
      	case ECamCmdCaptureSetupLightSensitivityUser:
       		{
-       		SwitchToInfoListBoxL( EInfoListBoxModeISO );
+       		SwitchToInfoListBoxL( EInfoListBoxModeISO, ETrue );
       		}    
 			break;
         // If capture setup menu is active and user presses softkey cancel,
@@ -424,15 +442,32 @@
     // if the view is in capture setup mode
     else if ( iCaptureSetupModeActive )
         {
-        SetSoftKeysL( R_AVKON_SOFTKEYS_OK_CANCEL__OK );
+        if( iForceAvkonCBA )
+            {
+            SetSoftKeysL( R_AVKON_SOFTKEYS_OK_CANCEL__OK ); //Avkon softkeys. Not transparent
+            }
+        else
+            {
+            SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
+            }
         }
     else if ( iSceneSettingModeActive )
     	{
     	SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE  );
+        if( iForceAvkonCBA )
+            {
+            EikSoftkeyPostingTransparency::MakeTransparent(
+                    *ViewCba(), EFalse );            
+            }
     	}
     else if ( iInfoListBoxActive )
         {
         SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE );
+        if( iForceAvkonCBA )
+            {
+            EikSoftkeyPostingTransparency::MakeTransparent(
+                    *ViewCba(), EFalse );            
+            }
         }
     // if the view is user scene setup
     else
@@ -482,6 +517,7 @@
     StatusPane()->MakeVisible( ETrue );
     
     // Update the command button array.
+    iForceAvkonCBA=ETrue;
     UpdateCbaL();
     SetTitlePaneTextL();
     PRINT( _L("Camera <= CCamUserSceneSetupViewBase::SwitchToUserSceneSetupModeL()") );  	   
@@ -508,7 +544,7 @@
 
     // Remove the view's main container, and add the capture setup 
     // control associated with the input command to the container stack.
-    CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( aSetupCommand );   
+    CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( aSetupCommand, EFalse );
    StatusPane()->MakeVisible( EFalse ); 	
     PRINT( _L("Camera <= CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL()") );  	   	
     }
--- a/camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -24,6 +24,7 @@
 #include <sendnorm.rsg>
 #include <sendui.h>
 #include <akntoolbar.h>
+#include <aknbutton.h>
 #ifndef __WINS__
   //#include <SFIUtilsAppInterface.h>
   #include <aknnotewrappers.h>  // CAknInformationNote
@@ -233,8 +234,7 @@
         }
 
     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
-
-    if ( iController.IsTouchScreenSupported() )
+    /*if ( iController.IsTouchScreenSupported() )
         {
         if ( appUi->IsSecondCameraEnabled() )
             {
@@ -264,11 +264,15 @@
                 CreateAndSetToolbarL( R_CAM_VIDEO_POSTCAPTURE_TOOLBAR );
                 }
             }
-        }
+        }*/
 
     iAiwServiceHandler->Reset();
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ),
             R_CAM_SHARE_ON_OVI_INTEREST );
+    
+    // SHARE_AIW
+    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID),
+                                     R_CAM_AIW_VIEW_INTEREST );
 
     CCamPostCaptureViewBase::DoActivateL(
             aPreViewId, aCustomMessageId, aCustomMessage );
@@ -330,6 +334,8 @@
     CCamPostCaptureViewBase::ConstructL();
 
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ), R_CAM_SHARE_ON_OVI_INTEREST );
+    // SHARE_AIW
+    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_AIW_VIEW_INTEREST );
 
     PRINT( _L("Camera <= CCamVideoPostCaptureView::ConstructL"))
     }
@@ -493,6 +499,11 @@
                 ECamCmdSendToCallerMultimedia, !showSendToCaller );
             }
 
+        if(iController.IntegerSettingValue(ECamSettingItemVideoEditorSupport))
+            {
+            showSend = ETrue;
+            }
+        
         if( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) )
             {
             aMenuPane->SetItemDimmed(
@@ -556,14 +567,50 @@
     (void)aResourceId; // remove compiler warning
 
     // fixed toolbar is used only with touch devices
-    if ( iController.IsTouchScreenSupported() && iEmbedded && aToolbar )
+    if ( iController.IsTouchScreenSupported() && aToolbar )
         {
         // HideItem will not do anything if a button for the given
         // command ID is not found.
-        aToolbar->HideItem( ECamCmdSend, ETrue, EFalse );
-        aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse );
-        aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
-        aToolbar->HideItem( ECamCmdPlay, ETrue, EFalse );
+		if( iEmbedded )
+			{
+			aToolbar->HideItem( ECamCmdSend, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdEdit, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
+			aToolbar->HideItem( ECamCmdPlay, ETrue, EFalse );
+			}
+        else
+			{
+            if(iController.IntegerSettingValue(ECamSettingItemVideoEditorSupport))
+                {
+                aToolbar->RemoveItem( ECamCmdSend );
+                CAknButton* editButton = dynamic_cast<CAknButton*>(aToolbar->ControlOrNull( ECamCmdEdit ));
+                if( editButton )
+                    {
+                    CAknButtonState* state = editButton->State();
+                    if( state )
+                        {
+                        HBufC* helpText = StringLoader::LoadLC( R_QTN_LCAM_TT_VIDEO_EDITOR );
+                        state->SetHelpTextL(*helpText);
+                        CleanupStack::PopAndDestroy(helpText);
+                        }
+                    }
+                }
+            else
+                {
+                aToolbar->RemoveItem( ECamCmdEdit );
+                }
+            
+            if(iOneClickUploadUtility->OneClickUploadSupported())
+                {
+                aToolbar->RemoveItem( ECamCmdPhotos );
+                }
+            else
+                {
+                aToolbar->RemoveItem( ECamCmdOneClickUpload );
+                }
+            
+			}
         }
 
     PRINT2( _L("Camera <= CCamVideoPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar );
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -657,13 +657,20 @@
   // if the view is in capture setup mode
   else if ( iCaptureSetupModeActive )
     {
-    SetSoftKeysL( R_AVKON_SOFTKEYS_OK_CANCEL__OK );
+    SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
     }
   // if the view is in scene settings mode
   else if ( iSceneSettingModeActive )
     {
     // R_AVKON_SOFTKEYS_OPTIONS_BACK
+    if( !iForceAvkonCBA )
+        {
+        SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT );    
+        }
+    else
+        {
     SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE ); //R_CAM_SOFTKEYS_OPTIONS_BACK__CHANGE );
+        }
     }
   else if ( iStandbyModeActive )
     {
@@ -995,9 +1002,12 @@
     	{
 	    // Create the scene setting container for video mode.
 	    iSceneSettingContainer = CCamShootingModeContainer::NewL( AppUi()->ApplicationRect(),
+                                                               EFalse, //Notskinned background
 	                                                           *this,
 	                                                           ECamControllerVideo,
-	                                                           iController );
+	                                                           iController,
+	                                                           EFalse ); 
+
 	    iSceneSettingContainer->DrawableWindow()->SetOrdinalPosition(-1);
     	}
     
@@ -1020,7 +1030,7 @@
     RemoveCaptureSetupMenuContainers();
 
     // Stop the viewfinder as it isn't required for scene settings
-    StopViewFinder();
+    //StopViewFinder();
     
     }
  
--- a/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -55,7 +55,7 @@
 #include <ECamUIOrientationOverrideCustomAPI.h>
 
 #include <ecamfacetrackingcustomapi.h>
-#include <akntoolbar.h> 
+#include <akntoolbar.h>
 // -------------------------------------
 // Own
 #include "camcameracontroller.pan"
@@ -63,7 +63,7 @@
 #include "cambuffershare.h"
 #include "cambuffersharecleanup.h"
 #include "cambuffercleanup.h"
-#include "cambuffer.h"  
+#include "cambuffer.h"
 
 #include "camsnapshotprovider.h"
 #include "camimageencoder.h"
@@ -99,7 +99,7 @@
 #include "CamPanic.h"
 // ===========================================================================
 // Local constants
-const TInt KIveRecoveryCountMax = 2;  
+const TInt KIveRecoveryCountMax = 2;
 typedef CCamera::CCameraAdvancedSettings CAS;
 typedef CCamera::CCameraImageProcessing  CIP;
 
@@ -108,25 +108,25 @@
   static const TInt               KPrimaryCameraIndex         =  0;
   //static const TInt               KSecondaryCameraIndex       =  1;
   static const TInt               KInvalidCameraIndex         = -1;
-  
+
   #ifdef CAMERAAPP_CAE_FOR_VIDEO
   //  static const TInt             KCameraDisplayIndex         = 0;
   #endif
   #ifdef CAMERAAPP_CAPI_V2
     static const TInt             KCameraClientPriority       = 100; // -100...100
   #endif
-  
+
   static const TInt               KCamCallBackPriority        = EPriorityHigh;
-  
+
   static const TInt               KCamSequenceGranularity     =  2;
   static const TInt               KResolutionArrayGranularity =  8;
   #ifdef CAMERAAPP_CAPI_V2_ADV
     static const TInt             KAdvArrayGranularity        =  5;
-  #endif  
-  
+  #endif
+
   static const CCamera::TFormat   KCamJpegAlternativeFormat1  = CCamera::EFormatFbsBitmapColor16M;
   static const CCamera::TFormat   KCamJpegAlternativeFormat2  = CCamera::EFormatFbsBitmapColor64K;
-  
+
   static const TInt             KCamReserveTryAgainMaxCount     = 50;
   static const TInt             KCamReserveTryAgainWaitInterval = 50000; // 50 milliseconds
   #ifdef _DEBUG
@@ -153,7 +153,7 @@
   #define CAMERAAPP_PERF_CONTROLLER_STOP_ONCE( AAA, BBB )
 #endif // CAMERAAPP_PERFORMANCE_CONTROLLER
 
-// Helper methods 
+// Helper methods
 #include "camflagutility.inl"
 #include "campointerutility.inl"
 
@@ -164,20 +164,20 @@
   inline void SetFalse( TAny* aTBool )
     {
     TBool* boolean = static_cast<TBool*>( aTBool );
-  
+
     if( boolean )
       *boolean = EFalse;
     }
   */
-  
+
   inline void SetNotBusy( TAny* aTUint )
     {
     TUint* flags = static_cast<TUint*>( aTUint );
-  
+
     if( flags )
       *flags = ECamBusyOff;
     };
-  
+
   inline void ReleaseAndNull( MCameraBuffer*& aBuffer )
     {
     if( aBuffer )
@@ -189,13 +189,13 @@
 #ifdef CAMERAAPP_CAPI_V2_ADV
   inline void ResetInfo( TAny* aInfo )
     {
-    TCamAdvancedSettingInfo* info = 
+    TCamAdvancedSettingInfo* info =
       static_cast<TCamAdvancedSettingInfo*>( aInfo );
 
     if( info )
       {
       info->Reset();
-      }      
+      }
     };
 
 
@@ -252,7 +252,7 @@
 
   if( !aPreserveBusyFlag )
     {
-    iBusy = ECamBusyOff;  
+    iBusy = ECamBusyOff;
     }
   }
 
@@ -260,7 +260,7 @@
 // PrintInfo
 // ---------------------------------------------------------------------------
 //
-void 
+void
 TCamControllerInfo::PrintInfo() const
   {
   PRINT ( _L("Camera <> --------------------------------------------------") );
@@ -305,7 +305,7 @@
   iResolutions.Close();
   }
 
-void 
+void
 TCamCameraResolutionSupport::Reset()
   {
   iForCameraIndex  = KInvalidCameraIndex;
@@ -330,7 +330,7 @@
   iIsoRatesSupport.Close();
   }
 
-void 
+void
 TCamAdvancedSettingInfo::Reset()
   {
   iForCameraIndex = KInvalidCameraIndex;
@@ -361,7 +361,7 @@
 // PrintInfo
 // ---------------------------------------------------------------------------
 //
-void 
+void
 TCamAdvancedSettingInfo::PrintInfo() const
   {
 #ifdef _DEBUG
@@ -398,7 +398,7 @@
     PRINT2( _L("Camera <> step[%3d]: %4d"), i, iEvStepsSupport[i] );
     }
 
-  PRINT ( _L("Camera <> --------------------------------------------------") );    
+  PRINT ( _L("Camera <> --------------------------------------------------") );
   PRINT1( _L("Camera <> Advanced EV modes support : %016b"), iEvModesSupport                    );
   PRINT1( _L("Camera <> EExposureAuto             : %016b"), CCamera::EExposureAuto             );
   PRINT1( _L("Camera <> EExposureNight            : %016b"), CCamera::EExposureNight            );
@@ -440,7 +440,7 @@
   PRINT ( _L("Camera <> --------------------------------------------------") );
 #endif // CAMERAAPP_CAPI_V2_IP
 
-  PRINT ( _L("Camera <> --------------------------------------------------") );    
+  PRINT ( _L("Camera <> --------------------------------------------------") );
   PRINT1( _L("Camera <> Stabilization modes support      : %016b"), iStabilizationModeSupport           );
   PRINT1( _L("Camera <>   EStabilizationModeOff          : %016b"), CAS::EStabilizationModeOff          );
   PRINT1( _L("Camera <>   EStabilizationModeHorizontal   : %016b"), CAS::EStabilizationModeHorizontal   );
@@ -459,7 +459,7 @@
   PRINT1( _L("Camera <>   EStabilizationComplexityLow    : %016b"), CAS::EStabilizationComplexityLow    );
   PRINT1( _L("Camera <>   EStabilizationComplexityMedium : %016b"), CAS::EStabilizationComplexityMedium );
   PRINT1( _L("Camera <>   EStabilizationComplexityHigh   : %016b"), CAS::EStabilizationComplexityHigh   );
-  PRINT ( _L("Camera <> --------------------------------------------------") );    
+  PRINT ( _L("Camera <> --------------------------------------------------") );
 #endif // _DEBUG
   }
 
@@ -474,12 +474,12 @@
 // ---------------------------------------------------------------------------
 //
 CCamCameraController*
-CCamCameraController::NewL( MCamSettingProvider& aProvider, 
-                            CCamAppController& aAppController, 
-                            TInt aCameraIndex /*= 0*/ )  
+CCamCameraController::NewL( MCamSettingProvider& aProvider,
+                            CCamAppController& aAppController,
+                            TInt aCameraIndex /*= 0*/ )
   {
-  CCamCameraController* self 
-      = new (ELeave) CCamCameraController( aProvider, aAppController );  
+  CCamCameraController* self
+      = new (ELeave) CCamCameraController( aProvider, aAppController );
 
   CleanupStack::PushL( self );
   self->ConstructL( aCameraIndex );
@@ -487,7 +487,7 @@
 
   return self;
   }
-    
+
 
 
 // ---------------------------------------------------------------------------
@@ -500,13 +500,13 @@
 
 #ifdef CAMERAAPP_FLASH_SIMULATOR
   delete iFlashSimulator;
-#endif 
+#endif
 
 #ifdef CAMERAAPP_PERFORMANCE_CONTROLLER
   delete iPerformanceLogger;
 #endif // CAMERAAPP_PERFORMANCE_CONTROLLER
-  
-  delete iIdle; 
+
+  delete iIdle;
   iSettingArray.Close();
 
   // Remove all observers.
@@ -518,10 +518,10 @@
   ClearSettingQueue();
 
 
-  PRINT( _L("Camera <> CCamCameraController: release current camera..") );  
+  PRINT( _L("Camera <> CCamCameraController: release current camera..") );
   // Release and null CCamera related objects.
   ReleaseCurrentCamera();
-  PRINT( _L("Camera <> CCamCameraController: ..done") );  
+  PRINT( _L("Camera <> CCamCameraController: ..done") );
 
   delete iActive;
 
@@ -547,19 +547,19 @@
 // HandleEvent
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::HandleEvent( const TECAMEvent& aEvent )
   {
   // TUid iEventType;
   // TInt iErrorCode;
-  PRINT2( _L("Camera => CCamCameraController::HandleEvent, event uid(0x%08x) error(%d)"), 
-          aEvent.iEventType.iUid, 
+  PRINT2( _L("Camera => CCamCameraController::HandleEvent, event uid(0x%08x) error(%d)"),
+          aEvent.iEventType.iUid,
           aEvent.iErrorCode );
 
   // If we are getting zoom event while saving video,
-  // we must not handle the event 
+  // we must not handle the event
   TInt uidValue( aEvent.iEventType.iUid );
-  if ( uidValue == KUidECamEventCameraSettingDigitalZoomUidValue 
+  if ( uidValue == KUidECamEventCameraSettingDigitalZoomUidValue
     && IsFlagOn( iInfo.iBusy, ECamBusySingle ) )
       {
        return;
@@ -584,22 +584,22 @@
     }
   // -------------------------------------------------------
   else if( !(IsFlagOn( iInfo.iState , ECamPowerOn )))
-    {    
+    {
     //If camera is in background then all the rest events will be ignored. Should return without leaving
-    return;   	
-    }   
+    return;
+    }
   // -------------------------------------------------------
   else if( aEvent.iEventType == KUidECamEventCameraSnapshot )
     {
     HandleSnapshotEvent( aEvent.iErrorCode );
     }
   // -------------------------------------------------------
-  else if( aEvent.iEventType == KUidECamEventCameraSettingsOptimalFocus 
+  else if( aEvent.iEventType == KUidECamEventCameraSettingsOptimalFocus
         || aEvent.iEventType == KUidECamEventCameraSettingAutoFocusType2 )
     {
     HandleAutoFocusEvent( aEvent.iErrorCode, aEvent.iEventType );
-    }  
-  // -------------------------------------------------------   
+    }
+  // -------------------------------------------------------
   else
     {
 #ifdef CAMERAAPP_CAPI_V2_ADV
@@ -622,12 +622,12 @@
       case KUidECamEventImageProcessingEffectUidValue:
       case KUidECamEventSettingsStabilizationAlgorithmComplexityUidValue:
         {
-        TCamCameraSettingId id = 
+        TCamCameraSettingId id =
             CCamSettingConversion::Map2CameraSetting( uidValue );
 
-        HandleCallbackEvent( aEvent.iErrorCode, 
-                             ECamCameraEventSettingsSingle, 
-                             ECamCameraEventClassSettings, 
+        HandleCallbackEvent( aEvent.iErrorCode,
+                             ECamCameraEventSettingsSingle,
+                             ECamCameraEventClassSettings,
                              &id );
         break;
         }
@@ -640,7 +640,7 @@
         HandleFlashStatusEvent( aEvent.iErrorCode, ECamCameraEventFlashNotReady );
         break;
       // -------------------------------
-      default: 
+      default:
         break;
       // -------------------------------
       }
@@ -671,7 +671,7 @@
 // ViewFinderReady
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::ViewFinderReady( MCameraBuffer& aCameraBuffer, TInt aError )
   {
   HandleViewfinderEvent( &aCameraBuffer, aError );
@@ -682,7 +682,7 @@
 // ImageBufferReady
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::ImageBufferReady( MCameraBuffer& aCameraBuffer, TInt aError )
   {
   HandleImageCaptureEvent( &aCameraBuffer, aError );
@@ -693,7 +693,7 @@
 // VideoBufferReady
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::VideoBufferReady( MCameraBuffer& aCameraBuffer, TInt aError )
   {
   if( KErrNone == aError )
@@ -713,8 +713,8 @@
 // ReserveComplete
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::ReserveComplete( TInt aError ) 
+void
+CCamCameraController::ReserveComplete( TInt aError )
   {
   HandleReserveGainEvent( aError );
   }
@@ -724,7 +724,7 @@
 // PowerOnComplete
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::PowerOnComplete( TInt aError )
   {
   HandlePowerOnEvent( aError );
@@ -735,18 +735,18 @@
 // ViewFinderFrameReady
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::ViewFinderFrameReady( CFbsBitmap& aFrame )
   {
   PRINT( _L("CamTest => CCamCameraController::ViewFinderFrameReady") );
 
   CCamBuffer* buffer = NULL;
-  
+
   TRAPD( error, buffer = CCamBuffer::NewL( aFrame, NULL ) );
 
   // Releases buffer
   HandleViewfinderEvent( buffer, error );
- 
+
   PRINT( _L("CamTest <= CCamCameraController::ViewFinderFrameReady") );
   }
 
@@ -755,15 +755,15 @@
 // ImageReady
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::ImageReady( CFbsBitmap* aBitmap, 
+void
+CCamCameraController::ImageReady( CFbsBitmap* aBitmap,
                                   HBufC8*    aData,
                                   TInt       aError )
   {
   PRINT( _L("Camera => CCamCameraController::ImageReady") );
 
   CCamBuffer* buffer = NULL;
- 
+
   // If no error so far, wrap the data to MCameraBuffer compatible wrapper.
   // New API provides these buffers already from CCamera callbacks.
   if( KErrNone == aError )
@@ -794,8 +794,8 @@
 // FrameBufferReady
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::FrameBufferReady( MFrameBuffer* aFrameBuffer, 
+void
+CCamCameraController::FrameBufferReady( MFrameBuffer* aFrameBuffer,
                                         TInt          /*aError*/ )
   {
   // Release the buffer if one is provided to make sure
@@ -816,7 +816,7 @@
 // McaeoInitComplete
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoInitComplete( TInt aError )
   {
   PRINT( _L("Camera => CCamCameraController::McaeoInitComplete") );
@@ -833,7 +833,7 @@
 // McaeoStillPrepareComplete
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoStillPrepareComplete( TInt /*aError*/ )
   {
   PRINT( _L("Camera =><= CCamCameraController::McaeoStillPrepareComplete, PANIC!") );
@@ -843,29 +843,29 @@
 
 // ---------------------------------------------------------------------------
 // McaeoVideoPrepareComplete
-// 
+//
 // This method is called asynchronously after a call has been made to
 // CCaeEngine::PrepareVideoRecordingL.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoVideoPrepareComplete( TInt aError )
   {
   PRINT( _L("Camera => CCamCameraController::McaeoVideoPrepareComplete") );
-#ifdef CAMERAAPP_CAE_ERR_SIMULATION  
+#ifdef CAMERAAPP_CAE_ERR_SIMULATION
   HandleVideoEvent( ECamCameraEventVideoInit, aError );
   // DelayCallback( ECamCameraEventVideoInit, aError, 500000 );
-#else 
+#else
   if( aError &&
       ( iIveCancel || ( !iIveSequenceActive && iIveRecoveryOngoing ) ) )
-      // Return if error and recovering process has been started, 
-      // but this video prepare complete is not part of recovery 
-      // i.e. iIveSequenceActive is not active yet. 
+      // Return if error and recovering process has been started,
+      // but this video prepare complete is not part of recovery
+      // i.e. iIveSequenceActive is not active yet.
     {
     PRINT1( _L("Camera => CCamCameraController::McaeoVideoPrepareComplete - Ignore err %d"), aError );
-    return; 
+    return;
     }
-  HandleVideoEvent( ECamCameraEventVideoInit, aError );  
+  HandleVideoEvent( ECamCameraEventVideoInit, aError );
 #endif // CAMERAAPP_CAE_ERR_SIMULATION
 
   PRINT( _L("Camera <= CCamCameraController::McaeoVideoPrepareComplete") );
@@ -875,8 +875,8 @@
 // McaeoViewFinderFrameReady
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::McaeoViewFinderFrameReady( CFbsBitmap& aFrame, 
+void
+CCamCameraController::McaeoViewFinderFrameReady( CFbsBitmap& aFrame,
                                                  TInt        aError )
   {
   PRINT( _L("Camera => CCamCameraController::McaeoViewFinderFrameReady") );
@@ -896,17 +896,17 @@
 // McaeoSnapImageReady
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::McaeoSnapImageReady( const CFbsBitmap& aBitmap, 
+void
+CCamCameraController::McaeoSnapImageReady( const CFbsBitmap& aBitmap,
                                                  TInt        aError  )
   {
   PRINT1( _L("Camera => CCamCameraController::McaeoSnapImageReady, status: %d"), aError );
   //__ASSERT_DEBUG( EFalse, Panic( ECamCameraControllerCaeUnsupported ) );
-  if( 
+  if(
 #ifdef CAMERAAPP_CAE_FIX
       ECamModeChangeInactive == iModeChange &&
 #endif
-      IsFlagOn( iInfo.iState, ECamVideoOn ) 
+      IsFlagOn( iInfo.iState, ECamVideoOn )
     )
     {
     CAMERAAPP_PERF_CONTROLLER_STOP( ECamRequestSsStart );
@@ -924,7 +924,7 @@
     NotifyObservers( aError,
                      ECamCameraEventSsReady,
                      ECamCameraEventClassSsData,
-                     copy );    
+                     copy );
     delete copy;
     copy = NULL;
     }
@@ -935,9 +935,9 @@
 // McaeoStillImageReady
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::McaeoStillImageReady( CFbsBitmap* /*aBitmap*/, 
-                                            HBufC8*     /*aData  */, 
+void
+CCamCameraController::McaeoStillImageReady( CFbsBitmap* /*aBitmap*/,
+                                            HBufC8*     /*aData  */,
                                             TInt        /*aError */ )
   {
   // Still images are not captured through CCaeEngine.
@@ -948,7 +948,7 @@
 // McaeoVideoRecordingOn
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoVideoRecordingOn( TInt aError )
   {
   PRINT( _L("Camera => CCamCameraController::McaeoVideoRecordingOn") );
@@ -956,9 +956,9 @@
 #ifdef CAMERAAPP_CAE_ERR_SIMULATION
   HandleVideoEvent( ECamCameraEventVideoStart, aError );
 #else
-  HandleVideoEvent( ECamCameraEventVideoStart, aError );  
+  HandleVideoEvent( ECamCameraEventVideoStart, aError );
 #endif // CAMERAAPP_CAE_ERR_SIMULATION
-  
+
   PRINT( _L("Camera <= CCamCameraController::McaeoVideoRecordingOn") );
 
   }
@@ -967,7 +967,7 @@
 // McaeoVideoRecordingPaused
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoVideoRecordingPaused( TInt aError )
   {
   PRINT( _L("Camera => CCamCameraController::McaeoVideoRecordingPaused") );
@@ -977,7 +977,7 @@
 #else
   HandleVideoEvent( ECamCameraEventVideoPause, aError );
 #endif // CAMERAAPP_CAE_ERR_SIMULATION
-  
+
   PRINT( _L("Camera <= CCamCameraController::McaeoVideoRecordingPaused") );
 
   }
@@ -986,7 +986,7 @@
 // McaeoVideoRecordingComplete
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoVideoRecordingComplete( TInt aError )
   {
   PRINT( _L("Camera => CCamCameraController::McaeoVideoRecordingComplete") );
@@ -1005,8 +1005,8 @@
         }
     iAsyncVideoStopModeSupported = EFalse;
     }
-  
-  PRINT( _L("Camera <= CCamCameraController::McaeoVideoRecordingComplete") );  
+
+  PRINT( _L("Camera <= CCamCameraController::McaeoVideoRecordingComplete") );
 
   }
 
@@ -1014,10 +1014,10 @@
 // McaeoVideoRecordingTimes
 // ---------------------------------------------------------------------------
 //
-void 
-CCamCameraController::McaeoVideoRecordingTimes( 
-    TTimeIntervalMicroSeconds aTimeElapsed, 
-    TTimeIntervalMicroSeconds aTimeRemaining, 
+void
+CCamCameraController::McaeoVideoRecordingTimes(
+    TTimeIntervalMicroSeconds aTimeElapsed,
+    TTimeIntervalMicroSeconds aTimeRemaining,
     TInt aError )
   {
   HandleVideoTimeEvent( aError, aTimeElapsed, aTimeRemaining );
@@ -1027,7 +1027,7 @@
 // McaeoVideoRecordingStopped
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::McaeoVideoRecordingStopped()
   {
   PRINT( _L("Camera => CCamCameraController::McaeoVideoRecordingStopped") );
@@ -1049,7 +1049,7 @@
 // ImageEncoded
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::ImageEncoded( TInt aStatus, HBufC8* aData )
   {
   PRINT( _L("Camera => CCamCameraController::ImageEncoded") );
@@ -1069,8 +1069,8 @@
       }
     else
       {
-      aStatus = KErrNotFound;      
-      }    
+      aStatus = KErrNotFound;
+      }
     }
   else
     {
@@ -1092,7 +1092,7 @@
 // AttachObserverL
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::AttachObserverL( const MCamCameraObserver* aObserver,
                                        const TUint&              aInterest )
   {
@@ -1101,7 +1101,7 @@
   // event interest being ECamCameraEventClassNone.
   if( aObserver
    && ECamCameraEventClassNone != aInterest
-   && KErrNotFound             == iObservers.Find( aObserver ) 
+   && KErrNotFound             == iObservers.Find( aObserver )
     )
     {
     // Try to add the observer to our list.
@@ -1112,7 +1112,7 @@
       {
       error = iObserverInterests.Append( aInterest );
       // If we are unable to add the interest info,
-      // remove also the observer. 
+      // remove also the observer.
       if( KErrNone != error )
         {
         iObservers.Remove( iObservers.Count() - 1 );
@@ -1122,12 +1122,12 @@
     User::LeaveIfError( error );
     }
   }
-    
+
 // ---------------------------------------------------------------------------
 // DetachObserver
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::DetachObserver( const MCamCameraObserver* aObserver )
   {
   if( aObserver )
@@ -1149,7 +1149,7 @@
 // Issue request for one operation.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::RequestL( const TCamCameraRequestId& aRequestId )
   {
   PRINT1( _L("Camera => CCamCameraController::RequestL, request:[%s]"), KCamRequestNames[aRequestId] );
@@ -1163,7 +1163,7 @@
   PRINT( _L("Camera <> process request..") );
   proceed = ProcessOneRequestL( aRequestId );
   CleanupStack::Pop();
-  
+
   // If this request will be responded through MCameraObserver(2) callback,
   // new requests cannot be accepted until that call arrives and
   // notification to our observers will be sent there.
@@ -1176,7 +1176,7 @@
     // as observer might want to issue a new request during
     // the notification callback.
     ClearFlags( iInfo.iBusy, ECamBusySingle );
-    
+
     if( ECamRequestVideoStop == aRequestId
      || ECamRequestSetAsyncVideoStopMode == aRequestId
      || ECamRequestImageCancel == aRequestId )
@@ -1185,8 +1185,8 @@
       // has been given. No need to do anything here.
       }
     else
-      {  
-      // Give notification to observers  
+      {
+      // Give notification to observers
       TCamCameraEventId event( Request2Event( aRequestId ) );
       NotifyObservers( KErrNone, event, EventClass( event ) );
       }
@@ -1201,11 +1201,11 @@
 
 // ---------------------------------------------------------------------------
 // DirectRequestL
-// 
+//
 // Issue request even when busy.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::DirectRequestL( const TCamCameraRequestId& aRequestId )
   {
   PRINT( _L("Camera => CCamCameraController::DirectRequestL") );
@@ -1269,7 +1269,7 @@
     // -----------------------------------------------------
     default:
       Panic( ECamCameraControllerUnsupported );
-      break;      
+      break;
     }
 
   if( notify )
@@ -1290,11 +1290,11 @@
 // associated event codes to observers. If any errors happen during the
 // sequence, the notification will reflect this with the status code.
 // When sequence ends, observers will be notified with event
-// ECamCameraEventSequenceEnd. No new requests are accepted before 
+// ECamCameraEventSequenceEnd. No new requests are accepted before
 // ECamCameraEventSequenceEnd notification is sent.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController
 ::RequestSequenceL( const RCamRequestArray& aSequence )
   {
@@ -1322,7 +1322,7 @@
 // RequestSettingsChangeL
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::RequestSettingsChangeL()
   {
   PRINT ( _L("Camera => CCamCameraController::RequestSettingsChangeL") );
@@ -1358,7 +1358,7 @@
   if( !callback )
     {
     TCamCameraSettingId setting = aSettingId;
-    NotifyObservers( KErrNone, 
+    NotifyObservers( KErrNone,
                      ECamCameraEventSettingsSingle,
                      ECamCameraEventClassSettings,
                      &setting );
@@ -1372,7 +1372,7 @@
 // CancelSequence
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::CancelSequence()
   {
   PRINT( _L("Camera => CCamCameraController::CancelSequence") );
@@ -1393,9 +1393,9 @@
     // Clears busy flag, if we were processing a sequence of requests / settings.
     // If iBusy is set because one request is on the way,
     // we must not clear it here - when that request is processed,
-    // the flag will be cleared. 
+    // the flag will be cleared.
     EndSequence( KErrCancel );
-    }    
+    }
   PRINT( _L("Camera <= CCamCameraController::CancelSequence") );
   }
 
@@ -1408,12 +1408,12 @@
   {
   PRINT1( _L("Camera => CCamCameraController::SwitchCameraL%d"),aCameraIndex );
   #ifdef _DEBUG
-  if( aCameraIndex == iInfo.iCurrentCamera ) 
+  if( aCameraIndex == iInfo.iCurrentCamera )
     {
     PRINT( _L("Camera <> CCamCameraController::SwitchCameraL - Changing Secondary camera orientation") );
     }
   #endif // _DEBUG
-  
+
   if( aCameraIndex < 0 || aCameraIndex >= CamerasAvailable() )
     {
     User::Leave( KErrNotSupported );
@@ -1426,17 +1426,17 @@
       {
       ReleaseCurrentCamera();
       }
-     
-    // used in CompleteSwitchCamera  
+
+    // used in CompleteSwitchCamera
     iCurrentCameraIndex = aCameraIndex;
-    
+
     // -----------------------------------------------------
     // Then create new camera:
     PRINT ( _L("############################################################") );
 #ifdef CAMERAAPP_CAE_FOR_VIDEO
 
     PRINT1( _L("Camera <> Creating CCaeEngine, camera index: %d .."), aCameraIndex );
-    iCaeEngine = NewCaeEngineL( aCameraIndex ); 
+    iCaeEngine = NewCaeEngineL( aCameraIndex );
 
 #else
 
@@ -1467,7 +1467,7 @@
     return;
     }
 
-#ifdef CAMERAAPP_CAE_FOR_VIDEO    
+#ifdef CAMERAAPP_CAE_FOR_VIDEO
   #ifdef CAMERAAPP_CAE_FIX
     PRINT ( _L("Camera <> Creating new CCamera..") );
     iCamera    = NewCameraL( iCurrentCameraIndex );
@@ -1488,7 +1488,7 @@
     if( KPrimaryCameraIndex == iInfo.iCurrentCamera )
       {
       // Support only for primary camera.
-      // Ignore error in instantiation: If NewL leaves, there's no 
+      // Ignore error in instantiation: If NewL leaves, there's no
       // support for Image Processing available. Report error to client
       // if settings requiring it are used.
       PRINT ( _L("Camera <> Create CCameraImageProcessing..") );
@@ -1503,8 +1503,8 @@
     GetAdvancedSettingsInfoL();
 
     PRINT ( _L("Camera <> Get i/f MCameraOrientation..") )
-    iCustomInterfaceOrientation = 
-      static_cast <MCameraOrientation*>( 
+    iCustomInterfaceOrientation =
+      static_cast <MCameraOrientation*>(
   	    iCamera->CustomInterface( KCameraOrientationUid ) );
     PRINT1( _L("Camera <> Orientation custom i/f pointer:%d"), iCustomInterfaceOrientation );
 
@@ -1532,42 +1532,42 @@
   PRINT1( _L("Camera => CCamCameraController::SetOrientationModeL %d"), aOrientation );
 #ifdef CAMERAAPP_CAE_FOR_VIDEO
     PRINT( _L("Camera <> CCameraController: Get i/f MUIOrientationOverride from iCaeEngine..") )
-    iCustomInterfaceUIOrientationOverride = 
-      static_cast <MCameraUIOrientationOverride*>( 
+    iCustomInterfaceUIOrientationOverride =
+      static_cast <MCameraUIOrientationOverride*>(
   	    iCaeEngine->CustomInterface( KCameraUIOrientationOverrideUid ) );
 #else
     PRINT( _L("Camera <> CCameraController: Get i/f MUIOrientationOverride from iCamera..") )
-    iCustomInterfaceUIOrientationOverride = 
-      static_cast <MCameraUIOrientationOverride*>( 
+    iCustomInterfaceUIOrientationOverride =
+      static_cast <MCameraUIOrientationOverride*>(
   	    iCamera->CustomInterface( KCameraUIOrientationOverrideUid ) );
 #endif // CAMERAAPP_CAE_FOR_VIDEO
 
     PRINT1( _L("Camera <> OrientationOverride custom i/f pointer:%d"), iCustomInterfaceUIOrientationOverride );
     TRAP_IGNORE(iCustomInterfaceUIOrientationOverride->SetOrientationModeL( aOrientation ));
-    
+
   PRINT( _L("Camera <= CCamCameraController::SetOrientationModeL") );
   }
 
 // ---------------------------------------------------------------------------
-// CamerasAvailable <<static>> 
+// CamerasAvailable <<static>>
 // ---------------------------------------------------------------------------
 //
-TInt 
-CCamCameraController::CamerasAvailable() 
-  { 
-#ifndef CAMERAAPP_CAPI_EMULATOR    
+TInt
+CCamCameraController::CamerasAvailable()
+  {
+#ifndef CAMERAAPP_CAPI_EMULATOR
   return CCamera::CamerasAvailable();
 #else
   // Temporary
   return 2;
-#endif  
+#endif
   }
 
 // ---------------------------------------------------------------------------
 // CameraHandle
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController::CameraHandle()
   {
   if( iCamera )
@@ -1581,7 +1581,7 @@
 // CameraInfo
 // ---------------------------------------------------------------------------
 //
-const TCameraInfo& 
+const TCameraInfo&
 CCamCameraController::CameraInfo() const
   {
   return iCameraInfo;
@@ -1591,7 +1591,7 @@
 // ControllerInfo
 // ---------------------------------------------------------------------------
 //
-const TCamControllerInfo& 
+const TCamControllerInfo&
 CCamCameraController::ControllerInfo() const
   {
   return iInfo;
@@ -1601,7 +1601,7 @@
 //
 // ---------------------------------------------------------------------------
 //
-TUint 
+TUint
 CCamCameraController::State() const
   {
   return iInfo.iState;
@@ -1611,7 +1611,7 @@
 //
 // ---------------------------------------------------------------------------
 //
-TCamViewfinderMode 
+TCamViewfinderMode
 CCamCameraController::ViewfinderMode()  const
   {
   return iInfo.iVfMode;
@@ -1627,7 +1627,7 @@
   return iInfo.iVfState;
   }
 
-  
+
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
@@ -1635,7 +1635,7 @@
 TCamCameraTriState
 CCamCameraController::SnapshotState() const
   {
-  return iInfo.iSsState;  
+  return iInfo.iSsState;
   }
 
 
@@ -1643,11 +1643,11 @@
 //
 // ---------------------------------------------------------------------------
 //
-TCamCameraReadyState 
+TCamCameraReadyState
 CCamCameraController::FlashState() const
   {
   TCamCameraReadyState state = ECamUnknown;
-  
+
 #ifdef CAMERAAPP_CAPI_V2_ADV
   if( iAdvancedSettings )
     {
@@ -1698,7 +1698,7 @@
     case ECameraSettingExposure:
     case ECameraUserSceneSettingExposure:
       {
-      TPckgBuf<TCamSettingDataExposure>* exposure = 
+      TPckgBuf<TCamSettingDataExposure>* exposure =
           static_cast<TPckgBuf<TCamSettingDataExposure>*>( aSettingData );
 #ifdef CAMERAAPP_CAE_FIX
       if( iCaeInUse )
@@ -1724,11 +1724,11 @@
       *iso = iAdvancedSettings->IsoRate();
       break;
       }
-    case ECameraSettingContAF:   
+    case ECameraSettingContAF:
       {
       TInt* contAF = static_cast<TInt*>( aSettingData );
       *contAF = iAdvancedSettings->AutoFocusType() &  //bitwise
-                CAS::EAutoFocusTypeContinuous; 
+                CAS::EAutoFocusTypeContinuous;
       break;
       }
 #endif
@@ -1736,7 +1736,7 @@
     case ECameraSettingWhiteBalance:
     case ECameraUserSceneSettingWhiteBalance:
       {
-      TPckgBuf<TCamSettingDataWhiteBalance>* wb = 
+      TPckgBuf<TCamSettingDataWhiteBalance>* wb =
           static_cast<TPckgBuf<TCamSettingDataWhiteBalance>*>( aSettingData );
 
 #ifdef CAMERAAPP_CAE_FIX
@@ -1757,7 +1757,7 @@
       CheckNonNullL( iImageProcessor, KErrNotSupported );
 
       CIP::TEffect* effect = static_cast<CIP::TEffect*>( aSettingData );
-      *effect = 
+      *effect =
         (CIP::TEffect)
           iImageProcessor->TransformationValue( KUidECamEventImageProcessingEffect );
       break;
@@ -1852,7 +1852,7 @@
     case ECameraSettingBrightness:
     case ECameraUserSceneSettingBrightness:
       {
-      CCamera::TBrightness* brightness = 
+      CCamera::TBrightness* brightness =
           static_cast<CCamera::TBrightness*>( aSettingData );
 #ifdef CAMERAAPP_CAE_FIX
       if( iCaeInUse )
@@ -1866,7 +1866,7 @@
     case ECameraSettingContrast:
     case ECameraUserSceneSettingContrast:
       {
-      CCamera::TContrast* contrast = 
+      CCamera::TContrast* contrast =
           static_cast<CCamera::TContrast*>( aSettingData );
 #ifdef CAMERAAPP_CAE_FIX
       if( iCaeInUse )
@@ -1880,7 +1880,7 @@
     // -----------------------------------------------------
     case ECameraSettingStabilization:
       {
-      TPckgBuf<TCamSettingDataStabilization>* pckg = 
+      TPckgBuf<TCamSettingDataStabilization>* pckg =
           static_cast<TPckgBuf<TCamSettingDataStabilization>*>( aSettingData );
       TCamSettingDataStabilization& stabilization = (*pckg)();
 
@@ -1895,7 +1895,7 @@
     case ECameraSettingOrientation:
       {
       CheckNonNullL( iCustomInterfaceOrientation, KErrNotSupported );
-      
+
       MCameraOrientation::TOrientation* orientation =
           static_cast<MCameraOrientation::TOrientation*>( aSettingData );
 
@@ -1927,7 +1927,7 @@
 // Leave here will cause iActive to call EndSequence with the error code.
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController::ProcessNextRequestL()
   {
   PRINT( _L("Camera => CCamCameraController::ProcessNextRequestL") );
@@ -1970,7 +1970,7 @@
     if( iSequenceIndex < iSequenceArray.Count() )
       {
       const TCamCameraRequestId& requestId( iSequenceArray[iSequenceIndex] );
-  
+
       PRINT( _L("Camera <> process request..") );
       // If this request will be responded through MCameraObserver(2) callback,
       // iActive will be requested a new callback there and also
@@ -1979,7 +1979,7 @@
       readyForNextStep = ProcessOneRequestL( requestId );
 
       if( readyForNextStep )
-        {        
+        {
         if( ECamRequestVideoStop == requestId
          || ECamRequestImageCancel == requestId )
           {
@@ -1988,8 +1988,8 @@
           PRINT( _L("Camera <> CCamCameraController::RequestL .. Skipping commmon notification, is done already.") );
           }
         else
-          {  
-          TCamCameraEventId event( Request2Event( requestId ) );  
+          {
+          TCamCameraEventId event( Request2Event( requestId ) );
           NotifyObservers( KErrNone, event, EventClass( event ) );
           }
         }
@@ -2018,10 +2018,10 @@
 // ProcessSettingL
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController::ProcessSettingL( const TCamCameraSettingId& aSettingId )
   {
-  PRINT1( _L("Camera => CCamCameraController::ProcessSettingL [%s]"), 
+  PRINT1( _L("Camera => CCamCameraController::ProcessSettingL [%s]"),
           KCameraSettingNames[aSettingId] );
 
   TInt callback( EFalse );
@@ -2037,30 +2037,30 @@
     case ECameraSettingFlash:
     case ECameraUserSceneSettingFlash:
       {
-      if ( IsFlagOn( iInfo.iState, ECamVideoOn ) ) 
+      if ( IsFlagOn( iInfo.iState, ECamVideoOn ) )
         {
         CCamera::TFlash flash( CCamera::EFlashNone );
-        TCamFlashId currentFlashSetting( ECamFlashOff ); 
+        TCamFlashId currentFlashSetting( ECamFlashOff );
         // Video light setting has values ECamFlashOff/ECamFlashForced
-        iSettingProvider.ProvideCameraSettingL( aSettingId, 
-                                                &currentFlashSetting ); 
-        PRINT2( _L("Camera => Video Flash now = %d, new = %d"), 
+        iSettingProvider.ProvideCameraSettingL( aSettingId,
+                                                &currentFlashSetting );
+        PRINT2( _L("Camera => Video Flash now = %d, new = %d"),
                                        iCamera->Flash(), currentFlashSetting );
         // Camera uses values EFlashNone/EFlashVideoLight
-        flash = (currentFlashSetting == ECamFlashOff)?  
+        flash = (currentFlashSetting == ECamFlashOff)?
                 CCamera::EFlashNone:CCamera::EFlashVideoLight;
-        PRINT1( _L("Camera => iCamera->SetFlashL( %d )"), flash );      
+        PRINT1( _L("Camera => iCamera->SetFlashL( %d )"), flash );
         iCamera->SetFlashL( flash );
         }
       else
         {
-        // Still image flash 
+        // Still image flash
         CCamera::TFlash flash( CCamera::EFlashAuto );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &flash );
 #ifdef CAMERAAPP_CAE_FIX
       if( iCaeInUse )
             {
-            iCaeEngine->SetFlashModeL( flash );  
+            iCaeEngine->SetFlashModeL( flash );
             }
       else
 #endif
@@ -2097,7 +2097,7 @@
         {
         iAdvancedSettings->SetExposureMode( mode );
         // iCamera->SetExposureL( mode );
-  
+
         TInt step = ResolveEvStep( params().iExposureStep );
         // Value needs to be multiplied by KECamFineResolutionFactor.
         // Setting provider does this for us.
@@ -2129,25 +2129,25 @@
       iSettingProvider.ProvideCameraSettingL( aSettingId, &iso );
       callback = ETrue;
       CleanupStack::PopAndDestroy( &ISOarray );
-      
+
       PRINT1( _L("Camera <> Setting ISO rate to: %d"), iso );
       if( !iso )
         {
         // ISO Auto
-        iAdvancedSettings->SetISORateL( 
-                CCamera::CCameraAdvancedSettings::EISOAutoUnPrioritised, iso );  
+        iAdvancedSettings->SetISORateL(
+                CCamera::CCameraAdvancedSettings::EISOAutoUnPrioritised, iso );
         }
-      else if( IsSupportedValue( iso, 
+      else if( IsSupportedValue( iso,
                                  iAdvancedSettingInfo.iIsoRatesSupport,
-                                 EDiscreteSteps ) ) 
+                                 EDiscreteSteps ) )
         {
-        // Selected ISO rate  
-        iAdvancedSettings->SetISORateL( 
+        // Selected ISO rate
+        iAdvancedSettings->SetISORateL(
                 CCamera::CCameraAdvancedSettings::EISOManual, iso );
         }
       else
         {
-        User::Leave( KErrNotSupported );  
+        User::Leave( KErrNotSupported );
         }
       break;
       }
@@ -2167,7 +2167,7 @@
         iCamera->SetWhiteBalanceL( params().iWhiteBalanceMode );
 #ifdef CAMERAAPP_CAPI_V2
         callback = ETrue;
-#endif      
+#endif
         }
       break;
       }
@@ -2180,8 +2180,8 @@
       CIP::TEffect effect( CIP::EEffectNone );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &effect );
 
-      if( IsSupportedValue( effect, 
-                            iAdvancedSettingInfo.iColourEffectSupport, 
+      if( IsSupportedValue( effect,
+                            iAdvancedSettingInfo.iColourEffectSupport,
                             iAdvancedSettingInfo.iColourEffectValueInfo ) )
         {
         iImageProcessor->SetTransformationValue( KUidECamEventImageProcessingEffect, effect );
@@ -2199,8 +2199,8 @@
       TInt sharpness( 0 );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &sharpness );
 
-      if( IsSupportedValue( sharpness, 
-                            iAdvancedSettingInfo.iSharpnessSupport, 
+      if( IsSupportedValue( sharpness,
+                            iAdvancedSettingInfo.iSharpnessSupport,
                             iAdvancedSettingInfo.iSharpnessValueInfo ) )
         {
         iImageProcessor->SetTransformationValue( KUidECamEventImageProcessingAdjustSharpness, sharpness );
@@ -2244,17 +2244,17 @@
 #ifdef CAMERAAPP_CAPI_V2_ADV
         if( iAdvancedSettingInfo.iDigitalZoomSupport.Count() > zoom )
             iAdvancedSettings->SetDigitalZoom( iAdvancedSettingInfo.iDigitalZoomSupport[zoom] );
-          else 
+          else
             User::Leave( KErrNotSupported );
         callback = ETrue;
-        
+
 #else
         // Note: Even if the method is misleadingly named
         //       CCamera::SetDigitalZoomFactorL, the values are
         //       zoom steps, not zoom factors.
         iCamera->SetDigitalZoomFactorL( zoom );
 #endif
-      
+
         }
       break;
       }
@@ -2275,13 +2275,13 @@
       PRINT( _L("Camera <> CCamCameraController::ProcessSettingL ECameraSettingStabilization") );
       TPckgBuf<TCamSettingDataStabilization> stabilization;
       iSettingProvider.ProvideCameraSettingL( aSettingId, &stabilization );
-      
+
       // Check that the values are supported..
       TBool modeOk    = ( CAS::EStabilizationModeOff == stabilization().iMode
                        || iAdvancedSettingInfo.iStabilizationModeSupport & stabilization().iMode );
       TBool effectOk  = ( CAS::EStabilizationOff     == stabilization().iEffect
                        || iAdvancedSettingInfo.iStabilizationEffectSupport & stabilization().iEffect );
-      TBool complexOk = ( CAS::EStabilizationComplexityAuto == stabilization().iComplexity 
+      TBool complexOk = ( CAS::EStabilizationComplexityAuto == stabilization().iComplexity
                        || iAdvancedSettingInfo.iStabilizationComplexitySupport & stabilization().iComplexity );
 
       if( modeOk && effectOk && complexOk )
@@ -2291,9 +2291,9 @@
         iAdvancedSettings->SetStabilizationEffect    ( stabilization().iEffect     );
         iAdvancedSettings->SetStabilizationComplexity( stabilization().iComplexity );
         // Events:
-        //   KUidECamEventCameraSettingStabilizationMode 
-        //   KUidECamEventCameraSettingsStabilizationEffect 
-        //   KUidECamEventSettingsStabilizationAlgorithmComplexity 
+        //   KUidECamEventCameraSettingStabilizationMode
+        //   KUidECamEventCameraSettingsStabilizationEffect
+        //   KUidECamEventSettingsStabilizationAlgorithmComplexity
         // We use the latest one to determine when we can continue.
         // Do not change above order unless CCamSettingConversion::Map2EventUidValue
         // is edited..
@@ -2307,12 +2307,12 @@
       break;
       }
     // -------------------------------
-    case ECameraSettingContAF:  
+    case ECameraSettingContAF:
       {
       CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
       if ( appUi->AppController().UiConfigManagerPtr()->IsContinuosAutofocusSupported() )
          {
-         TBool isContAFon( iAdvancedSettings->AutoFocusType() & 
+         TBool isContAFon( iAdvancedSettings->AutoFocusType() &
                            CAS::EAutoFocusTypeContinuous );
          if( IsFlagOn( iInfo.iState, ECamVideoOn ) )
             {
@@ -2349,8 +2349,8 @@
         }
       else
         {
-        // 
-        PRINT( _L("Camera <> Video file size too early, NOT SET!!") );        
+        //
+        PRINT( _L("Camera <> Video file size too early, NOT SET!!") );
         }
       break;
       }
@@ -2376,7 +2376,7 @@
         }
       else
         {
-        PRINT( _L("Camera <> Video name too early, NOT SET!!") );        
+        PRINT( _L("Camera <> Video name too early, NOT SET!!") );
         }
       break;
       }
@@ -2398,8 +2398,8 @@
         }
       else
         {
-        PRINT( _L("Camera <> Video mute too early, NOT SET!!") );        
-        }        
+        PRINT( _L("Camera <> Video mute too early, NOT SET!!") );
+        }
       break;
       }
     // -------------------------------
@@ -2421,11 +2421,11 @@
     case ECameraSettingOrientation:
       {
       CheckNonNullL( iCustomInterfaceOrientation, KErrNotSupported );
-      MCameraOrientation::TOrientation 
+      MCameraOrientation::TOrientation
         orientation( MCameraOrientation::EOrientation0 );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &orientation );
 
-      if ( iInfo.iCurrentCamera != KPrimaryCameraIndex && 
+      if ( iInfo.iCurrentCamera != KPrimaryCameraIndex &&
            orientation == MCameraOrientation::EOrientation90 )
         {
         PRINT( _L("Camera <> Rotate portrait secondary camera image 270 degrees") );
@@ -2458,18 +2458,18 @@
 //
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessOneRequestL( const TCamCameraRequestId& aRequestId )
   {
   PRINT( _L("Camera => CCamCameraController::ProcessOneRequestL") );
-  PRINT2( _L("Camera <> processing request [%s] id:%d "), 
-          KCamRequestNames[aRequestId], 
+  PRINT2( _L("Camera <> processing request [%s] id:%d "),
+          KCamRequestNames[aRequestId],
           aRequestId );
 
   TInt readyForNext( ETrue );
-  
-  // Order from most time critical / frequent 
+
+  // Order from most time critical / frequent
   // to less time critical / seldom.
   // Handled in submethods to preserve readability.
   // -----------------------------------------------------
@@ -2530,7 +2530,7 @@
 // ProcessControlStartupRequestL
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessControlStartupRequestL( const TCamCameraRequestId& aRequestId )
   {
@@ -2547,9 +2547,9 @@
     // If UIOrientationOverrideAPI is used, ui construction is completed while
     // waiting for Reserve to complete, event sent here to continue ui construction
     CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
-    if ( appUi->AppController().UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )    
-      {
-      NotifyObservers( KErrNone, 
+    if ( appUi->AppController().UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )
+      {
+      NotifyObservers( KErrNone,
                        ECamCameraEventReserveRequested,
                        ECamCameraEventClassBasicControl );
       }
@@ -2563,7 +2563,7 @@
 
     CAMERAAPP_PERF_CONTROLLER_START( ECamRequestPowerOn );
 
-    iCamera->PowerOn(); 
+    iCamera->PowerOn();
     }
   // -------------------------------------------------------
   // Unknown
@@ -2572,7 +2572,7 @@
     Panic( ECamCameraControllerCorrupt );
     }
   // -------------------------------------------------------
-  iReleasedByUi = EFalse;  
+  iReleasedByUi = EFalse;
   PRINT( _L("Camera <= CCamCameraController::ProcessControlStartupRequestL") );
   // Callback needs to be received before we can continue.
   return EFalse;
@@ -2582,16 +2582,16 @@
 // ProcessControlShutdownRequest
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessControlShutdownRequest( const TCamCameraRequestId& aRequestId )
   {
-  PRINT( _L("Camera => CCamCameraController::ProcessControlShutdownRequest") );  
+  PRINT( _L("Camera => CCamCameraController::ProcessControlShutdownRequest") );
   // -------------------------------------------------------
   // Power off
   if( ECamRequestPowerOff == aRequestId )
     {
-    if( IsFlagOn( iInfo.iState, ECamPowerOn ) ) 
+    if( IsFlagOn( iInfo.iState, ECamPowerOn ) )
       {
       // -------------------------------
       // Release image or video capture
@@ -2599,14 +2599,14 @@
         {
         // Leaves only if state is wrong (already checked here).
         ProcessImageShutdownRequest( ECamRequestImageRelease );
-        NotifyObservers( KErrNone, 
+        NotifyObservers( KErrNone,
                          ECamCameraEventImageRelease,
                          ECamCameraEventClassImage );
         }
       else if( IsFlagOn( iInfo.iState, ECamVideoOn ) )
         {
         TRAP_IGNORE( ProcessVideoRequestL( ECamRequestVideoRelease ) );
-        NotifyObservers( KErrNone, 
+        NotifyObservers( KErrNone,
                          ECamCameraEventVideoRelease,
                          ECamCameraEventClassVideo );
         }
@@ -2639,10 +2639,10 @@
         {
         iCaeEngine->PowerOff();
         }
-      else      
+      else
 #endif // CAMERAAPP_CAE_FIX
         {
-        iCamera->PowerOff(); 
+        iCamera->PowerOff();
         }
       // -------------------------------
       }
@@ -2674,18 +2674,18 @@
 #endif // CAMERAAPP_CAE_FIX
         {
         iCamera->Release();
-        iReleasedByUi = ETrue;  
+        iReleasedByUi = ETrue;
         if( iIveRecoveryCount > 0 )
             {
             HandleReserveLostEvent( KErrNone );
             }
         }
       }
-    PRINT( _L("Camera <> released, reset info") );  
+    PRINT( _L("Camera <> released, reset info") );
 
     // Reset our info, but preserve busy flag and camera index.
     // Sets iInfo.iState to ECamIdle.
-    iInfo.Reset( ETrue, ETrue ); 
+    iInfo.Reset( ETrue, ETrue );
     }
   // -------------------------------------------------------
   // Unknown
@@ -2694,8 +2694,8 @@
     Panic( ECamCameraControllerCorrupt );
     }
   // -------------------------------------------------------
-  PRINT( _L("Camera <= CCamCameraController::ProcessControlShutdownRequest") );  
-  
+  PRINT( _L("Camera <= CCamCameraController::ProcessControlShutdownRequest") );
+
   // No callback needs to be waited.
   return ETrue;
   }
@@ -2704,7 +2704,7 @@
 // ProcessViewfinderRequestL
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessVfRequestL( const TCamCameraRequestId& aRequestId )
   {
@@ -2752,7 +2752,7 @@
 void
 CCamCameraController::InitViewfinderL( const TCamViewfinderMode& aMode )
   {
-  PRINT( _L("Camera => CCamCameraController::InitViewfinderL") );  
+  PRINT( _L("Camera => CCamCameraController::InitViewfinderL") );
 
   // Check the old viewfinder is released now.
   // No further checks made here.
@@ -2765,10 +2765,10 @@
     case ECamViewfinderDirect:
       {
       // Don't proceed if not supported by camera.
-      CheckFlagOnL( iCameraInfo.iOptionsSupported, 
+      CheckFlagOnL( iCameraInfo.iOptionsSupported,
                     TCameraInfo::EViewFinderDirectSupported,
                     KErrNotSupported );
-      
+
   #ifdef CAMERAAPP_CAPI_V2_DVF
       PRINT( _L("Camera <> Creating CCameraDirectViewFinder instance") );
       if( iDirectViewfinder )
@@ -2778,8 +2778,8 @@
         }
       iDirectViewfinder = CCamera::CCameraDirectViewFinder::NewL( *iCamera );
   #else
-      // not implemented 
-      Panic( ECamCameraControllerUnsupported );      
+      // not implemented
+      Panic( ECamCameraControllerUnsupported );
   #endif
       iInfo.iVfState  = ECamTriInactive;
       iInfo.iVfMode   = ECamViewfinderDirect;
@@ -2789,10 +2789,10 @@
     case ECamViewfinderBitmap:
       {
       // Don't proceed if not supported by camera.
-      CheckFlagOnL( iCameraInfo.iOptionsSupported, 
+      CheckFlagOnL( iCameraInfo.iOptionsSupported,
                     TCameraInfo::EViewFinderBitmapsSupported,
                     KErrNotSupported );
-  
+
       iInfo.iVfState  = ECamTriInactive;
       iInfo.iVfMode   = ECamViewfinderBitmap;
       break;
@@ -2804,11 +2804,11 @@
     // ---------------------------------
     default:
       // Unknown mode
-      Panic( ECamCameraControllerUnsupported );     
-      break;      
+      Panic( ECamCameraControllerUnsupported );
+      break;
     // ---------------------------------
     }
-  PRINT( _L("Camera <= CCamCameraController::InitViewfinderL") );  
+  PRINT( _L("Camera <= CCamCameraController::InitViewfinderL") );
   }
 
 // ---------------------------------------------------------------------------
@@ -2821,11 +2821,11 @@
 
 #ifdef __WINSCW__
   const TCamViewfinderMode KTargetMode( ECamViewfinderBitmap );
-#else    
-    
+#else
+
   TPckgBuf<TCamViewfinderMode> mode;
   iSettingProvider.ProvideCameraParamL( ECameraParamVfMode, &mode );
-  
+
   // If the viewfinder mode needs to be changed,
   // first stop and release resources related to the old viewfinder type.
   const TCamViewfinderMode KTargetMode( mode() );
@@ -2837,25 +2837,29 @@
     ProcessVfRelaseRequest();
     }
 
-  // Check that application is still in foreground, if not then return
+  // Check that application is still in foreground, if not, then vf not started.
   CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
-
-  if ( !appUi->AppInBackground( ETrue ) )
+  if ( appUi && appUi->AppInBackground( ETrue ) )
+    {
+    // Notify appUi that we did not start viewfinder although asked to do so.
+    appUi->SetViewFinderStoppedStatus( iInfo.iVfState != ECamTriActive );
+    }
+  else
     {
     switch( iInfo.iVfState )
       {
       // -----------------------------------------------------
       case ECamTriIdle:
        PRINT( _L("Camera <> case ECamTriIdle") );
-  
+
         InitViewfinderL( KTargetMode );
         // << fall through >>
-  
+
       case ECamTriInactive:
         {
         // -------------------------------
         PRINT( _L("Camera <> case ECamTriInactive") );
-  
+
         if( ECamViewfinderDirect == iInfo.iVfMode )
 #ifdef CAMERAAPP_CAPI_V2_DVF
           {
@@ -2868,16 +2872,16 @@
                   PRINT( _L("Camera <> CCamCameraController::iViewfinderWindow is NULL - cannot start VF!") );
                   User::Leave( KErrNotReady );
                   }
-  
+
               // Use the same viewfinder position and size as for bitmap viewfinder
               TPckgBuf<TCamParamsVfBitmap> params;
               iSettingProvider.ProvideCameraParamL( ECameraParamVfBitmap, &params );
-  
+
               CEikonEnv* env = CEikonEnv::Static();
-  
+
               OstTrace0( CAMERAAPP_PERFORMANCE, CCAMCAMERACONTROLLER_PROCESSVFSTARTREQUESTL, "e_CAM_APP_VF_INIT 0" ); //CCORAPP_APP_VF_INIT_END
               OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMCAMERACONTROLLER_PROCESSVFSTARTREQUESTL, "e_CAM_APP_OVERLAY_INIT 0" ); //CCORAPP_APP_OVERLAY_INIT_END
-  
+
               TInt orgPos = SetVfWindowOrdinal(); // Set visible
               iCamera->StartViewFinderDirectL(
                   env->WsSession(),
@@ -2885,16 +2889,15 @@
                   *iViewfinderWindow,
                   params().iRect );
               (void) SetVfWindowOrdinal( orgPos ); // back to original
-  
-              CCamAppUi* appUi = static_cast<CCamAppUi*>( env->AppUi() );
-              if ( ECamActiveCameraSecondary == appUi->ActiveCamera() ) 
+
+              if ( ECamActiveCameraSecondary == appUi->ActiveCamera() )
                   {
-                  iCamera->SetViewFinderMirrorL(ETrue); 
+                  iCamera->SetViewFinderMirrorL(ETrue);
                   }
               // VF started succesfully, reset recovery counter
-              delete iIdle;  
+              delete iIdle;
               iIdle = NULL;
-              iIveRecoveryCount = KIveRecoveryCountMax;  
+              iIveRecoveryCount = KIveRecoveryCountMax;
               break;
               }
             case CCamera::CCameraDirectViewFinder::EViewFinderPause:
@@ -2906,7 +2909,7 @@
               {
               // Already running. Not considered as error.
               break;
-              }          
+              }
             default:
               {
               Panic( ECamCameraControllerUnsupported );
@@ -2917,14 +2920,14 @@
 #else // CAMERAAPP_CAPI_V2_DVF
           {
           // No controller support for direct vf.
-          Panic( ECamCameraControllerUnsupported );     
+          Panic( ECamCameraControllerUnsupported );
           }
 #endif // CAMERAAPP_CAPI_V2_DVF
         // -------------------------------
         else
           {
           PRINT( _L("Camera <> Get bitmap vf details..") );
-            
+
           TPckgBuf<TCamParamsVfBitmap> params;
           iSettingProvider.ProvideCameraParamL( ECameraParamVfBitmap, &params );
           iInfo.iViewfinderFormat = params().iFormat;
@@ -2933,7 +2936,7 @@
           if( iCaeInUse )
             {
             PRINT( _L("Camera <> Call CCaeEngine::StartViewFinderBitmapsL..") );
-  
+
             OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMCAMERACONTROLLER_PROCESSVFSTARTREQUESTL, "e_CAM_APP_VF_INIT 0" ); //CCORAPP_APP_VF_INIT_END
             OstTrace0( CAMERAAPP_PERFORMANCE, DUP3_CCAMCAMERACONTROLLER_PROCESSVFSTARTREQUESTL, "e_CAM_APP_OVERLAY_INIT 0" ); //CCORAPP_APP_OVERLAY_INIT_END
             iCaeEngine->StartViewFinderBitmapsL( iInfo.iViewfinderSize );
@@ -2944,16 +2947,16 @@
             PRINT( _L("Camera <> Call CCamera::StartViewFinderBitmapsL..") );
             OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMCAMERACONTROLLER_PROCESSVFSTARTREQUESTL, "e_CAM_APP_VF_INIT 0" );  //CCORAPP_APP_VF_INIT_END
             OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMCAMERACONTROLLER_PROCESSVFSTARTREQUESTL, "e_CAM_APP_OVERLAY_INIT 0" ); //CCORAPP_APP_OVERLAY_INIT_END
-            iCamera->StartViewFinderBitmapsL( iInfo.iViewfinderSize );      
-  		  
+            iCamera->StartViewFinderBitmapsL( iInfo.iViewfinderSize );
+
   		  if ( params().iMirrorImage )
   		  	{
-  		   	iCamera->SetViewFinderMirrorL( params().iMirrorImage );	
+  		   	iCamera->SetViewFinderMirrorL( params().iMirrorImage );
   		   	}
             }
           }
         // -------------------------------
-  
+
         iInfo.iVfState = ECamTriActive;
         //view finder started now(set stop status as false)
         appUi->SetViewFinderStoppedStatus( EFalse );
@@ -2972,8 +2975,8 @@
         Panic( ECamCameraControllerCorrupt );
         break;
       // -----------------------------------------------------
-      } 
-    }   
+      }
+    }
   PRINT( _L("Camera <= CCamCameraController::ProcessVfStartRequestL") );
   }
 
@@ -3078,9 +3081,9 @@
       // Do the stopping first and continue then with release.
       // Leaves only if iVfState is ECamVfIdle, which is not the case here.
       TRAP_IGNORE( ProcessVfStopRequestL() );
-      
+
       // Need to notify here, because done as a part of other request.
-      NotifyObservers( KErrNone, 
+      NotifyObservers( KErrNone,
                        ECamCameraEventVfStop,
                        ECamCameraEventClassVfControl );
       // << fall through >>
@@ -3101,7 +3104,7 @@
         }
       // These may very well remain as they are.
       // Atleast for the format there is no "zero" value available.
-      //    iInfo.iViewfinderSize  
+      //    iInfo.iViewfinderSize
       //    iInfo.iViewfinderFormat
       iInfo.iVfState          = ECamTriIdle;
       iInfo.iVfMode           = ECamViewfinderNone;
@@ -3124,7 +3127,7 @@
 // ProcessImageRequestL
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessImageRequestL( const TCamCameraRequestId& aRequestId )
   {
@@ -3138,7 +3141,7 @@
     case ECamRequestImageInit:
       {
       // When camera engine still capture don't Init a new capture
-      
+
       if ( ECamCaptureOn == iInfo.iCaptureState )
       	{
       	return EFalse;
@@ -3152,9 +3155,9 @@
         iModeChange       = ECamModeChangeVideo2Image;
         iModeChangePhase  = ECamModeChangePhaseIdle;   // incremented before first step
         iModeChangeStatus = KErrNone;
-        iActive->IssueRequest();        
+        iActive->IssueRequest();
         }
-      else 
+      else
   #else
       if( IsFlagOn( iInfo.iState, ECamVideoOn ) )
         {
@@ -3169,8 +3172,8 @@
       CheckEqualsL( iInfo.iCaptureState, ECamCaptureOff, KErrInUse    );
 
       PRINT( _L("Camera <> Checking that image capture supported..") );
-      CheckFlagOnL( iCameraInfo.iOptionsSupported, 
-                    TCameraInfo::EImageCaptureSupported, 
+      CheckFlagOnL( iCameraInfo.iOptionsSupported,
+                    TCameraInfo::EImageCaptureSupported,
                     KErrNotSupported );
 
       PRINT( _L("Camera <> Ask image parameters..") );
@@ -3187,25 +3190,25 @@
       User::LeaveIfError( index );
 
       PRINT( _L("Camera <> Call CCamera::PrepareImageCaptureL..") );
-      PRINT2( _L("Camera <> Image size: (%d, %d)"), 
+      PRINT2( _L("Camera <> Image size: (%d, %d)"),
                   params().iSize.iWidth,
                   params().iSize.iHeight );
-      
+
       OstTrace0( CAMERAAPP_PERFORMANCE, CCAMCAMERACONTROLLER_PROCESSIMAGEREQUESTL, "e_CAM_APP_CONFIGURATIONS 0" );  //CCORAPP_APP_CONFIGS_END
       iCamera->PrepareImageCaptureL( format, index );
       OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMCAMERACONTROLLER_PROCESSIMAGEREQUESTL, "e_CAM_APP_STILL_INIT 0" ); //CCORAPP_APP_STILL_INIT_END
       OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMCAMERACONTROLLER_PROCESSIMAGEREQUESTL, "e_CAM_APP_OVERLAY_INIT 1" );   //CCORAPP_APP_OVERLAY_INIT_START
-      
+
       iCamera->SetJpegQuality( params().iQualityFactor );
 
       SetFlags( iInfo.iState, ECamImageOn );
-      
-#ifdef CAMERAAPP_CAPI_V2_ADV      
+
+#ifdef CAMERAAPP_CAPI_V2_ADV
       // Set current autofocus range to invalid value to force focusing
-      iInfo.iCurrentFocusRange = static_cast<CAS::TFocusRange>( -1 );    
+      iInfo.iCurrentFocusRange = static_cast<CAS::TFocusRange>( -1 );
       GetAdvancedSettingsInfoL();
 #endif // CAMERAAPP_CAPI_V2_ADV
-      
+
       iInfo.iCaptureCount  = 0;
       iInfo.iSnapshotCount = 0;
       callback = EFalse; // No callback to wait for.
@@ -3227,12 +3230,12 @@
 
       PRINT1( _L("Camera <> CCamCameraController .. About to start capture, total shared buffers in use: %d"), CCamBufferShare::TotalBufferShareCount() );
       iCamera->CaptureImage();
-      
+
       // When image data is received from CCamera,
       // an event is generated for that. We need to notify
-      // here as other places check if the request has associated 
+      // here as other places check if the request has associated
       // callback, and send no notification yet if callback exist.
-      NotifyObservers( KErrNone, 
+      NotifyObservers( KErrNone,
                        ECamCameraEventImageStart,
                        ECamCameraEventClassImage );
       break;
@@ -3247,14 +3250,14 @@
     }
   PRINT1( _L("Camera <= CCamCameraController::ProcessImageRequestL, continue now:%d"), !callback );
   return !callback;
-  }    
+  }
 
 
 // ---------------------------------------------------------------------------
 // ProcessImageShutdownRequest
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessImageShutdownRequest( const TCamCameraRequestId& aRequestId )
   {
@@ -3266,19 +3269,19 @@
     case ECamRequestImageCancel:
       {
       if( IsFlagOn( iInfo.iState, ECamImageOn )
-//      && ECamCaptureOn == iInfo.iCaptureState  
+//      && ECamCaptureOn == iInfo.iCaptureState
         )
         {
         const TCamCameraCaptureState previousState( iInfo.iCaptureState );
 
-        if( iEncoder ) 
+        if( iEncoder )
           {
           iEncoder->Cancel();
 
           delete iEncoder;
           iEncoder = NULL;
           }
-      
+
         PRINT( _L("Camera <> Calling iCamera->CancelCaptureImage()") );
         iCamera->CancelCaptureImage();
 
@@ -3293,8 +3296,8 @@
           ClearFlags( iInfo.iBusy, ECamBusySingle );
 
           TInt fullCaptures( Min( iInfo.iCaptureCount, iInfo.iSnapshotCount ) );
-          NotifyObservers( KErrNone, 
-                           ECamCameraEventImageStop, 
+          NotifyObservers( KErrNone,
+                           ECamCameraEventImageStop,
                            ECamCameraEventClassImage,
                            &fullCaptures );
           }
@@ -3308,7 +3311,7 @@
       ProcessImageShutdownRequest( ECamRequestImageCancel );
 
       // Nothing else really needed for image, just set flags.
-      ClearFlags( iInfo.iState, ECamImageOn ); 
+      ClearFlags( iInfo.iState, ECamImageOn );
       iInfo.iCaptureCount  = 0;
       iInfo.iSnapshotCount = 0;
       iInfo.iCaptureState  = ECamCaptureOff;
@@ -3325,7 +3328,7 @@
     }
   PRINT( _L("Camera <= CCamCameraController::ProcessImageShutdownRequest") );
   return ETrue; // can continue sequence, if needed
-  }    
+  }
 
 
 
@@ -3333,7 +3336,7 @@
 // ProcessVideoRequestL
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessVideoRequestL( const TCamCameraRequestId& aRequestId )
   {
@@ -3383,17 +3386,17 @@
         // _LIT( KTempFilename, "C:\\video.3gp" );
         // TPtrC ptr;
         // ptr.Set( KTempFilename() );
-        PRINT1( _L("Camera <> Set filename [%S]"), &ptr );        
+        PRINT1( _L("Camera <> Set filename [%S]"), &ptr );
         iCaeEngine->SetVideoRecordingFileNameL( ptr );
         CleanupStack::PopAndDestroy( filename );
-        
+
         // Set max video clip size
-        ProcessSettingL( ECameraSettingFileMaxSize );          
+        ProcessSettingL( ECameraSettingFileMaxSize );
 
         TPckgBuf<TCamParamsVideoCae> params;
         PRINT( _L("Camera <> Getting params from setting provider..") );
         iSettingProvider.ProvideCameraParamL( ECameraParamVideoCae, &params );
-        // The audioOn value is defined On==0 and Off==1, but the engine expects 
+        // The audioOn value is defined On==0 and Off==1, but the engine expects
         // ETrue if audio recording is On
         params().iAudioOn = ( ECamSettOn == params().iAudioOn )
         											? ETrue
@@ -3414,12 +3417,12 @@
                     params().iVideoType,
                     params().iAudioType );
             }
-                                          
-#ifdef CAMERAAPP_CAPI_V2_ADV                                          
+
+#ifdef CAMERAAPP_CAPI_V2_ADV
       // Set current autofocus range to invalid value to force focusing
-      iInfo.iCurrentFocusRange = static_cast<CAS::TFocusRange>( -1 );                                          
+      iInfo.iCurrentFocusRange = static_cast<CAS::TFocusRange>( -1 );
 #endif // CAMERAAPP_CAPI_V2_ADV
-                                          
+
         iAppController.SetVideoInitNeeded( EFalse );
         // iState is updated in the callback.
         PRINT( _L("Camera <> ..waiting for callback") );
@@ -3437,7 +3440,7 @@
         case ECamCaptureOff:    iCaeEngine->StartVideoRecording();  break;
         //case ECamCaptureOff:    iCaeEngine->ResumeVideoRecording();  break;
         case ECamCapturePaused: iCaeEngine->ResumeVideoRecording(); break;
-        default:                
+        default:
           Panic( ECamCameraControllerCorrupt );
           break;
         }
@@ -3460,18 +3463,18 @@
       switch( iInfo.iCaptureState )
         {
         case ECamCaptureOn:     // << fall through >>
-        case ECamCapturePaused: 
+        case ECamCapturePaused:
           PRINT( _L("Camera <> call CCaeEngine::StopVideoRecording..") );
-          iCaeEngine->StopVideoRecording(); 
+          iCaeEngine->StopVideoRecording();
           // If we got the callback during above call,
           // we should not wait for it anymore.
           // Check the capture state to be sure.
           callback = (ECamCaptureOff != iInfo.iCaptureState);
           break;
-        case ECamCaptureOff:    
+        case ECamCaptureOff:
           // no action, already stopped
           break;
-        default:                
+        default:
           Panic( ECamCameraControllerCorrupt );
           break;
         }
@@ -3483,10 +3486,10 @@
       {
       // Need to be stopped.
       CheckEqualsL( iInfo.iCaptureState, ECamCaptureOff, KErrInUse );
-  
+
       if( IsFlagOn( iInfo.iState, ECamVideoOn ) )
         iCaeEngine->CloseVideoRecording();
-        
+
       ClearFlags( iInfo.iState, ECamVideoOn );
       callback = EFalse;
 #ifdef CAMERAAPP_CAPI_V2_ADV
@@ -3504,8 +3507,8 @@
       break;
       }
     // -----------------------------------------------------
-    default: 
-      Panic( ECamCameraControllerCorrupt ); 
+    default:
+      Panic( ECamCameraControllerCorrupt );
       break;
     // -----------------------------------------------------
     }
@@ -3525,7 +3528,7 @@
 // ProcessSnapshotRequestL
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController
 ::ProcessSnapshotRequestL( const TCamCameraRequestId& aRequestId )
   {
@@ -3547,15 +3550,15 @@
           // << fall through >>
         case ECamTriInactive:
           {
-          PRINT( _L("Camera <> ECamTriInactive") );  
+          PRINT( _L("Camera <> ECamTriInactive") );
           iSnapshotProvider->StartSnapshot();
           break;
           }
-        case ECamTriActive: // Already active, no action  
-          PRINT( _L("Camera <> ECamTriActive") ); 
+        case ECamTriActive: // Already active, no action
+          PRINT( _L("Camera <> ECamTriActive") );
           break;
         default:
-          Panic( ECamCameraControllerCorrupt ); 
+          Panic( ECamCameraControllerCorrupt );
           break;
         }
       iInfo.iSsState = ECamTriActive;
@@ -3603,12 +3606,12 @@
     case ECamTriInactive: // Already inactive, no action.
       PRINT( _L("Camera <> Snapshot idle/inactive, no need to stop") );
       break;
-    case ECamTriActive:   
+    case ECamTriActive:
       PRINT( _L("Camera <> Snapshot ECamTriActive -> need to stop") );
       iSnapshotProvider->StopSnapshot();
       break;
     default:
-      Panic( ECamCameraControllerCorrupt ); 
+      Panic( ECamCameraControllerCorrupt );
       break;
     }
   iInfo.iSsState = ECamTriInactive;
@@ -3629,28 +3632,28 @@
       break;
     case ECamTriActive:
       iSnapshotProvider->StopSnapshot();
-      NotifyObservers( KErrNone, 
-                       ECamCameraEventSsStop, 
+      NotifyObservers( KErrNone,
+                       ECamCameraEventSsStop,
                        ECamCameraEventClassSsControl );
       // << fall through >>
     case ECamTriInactive:
       delete iSnapshotProvider;
       iSnapshotProvider = NULL;
       break;
-    default:              
-      Panic( ECamCameraControllerCorrupt ); 
+    default:
+      Panic( ECamCameraControllerCorrupt );
       break;
     }
 
   iInfo.iSsState = ECamTriIdle;
   PRINT( _L("Camera <= CCamCameraController::ProcessSsReleaseRequest") );
-  } 
+  }
 
 // ---------------------------------------------------------------------------
 // InitSnapshotL
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::InitSnapshotL()
   {
   PRINT( _L("Camera => CCamCameraController::InitSnapshotL") );
@@ -3671,11 +3674,11 @@
 
 
   // -------------------------------------------------------
-  // Initialize the snapshot parameters      
+  // Initialize the snapshot parameters
   TPckgBuf<TCamParamsSnapshot> params;
   iSettingProvider.ProvideCameraParamL( ECameraParamSnapshot, &params );
 
-  // Try to get the best, still supported, snapshot format.       
+  // Try to get the best, still supported, snapshot format.
   iInfo.iSnapshotFormat         = ResolveSnapshotFormatL( params().iFormat );
   iInfo.iSnapshotSize           = params().iSize;
   iInfo.iSnapshotAspectMaintain = params().iMaintainAspect;
@@ -3697,65 +3700,65 @@
 //
 void CCamCameraController::ProcessAutofocusRequestL( const TCamCameraRequestId& aRequestId )
   {
-  PRINT( _L("Camera => CCamCameraController::ProcessAutofocusRequestL") );  
+  PRINT( _L("Camera => CCamCameraController::ProcessAutofocusRequestL") );
 #ifdef CAMERAAPP_CAPI_V2_ADV
  CheckNonNullL( iAdvancedSettings, KErrNotReady );
   if( ECamRequestStartAutofocus == aRequestId )
     {
-    PRINT( _L("Camera <> SetAutoFocusType( EAutoFocusTypeSingle )") );    
-    iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeSingle );  
-    iAfInProgress = ETrue; 
+    PRINT( _L("Camera <> SetAutoFocusType( EAutoFocusTypeSingle )") );
+    iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeSingle );
+    iAfInProgress = ETrue;
     iFirstAfEventReceived = EFalse;
     }
   else if( ECamRequestCancelAutofocus == aRequestId )
     {
-    if( iAfInProgress ) 
+    if( iAfInProgress )
       {
       // Autofocus in progress, need to cancel it before setting range to hyperfocal
       PRINT( _L("Camera <> Cancel ongoing autofocus request") );
       iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeOff );
       iAfHyperfocalPending = ETrue;
       }
-    else 
-      { 
+    else
+      {
       // If focustype is set to continuous, need to change it to off
 	  // before continuing
 
-      PRINT( _L("Camera <> SetAutoFocusType( EAutoFocusTypeOff )") ); 
+      PRINT( _L("Camera <> SetAutoFocusType( EAutoFocusTypeOff )") );
       if ( iAdvancedSettings->AutoFocusType() & CAS::EAutoFocusTypeContinuous )
         {
-        iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeOff );     
+        iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeOff );
         }
-                            
-      PRINT( _L("Camera <> Cancel autofocus - set focus range to hyperfocal") );    
-      iInfo.iCurrentFocusRange = CAS::EFocusRangeHyperfocal;   
-      iAdvancedSettings->SetFocusRange( CAS::EFocusRangeHyperfocal );  
-      
-      // Then start the focus. The callback of this cancel request sets 
+
+      PRINT( _L("Camera <> Cancel autofocus - set focus range to hyperfocal") );
+      iInfo.iCurrentFocusRange = CAS::EFocusRangeHyperfocal;
+      iAdvancedSettings->SetFocusRange( CAS::EFocusRangeHyperfocal );
+
+      // Then start the focus. The callback of this cancel request sets
       // a boolean in CamAppController, so the resulting optimal
       // focus event does not change reticule/focus state.
-      iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeSingle );   
-      iAfInProgress = ETrue; 
+      iAdvancedSettings->SetAutoFocusType( CAS::EAutoFocusTypeSingle );
+      iAfInProgress = ETrue;
       }
     }
   else if( ECamRequestSetAfRange == aRequestId )
     {
     PRINT( _L("Camera <> Set autofocus range") );
     // Get autofocus mode from settings provider
-    
+
     CAS::TFocusRange afRange;
     iSettingProvider.ProvideCameraSettingL( ECameraSettingFocusRange, &afRange );
-    
+
     if( iInfo.iCurrentFocusRange != afRange )
-      {      
+      {
       iAdvancedSettings->SetFocusRange( afRange );
-      
+
       // Should this be done in the callback?:
       iInfo.iCurrentFocusRange = afRange;
       }
     else
       {
-      // Correct range already set. No need to do anything.  
+      // Correct range already set. No need to do anything.
       }
     }
   else
@@ -3763,8 +3766,8 @@
     // Other request must not end up here
     __ASSERT_DEBUG( EFalse, Panic( ECamCameraControllerCorrupt ) );
     }
-#endif // CAMERAAPP_CAPI_V2_ADV   
-  
+#endif // CAMERAAPP_CAPI_V2_ADV
+
   (void)aRequestId; // removes compiler warning
   PRINT( _L("Camera <= CCamCameraController::ProcessAutofocusRequestL") );
   }
@@ -3782,10 +3785,10 @@
 #ifdef CAMERAAPP_CAPI_V2_ADV
   // Check that we are prepared for image mode.
   CheckFlagOnL( iInfo.iState, ECamImageOn, KErrNotReady );
-    
+
   // Get requested capture count and determine current and target drive modes.
   TInt requestedLimit( 1 );
-  iSettingProvider.ProvideCameraSettingL( ECameraSettingCaptureLimit, &requestedLimit );  
+  iSettingProvider.ProvideCameraSettingL( ECameraSettingCaptureLimit, &requestedLimit );
   if( requestedLimit < 1 ) User::Leave( KErrArgument );
 
   const CAS::TDriveMode& currentMode( iAdvancedSettings->DriveMode() );
@@ -3806,7 +3809,7 @@
 
   // -------------------------------------------------------
   // Determine needed changes and when to issue them
-  // 
+  //
   // During burst capture, we may receive snapshots and
   // image data on mixed order, e.g:
   //
@@ -3814,9 +3817,9 @@
   //   --------------^^--------------------------^^
   //
   // C-API starts new burst capture when we adjust the
-  // capture limit. To avoid problems and to get equal 
-  // amount of snapshots and images, capture count is 
-  // only changed when we image data is received, 
+  // capture limit. To avoid problems and to get equal
+  // amount of snapshots and images, capture count is
+  // only changed when we image data is received,
   // and as many images as snapshots have arrived.
   // In the chart above ^ marks a place where capture limit
   // can be updated.
@@ -3833,7 +3836,7 @@
       PRINT( _L("Camera <> CCamCameraController .. Drive mode update not possible now, LEAVE!") );
       User::Leave( KErrInUse );
       }
-    else if ( CAS::EDriveModeBurst == currentMode )    
+    else if ( CAS::EDriveModeBurst == currentMode )
       {
       if( cameraLimit != requestedLimit )
         {
@@ -3851,17 +3854,17 @@
       {
       // No action needed. Capture limit of 1 image kept.
       PRINT( _L("Camera <> CCamCameraController .. Single shot mode kept, no action") );
-      }    
+      }
     }
   // -----------------------------------
-  // Not capturing 
-  //   
+  // Not capturing
+  //
   else
     {
     PRINT( _L("Camera <> CCamCameraController .. No capture ongoing..") );
 
     iInfo.iCaptureLimit = requestedLimit;
-    // Capture limit has changed, 
+    // Capture limit has changed,
     // check if drive mode also needs to be changed..
     if( targetMode != currentMode )
       {
@@ -3876,13 +3879,13 @@
     }
 
   // -------------------------------------------------------
-  // Notify user that the change is done  
+  // Notify user that the change is done
   // or wait for camera callbacks to finish.
   PRINT1( _L("Camera <> CCamCameraController .. Should wait callback = %d"), callback );
   if( !callback )
     {
     TInt setting( ECameraSettingCaptureLimit );
-    NotifyObservers( KErrNone, 
+    NotifyObservers( KErrNone,
                      ECamCameraEventSettingsSingle,
                      ECamCameraEventClassSettings,
                      &setting );
@@ -3899,7 +3902,7 @@
 // EndSequence
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::EndSequence( TInt aStatus )
   {
   PRINT1( _L("Camera => CCamCameraController::EndSequence, status:%d"), aStatus );
@@ -3922,14 +3925,14 @@
     ClearRequestQueue();
     iReserveTryAgainCount = KCamReserveTryAgainMaxCount;
 
-    
+
     // Need to first clear busy flag as observer might issue
     // new requests in notification callback.
     ClearFlags( iInfo.iBusy, ECamBusySequence );
 
     PRINT( _L("Camera <> send notification..") );
-    NotifyObservers( aStatus, 
-                     ECamCameraEventSequenceEnd, 
+    NotifyObservers( aStatus,
+                     ECamCameraEventSequenceEnd,
                      ECamCameraEventClassBasicControl );
     }
   // -------------------------------------------------------
@@ -3949,8 +3952,8 @@
     ClearSettingQueue();
 
     ClearFlags( iInfo.iBusy, ECamBusySetting );
-    
-    NotifyObservers( aStatus, 
+
+    NotifyObservers( aStatus,
                      ECamCameraEventSettingsDone,
                      ECamCameraEventClassSettings,
                      &last );
@@ -3973,7 +3976,7 @@
 void
 CCamCameraController::ClearRequestQueue()
   {
-  iSequenceArray.Reset(); 
+  iSequenceArray.Reset();
   iSequenceIndex = -1;
   }
 
@@ -3984,7 +3987,7 @@
 void
 CCamCameraController::ClearSettingQueue()
   {
-  iSettingArray.Reset(); 
+  iSettingArray.Reset();
   iSettingIndex = -1;
   }
 
@@ -4008,25 +4011,25 @@
   OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMCAMERACONTROLLER_HANDLEPOWERONEVENT, "e_CAM_APP_VF_INIT 1" );  //CCORAPP_APP_VF_INIT_START
   OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMCAMERACONTROLLER_HANDLEPOWERONEVENT, "e_CAM_APP_CONFIGURATIONS 1" );   //CCORAPP_APP_CONFIGS_START
   OstTrace0( CAMERAAPP_PERFORMANCE, DUP3_CCAMCAMERACONTROLLER_HANDLEPOWERONEVENT, "e_CAM_APP_STILL_INIT 1" );   //CCORAPP_APP_STILL_INIT_START
-  
+
   CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
-  
+
   if ( appUi->AppController().UiConfigManagerPtr()->IsFaceTrackingSupported() )
       {
       PRINT( _L("Camera <> CCamAppController: Get i/f MCameraFaceTracking..") )
-      iCustomInterfaceFaceTracking = 
-          static_cast <MCameraFaceTracking*>( 
+      iCustomInterfaceFaceTracking =
+          static_cast <MCameraFaceTracking*>(
             iCamera->CustomInterface( KCameraFaceTrackingUid ) );
       PRINT1( _L("Camera <> Face Tracking custom i/f pointer:%d"), iCustomInterfaceFaceTracking );
       }
-  
+
   if( KErrNone == aStatus )
     {
     SetFlags( iInfo.iState, ECamPowerOn|ECamReserved );
-    
+
     TRAP_IGNORE( SetFaceTrackingL() );
 #if defined( CAMERAAPP_CAE_FOR_VIDEO ) && !defined( CAMERAAPP_CAE_FIX )
-    // We need to tell to CCaeEngine that the CCamera has been reserved 
+    // We need to tell to CCaeEngine that the CCamera has been reserved
     // and powered on "behind its back".
     if( iCaeEngine )
       {
@@ -4068,31 +4071,31 @@
     {
     PRINT( _L("Camera <> no mode change ongoing") );
     HandleCallbackEvent( aStatus,
-                         ECamCameraEventPowerOn, 
+                         ECamCameraEventPowerOn,
                          ECamCameraEventClassBasicControl );
     }
 #else
 
   HandleCallbackEvent( aStatus,
-                       ECamCameraEventPowerOn, 
+                       ECamCameraEventPowerOn,
                        ECamCameraEventClassBasicControl );
 
 #endif // CAMERAAPP_CAE_FIX
-  
+
   if ( appUi->AppController().UiConfigManagerPtr()->IsOrientationSensorSupported() )
       {
       PRINT( _L("Camera <> CCamCameraController: Get i/f MCameraOrientation..") )
-      
+
       if(!iCustomInterfaceOrientation )
           {
-          iCustomInterfaceOrientation = 
-          static_cast <MCameraOrientation*>( 
+          iCustomInterfaceOrientation =
+          static_cast <MCameraOrientation*>(
           iCamera->CustomInterface( KCameraOrientationUid ) );
           }
-        
-      PRINT1( _L("Camera <> Orientation custom i/f pointer:%d"), iCustomInterfaceOrientation );      
-      }  
-  
+
+      PRINT1( _L("Camera <> Orientation custom i/f pointer:%d"), iCustomInterfaceOrientation );
+      }
+
   PRINT( _L("Camera <= CCamCameraController::HandlePowerOnEvent") );
   }
 
@@ -4143,12 +4146,12 @@
     {
     PRINT( _L("Camera <> no mode change ongoing") );
     HandleCallbackEvent( aStatus,
-                         ECamCameraEventReserveGain, 
+                         ECamCameraEventReserveGain,
                          ECamCameraEventClassBasicControl );
     }
 #else
   HandleCallbackEvent( aStatus,
-                       ECamCameraEventReserveGain, 
+                       ECamCameraEventReserveGain,
                        ECamCameraEventClassBasicControl );
 #endif // CAMERAAPP_CAE_FIX
   PRINT( _L("Camera <= CCamCameraController::HandleReserveGainEvent") );
@@ -4167,7 +4170,7 @@
   iInfo.iState   = ECamIdle;
   iInfo.iVfState = ECamTriIdle;
   iInfo.iSsState = ECamTriIdle;
-  
+
 #pragma message("CCamCameraController: Reserve lost event does not stop sequence")
 
   // These are not valid anymore.
@@ -4189,25 +4192,25 @@
 #endif // CAMERAAPP_CAPI_V2
     {
     PRINT( _L("Camera <> no mode change ongoing") );
-    NotifyObservers( aStatus, 
+    NotifyObservers( aStatus,
                      ECamCameraEventReserveLose,
                      ECamCameraEventClassBasicControl );
     }
 
 #else // CAMERAAPP_CAE_FIX
 /*
-  // We need to tell to CCaeEngine that the CCamera 
+  // We need to tell to CCaeEngine that the CCamera
   // has been released "behind its back".
   if( iCaeEngine )
     {
     iCaeEngine->DisableVideoRecording();
     }
-*/    
+*/
 #endif // CAMERAAPP_CAE_FIX
   // -------------------------------------------------------
 #else
 
-  NotifyObservers( aStatus, 
+  NotifyObservers( aStatus,
                    ECamCameraEventReserveLose,
                    ECamCameraEventClassBasicControl );
   // -------------------------------------------------------
@@ -4226,16 +4229,16 @@
        iIveRecoveryCount &&                   // Give up eventually
        !appUi->AppInBackground( EFalse ) &&   // Only if on the foreground
        ( !iReleasedByUi ||             // Try recover if unknown reason
-         appUi->StandbyStatus() ) &&    // or known error 
+         appUi->StandbyStatus() ) &&    // or known error
          !iAppController.InVideocallOrRinging() && // Video telephony parallel use case
          !iIveRecoveryOngoing        //  processing recovery sequence
          )
     {
     PRINT( _L("Camera <> CCamCameraController::HandleReserveLostEvent - Start recovery") );
-    NotifyObservers( aStatus, 
+    NotifyObservers( aStatus,
                      ECamCameraEventReserveLose,
                      ECamCameraEventClassBasicControl );
-    iIdle->Start( TCallBack( IdleCallback, this ) );  
+    iIdle->Start( TCallBack( IdleCallback, this ) );
     }
   PRINT( _L("Camera <= CCamCameraController::HandleReserveLostEvent") );
   }
@@ -4245,7 +4248,7 @@
 // ---------------------------------------------------------------------------
 //
 void
-CCamCameraController::HandleViewfinderEvent( MCameraBuffer* aCameraBuffer, 
+CCamCameraController::HandleViewfinderEvent( MCameraBuffer* aCameraBuffer,
                                              TInt           aStatus )
   {
   PRINT_FRQ1( _L("Camera => CCamCameraController::HandleViewfinderEvent, status in:%d"), aStatus );
@@ -4265,10 +4268,10 @@
       });
     PRINT_FRQ1( _L("Camera <> ..status after getting bitmap data: %d"), aStatus );
     }
-     
-  NotifyObservers( aStatus, 
-                   ECamCameraEventVfFrameReady, 
-                   ECamCameraEventClassVfData, 
+
+  NotifyObservers( aStatus,
+                   ECamCameraEventVfFrameReady,
+                   ECamCameraEventClassVfData,
                    vfFrame );
 
   ReleaseAndNull( aCameraBuffer );
@@ -4282,7 +4285,7 @@
 // ---------------------------------------------------------------------------
 //
 void
-CCamCameraController::HandleImageCaptureEvent( MCameraBuffer* aCameraBuffer, 
+CCamCameraController::HandleImageCaptureEvent( MCameraBuffer* aCameraBuffer,
                                                TInt           aStatus )
   {
   PRINT1( _L("Camera => CCamCameraController::HandleImageCaptureEvent, status in: %d"), aStatus );
@@ -4292,8 +4295,8 @@
   if( ECamCaptureOn == iInfo.iCaptureState )
     {
     // Store flags
-    TUint busyFlags( iInfo.iBusy ); 
-      
+    TUint busyFlags( iInfo.iBusy );
+
     // -----------------------------------------------------
     // Try to get the image data.
     if( KErrNone == aStatus )
@@ -4301,8 +4304,8 @@
       // Takes ownership of aCameraBuffer and NULLs the pointer.
       TRAP( aStatus, HandleImageCaptureEventL( aCameraBuffer ) );
       PRINT1( _L("Camera <> status after handling data: %d"), aStatus );
-      }    
-    
+      }
+
     // Release if not NULLed in HandleImageCaptureEventL.
     ReleaseAndNull( aCameraBuffer );
 
@@ -4318,8 +4321,8 @@
       // See HandleCallbackEvent for comments.
       // ClearFlags( iInfo.iBusy, ECamBusySingle );
 
-      NotifyObservers( aStatus, 
-                       ECamCameraEventImageData, 
+      NotifyObservers( aStatus,
+                       ECamCameraEventImageData,
                        ECamCameraEventClassImage );
       }
     // -----------------------------------------------------
@@ -4332,8 +4335,8 @@
       ClearFlags( iInfo.iBusy, ECamBusySingle );
 
       TInt fullCaptures( Min( iInfo.iCaptureCount, iInfo.iSnapshotCount ) );
-      NotifyObservers( aStatus, 
-                       ECamCameraEventImageStop, 
+      NotifyObservers( aStatus,
+                       ECamCameraEventImageStop,
                        ECamCameraEventClassImage,
                        &fullCaptures );
 
@@ -4349,7 +4352,7 @@
     {
     PRINT( _L("Camera <> CCamCameraController ... [WARNING] Unexpected image data event!") );
     iInfo.PrintInfo();
-    
+
     // Stop capture to be safe.
     PRINT( _L("Camera <> CCamCameraController ... Calling CancelCaptureImage..") );
     iCamera->CancelCaptureImage();
@@ -4384,10 +4387,10 @@
   CleanupStack::PushL( TCleanupItem( CamBufferShareCleanup, share ) );
 
   PRINT( _L("Camera <> CCamCameraController .. Checking encoded data availability..") );
-  TRAPD( dataStatus, 
+  TRAPD( dataStatus,
     {
     TDesC8* data = share->SharedBuffer()->DataL( 0 );
-    if( !data ) 
+    if( !data )
       User::Leave( KErrNotFound );
     });
 
@@ -4402,7 +4405,7 @@
     PRINT1( _L("Camera <> CCamCameraController ... Incremented capture counter to: %d"), iInfo.iCaptureCount );
 
     // If we have needed amount of snapshots and images, end capture.
-    if( iInfo.iCaptureCount  >= iInfo.iCaptureLimit 
+    if( iInfo.iCaptureCount  >= iInfo.iCaptureLimit
      && ( (iInfo.iSnapshotCount >= iInfo.iCaptureLimit) || iInfo.iSsState != ECamTriActive ) )
       {
       PRINT( _L("Camera <> CCamCameraController ... Capture limit met, calling CancelCaptureImage..") );
@@ -4415,7 +4418,7 @@
     // If we are in burst mode and need to increase capture limit,
     // do it now. If we have just decreased the capture limit,
     // we just cancel once the limit is met.
-    else if( iAdvancedSettings 
+    else if( iAdvancedSettings
           && iAdvancedSettings->DriveMode() == CAS::EDriveModeBurst )
       {
       const TInt cameraLimit( iAdvancedSettings->BurstImages() );
@@ -4441,9 +4444,9 @@
     // See HandleCallbackEvent for comments.
     // ClearFlags( iInfo.iBusy, ECamBusySingle );
 
-    NotifyObservers( KErrNone, 
+    NotifyObservers( KErrNone,
                      ECamCameraEventImageData,
-                     ECamCameraEventClassImage, 
+                     ECamCameraEventClassImage,
                      share );
     }
   // -------------------------------------------------------
@@ -4486,11 +4489,11 @@
   // CCameraSnapshot sends atleast event with KErrCancel status
   // when releasing the camera.
   TBool videoSsExpected( IsFlagOn( iInfo.iState, ECamVideoOn ) );
-  TBool imageSsExpected( IsFlagOn( iInfo.iState, ECamImageOn ) 
+  TBool imageSsExpected( IsFlagOn( iInfo.iState, ECamImageOn )
                       && ECamCaptureOn        == iInfo.iCaptureState
                       && iInfo.iSnapshotCount <  iInfo.iCaptureLimit );
 
-  if( 
+  if(
 #ifdef CAMERAAPP_CAE_FIX
       ECamModeChangeInactive == iModeChange &&
 #endif
@@ -4506,14 +4509,14 @@
       TRAP( aStatus, HandleSnapshotEventL() );
       PRINT1( _L("Camera <> CCamCameraController ... status after handling snapshot data: %d"), aStatus );
       }
-  
+
     // -----------------------------------------------------
     // If snapshot was received and notified ok,
     // check if capture ended.
     if( KErrNone == aStatus )
       {
       // If we have needed amount of snapshots and images, end capture.
-      if( iInfo.iCaptureCount  >= iInfo.iCaptureLimit 
+      if( iInfo.iCaptureCount  >= iInfo.iCaptureLimit
        && iInfo.iSnapshotCount >= iInfo.iCaptureLimit )
         {
         PRINT( _L("Camera <> CCamCameraController ... Setting capture state to OFF..") );
@@ -4525,8 +4528,8 @@
     else
       {
       PRINT( _L("Camera <> CCamCameraController ... error encountered, notify and set capture state off..") );
-      NotifyObservers( aStatus, 
-                       ECamCameraEventSsReady, 
+      NotifyObservers( aStatus,
+                       ECamCameraEventSsReady,
                        ECamCameraEventClassSsData );
       iInfo.iCaptureState = ECamCaptureOff;
       }
@@ -4541,8 +4544,8 @@
       ClearFlags( iInfo.iBusy, ECamBusySingle );
 
       TInt fullCaptures( Min( iInfo.iCaptureCount, iInfo.iSnapshotCount ) );
-      NotifyObservers( aStatus, 
-                       ECamCameraEventImageStop, 
+      NotifyObservers( aStatus,
+                       ECamCameraEventImageStop,
                        ECamCameraEventClassImage,
                        &fullCaptures );
       }
@@ -4557,11 +4560,11 @@
       {
       // For burst stopping:
       //   We have more snapshots already than requested..
-      //   All needed captures have to have started, 
+      //   All needed captures have to have started,
       //   so we can call cancel here.
-      // Note: 
+      // Note:
       //   Cannot use ">=" as last image might not be provided then.
-      //   
+      //
       PRINT( _L("Camera <> CCamCameraController ... Snapshot limit passed, calling CancelCaptureImage..") );
       iCamera->CancelCaptureImage();
       }
@@ -4580,7 +4583,7 @@
 // Helper method for leaving part of HandleSnapshotEvent.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::HandleSnapshotEventL( TBool aIgnore )
   {
    PRINT1( _L("Camera => CCamCameraController::HandleSnapshotEventL ignore %d"),aIgnore);
@@ -4595,11 +4598,11 @@
   CleanupStack::PopAndDestroy(); // temp.Close()
 
   if( !aIgnore )
-      { 
+      {
 
       CleanupStack::PushL( TCleanupItem( CameraBufferCleanup, buffer ) );
       CFbsBitmap& snapshot = buffer->BitmapL( firstImageIndex );
-      PRINT2( _L("Camera <> CCamCameraController ... snapshot size: (%dx%d)"), 
+      PRINT2( _L("Camera <> CCamCameraController ... snapshot size: (%dx%d)"),
               snapshot.SizeInPixels().iWidth, snapshot.SizeInPixels().iHeight );
 
       // Increase received snapshots count.
@@ -4616,7 +4619,7 @@
 
       CleanupStack::PopAndDestroy(); // buffer->Release()
       }
-  else 
+  else
       {
       ReleaseAndNull(buffer);
       }
@@ -4630,14 +4633,14 @@
 // HandleVideoInitEvent
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::HandleVideoEvent( const TCamCameraEventId& aEventId,
                                               TInt               aStatus   )
   {
-  PRINT2( _L("Camera => CCamCameraController::HandleVideoEvent, status:%d, event[%s]"), 
-          aStatus, 
+  PRINT2( _L("Camera => CCamCameraController::HandleVideoEvent, status:%d, event[%s]"),
+          aStatus,
           KCamCameraEventNames[aEventId] );
-  
+
   // Only video stop of these events may come without our explicit request.
 /*
   if( ECamCameraEventVideoStop != aEventId )
@@ -4659,7 +4662,7 @@
         else                      ClearFlags( iInfo.iState, ECamVideoOn );
         }
 #ifdef CAMERAAPP_CAPI_V2_ADV
-        TRAP_IGNORE( GetAdvancedSettingsInfoL() );  
+        TRAP_IGNORE( GetAdvancedSettingsInfoL() );
 #endif
 #ifdef CAMERAAPP_CAE_FIX
       if( ECamModeChangeImage2Video == iModeChange )
@@ -4672,14 +4675,14 @@
       break;
     // -----------------------------------------------------
     case ECamCameraEventVideoStart:
-      if( KErrNone == aStatus ) 
+      if( KErrNone == aStatus )
         {
         iInfo.iCaptureState = ECamCaptureOn;
         }
       break;
     // -----------------------------------------------------
     case ECamCameraEventVideoPause:
-      if( KErrNone == aStatus ) 
+      if( KErrNone == aStatus )
         {
         iInfo.iCaptureState = ECamCapturePaused;
         }
@@ -4696,11 +4699,11 @@
       iInfo.iCaptureState = ECamCaptureOff;
       // We may receive this event from CCaeEngine, even though we have not
       // issued a request to stop the video recording. If e.g. there is not
-      // enough space in the disk to continue recording, this event is 
+      // enough space in the disk to continue recording, this event is
       // generated without explicit request.
       //
-      // We must not continue any pending operations if this event is not 
-      // a response to our stop request. 
+      // We must not continue any pending operations if this event is not
+      // a response to our stop request.
       // HandleCallbackEvent takes care of that.
       break;
     // -----------------------------------------------------
@@ -4717,8 +4720,8 @@
     // -----------------------------------------------------
     }
 
-  HandleCallbackEvent( aStatus, 
-                       aEventId, 
+  HandleCallbackEvent( aStatus,
+                       aEventId,
                        ECamCameraEventClassVideo );
   PRINT( _L("Camera <= CCamCameraController::HandleVideoEvent") );
   }
@@ -4729,10 +4732,10 @@
 // HandleVideoTimeEvent
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController
-::HandleVideoTimeEvent( TInt aStatus, 
-                        TTimeIntervalMicroSeconds aTimeElapsed, 
+::HandleVideoTimeEvent( TInt aStatus,
+                        TTimeIntervalMicroSeconds aTimeElapsed,
                         TTimeIntervalMicroSeconds aTimeRemaining )
   {
   // If capture has already stopped, we don't echo this to our observers.
@@ -4740,9 +4743,9 @@
     {
     iVideoTimes.iTimeElapsed   = aTimeElapsed.Int64();
     iVideoTimes.iTimeRemaining = aTimeRemaining.Int64();
-    
-    NotifyObservers( aStatus, 
-                     ECamCameraEventVideoTimes, 
+
+    NotifyObservers( aStatus,
+                     ECamCameraEventVideoTimes,
                      ECamCameraEventClassVideoTimes,
                      &iVideoTimes );
     }
@@ -4754,14 +4757,14 @@
 //
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::HandleAutoFocusEvent( TInt aStatus, const TUid& aEventUid )
   {
-  PRINT1( _L("Camera => CCamCameraController::HandleAutoFocusEvent, status: %d"), aStatus ); 
+  PRINT1( _L("Camera => CCamCameraController::HandleAutoFocusEvent, status: %d"), aStatus );
   TBool proceed = EFalse;
 
   // -------------------------------------------------------
-  // Check the event 
+  // Check the event
   if( KUidECamEventCameraSettingsOptimalFocus == aEventUid )
     {
     PRINT( _L("Camera <> CCamCameraController: event KUidECamEventCameraSettingsOptimalFocus") );
@@ -4774,24 +4777,24 @@
     }
   else if( KUidECamEventCameraSettingAutoFocusType2 == aEventUid )
     {
-    PRINT( _L("Camera <> CCamCameraController: event KUidECamEventCameraSettingsAutoFocusType2") );      
+    PRINT( _L("Camera <> CCamCameraController: event KUidECamEventCameraSettingsAutoFocusType2") );
     // If AF started and canceled before finishing
     if( iAfInProgress && iAfHyperfocalPending && iFirstAfEventReceived )
       {
-      // continue to set focus to hyperfocal    
-      proceed = ETrue;    
-      }
-    if( !iFirstAfEventReceived )  
+      // continue to set focus to hyperfocal
+      proceed = ETrue;
+      }
+    if( !iFirstAfEventReceived )
       {
       // For the first time, this event means that the autofocusing has been started
-      iFirstAfEventReceived = ETrue;  
+      iFirstAfEventReceived = ETrue;
       PRINT( _L("Camera <> CCamCameraController: event KUidECamEventCameraSettingAutoFocusType2 - first time, set iFirstAfEventReceived ") );
       }
     else
       {
-      iFirstAfEventReceived = EFalse;      
-      PRINT( _L("Camera <> CCamCameraController: event KUidECamEventCameraSettingAutoFocusType2 - second time") );    
-      }        
+      iFirstAfEventReceived = EFalse;
+      PRINT( _L("Camera <> CCamCameraController: event KUidECamEventCameraSettingAutoFocusType2 - second time") );
+      }
     }
   else
     {
@@ -4806,20 +4809,20 @@
                              ? ECamCameraEventAutofocusSuccessful
                              : ECamCameraEventAutofocusFailed;
     if( iAfHyperfocalPending )
-      {                         
+      {
       PRINT( _L("Camera <> Cancelled active autofocus request.") );
-      PRINT( _L("Camera <> Setting focus range to hyperfocal, no event to observers yet") );       
-      iAfHyperfocalPending = EFalse; 
+      PRINT( _L("Camera <> Setting focus range to hyperfocal, no event to observers yet") );
+      iAfHyperfocalPending = EFalse;
       iAfInProgress = EFalse;
       TRAP_IGNORE( ProcessAutofocusRequestL( ECamRequestCancelAutofocus ) );
-      }       
-    else 
+      }
+    else
       {
       HandleCallbackEvent( KErrNone,
-                           event, 
+                           event,
                            ECamCameraEventClassAutofocus );
-      }                  
-               
+      }
+
     }
   else if(iFirstAfEventReceived && (aStatus != KErrNone) )
     {
@@ -4827,23 +4830,23 @@
     //and no further autofocus events would occur.
     iFirstAfEventReceived = EFalse;
     iAfInProgress = EFalse;
-    
+
     if( iAfHyperfocalPending )
-      {                         
+      {
       PRINT( _L("Camera <> Cancelled active autofocus request.") );
-      PRINT( _L("Camera <> Set focus range to hyperfocal, no event to observers yet") );       
-      iAfHyperfocalPending = EFalse; 
+      PRINT( _L("Camera <> Set focus range to hyperfocal, no event to observers yet") );
+      iAfHyperfocalPending = EFalse;
       TRAP_IGNORE( ProcessAutofocusRequestL( ECamRequestCancelAutofocus ) );
-      }       
+      }
     else
       {
       HandleCallbackEvent( KErrNone,
-                           ECamCameraEventAutofocusFailed, 
-                           ECamCameraEventClassAutofocus );           
-      }                                      
+                           ECamCameraEventAutofocusFailed,
+                           ECamCameraEventClassAutofocus );
+      }
     }
   // -------------------------------------------------------
-  PRINT( _L("Camera <= CCamCameraController::HandleAutoFocusEvent") ); 
+  PRINT( _L("Camera <= CCamCameraController::HandleAutoFocusEvent") );
   }
 
 
@@ -4853,17 +4856,17 @@
 // HandleFlashStatusEvent
 //
 // Helper method to handle flash status updates.
-// 
+//
 // ---------------------------------------------------------------------------
 void
 CCamCameraController::HandleFlashStatusEvent( TInt                     aStatus,
                                               const TCamCameraEventId& aEventId )
   {
-  PRINT2( _L("Camera => CCamCameraController::HandleFlashStatusEvent, event[%s] status:%d"), KCamCameraEventNames[aEventId], aStatus ); 
-  NotifyObservers( aStatus, 
+  PRINT2( _L("Camera => CCamCameraController::HandleFlashStatusEvent, event[%s] status:%d"), KCamCameraEventNames[aEventId], aStatus );
+  NotifyObservers( aStatus,
                    aEventId,
                    EventClass( aEventId ) );
-  PRINT ( _L("Camera <= CCamCameraController::HandleFlashStatusEvent" ) ); 
+  PRINT ( _L("Camera <= CCamCameraController::HandleFlashStatusEvent" ) );
   }
 
 
@@ -4877,12 +4880,12 @@
 //
 void
 CCamCameraController
-::HandleCallbackEvent(       TInt                    aStatus, 
-                       const TCamCameraEventId&      aEventId, 
+::HandleCallbackEvent(       TInt                    aStatus,
+                       const TCamCameraEventId&      aEventId,
                        const TCamCameraEventClassId& aEventClass,
                              TAny*                   aEventData /*= NULL*/ )
   {
-  PRINT1( _L("Camera => CCamCameraController::HandleCallbackEvent, event[%s]"), 
+  PRINT1( _L("Camera => CCamCameraController::HandleCallbackEvent, event[%s]"),
           KCamCameraEventNames[aEventId] );
   // -------------------------------------------------------
   // Clear single request busy flag before notification to observers,
@@ -4891,7 +4894,7 @@
   ClearFlags( iInfo.iBusy, ECamBusySingle );
 
   // Observers might issue a new sequence during notification.
-  // We need to decide if sequence needs to continue here 
+  // We need to decide if sequence needs to continue here
   // based on the status *before* notification.
   TBool proceedSequence = EFalse;
   TBool notify          = ETrue;
@@ -4903,44 +4906,44 @@
   //    There are events like "video stopped" or "reserve lost"
   //    that may be received without our associated request.
   //    In that case we must not proceed sequence processing now.
-  // 3) In case that aStatus is KErrInUse and the current event is 
-  //    Reserve, it means reserve failed for some reason 
+  // 3) In case that aStatus is KErrInUse and the current event is
+  //    Reserve, it means reserve failed for some reason
   if( IsFlagOn( iInfo.iBusy, ECamBusySequence ) ) // 1
     {
     PRINT( _L("Camera <> Sequence is active") );
     PRINT2( _L("Camera <> seq index: %d, seq array len: %d"), iSequenceIndex, iSequenceArray.Count() );
     if( KErrNone != aStatus )
         {
-      
+
         if ( KErrInUse == aStatus               // 3
-            && aEventId == ECamCameraEventReserveGain 
+            && aEventId == ECamCameraEventReserveGain
             && iSequenceIndex >= 0
-            && Request2Event( iSequenceArray[iSequenceIndex] ) == ECamCameraEventReserveGain 
+            && Request2Event( iSequenceArray[iSequenceIndex] ) == ECamCameraEventReserveGain
             && iReserveTryAgainCount > 0 )
             {
             // Handle here only if reserve gain with error is part of a sequence and try again count is not zero
-            
+
             iReserveTryAgainCount--;
             User::After( KCamReserveTryAgainWaitInterval );
-            
+
             // decrease index, to get the same request handled again
             iSequenceIndex--;
             notify          = EFalse;
             proceedSequence = ETrue;
             PRINT1( _L( "Camera <> CCamCameraController::HandleCallbackEvent - %d reserve try again left" ), iReserveTryAgainCount );
-            
-            } 
-        else 
+
+            }
+        else
             {
 
             notify          = EFalse;
             proceedSequence = EFalse;
-            EndSequence( aStatus );      
+            EndSequence( aStatus );
 
             }
-   
+
         }
-    else if( iSequenceIndex >= 0 &&  // Sequence has started 
+    else if( iSequenceIndex >= 0 &&  // Sequence has started
              Request2Event( iSequenceArray[iSequenceIndex] ) == aEventId ) // 2
         {
         notify          = ETrue;
@@ -4950,11 +4953,11 @@
         {
          // Not the event we need yet.
         }
-        
+
     }
   // -------------------------------------------------------
   // Setting sequence ongoing
-  else if( IsFlagOn( iInfo.iBusy, ECamBusySetting ) 
+  else if( IsFlagOn( iInfo.iBusy, ECamBusySetting )
            && iSettingIndex >= 0 )
     {
     PRINT( _L("Camera <> Settings change ongoing..") );
@@ -4970,12 +4973,12 @@
       proceedSequence = EFalse;
       EndSequence( aStatus ); // does one notification
       }
-    else if( ECamCameraEventSettingsSingle == aEventId 
-          && aEventData 
+    else if( ECamCameraEventSettingsSingle == aEventId
+          && aEventData
           && iSettingArray[iSettingIndex] == *( static_cast<TInt*>( aEventData ) )
            )
       {
-      // We have checked already in HandleEvent that this is 
+      // We have checked already in HandleEvent that this is
       // the right event for the setting we wait to finish.
       // Notification can be sent with the given data.
       PRINT( _L("Camera <> One setting finished, continue sequence") );
@@ -4984,8 +4987,8 @@
     // Video init event repeated when filename or max file size set
     // after init already done
     else if( IsFlagOn( iInfo.iState, ECamVideoOn )
-          && ECamCameraEventVideoInit == aEventId 
-          && ( ECameraSettingFileName    == iSettingArray[iSettingIndex] 
+          && ECamCameraEventVideoInit == aEventId
+          && ( ECameraSettingFileName    == iSettingArray[iSettingIndex]
             || ECameraSettingFileMaxSize == iSettingArray[iSettingIndex]
             || ECameraSettingAudioMute   == iSettingArray[iSettingIndex] ) )
       {
@@ -5015,7 +5018,7 @@
   // Notify the observers with data from the event.
   if( notify )
     {
-    NotifyObservers( aStatus, aEventId, aEventClass, aEventData ); 
+    NotifyObservers( aStatus, aEventId, aEventClass, aEventData );
     }
 
   // -------------------------------------------------------
@@ -5037,9 +5040,9 @@
 // Notify all our observers of an event.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController
-::NotifyObservers( TInt                   aStatus, 
+::NotifyObservers( TInt                   aStatus,
                    TCamCameraEventId      aEventId,
                    TCamCameraEventClassId aEventClass,
                    TAny*                  aEventData /*=NULL*/ )
@@ -5048,7 +5051,7 @@
 //  PRINT3( _L("Camera <> status:% 3d event:% 3d class:%032b"), aStatus, aEventId, aEventClass );
 
   // NOTE:
-  //   We might skip an observer, if during the notification some observer 
+  //   We might skip an observer, if during the notification some observer
   //   is removed from the array (from smaller index than current one).
   //   This is a commmon problem for all observable classes in this application.
   for( TInt i = 0; i < iObservers.Count(); i++ )
@@ -5073,7 +5076,7 @@
 void
 CCamCameraController::ReleaseCurrentCamera()
   {
-  PRINT( _L("Camera => CCamCameraController::ReleaseCurrentCamera") );  
+  PRINT( _L("Camera => CCamCameraController::ReleaseCurrentCamera") );
   // Cancel any outstanding sequence.
   if( IsFlagOn( iInfo.iBusy, ECamBusySequence )
 #ifdef CAMERAAPP_CAE_FIX
@@ -5088,7 +5091,7 @@
 
   if( IsFlagOn( iInfo.iState, ECamReserved ) )
     {
-    // Releases viewfinder and snapshot, cancels capture, 
+    // Releases viewfinder and snapshot, cancels capture,
     // powers off and releases CCamera if needed.
     ProcessControlShutdownRequest( ECamRequestRelease );
     }
@@ -5132,7 +5135,7 @@
   iResolutionSupport.Reset();
   iInfo.iState = ECamIdle;
 
-  PRINT( _L("Camera <= CCamCameraController::ReleaseCurrentCamera") );  
+  PRINT( _L("Camera <= CCamCameraController::ReleaseCurrentCamera") );
   }
 
 
@@ -5161,7 +5164,7 @@
 // GetResolutionIndexL
 //
 // Get quality index for prepare with given format and size.
-// If current info is not for the given format, update the 
+// If current info is not for the given format, update the
 // supported resolutions info. After the support info is up to date,
 // find the index. Return KErrNotFound if not supported size.
 //
@@ -5189,13 +5192,13 @@
     iResolutionSupport.Reset();
 
     // Get the resolution info for current camera with given format.
-    const TInt KResolutionCount( iCameraInfo.iNumImageSizesSupported );  
+    const TInt KResolutionCount( iCameraInfo.iNumImageSizesSupported );
     RArray<TSize>& resolutions( iResolutionSupport.iResolutions );
 
     resolutions.ReserveL( KResolutionCount );
     for( TInt i = 0; i < KResolutionCount; i++ )
       {
-      // Reserve called, so should not leave.      
+      // Reserve called, so should not leave.
       resolutions.AppendL( TSize() );
       iCamera->EnumerateCaptureSizes( resolutions[i], i, aFormat );
       }
@@ -5219,7 +5222,7 @@
   for( TInt i = 0; i < iResolutionSupport.iResolutions.Count(); i++ )
     {
     const TSize& size( iResolutionSupport.iResolutions[i] );
-    PRINT3( _L("Camera <> Size (%d): (%d,%d)"), i, size.iWidth, size.iHeight ); 
+    PRINT3( _L("Camera <> Size (%d): (%d,%d)"), i, size.iWidth, size.iHeight );
     }
   PRINT ( _L("Camera <> ==================================================") );
 #endif
@@ -5231,9 +5234,9 @@
   //   If JPEG format is not supported, but bitmap format is,
   //   pretend to support the format anyway.
   //   When capturing, we encode the JPEG from the bitmap.
-  if( CCamera::EFormatJpeg == aFormat 
+  if( CCamera::EFormatJpeg == aFormat
    && KErrNotFound         == index )
-    {    
+    {
     PRINT ( _L("Camera <> Jpeg not supported, trying bitmap format 1..") );
     aFormat = KCamJpegAlternativeFormat1;
     index   = GetResolutionIndexL( aFormat, aSize );
@@ -5272,8 +5275,8 @@
 CCamCameraController::GetAdvancedSettingsInfoL()
   {
   PRINT ( _L("Camera => CCamCameraController::GetAdvancedSettingsInfoL") );
-  PRINT2( _L("Camera <> current camera:%d, latest info for:%d"), 
-          iInfo.iCurrentCamera, 
+  PRINT2( _L("Camera <> current camera:%d, latest info for:%d"),
+          iInfo.iCurrentCamera,
           iAdvancedSettingInfo.iForCameraIndex );
 
 
@@ -5298,20 +5301,20 @@
       TBool isInfluencePossible; // Not used
 
       PRINT( _L("Camera <> Get zoom steps for image") );
-      TRAP( error, iAdvancedSettings->GetDigitalZoomStepsForStillL ( 
-                      iAdvancedSettingInfo.iDigitalZoomSupport, 
-                      iAdvancedSettingInfo.iDigitalZoomValueInfo, 
-                      index, 
-                      format, 
+      TRAP( error, iAdvancedSettings->GetDigitalZoomStepsForStillL (
+                      iAdvancedSettingInfo.iDigitalZoomSupport,
+                      iAdvancedSettingInfo.iDigitalZoomValueInfo,
+                      index,
+                      format,
                       isInfluencePossible  ) );
-      
+
       if( KErrNotSupported != error ) User::LeaveIfError( error );
       }
-    else if( IsFlagOn( iInfo.iState, ECamVideoOn ) ) 
+    else if( IsFlagOn( iInfo.iState, ECamVideoOn ) )
       {
       PRINT( _L("Camera <> Get zoom steps for video") );
-      TRAP( error, iAdvancedSettings->GetDigitalZoomStepsL( 
-                      iAdvancedSettingInfo.iDigitalZoomSupport, 
+      TRAP( error, iAdvancedSettings->GetDigitalZoomStepsL(
+                      iAdvancedSettingInfo.iDigitalZoomSupport,
                       iAdvancedSettingInfo.iDigitalZoomValueInfo ) );
       if( KErrNotSupported != error ) User::LeaveIfError( error );
       }
@@ -5319,11 +5322,11 @@
     // -----------------------------------------------------
     // EV steps multiplied by KECamFineResolutionFactor.
     PRINT( _L("Camera <> Get EV support..") );
-    iAdvancedSettingInfo.iEvModesSupport = 
+    iAdvancedSettingInfo.iEvModesSupport =
         iAdvancedSettings->SupportedExposureModes();
 
-    TRAP( error, iAdvancedSettings->GetExposureCompensationStepsL( 
-                    iAdvancedSettingInfo.iEvStepsSupport, 
+    TRAP( error, iAdvancedSettings->GetExposureCompensationStepsL(
+                    iAdvancedSettingInfo.iEvStepsSupport,
                     iAdvancedSettingInfo.iEvStepsValueInfo ) );
     // Ignore error if just not supported.
     // We check the support when setting is requested.
@@ -5332,20 +5335,20 @@
     // -----------------------------------------------------
     // ISO rates (.. 50, 100, 200, ..)
     PRINT( _L("Camera <> Get ISO rates..") );
-    TRAP( error, iAdvancedSettings->GetSupportedIsoRatesL( 
+    TRAP( error, iAdvancedSettings->GetSupportedIsoRatesL(
                     iAdvancedSettingInfo.iIsoRatesSupport ) );
     if( KErrNotSupported != error ) User::LeaveIfError( error );
 
     // -----------------------------------------------------
     // Stabilization
     PRINT( _L("Camera <> Get Stabilization info..") );
-    iAdvancedSettingInfo.iStabilizationModeSupport = 
+    iAdvancedSettingInfo.iStabilizationModeSupport =
         iAdvancedSettings->SupportedStabilizationModes();
 
-    iAdvancedSettingInfo.iStabilizationEffectSupport = 
+    iAdvancedSettingInfo.iStabilizationEffectSupport =
         iAdvancedSettings->SupportedStabilizationEffects();
 
-    iAdvancedSettingInfo.iStabilizationComplexitySupport = 
+    iAdvancedSettingInfo.iStabilizationComplexitySupport =
         iAdvancedSettings->SupportedStabilizationComplexityValues();
     // -----------------------------------------------------
 
@@ -5354,28 +5357,28 @@
     if( KPrimaryCameraIndex == iInfo.iCurrentCamera )
       {
       PRINT( _L("Camera <> Get image processing info..") );
-   
+
       if( iImageProcessor != NULL )
         {
         // -----------------------------------------------------
         PRINT( _L("Camera <> Get sharpness support..") );
-        TRAP( error, iImageProcessor->GetTransformationSupportedValuesL( 
+        TRAP( error, iImageProcessor->GetTransformationSupportedValuesL(
                         KUidECamEventImageProcessingAdjustSharpness,
                         iAdvancedSettingInfo.iSharpnessSupport,
                         iAdvancedSettingInfo.iSharpnessValueInfo ) );
         if( KErrNotSupported != error ) User::LeaveIfError( error );
-    
+
         // -----------------------------------------------------
         PRINT( _L("Camera <> Get colour effect support..") );
-        TRAP( error, iImageProcessor->GetTransformationSupportedValuesL( 
+        TRAP( error, iImageProcessor->GetTransformationSupportedValuesL(
                           KUidECamEventImageProcessingEffect,
                           iAdvancedSettingInfo.iColourEffectSupport,
                           iAdvancedSettingInfo.iColourEffectValueInfo ) );
         if( KErrNotSupported != error ) User::LeaveIfError( error );
         }
-      else 
+      else
         {
-        PRINT( _L("Camera <> [WARNING] Image processing not supported") );          
+        PRINT( _L("Camera <> [WARNING] Image processing not supported") );
         }
       }
 #endif // CAMERAAPP_CAPI_V2_IP
@@ -5389,7 +5392,7 @@
 #ifdef _DEBUG
     iAdvancedSettingInfo.PrintInfo();
 #endif
-    
+
   PRINT ( _L("Camera <= CCamCameraController::GetAdvancedSettingsInfoL") );
   }
 
@@ -5400,7 +5403,7 @@
 //
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController::ResolveEvStep( TInt aEvProposedStep ) const
   {
   PRINT1( _L("Camera => CCamCameraController::ResolveEvStep( %d )"), aEvProposedStep );
@@ -5431,8 +5434,8 @@
 // ---------------------------------------------------------------------------
 //
 TBool
-CCamCameraController::IsSupportedValue( const TInt&         aValue, 
-                                        const RArray<TInt>& aValueList, 
+CCamCameraController::IsSupportedValue( const TInt&         aValue,
+                                        const RArray<TInt>& aValueList,
                                         const TValueInfo&   aValueInfo )
   {
   TBool support( EFalse );
@@ -5448,7 +5451,7 @@
       // that is always supported.
       // Array: [0] bitfield of supported bits
       support = ( 1 <= aValueList.Count()
-               && ( !aValue 
+               && ( !aValue
                  || (aValue & aValueList[0]) // 0 always supported
                   )
                 );
@@ -5485,7 +5488,7 @@
       // continuous range of values within those two is supported.
       // Array: [0] min supported value
       //        [1] max supported value
-      support = 
+      support =
         ( 2      <= aValueList.Count() // We need 2 items.
        && aValue >= aValueList[0]      // aValue >= min
        && aValue <= aValueList[1]      // aValue <= max
@@ -5518,10 +5521,10 @@
   PRINT ( _L("Camera => CCamCameraController::ResolveSnapshotFormatL") );
 
   CheckNonNullL( iSnapshotProvider, KErrNotReady );
-  
+
   const TUint32    support = iSnapshotProvider->SupportedFormats();
   CCamera::TFormat final   = aPreferredFormat;
-  
+
   // Return the preferred format if it is supported.
   // Otherwise return the "best" supported format.
   if      ( support & aPreferredFormat                   ) final = aPreferredFormat;
@@ -5535,7 +5538,7 @@
     PRINT( _L("Camera <> CCamCameraController: No acceptable format available, LEAVE!") );
     User::Leave( KErrNotSupported );
     }
-  
+
   PRINT1( _L("Camera <> Preferred format : %032b"), aPreferredFormat  );
   PRINT1( _L("Camera <> Supported formats: %032b"), support           );
   PRINT1( _L("Camera <> Selected  format : %032b"), final             );
@@ -5588,18 +5591,18 @@
     // -----------------------------------------------------
     // Autofocus
     case ECamRequestStartAutofocus:   return ECamCameraEventStartAutofocus;
-    case ECamRequestCancelAutofocus:  return ECamCameraEventCancelAutofocus; 
+    case ECamRequestCancelAutofocus:  return ECamCameraEventCancelAutofocus;
     case ECamRequestSetAfRange:       return ECamCameraEventSetAfRange;
     // -----------------------------------------------------
-    
-    // Unrecognised      
+
+    // Unrecognised
     default:
       {
       Panic( ECamCameraControllerUnknownRequest );
       return ECamCameraEventNone;
       }
     // -----------------------------------------------------
-    }        
+    }
   }
 
 
@@ -5627,7 +5630,7 @@
     case ECamCameraEventVfRelease:
       return ECamCameraEventClassVfControl;
     // -------------------------------------------------------
-    case ECamCameraEventVfFrameReady: 
+    case ECamCameraEventVfFrameReady:
       return ECamCameraEventClassVfData;
     // -------------------------------------------------------
     case ECamCameraEventSsStart:
@@ -5635,7 +5638,7 @@
     case ECamCameraEventSsRelease:
       return ECamCameraEventClassSsControl;
     // -------------------------------------------------------
-    case ECamCameraEventSsReady:      
+    case ECamCameraEventSsReady:
       return ECamCameraEventClassSsData;
     // -------------------------------------------------------
     case ECamCameraEventImageInit:
@@ -5653,7 +5656,7 @@
       return ECamCameraEventClassVideo;
     // -------------------------------------------------------
     case ECamCameraEventVideoTimes:
-      return ECamCameraEventClassVideoTimes;  
+      return ECamCameraEventClassVideoTimes;
     // -------------------------------------------------------
     case ECamCameraEventSettingsSingle:
     case ECamCameraEventSettingsDone:
@@ -5672,7 +5675,7 @@
     // -------------------------------------------------------
     default:
       {
-    #ifdef _DEBUG      
+    #ifdef _DEBUG
       Panic( ECamCameraControllerCorrupt );
     #endif
       return ECamCameraEventClassAll;
@@ -5719,7 +5722,7 @@
 // CurrentSettingHasCallback
 // ---------------------------------------------------------------------------
 //
-TBool 
+TBool
 CCamCameraController::CurrentSettingHasCallback()
   {
   TBool callback( EFalse );
@@ -5749,18 +5752,18 @@
 // NewCaeEngineL
 // ---------------------------------------------------------------------------
 //
-CCaeEngine* 
+CCaeEngine*
 CCamCameraController::NewCaeEngineL( TInt aCameraIndex )
   {
   PRINT( _L("Camera => CCamCameraController::NewCaeEngineL") );
-  
-#ifndef FORCE_DUMMY_ENGINE  
-  CCaeEngine* engine = CCaeEngine::NewL( aCameraIndex ); 
+
+#ifndef FORCE_DUMMY_ENGINE
+  CCaeEngine* engine = CCaeEngine::NewL( aCameraIndex );
 #else
   (void)aCameraIndex; // remove compiler warning
   CCaeEngine* engine = CCameraappDummyEngine::NewL();
 #endif
-  
+
   engine->SetCamAppEngineObserver( *this );
 
   PRINT( _L("Camera <= CCamCameraController::NewCaeEngineL") );
@@ -5772,7 +5775,7 @@
 // NewCameraL
 // ---------------------------------------------------------------------------
 //
-CAMERA* 
+CAMERA*
 CCamCameraController::NewCameraL( TInt aCameraIndex )
   {
   PRINT( _L("Camera => CCamCameraController::NewCameraL") );
@@ -5783,11 +5786,11 @@
 
   // Both v1 and v2 observer interface implemented
   // Need to cast to avoid ambiguous call.
-  MCameraObserver* self( this );  
+  MCameraObserver* self( this );
   PRINT1( _L("Camera <> Give observer pointer: %d"), self );
-  
+
   camera = CAMERA::NewL ( *self, aCameraIndex );
-  
+
 #endif // CAMERAAPP_CAPI_V2
 
   PRINT( _L("Camera <= CCamCameraController::NewCameraL") );
@@ -5798,7 +5801,7 @@
 // NewDuplicateCameraL
 // ---------------------------------------------------------------------------
 //
-CAMERA* 
+CAMERA*
 CCamCameraController::NewDuplicateCameraL( TInt aCameraHandle )
   {
   PRINT1( _L("Camera => CCamCameraController::NewDuplicateCameraL( %d )"), aCameraHandle );
@@ -5853,13 +5856,13 @@
 // ---------------------------------------------------------------------------
 //
 CCamCameraController
-::CCamCameraController( MCamSettingProvider& aSettingProvider, 
+::CCamCameraController( MCamSettingProvider& aSettingProvider,
                         CCamAppController& aAppController )
   : iSequenceArray       ( KCamSequenceGranularity     ),
     iReserveTryAgainCount( KCamReserveTryAgainMaxCount ),
     iSettingProvider     ( aSettingProvider            ),
-    iAppController       ( aAppController              )    
-  { 
+    iAppController       ( aAppController              )
+  {
   }
 
 
@@ -5875,11 +5878,11 @@
   {
   PRINT1( _L("Camera => CCamCameraController::ProceedModeSwitch, status in:%d"), iModeChangeStatus );
   TInt proceed( EFalse );
-  
+
   // Update only after here, so any events arriving
   // in the middle get ignored if wanted.
   ++iModeChangePhase;
-  
+
   if( KErrNone == iModeChangeStatus )
     {
     TRAP( iModeChangeStatus, proceed = DoProceedModeSwitchL() );
@@ -5968,22 +5971,22 @@
         TPtrC ptr;
         ptr.Set( KTempFilename() );
 #pragma message( "Camera Controller: video filename hardcoded" )
-        PRINT1( _L("Camera <> Set filename [%S]"), &ptr );        
+        PRINT1( _L("Camera <> Set filename [%S]"), &ptr );
         iCaeEngine->SetVideoRecordingFileNameL( ptr );
 //        CleanupStack::PopAndDestroy( filename );
 
 
         // Set max video clip size
-        ProcessSettingL( ECameraSettingFileMaxSize );        
+        ProcessSettingL( ECameraSettingFileMaxSize );
 
 
         TPckgBuf<TCamParamsVideoCae> params;
         iSettingProvider.ProvideCameraParamL( ECameraParamVideoCae, &params );
-        // The audioOn value is defined On==0 and Off==1, but the engine expects 
+        // The audioOn value is defined On==0 and Off==1, but the engine expects
         // ETrue if audio recording is On
         params().iAudioOn = ( ECamSettOn == params().iAudioOn )
         											? ETrue
-        											: EFalse;  
+        											: EFalse;
         PRINT( _L("Camera <> Call prepare..") );
         // McaeoVideoPrepareComplete will be called when prepare is ready.
         // The callback is allowed to come also *during* this call.
@@ -6009,8 +6012,8 @@
         iModeChangePhase = ECamModeChangePhaseIdle;
         callback         = EFalse;
 
-        NotifyObservers( iModeChangeStatus, 
-                         ECamCameraEventVideoInit, 
+        NotifyObservers( iModeChangeStatus,
+                         ECamCameraEventVideoInit,
                          ECamCameraEventClassVideo );
         break;
         }
@@ -6033,7 +6036,7 @@
       case ECamModeChangePhase0:
         {
         PRINT( _L("Camera <> Phase0: Release camera..") );
-        TInt cameraIndex = iInfo.iCurrentCamera; 
+        TInt cameraIndex = iInfo.iCurrentCamera;
         ReleaseCurrentCamera();
         SwitchCameraL( cameraIndex );
         CompleteSwitchCameraL();
@@ -6061,17 +6064,17 @@
         PRINT( _L("Camera <> Phase3: Prepare image..") );
         TPckgBuf<TCamParamsImage> params;
         iSettingProvider.ProvideCameraParamL( ECameraParamImage, &params );
-  
+
         // Query the supported resolutions for the selected format.
         TInt index = GetResolutionIndexL( params().iFormat, params().iSize );
         User::LeaveIfError( index );
 
-        PRINT2( _L("Camera <> Image size: (%d, %d)"), 
+        PRINT2( _L("Camera <> Image size: (%d, %d)"),
                   params().iSize.iWidth,
                   params().iSize.iHeight );
         iCamera->PrepareImageCaptureL( params().iFormat, index );
         iCamera->SetJpegQuality( params().iQualityFactor );
-  
+
         SetFlags( iInfo.iState, ECamImageOn );
 
         callback  = EFalse;
@@ -6085,10 +6088,10 @@
         iModeChangePhase = ECamModeChangePhaseIdle;
         callback         = EFalse;
 
-        NotifyObservers( iModeChangeStatus, 
+        NotifyObservers( iModeChangeStatus,
                          ECamCameraEventImageInit,
                          ECamCameraEventClassImage );
-                         
+
         break;
         }
       // -------------------------------
@@ -6118,7 +6121,7 @@
 * Method to retrieve Remaining Recording time from CCaeEngine
 * which is used in AppController and AppUi during Video Rec Operation
 */
-TTimeIntervalMicroSeconds 
+TTimeIntervalMicroSeconds
 CCamCameraController::RemainingVideoRecordingTime()
 	{
 	if( iCaeEngine )
@@ -6130,7 +6133,7 @@
 
 // ===========================================================================
 // Performance measurement related
-   
+
 #ifdef CAMERAAPP_PERFORMANCE_CONTROLLER
 
 // ---------------------------------------------------------------------------
@@ -6140,7 +6143,7 @@
 // Used to record performance measurement data.
 // ---------------------------------------------------------------------------
 //
-const CCamPerformanceLogger* 
+const CCamPerformanceLogger*
 CCamCameraController::PerformanceLogger() const
   {
   return iPerformanceLogger;
@@ -6158,25 +6161,25 @@
 // PrintCameraInfo
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::PrintCameraInfo() const
   {
   PRINT ( _L("Camera <> ==================================================") );
-  PRINT ( _L("Camera <> Camera info:") ); 
-  PRINT3( _L("Camera <> Camera hw version[%d.%d.%d]"), 
+  PRINT ( _L("Camera <> Camera info:") );
+  PRINT3( _L("Camera <> Camera hw version[%d.%d.%d]"),
           iCameraInfo.iHardwareVersion.iMajor,
           iCameraInfo.iHardwareVersion.iMinor,
           iCameraInfo.iHardwareVersion.iBuild );
-  PRINT3( _L("Camera <> Camera sw version[%d.%d.%d]"), 
+  PRINT3( _L("Camera <> Camera sw version[%d.%d.%d]"),
           iCameraInfo.iSoftwareVersion.iMajor,
           iCameraInfo.iSoftwareVersion.iMinor,
-          iCameraInfo.iSoftwareVersion.iBuild );  
+          iCameraInfo.iSoftwareVersion.iBuild );
   PRINT1( _L("Camera <> TCameraInfo.iMinZoom             : %d"), iCameraInfo.iMinZoom );
-  PRINT1( _L("Camera <> TCameraInfo.iMaxZoom             : %d"), iCameraInfo.iMaxZoom ); 
-  PRINT1( _L("Camera <> TCameraInfo.iMaxDigitalZoom      : %d"), iCameraInfo.iMaxDigitalZoom ); 
+  PRINT1( _L("Camera <> TCameraInfo.iMaxZoom             : %d"), iCameraInfo.iMaxZoom );
+  PRINT1( _L("Camera <> TCameraInfo.iMaxDigitalZoom      : %d"), iCameraInfo.iMaxDigitalZoom );
   PRINT1( _L("Camera <> TCameraInfo.iMinZoomFactor       : %f"), iCameraInfo.iMinZoomFactor );
-  PRINT1( _L("Camera <> TCameraInfo.iMaxZoomFactor       : %f"), iCameraInfo.iMaxZoomFactor ); 
-  PRINT1( _L("Camera <> TCameraInfo.iMaxDigitalZoomFactor: %f"), iCameraInfo.iMaxDigitalZoomFactor ); 
+  PRINT1( _L("Camera <> TCameraInfo.iMaxZoomFactor       : %f"), iCameraInfo.iMaxZoomFactor );
+  PRINT1( _L("Camera <> TCameraInfo.iMaxDigitalZoomFactor: %f"), iCameraInfo.iMaxDigitalZoomFactor );
   PRINT ( _L("Camera <> ==================================================") );
   }
 
@@ -6205,54 +6208,54 @@
 // CCamCameraController::SettingValueUpToDateL
 // ---------------------------------------------------------------------------
 //
-TBool 
+TBool
 CCamCameraController::SettingValueUpToDateL( const NCamCameraController::TCamCameraSettingId& aSettingId )
   {
   PRINT( _L("Camera => CCamCameraController::SettingValueUpToDate") );
   TBool upToDate = ETrue;
-    
+
   switch( aSettingId )
-    {      
+    {
     case ECameraSettingFlash:
     case ECameraUserSceneSettingFlash:
       {
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingFlash") );        
-      
-      // Supposed setting value from settings provider      
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingFlash") );
+
+      // Supposed setting value from settings provider
       CCamera::TFlash flashSetting( CCamera::EFlashNone );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &flashSetting );
-      
-      // Real settings value from camera  
+
+      // Real settings value from camera
       CCamera::TFlash flashValue( CCamera::EFlashNone );
-      GetCameraSettingValueL( aSettingId, &flashValue );   
-      
+      GetCameraSettingValueL( aSettingId, &flashValue );
+
       PRINT2( _L("Camera <> flashValue = %d, flashSetting = %d"), flashValue, flashSetting );
-      upToDate = ( flashValue == flashSetting );           
-      break;  
-      }    
+      upToDate = ( flashValue == flashSetting );
+      break;
+      }
     case ECameraSettingExposure:
     case ECameraUserSceneSettingExposure:
       {
       PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingExposure") );
       TPckgBuf<TCamSettingDataExposure> exposureSetting;
       iSettingProvider.ProvideCameraSettingL( aSettingId, &exposureSetting );
-      
+
       TPckgBuf<TCamSettingDataExposure> exposureValue;
-      GetCameraSettingValueL( aSettingId, &exposureValue ); 
-      
+      GetCameraSettingValueL( aSettingId, &exposureValue );
+
       if ( exposureSetting().iExposureMode != exposureValue().iExposureMode ||
            exposureSetting().iExposureStep != exposureValue().iExposureStep )
         {
-        upToDate = EFalse;  
+        upToDate = EFalse;
         }
-      
+
       break;
-      }    
+      }
     case ECameraSettingLightSensitivity:
     case ECameraUserSceneSettingLightSensitivity:
-      {        
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingLightSensitivity") );  
-      
+      {
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingLightSensitivity") );
+
       RArray<TInt> ISOarray;
       CleanupClosePushL( ISOarray );
 #ifdef CAMERAAPP_CAPI_V2
@@ -6264,114 +6267,114 @@
       iSettingProvider.ProvideCameraSettingL( aSettingId, &isoSetting );
       CleanupStack::PopAndDestroy( &ISOarray );
 
-      
+
       TInt* isoValue = 0;
       GetCameraSettingValueL( aSettingId, &isoValue );
-      
-      upToDate = ( isoSetting == isoValue );      
-      break;  
-      }    
+
+      upToDate = ( isoSetting == isoValue );
+      break;
+      }
     case ECameraSettingWhiteBalance:
     case ECameraUserSceneSettingWhiteBalance:
       {
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingWhiteBalance") );  
-      
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingWhiteBalance") );
+
       TPckgBuf<TCamSettingDataWhiteBalance> wbSetting;
       iSettingProvider.ProvideCameraSettingL( aSettingId, &wbSetting );
-      
+
       TPckgBuf<TCamSettingDataWhiteBalance> wbValue;
-      GetCameraSettingValueL( aSettingId, &wbValue );      
-      
+      GetCameraSettingValueL( aSettingId, &wbValue );
+
       upToDate = ( wbSetting().iWhiteBalanceMode == wbValue().iWhiteBalanceMode );
-      break;  
-      }    
+      break;
+      }
     case ECameraSettingColourEffect:
-    case ECameraUserSceneSettingColourEffect:	
-      {
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingColourEffect") );  
-      
+    case ECameraUserSceneSettingColourEffect:
+      {
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingColourEffect") );
+
       CIP::TEffect effectSetting( CIP::EEffectNone );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &effectSetting );
-      
+
       CIP::TEffect effectValue( CIP::EEffectNone );
-      // Can't leave here or other settings won't be restored  
-      TRAP_IGNORE( GetCameraSettingValueL( aSettingId, &effectValue ) ); 
-      
-      upToDate = ( effectSetting == effectValue );      
-      break;  
-      }    
+      // Can't leave here or other settings won't be restored
+      TRAP_IGNORE( GetCameraSettingValueL( aSettingId, &effectValue ) );
+
+      upToDate = ( effectSetting == effectValue );
+      break;
+      }
     case ECameraSettingBrightness:
     case ECameraUserSceneSettingBrightness:
-      {                 
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingBrightness") );        
+      {
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingBrightness") );
       CCamera::TBrightness brightnessSetting;
       iSettingProvider.ProvideCameraSettingL( aSettingId, &brightnessSetting );
-            
-      CCamera::TBrightness brightnessValue;  
-      GetCameraSettingValueL( aSettingId, &brightnessValue ); 
-      
-      upToDate = ( brightnessSetting == brightnessValue );  
+
+      CCamera::TBrightness brightnessValue;
+      GetCameraSettingValueL( aSettingId, &brightnessValue );
+
+      upToDate = ( brightnessSetting == brightnessValue );
       break;
-      }      
+      }
     case ECameraSettingContrast:
     case ECameraUserSceneSettingContrast:
       {
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingContrast") ); 
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingContrast") );
       CCamera::TContrast contrastSetting( CCamera::EContrastAuto );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &contrastSetting );
-      
+
       CCamera::TContrast contrastValue( CCamera::EContrastAuto );
-      GetCameraSettingValueL( aSettingId, &contrastValue ); 
-      
-      upToDate = ( contrastSetting == contrastValue );  
-      break;  
-      }    
+      GetCameraSettingValueL( aSettingId, &contrastValue );
+
+      upToDate = ( contrastSetting == contrastValue );
+      break;
+      }
     case ECameraSettingSharpness:
     case ECameraUserSceneSettingSharpness:
       {
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingSharpness") ); 
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingSharpness") );
       TInt sharpnessSetting( 0 );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &sharpnessSetting );
-      
+
       TInt sharpnessValue( 0 );
-      // Can't leave here or other settings won't be restored  
-      TRAP_IGNORE( GetCameraSettingValueL( aSettingId, &sharpnessValue ) ); 
-      
-      upToDate = ( sharpnessSetting == sharpnessValue );  
+      // Can't leave here or other settings won't be restored
+      TRAP_IGNORE( GetCameraSettingValueL( aSettingId, &sharpnessValue ) );
+
+      upToDate = ( sharpnessSetting == sharpnessValue );
       break;
       }
     case ECameraSettingDigitalZoom:
       {
       TInt zoomSetting( 0 );
-      iSettingProvider.ProvideCameraSettingL( aSettingId, &zoomSetting );      
-      
+      iSettingProvider.ProvideCameraSettingL( aSettingId, &zoomSetting );
+
       TInt zoomValue( 0 );
-      GetCameraSettingValueL( aSettingId, &zoomValue );            
-      
+      GetCameraSettingValueL( aSettingId, &zoomValue );
+
       upToDate = ( zoomSetting == zoomValue );
       break;
-      } 
+      }
 #ifdef CAMERAAPP_CAPI_V2
     case ECameraSettingStabilization:
       {
-      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingStabilization") ); 
-      
+      PRINT( _L("Camera <> CCamCameraController::SettingValueUpToDate ECameraSettingStabilization") );
+
       TPckgBuf<TCamSettingDataStabilization> stabilizationSetting;
       iSettingProvider.ProvideCameraSettingL( aSettingId, &stabilizationSetting );
-      
+
       TPckgBuf<TCamSettingDataStabilization> stabilizationValue;
       GetCameraSettingValueL( aSettingId, &stabilizationValue );
       if ( stabilizationSetting().iMode != stabilizationValue().iMode ||
               stabilizationSetting().iEffect != stabilizationValue().iEffect ||
               stabilizationSetting().iComplexity != stabilizationValue().iComplexity )
         {
-        upToDate = EFalse;  
+        upToDate = EFalse;
         }
       break;
       }
-    case ECameraSettingContAF: 
-      {
-      TBool isContAFon( iAdvancedSettings->AutoFocusType() & 
+    case ECameraSettingContAF:
+      {
+      TBool isContAFon( iAdvancedSettings->AutoFocusType() &
                         CAS::EAutoFocusTypeContinuous );
       if( IsFlagOn( iInfo.iState, ECamVideoOn ) )
         {
@@ -6379,24 +6382,24 @@
         iSettingProvider.ProvideCameraSettingL( aSettingId, &contAF );
         if( contAF != isContAFon )
           {
-          upToDate = EFalse; 
+          upToDate = EFalse;
           }
         }
       else
         {
         //Do nothing
-        
-        }     
+
+        }
       break;
       }
-#endif      
+#endif
     default:
       {
       PRINT1( _L("CCamCameraController::SettingValueUpToDate - unknown setting id: %d"), aSettingId );
       }
-    
-    }  
-    
+
+    }
+
   PRINT1( _L("Camera <= CCamCameraController::SettingValueUpToDate returning %d"), upToDate );
   return upToDate;
   }
@@ -6422,7 +6425,7 @@
         iInfo.iVfState = ECamTriInactive;
 
         // restart viewfinder
-        //TRAP_IGNORE( ProcessVfStartRequestL() );  
+        //TRAP_IGNORE( ProcessVfStartRequestL() );
 		iAppController.EnterViewfinderMode(iAppController.CurrentMode());
         }
     iViewfinderWindow = aWindow;
@@ -6459,10 +6462,10 @@
 // CCamCameraController::SetVfWindowOrdinal
 // ---------------------------------------------------------------------------
 //
-TInt CCamCameraController::SetVfWindowOrdinal( TInt aOrdinalPosition )  
-    {
-    TInt orgPos( KErrUnknown ); 
-    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() ); 
+TInt CCamCameraController::SetVfWindowOrdinal( TInt aOrdinalPosition )
+    {
+    TInt orgPos( KErrUnknown );
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
     if ( iViewfinderWindow )
         {
         TInt cbaPos(0);
@@ -6479,7 +6482,7 @@
             // Find out other windows ordinal positions
             if ( cba )
                 {
-                cbaPos =  cba->DrawableWindow()->OrdinalPosition(); 
+                cbaPos =  cba->DrawableWindow()->OrdinalPosition();
                 }
             CAknToolbar* toolbar = appUi->CurrentFixedToolbar();
             if ( toolbar )
@@ -6489,7 +6492,7 @@
                     {
                     toolbarPos = toolbarwindow->OrdinalPosition();
                     }
-                } 
+                }
             // Calculate new viewfinder position,
             // just under fixed toolbar and CBA buttons
             TInt newPos = Max( toolbarPos, cbaPos ) + 1;
@@ -6507,12 +6510,12 @@
 // Static function called when the timer expires
 // ---------------------------------------------------------------------------
 //
-TInt 
+TInt
 CCamCameraController::DelayedCaeCallback( TAny* aController )
     {
     CCamCameraController* self = static_cast<CCamCameraController*>( aController );
     self->CallAppropriateCallback();
-    
+
     return KErrNone;
     }
 
@@ -6521,12 +6524,12 @@
 // Helper function to call the appropriate callback handler.
 // ---------------------------------------------------------------------------
 //
-void 
+void
 CCamCameraController::CallAppropriateCallback( const TCamCameraEventId aEventId,
                                                      TInt              aStatus )
     {
-    PRINT2( _L("Camera => CCamCameraController::CallAppropriateCallback, event:%d, status:%d"), aEventId, aStatus ) 
-    
+    PRINT2( _L("Camera => CCamCameraController::CallAppropriateCallback, event:%d, status:%d"), aEventId, aStatus )
+
     switch ( iSimEventId )
         {
         case ECamCameraEventVideoInit:
@@ -6538,25 +6541,25 @@
                 PRINT( _L("Camera <> CCamCameraController::CallAppropriateCallback - calling handler after delay") )
                 HandleVideoEvent( iSimEventId, iSimStatus );
                 }
-            else 
+            else
                 {
                 PRINT( _L("Camera <> CCamCameraController::CallAppropriateCallback - calling handler without delay") )
                 HandleVideoEvent( aEventId, aStatus );
-                }           
+                }
             break;
         default:
             break;
         }
-    
-    // In case of being called by timer, stop and destro the timer 
+
+    // In case of being called by timer, stop and destro the timer
     if( aEventId == ECamCameraEventNone && iCallbackTimer )
         {
         iCallbackTimer->Cancel();
         delete iCallbackTimer;
         iCallbackTimer = NULL;
         }
-    
-    PRINT( _L("Camera <= CCamCameraController::CallAppropriateCallback") )  
+
+    PRINT( _L("Camera <= CCamCameraController::CallAppropriateCallback") )
     }
 
 #endif // CAMERAAPP_CAE_ERR_SIMULATION
@@ -6565,7 +6568,7 @@
 // CCamCameraController::AsyncVideoStopModeSupported
 // ---------------------------------------------------------------------------
 //
-TBool 
+TBool
 CCamCameraController::AsyncVideoStopModeSupported()
   {
   PRINT1( _L("Camera <> CCamCameraController::AsyncVideoStopModeSupported = %d "), iAsyncVideoStopModeSupported );
@@ -6576,7 +6579,7 @@
 // IdleCallback <<static>>
 // ---------------------------------------------------------------------------
 //
-// static 
+// static
 TInt CCamCameraController::IdleCallback( TAny* aSelf )
     {
     CCamCameraController* self( static_cast<CCamCameraController*>( aSelf ) );
@@ -6592,7 +6595,7 @@
 void CCamCameraController::DoIveRecovery()
     {
     PRINT( _L("Camera => CCamCameraController::DoIveRecovery") )
-    if( iAppController.IsAppUiAvailable() 
+    if( iAppController.IsAppUiAvailable()
             && !( iAppController.IsInShutdownMode() || iAppController.CheckExitStatus() ) )
         {
         CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
@@ -6608,19 +6611,19 @@
             {
             //There was an error when getting active view ID. Propably camera
             //application went to background. In that case just return because
-            //camera resource should be released when going to background.             
+            //camera resource should be released when going to background.
             return;
             }
 		__ASSERT_DEBUG(view, CamPanic(ECamPanicNullPointer));
-        if ( appUi->StandbyStatus() && view->IsInStandbyMode() ) 
+        if ( appUi->StandbyStatus() && view->IsInStandbyMode() )
             {
-            PRINT( _L("Camera <> CCamCameraController::DoIveRecovery - Standby mode active, try to exit") )  
-            TRAP_IGNORE( appUi->HandleControllerEventL(  ECamEventCameraChanged, 
+            PRINT( _L("Camera <> CCamCameraController::DoIveRecovery - Standby mode active, try to exit") )
+            TRAP_IGNORE( appUi->HandleControllerEventL(  ECamEventCameraChanged,
                                                          KErrNone ) );
             }
         else
             {
-            PRINT( _L("Camera <> CCamCameraController::DoIveRecovery - Start recovering from beginning") )  
+            PRINT( _L("Camera <> CCamCameraController::DoIveRecovery - Start recovering from beginning") )
             iIveSequenceActive = EFalse;
             if( IsFlagOn( iInfo.iBusy, ECamBusySequence|ECamBusySetting ) )
                 {
@@ -6631,15 +6634,15 @@
                     }
                 iIveCancel = ETrue;
                 EndSequence( KErrNone ); // Clears iIveRecoveryOngoing and iIveSequenceActive
-                }  
-            NotifyObservers( KErrNone, ECamCameraEventIveRecover, 
+                }
+            NotifyObservers( KErrNone, ECamCameraEventIveRecover,
                              ECamCameraEventClassBasicControl );
             }
         iIveRecoveryCount--;
         iIveRecoveryOngoing = ETrue;
         iIveCancel = EFalse;
         }
-    PRINT1( _L("Camera <= CCamCameraController::DoIveRecovery iIveRecoveryCount%d"),iIveRecoveryCount )  
+    PRINT1( _L("Camera <= CCamCameraController::DoIveRecovery iIveRecoveryCount%d"),iIveRecoveryCount )
     }
 
 // ---------------------------------------------------------------------------
@@ -6650,7 +6653,7 @@
     {
     // ETrue if recovery is started, but not completed.
     // iIveRecoveryOngoing is set to false when last recovery command is executed
-    return (iIdle && iIdle->IsActive()) || 
+    return (iIdle && iIdle->IsActive()) ||
             iIveCancel || iIveRecoveryOngoing || iIveSequenceActive;
     }
 
@@ -6661,7 +6664,7 @@
 //
 void CCamCameraController::SetFaceTrackingL()
     {
-    if( iCustomInterfaceFaceTracking && 
+    if( iCustomInterfaceFaceTracking &&
         KPrimaryCameraIndex == iInfo.iCurrentCamera )
       {
       TBool ftOn( EFalse );
--- a/camerauis/cameraapp/generic/src/cameracontroller/camimagedecoder.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camimagedecoder.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -16,13 +16,12 @@
 */
 
 
-
-
 #include <imageconversion.h>
 #include <ExifRead.h>
 #include <ecam.h> // MCameraBuffer
 
 #include <eikenv.h>
+#include <SvgCodecImageConstants.hrh>
 
 #include "camlogging.h"
 #include "camfilesaveutility.h"
@@ -79,11 +78,17 @@
   delete iDecoder;
 
   SetImageData( NULL );
- if(iDecodedBitmap)
+  if(iDecodedBitmap)
   	{
   	delete iDecodedBitmap;
   	iDecodedBitmap = NULL;
   	}
+  if ( iDecodedMask )
+     {
+     delete iDecodedMask;
+     iDecodedMask = NULL;
+     }
+ 
   iFs.Close();
   PRINT( _L("Camera <= ~CCamImageDecoder") );
   }
@@ -150,6 +155,67 @@
   }
 
 
+void CCamImageDecoder::StartIconConversionL( TDesC* aFilePath )
+  {
+  PRINT( _L("Camera => CCamImageDecoder::StartConversionL 2") );
+
+  // Data for CImageDecoder must be available throughout the conversion.
+  // Need to stop any outstanding operation before deleting the descriptor.
+  Cancel();
+
+  PRINT( _L("Camera <> CCamImageDecoder: Creating decoder..") );
+
+  delete iDecoder;
+  iDecoder = NULL;
+  
+  CImageDecoder::TOptions options = (CImageDecoder::TOptions) (CImageDecoder::EOptionNoDither );
+  iDecoder = CImageDecoder::FileNewL( iFs, *aFilePath , options, KImageTypeSVGUid );
+
+  if( iDecoder->FrameCount() > 0 )
+    {
+    const TFrameInfo& info( iDecoder->FrameInfo() );
+
+#ifdef _DEBUG   
+    TSize size = info.iOverallSizeInPixels;
+    PRINT2( _L("Camera <> CCamImageDecoder: Bmp size(%d,%d)"), size.iWidth, size.iHeight );
+    PRINT1( _L("Camera <> CCamImageDecoder: Bmp dispmode(%d)"), info.iFrameDisplayMode );
+#endif
+
+    PRINT( _L("Camera <> CCamImageDecoder: Create bitmap for snapshot..") );
+    if( !iDecodedBitmap ) iDecodedBitmap = new (ELeave) CFbsBitmap;
+    else                  iDecodedBitmap->Reset();
+    
+    if( !iDecodedMask ) iDecodedMask = new (ELeave) CFbsBitmap;
+    else                iDecodedMask->Reset();
+
+    TRAPD ( createError, 
+            {
+            iDecodedBitmap->Create( info.iOverallSizeInPixels, info.iFrameDisplayMode );
+            iDecodedMask->Create( info.iOverallSizeInPixels, EGray256 );
+            } );
+    if( KErrNone != createError )
+      {
+      delete iDecodedBitmap;
+      iDecodedBitmap = NULL;
+      delete iDecodedMask;
+      iDecodedMask = NULL;
+      User::Leave( createError );
+      }
+
+    PRINT( _L("Camera <> CCamImageDecoder: start conversion..") );
+    iRetryCounter = 0;
+    iDecoder->Convert( &iStatus, *iDecodedBitmap, *iDecodedMask, 0 );
+    SetActive();
+    }
+  else
+    {
+    PRINT( _L("Camera <> CCamImageDecoder: No frame provided, leave..") );
+    User::Leave( KErrNotFound );    
+    }
+
+  PRINT( _L("Camera <= CCamImageDecoder::StartConversionL 2") );
+  }
+
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
@@ -253,7 +319,7 @@
       // CImageDecoder has finished using the data,
       // so we are able to free it.
       SetImageData( NULL );
-      iObserver.ImageDecoded( iStatus.Int(), iDecodedBitmap );
+      iObserver.ImageDecoded( iStatus.Int(), iDecodedBitmap, iDecodedMask );
       break;
       }
     case KErrUnderflow :
@@ -298,7 +364,7 @@
   SetImageData( NULL );
   // Leave has occurred in RunL.
   // Notify observer with error.
-  iObserver.ImageDecoded( aError, NULL );
+  iObserver.ImageDecoded( aError, NULL, NULL );
 
   PRINT( _L("Camera <= CCamImageDecoder::RunError") );
   return KErrNone;
--- a/camerauis/cameraapp/generic/src/cameracontroller/camsnapshot.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camsnapshot.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -439,7 +439,7 @@
 // ---------------------------------------------------------------------------
 //
 void 
-CCamSnapshot::ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap )
+CCamSnapshot::ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* /*aMask*/ )
   {
   PRINT1( _L("Camera => CCamSnapshot::ImageDecoded, status in: %d"), aStatus );
   if( iSnapshotOn )
@@ -590,7 +590,7 @@
     CFbsBitmap& bitmap = buffer->BitmapL( 0 );
     PRINT( _L("Camera <> Using bitmap data, just scale..") );
     // Simulate that the bitmap has been decoded now.
-    ImageDecoded( aError, &bitmap );
+    ImageDecoded( aError, &bitmap, NULL );
     });
 
   // If problems with bitmap data, try encoded data.
--- a/camerauis/cameraapp/generic/src/camfolderutility.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/camfolderutility.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -126,7 +126,36 @@
       {
       aPath.Append( PathInfo::ImagesPath() );  
       }             
-     
+    // Copied from below
+    TBuf<KMaxNameBaseLength> cameraFolder; // "Camera"
+    StringLoader::Load( cameraFolder, R_CAM_CAMERA_SUBFOLDER );
+    
+    RFs rfs;
+    User::LeaveIfError( rfs.Connect() );
+    CleanupClosePushL( rfs );     
+ 
+    TFileName fn( aPath );
+    fn.Append( cameraFolder );
+    TEntry entry;
+    TInt err2 = rfs.Entry(fn, entry );
+
+    if( KErrNone == err2 )
+      {
+       if (!entry.IsDir( ))
+          {
+           RBuf newName;
+           CleanupClosePushL( newName);  
+           newName.CreateL( fn.Length() + 4 );
+           newName.Copy( fn );
+           newName.Append(_L(".bak"));
+           TInt error = rfs.Rename( fn, newName );
+           if ( error != KErrNone )
+               {
+                User::LeaveIfError( rfs.Delete( fn ) );
+               }
+           CleanupStack::PopAndDestroy( &newName );
+          }
+       }
   // Add a folder for the current month
   // Use the specified time to determine the year and month.
   // If this is 0 then use the current time.
@@ -154,8 +183,8 @@
       cr->Set( KCamCrLastUsedMonthFolder, monthFolder );
       }  
   CleanupStack::PopAndDestroy( cr );    
-  TBuf<KMaxNameBaseLength> cameraFolder;
-  StringLoader::Load( cameraFolder, R_CAM_CAMERA_SUBFOLDER );
+//  TBuf<KMaxNameBaseLength> cameraFolder;
+//  StringLoader::Load( cameraFolder, R_CAM_CAMERA_SUBFOLDER );
   aPath.Append( cameraFolder );   
   aPath.Append( KBackslash );          
   aPath.Append( monthFolder );  
@@ -165,11 +194,7 @@
   // This may be returned e.g.if the month counter destination folder  (YYYYMMXX) is
   // not created
   TInt monthFolderLength = aPath.Length();
-  
-  RFs rfs;
-  User::LeaveIfError( rfs.Connect() );
-  CleanupClosePushL( rfs );     
- 
+
   // ensure the path exists
   TInt err = rfs.MkDirAll( aPath );
  
@@ -207,7 +232,8 @@
       aPath.Append( KDigitOffset()[0] + monthCounter%KBase10 );
       aPath.Append( KBackslash );
       // If the folder does not exist then remove the final folder name from the path
-      TEntry entry;
+      //TEntry entry;
+      
       if ( rfs.Entry( aPath, entry ) == KErrNotFound )
           {
           aPath.SetLength( monthFolderLength );
--- a/camerauis/cameraapp/generic/src/camoneclickuploadutility.cpp	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/generic/src/camoneclickuploadutility.cpp	Mon Mar 15 12:39:00 2010 +0200
@@ -16,22 +16,35 @@
 */
 
 
+#include <gulicon.h>
+#include <akntoolbar.h>
+#include <aknbutton.h> 
+
 #include <AiwServiceHandler.h>
 #include <cameraapp.rsg>
 #include <vgacamsettings.rsg>
 #include <centralrepository.h>
 
+
 #include "camoneclickuploadutility.h"
 #include "camlogging.h"
 #include "CamPanic.h"
+#include "Cam.hrh"
 
-const TUid KShareOnlineCrUid = { 0x2000BB53 };
+#include <cameraapp.mbg>
+#include "camutility.h"
+
+const TUid KShareOnlineCrUid = { 0x2002CC1F };
 const TUint32 KShareCrApplicationVersion = 0x01010020;
 const TInt KCamShareOnlineVersionBufLen = 12;
-const TVersion KShareOnlineMinimumVersion( 4, 3, 0 );
+const TVersion KShareOnlineMinimumVersion( 5, 0, 0 );
 const TUid KOpenModeOneClick = { 2 };
 const TUid KCmdGetOneClickToolTip = { 15 };
 
+const TUint32 KShareImageServiceIconFileName = 0x00000002;
+const TUint32 KShareVideoServiceIconFileName = 0x00000003;
+const TUint32 KShareCommonServiceIconFileName = 0x00000004;
+
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -92,6 +105,9 @@
     {
     delete iAiwServiceHandler;
     delete iTooltip;
+    
+    if ( iDecoder )
+        delete iDecoder;
     }
 
 
@@ -274,3 +290,137 @@
     iAiwServiceHandler = CAiwServiceHandler::NewL();
     iAiwServiceHandler->AttachL( R_CAM_ONE_CLICK_UPLOAD_INTEREST );
     }
+
+// ---------------------------------------------------------------------------
+// Get the icon for Share AP item
+// ---------------------------------------------------------------------------
+//
+void CCamOneClickUploadUtility::CurrentIconPathL( TCamCameraMode aMode, TDes& aPath )
+    {
+    PRINT( _L("Camera => CCamOneClickUploadUtility::CurrentIconPathL") );
+    TUint32 serviceIconId = KShareCommonServiceIconFileName;
+
+    if ( ECamControllerVideo == aMode )
+        {
+        serviceIconId = KShareVideoServiceIconFileName;
+        }
+    else // image
+        {
+        serviceIconId = KShareImageServiceIconFileName;
+        }
+
+    CRepository* rep = CRepository::NewLC( KShareOnlineCrUid );
+    User::LeaveIfError( rep->Get( serviceIconId, aPath ) );
+    CleanupStack::PopAndDestroy( rep );
+    PRINT1( _L("Camera <= CCamOneClickUploadUtility::CurrentIconPathL: %S"), &aPath );
+    }
+
+// -----------------------------------------------------------------------------
+// CCamOneClickUploadUtility::UpdateUploadIcon
+// -----------------------------------------------------------------------------
+//
+void CCamOneClickUploadUtility::UpdateUploadIcon( CAknToolbar *aToolbar, 
+                                                  TCamCameraMode aMode )
+    {
+    PRINT( _L("Camera => CCamOneClickUploadUtility::UpdateUploadIcon") );
+
+    TFileName currIcon;
+    CurrentIconPathL( aMode, currIcon );
+
+    // If the icons are different then load the icon
+    PRINT1( _L("Camera <> current icon: %S"), &iIconFileName );
+    if ( currIcon.Compare(iIconFileName) != 0 )
+        {
+        PRINT( _L("Camera <> Decoding icon") );
+        iToolbar = aToolbar;
+        TRAPD( err, DecodeIconL( &currIcon ) );
+        if (err)
+            {
+            PRINT1( _L("Camera <> CamOneClickUploadUtility - Icon decoding failed: %d"), err );
+            }
+        }
+    else
+        {
+        if ( aToolbar && iIconImage )
+            {
+            PRINT( _L("Camera <> Copying icon") );
+            CAknButton* button = dynamic_cast<CAknButton*>(
+                aToolbar->ControlOrNull( ECamCmdOneClickUpload ) );
+            CAknButtonState* state = button->State();
+
+            CGulIcon *icon = CGulIcon::NewL( iIconImage, iIconMask );
+            state->SetIcon( icon );
+            icon->SetBitmapsOwnedExternally( ETrue );
+
+            button->SetButtonFlags( KAknButtonNoFrame | KAknButtonPressedDownFrame );
+            aToolbar->DrawNow();
+            }
+        }
+    PRINT( _L("Camera <= CCamOneClickUploadUtility::UpdateUploadIcon") );
+    }
+
+// -----------------------------------------------------------------------------
+// CCamOneClickUploadUtility::DecodeIconL()
+// -----------------------------------------------------------------------------
+//
+void CCamOneClickUploadUtility::DecodeIconL( TDesC* aPath )
+    {
+    PRINT1( _L("Camera => CCamOneClickUploadUtility::DecodeIconL: %S"), aPath );
+
+    if ( !iDecoder )
+        {
+        iDecoder = CCamImageDecoder::NewL( *this );
+        }
+    iDecoder->StartIconConversionL( aPath );
+
+    // Mark the given file as the icon in use when decoding has started
+    iIconFileName.Copy( *aPath );
+
+    PRINT( _L("Camera <= CCamOneClickUploadUtility::DecodeIconL") );
+    }
+
+// ---------------------------------------------------------------------------
+// Image decoding complete notification
+// ---------------------------------------------------------------------------
+//
+void CCamOneClickUploadUtility::ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask )
+    {
+    PRINT( _L("Camera => CCamOneClickUploadUtility::ImageDecoded") );
+
+    if ( aStatus == KErrNone )
+        {
+        delete iIconImage;
+        delete iIconMask;
+        
+        iIconImage = new (ELeave) CFbsBitmap;
+        iIconImage->Duplicate( aBitmap->Handle() );
+
+        if ( aMask )
+            {
+            iIconMask = new (ELeave) CFbsBitmap;
+            iIconMask->Duplicate( aMask->Handle() );
+            }
+    
+        if ( iToolbar )
+            {
+            PRINT( _L("Displaying icon") );
+            
+            CAknButton* uploadButton =
+                        static_cast<CAknButton*> (iToolbar->ControlOrNull(ECamCmdOneClickUpload));
+            CAknButtonState* currentState = uploadButton->State();
+
+            CGulIcon *icon =  CGulIcon::NewL( iIconImage, iIconMask );
+            icon->SetBitmapsOwnedExternally( ETrue );
+            currentState->SetIcon( icon );
+
+            uploadButton->SetButtonFlags( KAknButtonNoFrame | KAknButtonPressedDownFrame );
+            iToolbar->DrawNow();
+            }
+        }
+    else
+        {
+        PRINT1( _L("Camera <> CCamOneClickUploadUtility::ImageDecoded - err:%d"), aStatus );
+        }
+
+    PRINT( _L("Camera <= CCamOneClickUploadUtility::ImageDecoded") );
+    }
--- a/camerauis/cameraapp/loc/cam.loc	Fri Mar 12 15:41:04 2010 +0200
+++ b/camerauis/cameraapp/loc/cam.loc	Mon Mar 15 12:39:00 2010 +0200
@@ -4241,5 +4241,10 @@
 //l: popup_note_window
 #define qtn_lcam_insert_mmc_note "Please insert memory card in order to capture photos and videos"
 
+//d:Capture tone off setting in photo settings list
+//l:list_set_graphic_pane_t1
+//
+#define qtn_lcam_shuttersound_off "Off"
+
 // end of file