201019
authorhgs
Fri, 14 May 2010 15:14:51 +0300
changeset 38 ff53afa8ad05
parent 37 4eb2df7f7cbe
child 39 f6d44a0cd476
201019
inc/mpxvideo_debug.h
inc/videoservices.h
mediasettings/mediasettingsengine/group/MPSettROPModel.mmp
mediasettings/mediasettingsengine/rom/mpsettropmodel.iby
mediasettings/mediasettingsengine/rom/mpsettropmodelrsc.iby
videocollection/inc/videocollectiontrace.h
videocollection/mpxmyvideoscollection/inc/vcxmyvideosalbums.h
videocollection/mpxmyvideoscollection/inc/vcxmyvideosmdsalbums.h
videocollection/mpxmyvideoscollection/src/vcxmyvideosalbum.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosalbums.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsalbums.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosvideocache.cpp
videocollection/tsrc/stubs/inc/hbinputdialog.h
videocollection/tsrc/stubs/inc/hbmessagebox.h
videocollection/tsrc/stubs/inc/hbmessageboxdata.h
videocollection/tsrc/stubs/inc/testobjectstore.h
videocollection/tsrc/stubs/src/hbdocumentloader.cpp
videocollection/tsrc/stubs/src/hbinputdialog.cpp
videocollection/tsrc/stubs/src/hbmessagebox.cpp
videocollection/tsrc/stubs/src/testobjectstore.cpp
videocollection/tsrc/stubs/src/videocollectionuiloader.cpp
videocollection/tsrc/stubs/src/videolistselectiondialog.cpp
videocollection/tsrc/stubs/src/videolistview.cpp
videocollection/tsrc/stubs/src/videolistwidget.cpp
videocollection/tsrc/stubs/src/videoservicebrowse.cpp
videocollection/tsrc/stubs/src/videoservices.cpp
videocollection/tsrc/stubs/src/videoserviceurifetch.cpp
videocollection/tsrc/stubs/stubs.pro
videocollection/tsrc/videoservicestestapp/sis/Nokia_RnDCert_02.der
videocollection/tsrc/videoservicestestapp/sis/Nokia_RnDCert_02.key
videocollection/tsrc/videoservicestestapp/sis/videoservicestestapp.sisx
videocollection/videocollectionview/data/videocollectionview.qrc
videocollection/videocollectionview/inc/videocollectionuiloader.h
videocollection/videocollectionview/inc/videolistview.h
videocollection/videocollectionview/inc/videolistwidget.h
videocollection/videocollectionview/src/videocollectionuiloader.cpp
videocollection/videocollectionview/src/videocollectionviewutils.cpp
videocollection/videocollectionview/src/videolistselectiondialog.cpp
videocollection/videocollectionview/src/videolistview.cpp
videocollection/videocollectionview/src/videolistwidget.cpp
videocollection/videocollectionview/tsrc/testlistview/src/testlistview.cpp
videocollection/videocollectionview/tsrc/testlistwidget/inc/testlistwidget.h
videocollection/videocollectionview/tsrc/testlistwidget/src/testlistwidget.cpp
videocollection/videocollectionview/tsrc/testvideocollectionuiloader/src/testvideocollectionuiloader.cpp
videocollection/videocollectionview/tsrc/testvideolistselectiondialog/src/testvideolistselectiondialog.cpp
videocollection/videocollectionwrapper/data/videocollectionwrapper.qrc
videocollection/videocollectionwrapper/inc/videodatasignalreceiver.h
videocollection/videocollectionwrapper/inc/videolistdatamodel_p.h
videocollection/videocollectionwrapper/inc/videothumbnaildata_p.h
videocollection/videocollectionwrapper/src/videocollectionlistener.cpp
videocollection/videocollectionwrapper/src/videolistdatamodel_p.cpp
videocollection/videocollectionwrapper/src/videothumbnaildata_p.cpp
videocollection/videocollectionwrapper/tsrc/testvideocollectionclient/stub/inc/stubcollectionsignalreceiver.h
videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/inc/mediaobjectfactory.h
videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/src/mediaobjectfactory.cpp
videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/src/testvideocollectionlistener.cpp
videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/inc/stubsignalreceiver.h
videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/src/stubsignalreceiver.cpp
videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/inc/videolistdatamodel_p.h
videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp
videocollection/videocollectionwrapper/tsrc/testvideomodel_p/inc/testvideomodel_p.h
videocollection/videocollectionwrapper/tsrc/testvideomodel_p/src/mediaobjectfactory.cpp
videocollection/videocollectionwrapper/tsrc/testvideomodel_p/src/testvideomodel_p.cpp
videocollection/videocollectionwrapper/videocollectionwrapper.pro
videocollection/videofiledetailsview/data/pri_large_video.svg
videocollection/videofiledetailsview/data/videofiledetails.qrc
videocollection/videofiledetailsview/data/videofiledetails.xml
videocollection/videofiledetailsview/src/videofiledetailsviewplugin.cpp
videocollection/videofiledetailsview/tsrc/testplugin/src/testvideofiledetails.cpp
videocollection/videofiledetailsview/tsrc/testplugin/stub/inc/hbmessagebox.h
videocollection/videofiledetailsview/tsrc/testplugin/stub/src/hbmessagebox.cpp
videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackfiledetailswidget.h
videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackprogressbar.h
videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackstatuspanecontrol.h
videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackcontrolscontroller.cpp
videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackfiledetailswidget.cpp
videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackprogressbar.cpp
videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackstatuspanecontrol.cpp
videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybacktoolbar.cpp
videoplayback/hbvideoplaybackview/inc/mpxvideoplaybackcontrolscontroller.h
videoplayback/hbvideoplaybackview/resources/hbvideoplaybackview.docml
videoplayback/hbvideoplaybackview/tsrc/testcontrolconfiguration/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testcontrolconfiguration/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/src/mpxvideoplaybackfiledetailswidget.cpp
videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/src/hbeffect.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackdocumentloader/stub/src/mpxvideoplaybackcontrolscontroller.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/hbglobal.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/mpxvideoplaybackdocumentloader.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/src/testmpxvideoplaybacktoolbar.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/src/testmpxvideoviewwrapper.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxplaybackutilityimpl.h
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxplaybackutilityimpl.cpp
videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testprogressbar/src/testprogressbar.cpp
videoplayback/hbvideoplaybackview/tsrc/testprogressbar/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testprogressbar/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/src/teststatuspanecontrol.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hbgroupbox.h
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hblabel.h
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hbvideobaseplaybackview.h
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hbgroupbox.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hblabel.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hbvideobaseplaybackview.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/mpxvideoplaybackdocumentloader.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/teststatuspanecontrol.pro
videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/centralrepository.cpp
videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/mpxvideoviewwrapper.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/src/mpxvideoviewwrapper.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/inc/testmpxvideoplaybackcontrolscontroller.h
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/src/testmpxvideoplaybackcontrolscontroller.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/src/mpxvideoplaybackfullscreencontrol.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/inc/testvideoplaybackview.h
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/src/testvideoplaybackview.cpp
videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/stub/src/mpxvideoviewwrapper.cpp
videoplayback/hbvideoplaybackview/viewsrc/hbvideobaseplaybackview.cpp
videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp
videoplayback/inc/hbvideobaseplaybackview.h
videoplayback/videohelix/conf/mpxvideopbplugins.confml
videoplayback/videohelix/group/mpxvideohelixplayback.mmp
videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h
videoplayback/videohelix/inc/mpxvideoplaybackmode.h
videoplayback/videohelix/inc/mpxvideoplaybackstate.h
videoplayback/videohelix/inc/mpxvideoplayerutility.h
videoplayback/videohelix/inc/mpxvideoposterframesetter.h
videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp
videoplayback/videohelix/src/mpxvideoplaybackmode.cpp
videoplayback/videohelix/src/mpxvideoplaybackstate.cpp
videoplayback/videohelix/src/mpxvideoplayerutility.cpp
videoplayback/videohelix/src/mpxvideoposterframesetter.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg
videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp
videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h
videoplayback/videohelix/tsrc/ut_videohelixtest/inc/tnmgr_stub.h
videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h
videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/src/tnmgr_stub.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtest.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp
videoplayerapp/bwins/videoplayerengineu.def
videoplayerapp/eabi/videoplayerengineu.def
videoplayerapp/hbvideoplayer/hbvideoplayer.pro
videoplayerapp/hbvideoplayer/resources/service_conf.xml
videoplayerapp/hbvideoplayer/src/main.cpp
videoplayerapp/inc/videoplayerengine.h
videoplayerapp/videoplayerengine/inc/videoservicebrowse.h
videoplayerapp/videoplayerengine/inc/videoserviceplay.h
videoplayerapp/videoplayerengine/inc/videoserviceurifetch.h
videoplayerapp/videoplayerengine/inc/videoserviceview.h
videoplayerapp/videoplayerengine/src/videoplayerengine.cpp
videoplayerapp/videoplayerengine/src/videoservicebrowse.cpp
videoplayerapp/videoplayerengine/src/videoserviceplay.cpp
videoplayerapp/videoplayerengine/src/videoservices.cpp
videoplayerapp/videoplayerengine/src/videoserviceurifetch.cpp
videoplayerapp/videoplayerengine/src/videoserviceview.cpp
videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/src/testvideoplayerengine.cpp
--- a/inc/mpxvideo_debug.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/inc/mpxvideo_debug.h	Fri May 14 15:14:51 2010 +0300
@@ -41,7 +41,7 @@
     #ifdef _MPX_FILE_LOGGING_
         #define FU_DEBUG MPXDebug::FileLog
     #else        
-        #define FU_DEBUG MPXDebug::NullLog
+        #define FU_DEBUG
     #endif
 #endif 
 
@@ -49,15 +49,6 @@
 class MPXDebug
 {
     public:
-        inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... )
-        {
-        }
-
-        inline static void NullLog( TRefByValue<const TDesC> /*aFunctionName*/,
-		                            TRefByValue<const TDesC16> /*aFmt*/, ... )
-        {
-        }
-
         inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... )
         {
             VA_LIST list;
@@ -77,8 +68,8 @@
     #define MPX_DEBUG             TFusionLog::FusionLog
     #define MPX_ENTER_EXIT        TEnterExitLog _s
 #else
-    #define MPX_DEBUG             MPXDebug::NullLog
-    #define MPX_ENTER_EXIT        MPXDebug::NullLog
+    #define MPX_DEBUG
+    #define MPX_ENTER_EXIT
 #endif
 
 
@@ -160,8 +151,13 @@
             FU_DEBUG(_KMPXErrorInfo, aErr, MPX_S(__FILE__), __LINE__);\
     }
 
-#define MPX_TRAP(_r, _s) TRAP(_r,_s);MPX_ERROR_LOG(_r);
-#define MPX_TRAPD(_r, _s) TRAPD(_r,_s);MPX_ERROR_LOG(_r);
+#ifdef _DEBUG
+    #define MPX_TRAP(_r, _s) TRAP(_r,_s);MPX_ERROR_LOG(_r);
+    #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);MPX_ERROR_LOG(_r);
+#else // _DEBUG
+    #define MPX_TRAP(_r, _s) TRAP(_r,_s);(_r=_r);
+    #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);(_r=_r);
+#endif // _DEBUG
 
 #endif  // __MPXVIDEO_DEBUG_H__
 
--- a/inc/videoservices.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/inc/videoservices.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#3 %
+// Version : %version: 5 %
 
 #ifndef __VIDEOSERVICES_H__
 #define __VIDEOSERVICES_H__
@@ -164,21 +164,61 @@
     VideoServiceUriFetch* mServiceUriFetch;
 
     /**
+     * Deprecated VideoServiceUriFetch service instance.
+     */
+    VideoServiceUriFetch* mServiceUriFetchDeprecatedNewService;
+    
+    /**
+     * Deprecated VideoServiceUriFetch service instance.
+     */
+    VideoServiceUriFetch* mServiceUriFetchDeprecatedOldService;
+
+    /**
      * VideoServicePlay service instance.
      */
     VideoServicePlay* mServicePlay;
     
     /**
+     * VideoServicePlay service instance.
+     */
+    VideoServicePlay* mServicePlayDeprecatedNewService;
+    
+    /**
+     * VideoServicePlay service instance.
+     */
+    VideoServicePlay* mServicePlayDeprecatedOldService;    
+    
+    /**
      * VideoServiceView service instance.
      */    
     VideoServiceView* mServiceView; 
     
     /**
+     * VideoServiceView service instance.
+     */    
+    VideoServiceView* mServiceViewDeprecatedNewService; 
+    
+    /**
+     * VideoServiceView service instance.
+     */    
+    VideoServiceView* mServiceViewDeprecatedOldService;     
+    
+    /**
      * VideoServiceBrowse service instance.
      */
     VideoServiceBrowse *mServiceBrowse;
 
     /**
+     * Deprecated VideoServiceBrowse service instance.
+     */
+    VideoServiceBrowse *mServiceBrowseDeprecatedNewService;
+    
+    /**
+     * Deprecated VideoServiceBrowse service instance.
+     */
+    VideoServiceBrowse *mServiceBrowseDeprecatedOldService;
+
+    /**
      * Pointer of QVideoPlayerEngine.
      */
     QVideoPlayerEngine* mEngine;
--- a/mediasettings/mediasettingsengine/group/MPSettROPModel.mmp	Fri Apr 30 09:52:11 2010 +0300
+++ b/mediasettings/mediasettingsengine/group/MPSettROPModel.mmp	Fri May 14 15:14:51 2010 +0300
@@ -16,10 +16,11 @@
 
 
 
-// Version : %version: 5 %
+// Version : %version: 6 %
 
 
 
+#include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
 TARGET          mpsettropmodel.dll
 CAPABILITY      CAP_ECOM_PLUGIN
@@ -41,7 +42,7 @@
 START RESOURCE  MPSettingsROPModel.rss
 HEADER
 TARGET mpsettingsropmodel.rsc       
-TARGETPATH      resource 
+TARGETPATH      RESOURCE_FILES_DIR 
 END
 
 USERINCLUDE     .
--- a/mediasettings/mediasettingsengine/rom/mpsettropmodel.iby	Fri Apr 30 09:52:11 2010 +0300
+++ b/mediasettings/mediasettingsengine/rom/mpsettropmodel.iby	Fri May 14 15:14:51 2010 +0300
@@ -21,8 +21,6 @@
 
 #include <data_caging_paths_for_iby.hrh>
 
-ECOM_PLUGIN( mpsettropmodel.dll, 101f857b.rsc )
-
-data=DATAZ_\resource\MPSettingsROPModel.rsc      	    resource\MPSettingsROPModel.rsc
+ECOM_PLUGIN( mpsettropmodel.dll, mpsettropmodel.rsc )
 
 #endif // MPSETTROPMODEL_IBY
\ No newline at end of file
--- a/mediasettings/mediasettingsengine/rom/mpsettropmodelrsc.iby	Fri Apr 30 09:52:11 2010 +0300
+++ b/mediasettings/mediasettingsengine/rom/mpsettropmodelrsc.iby	Fri May 14 15:14:51 2010 +0300
@@ -22,7 +22,7 @@
 
 #include <data_caging_paths_for_iby.hrh>
 
-data=DATAZ_\APP_RESOURCE_DIR\MPSettingsROPModel.rsc      	   APP_RESOURCE_DIR\MPSettingsROPModel.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\mpsettingsropmodel.rsc      	   RESOURCE_FILES_DIR\mpsettingsropmodel.rsc
 
 
 #endif // MPSETTROPMODELRSC_IBY
\ No newline at end of file
--- a/videocollection/inc/videocollectiontrace.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/inc/videocollectiontrace.h	Fri May 14 15:14:51 2010 +0300
@@ -29,11 +29,11 @@
 #define DISABLE_TRACE 0
 
 /**
- * 0 = Tracing into RDebug in all builds.
- * 1 = Tracing into RDebug in winscw, file in ARM. (Default)
+ * 0 = Tracing into RDebug in all builds. (Default)
+ * 1 = Tracing into RDebug in winscw, file in ARM.
  * 2 = Tracing into file in all builds. 
  */
-#define TRACE_OUTPUT 1
+#define TRACE_OUTPUT 0
 
 //-----------------------------------------------------------------------------
 // Trace configuration
--- a/videocollection/mpxmyvideoscollection/inc/vcxmyvideosalbums.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/inc/vcxmyvideosalbums.h	Fri May 14 15:14:51 2010 +0300
@@ -180,6 +180,18 @@
          * @param aMdsId  MDS ID of the changed video.
          */
         void VideoTitleChangedL( TUint32 aMdsId );
+        
+        /**
+         * Called when video is added or removed from cache. Adds changed
+         * album indexes to iChangedAlbums.
+         */
+        void VideoAddedOrRemovedFromCacheL( CMPXMedia& video );
+
+        /**
+         * Goes through iChangedAlbums and updates album attributes and adds
+         * changed events.
+         */
+        void UpdateChangedAlbumsL();
 
 protected:
         
@@ -340,6 +352,13 @@
          */
         RArray<TUint32> iMdsOpResultsUint32;
         
+        /**
+         * When videos are removed or added from cache, the indexes of the
+         * changed albums are stored here. Reason is to calculate new attributes
+         * only once per changed album.
+         */
+        RArray<TInt> iChangedAlbums;
+        
     };
 
 #endif   // VCXMYVIDEOSALBUMS_H
--- a/videocollection/mpxmyvideoscollection/inc/vcxmyvideosmdsalbums.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/inc/vcxmyvideosmdsalbums.h	Fri May 14 15:14:51 2010 +0300
@@ -359,8 +359,13 @@
          * Called from RunL when albums remove completes.
          */
         void HandleRemoveAlbumsCompletedL();
+
+        /**
+         * Registers observing to MDS session.
+         */
+        void SetObservingL();
         
-    public:
+    protected:
 
         /**
         * From MMdEQueryObserver.
@@ -396,14 +401,12 @@
                     TObserverNotificationType aType,
                     const RArray<TMdERelation>& aRelationArray);
 
-#if 0 //not used
         /**
          * From MMdERelationObserver
          */
         void HandleRelationNotification(CMdESession& aSession, 
                 TObserverNotificationType aType,
                 const RArray<TItemId>& aRelationIdArray);
-#endif
         
     private:
         
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosalbum.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosalbum.cpp	Fri May 14 15:14:51 2010 +0300
@@ -294,8 +294,8 @@
 //
 void CVcxMyVideosAlbum::CalculateAttributesL( TInt aStartIndex )
     {
+    TInt videoCount = 0;
     TUint32 count = iVideoList.Count();
-    iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryItemCount, count );
     TInt newCount = 0;
     CMPXMedia* video;
     CMPXMedia* latestNewVideo = NULL;
@@ -308,6 +308,7 @@
         video = iCollection.iCache->FindVideoByMdsIdL( iVideoList[i].iMdsId, pos );
         if ( video )
             {
+            videoCount++;
             flags = TVcxMyVideosCollectionUtil::FlagsL( *video );
             if ( flags & EVcxMyVideosVideoNew )
                 {
@@ -321,7 +322,7 @@
                 }
             }
         }
-    iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryItemCount, count );
+    iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryItemCount, videoCount );
     iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryNewItemCount, newCount );
     if ( latestNewVideo )
         {
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosalbums.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosalbums.cpp	Fri May 14 15:14:51 2010 +0300
@@ -49,6 +49,7 @@
 void CVcxMyVideosAlbums::ConstructL()
     {
     iAlbums.Reset();
+    iChangedAlbums.Reset();
     }
 
 // ---------------------------------------------------------------------------
@@ -81,6 +82,7 @@
     iMdsOpResults.Close();
     iMdsOpResultsUint32.Close();
     iRemoveFromAlbumVideos.Close();
+    iChangedAlbums.Close();
     }
     
 // ----------------------------------------------------------------------------
@@ -766,4 +768,39 @@
     NewVideoFlagChangedL( aMdsId ); // same calculation works for this
     }
 
+// ----------------------------------------------------------------------------
+// CVcxMyVideosAlbums::VideoAddedOrRemovedFromCacheL
+// ----------------------------------------------------------------------------
+//
+void CVcxMyVideosAlbums::VideoAddedOrRemovedFromCacheL( CMPXMedia& aVideo )
+    {
+    TInt count = iAlbums.Count();
+    TUint32 mdsId = TVcxMyVideosCollectionUtil::IdL( aVideo ).iId1;
+    for ( TInt i = 0; i < count; i++ )
+        {
+        if ( iAlbums[i]->BelongsToAlbum( mdsId ) )
+            {
+            if ( iChangedAlbums.Find( i ) == KErrNotFound )
+                {
+                iChangedAlbums.AppendL( i );
+                }
+            }
+        }    
+    }
+// ----------------------------------------------------------------------------
+// CVcxMyVideosAlbums::UpdateChangedAlbumsL
+// ----------------------------------------------------------------------------
+//
+void CVcxMyVideosAlbums::UpdateChangedAlbumsL()
+    {
+    TInt count = iChangedAlbums.Count();
+    for ( TInt i = 0; i < count; i++ )
+        {
+        iCollection.iMessageList->AddEventL(
+                TMPXItemId( iAlbums[iChangedAlbums[i]]->iMdsId, KVcxMvcMediaTypeAlbum ),
+                EMPXItemModified, EVcxMyVideosVideoListOrderChanged );
+        iAlbums[iChangedAlbums[i]]->CalculateAttributesL();
+        }
+    iChangedAlbums.Reset();
+    }
 // END OF FILE
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp	Fri May 14 15:14:51 2010 +0300
@@ -49,8 +49,6 @@
 CVcxMyVideosAsyncFileOperations* CVcxMyVideosAsyncFileOperations::NewL(
     CVcxMyVideosCollectionPlugin& aCollection )
     {
-    MPX_FUNC("CVcxMyVideosAsyncFileOperations::NewL");
-
     CVcxMyVideosAsyncFileOperations* self = new (ELeave) CVcxMyVideosAsyncFileOperations(
             aCollection );
     CleanupStack::PushL(self);
@@ -65,8 +63,6 @@
 //
 CVcxMyVideosAsyncFileOperations::~CVcxMyVideosAsyncFileOperations()
     {
-    MPX_FUNC("CVcxMyVideosAsyncFileOperations::~CVcxMyVideosAsyncFileOperations");
-        
     iOperationIdArray.Close();
     iOperationResult.Close();
     delete iFileCopier;
@@ -78,11 +74,9 @@
 // Constructor.
 // ----------------------------------------------------------------------------
 //
-CVcxMyVideosAsyncFileOperations::CVcxMyVideosAsyncFileOperations(
-        CVcxMyVideosCollectionPlugin& aCollection )
+CVcxMyVideosAsyncFileOperations::CVcxMyVideosAsyncFileOperations( CVcxMyVideosCollectionPlugin& aCollection )
 : iCollection( aCollection )
     {
-    MPX_FUNC("CVcxMyVideosAsyncFileOperations::CVcxMyVideosAsyncFileOperations");
     }
 
 // ----------------------------------------------------------------------------
@@ -579,17 +573,11 @@
         MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: Copy succeeded");
         if ( iIsMoveOperation )
             {
-            MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: move case");
+            MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: move op: deleting source file");
             aErr = BaflUtils::DeleteFile( iCollection.iFs, iSourcePath );
             if ( aErr != KErrNone )
                 {
                 MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: delete for source file failed: %d", aErr );
-                MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: deleting target file");
-                TInt delErr = BaflUtils::DeleteFile( iCollection.iFs, iTargetPath );
-                if ( delErr != KErrNone )
-                    {
-                    MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: delete for target file failed: %d", delErr );
-                    }
                 }
             }
         }
@@ -598,15 +586,21 @@
         MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: CopyFile failed: %d", aErr);
         }
     
-    // roll mds and cache back if file operations failed
+    // roll everything back if file operations failed
     if ( aErr != KErrNone )
         {
         if ( iIsMoveOperation )
             {
-            MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: move failed %d", aErr );
-            MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: setting media path back and leaving." );
+            MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: move operation failed %d", aErr );
+            MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: setting media path back in MDS" );
             iMediaForMoveOp->SetTextValueL( KMPXMediaGeneralUri, iSourcePath );
             iCollection.SetVideoL( *iMediaForMoveOp );
+            MPX_DEBUG1("CVcxMyVideosAsyncFileOperations:: deleting target file");
+            TInt delErr = BaflUtils::DeleteFile( iCollection.iFs, iTargetPath );
+            if ( delErr != KErrNone )
+                {
+                MPX_DEBUG2("CVcxMyVideosAsyncFileOperations:: delete for target file failed: %d", delErr );
+                }
             }
         else
             {
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp	Fri May 14 15:14:51 2010 +0300
@@ -541,6 +541,8 @@
 
     CleanupStack::PopAndDestroy( &nonVideoIds );
     
+    iAlbums->UpdateChangedAlbumsL();
+    
     iMessageList->SendL();
     }
     
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsalbums.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsalbums.cpp	Fri May 14 15:14:51 2010 +0300
@@ -50,27 +50,8 @@
 void CVcxMyVideosMdsAlbums::ConstructL()
     {
     GetSchemaDefinitionsL();
-    CActiveScheduler::Add( this );
-    
-    if ( iObserver )
-        {
-        //ENotifyAdd and ENotifyModify are not supported
-        iMdsDb.MdsSessionL().AddRelationItemObserverL( *this, NULL,
-                ENotifyRemove, iMdsDb.iNamespaceDef );
-
-#if 0
-        // We receive only IDs from here. We need to make query to get
-        // relation objects-> slow to use. We use the response from
-        // the add operation instead. This way we don't receive
-        // add events if someone else adds videos to our albums
-        // but the performance is the best possible.
-        iMdsDb.MdsSessionL().AddRelationObserverL( *this, NULL,
-                ENotifyAdd | ENotifyModify | ENotifyRemove );        
-#endif
-        }
-    
-    //TODO: do we need this?
-    //iMdsDb.MdsSessionL().AddRelationPresentObserverL();
+    SetObservingL();
+    CActiveScheduler::Add( this );    
     }
 
 // ---------------------------------------------------------------------------
@@ -160,6 +141,30 @@
     }
 
 // ---------------------------------------------------------------------------
+// CVcxMyVideosMdsAlbums::SetObservingL
+// ---------------------------------------------------------------------------
+//
+void CVcxMyVideosMdsAlbums::SetObservingL()
+    {
+    if ( iObserver )
+        {
+        //ENotifyAdd and ENotifyModify are not supported
+        iMdsDb.MdsSessionL().AddRelationItemObserverL( *this, NULL,
+                ENotifyRemove, iMdsDb.iNamespaceDef );
+
+#if 0
+        // We receive only IDs from here. We need to make query to get
+        // relation objects-> slow to use. We use the response from
+        // the add operation instead. This way we don't receive
+        // add events if someone else adds videos to our albums
+        // but the performance is the best possible.
+        iMdsDb.MdsSessionL().AddRelationObserverL( *this, NULL,
+                ENotifyAdd | ENotifyModify | ENotifyRemove );        
+#endif    
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // CVcxMyVideosMdsAlbums::GetAlbumsL
 // ---------------------------------------------------------------------------
 //
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp	Fri May 14 15:14:51 2010 +0300
@@ -233,6 +233,7 @@
         if ( iAlbums )
             {
             iAlbums->GetSchemaDefinitionsL();
+            iAlbums->SetObservingL();
             }
         }
     else
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp	Fri May 14 15:14:51 2010 +0300
@@ -219,6 +219,8 @@
             {
             MPX_DEBUG1("CVcxMyVideosOpenHandler:: KVcxMvcCategoryIdAll: calling HandleOpen(iCache.iVideoList)");
             iCache.iVideoList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
+            iCache.iVideoList->SetTObjectValueL<TInt>( KVcxMediaMyVideosInt32Value,
+                    EVcxMyVideosVideoListComplete );
             iCollection.iObs->HandleOpen( iCache.iVideoList, KErrNone );                    
             }
         else
@@ -227,6 +229,8 @@
             CMPXMedia* videoList = iCache.CreateVideoListByOriginL( origin );
             MPX_DEBUG1("CVcxMyVideosOpenHandler:: calling HandleOpen(new list)");
             videoList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
+            iCache.iVideoList->SetTObjectValueL<TInt>( KVcxMediaMyVideosInt32Value,
+                    EVcxMyVideosVideoListComplete );
             iCollection.iObs->HandleOpen( videoList, KErrNone );
             delete videoList;
             }
@@ -403,6 +407,8 @@
             //videolist complete
             CMPXMedia* videoList = album->CreateVideoListL();
             videoList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
+            videoList->SetTObjectValueL<TInt>( KVcxMediaMyVideosInt32Value,
+                    EVcxMyVideosVideoListComplete ); 
             iCollection.iObs->HandleOpen( videoList, KErrNone );
             delete videoList;
             iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );
@@ -500,6 +506,11 @@
         MPX_DEBUG2("CVcxMyVideosOpenHandler:: First videos for album %d arrived, calling HandleOpen()", aAlbumId);
         
         iAlbumVideoList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
+        if ( aComplete )
+            {
+            iAlbumVideoList->SetTObjectValueL<TInt>( KVcxMediaMyVideosInt32Value,
+                    EVcxMyVideosVideoListComplete );
+            }
         iCollection.iObs->HandleOpen( iAlbumVideoList, aError );
         iPendingAlbumOpenId = 0;
         }
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosvideocache.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosvideocache.cpp	Fri May 14 15:14:51 2010 +0300
@@ -14,7 +14,7 @@
 * Description:   Video list cache. Contains cached data from MDS.*
 */
 
-// Version : %version: TB101_57 %
+// Version : %version: TB101_58 %
 
 
 // INCLUDE FILES
@@ -1504,6 +1504,7 @@
     if ( aUpdateCategories )
         {
         iCollection.CategoriesL().VideoAddedL( aVideo );
+        iCollection.AlbumsL().VideoAddedOrRemovedFromCacheL( aVideo );
         }
 
     return KErrNone;
@@ -1563,6 +1564,7 @@
             pos != KErrNotFound /* no need to update if item is on iPartialVideoList*/ )
         {
         iCollection.CategoriesL().VideoRemovedL( *video );
+        iCollection.AlbumsL().VideoAddedOrRemovedFromCacheL( *video );
         }
         
     if ( pos != KErrNotFound )
--- a/videocollection/tsrc/stubs/inc/hbinputdialog.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbinputdialog.h	Fri May 14 15:14:51 2010 +0300
@@ -20,6 +20,8 @@
 #define HBINPUT_DIALOG_H
 
 #include "hbwidget.h"
+#include "hbaction.h"
+#include <qvariant.h>
 #include <qgraphicsitem.h>
 
 class HbInputDialog : public HbWidget
@@ -27,20 +29,52 @@
     Q_OBJECT
 
 public:
-    HbInputDialog(QGraphicsItem *parent= 0) : HbWidget(parent) {}
-    ~HbInputDialog() {}
+    HbInputDialog(QGraphicsItem *parent= 0);
+    ~HbInputDialog();
 
     /**
      * Returns string in parameter text if mGetTextReturnValue is null QString.
      */
+    /*
     static QString getText(const QString &label,const QString &text = QString(),
-            bool *ok = 0, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+            bool *ok = 0, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);*/
+    
+    /**
+     * Create new HbInputDialog after call to this and call emitDialogFinished to finish the sequence.
+     */
+    void getText(const QString &heading
+            ,QObject *receiver
+            ,const char *member
+            ,const QString &text=QString()
+            ,QGraphicsScene *scene=0
+            ,QGraphicsItem *parent=0);
+    
+    void emitDialogFinished( QObject* receiver, const char* member, int actionNum );
+    
+    void setAttribute(int attribute);
     
-    static bool mGetTextFails;
+    QList<HbAction*> actions() const
+    {
+        return mActions;
+    }
+    
+    QVariant value(int row = 0) { Q_UNUSED(row); mValueCallCount++; return mValueReturnValue; }
+    
+signals:
+
+    void finished(HbAction *action);
     
-    static QString mGetTextReturnValue;
+public:
+
+    QList<HbAction*> mActions;
     
+    static QString mLastHeading;
+    static QString mLastText;
     static int mGetTextCallCount;
+    static int mAttribute;
+    
+    static QVariant mValueReturnValue;
+    static int mValueCallCount;
 };
 
 #endif //HBINPUT_DIALOG_H
--- a/videocollection/tsrc/stubs/inc/hbmessagebox.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbmessagebox.h	Fri May 14 15:14:51 2010 +0300
@@ -19,22 +19,49 @@
 #ifndef HBMESSAGEBOX_H
 #define HBMESSAGEBOX_H
 
+#include <qobject.h>
 #include <qstring.h>
+#include "hbaction.h"
 
 class QGraphicsWidget;
 class QGraphicsScene;
 class QGraphicsItem;
 
-class HbMessageBox
+class HbMessageBox : public QObject
 {   
+    Q_OBJECT
+    
 public:
+    enum MessageBoxType {
+        MessageTypeInformation,
+        MessageTypeQuestion,
+        MessageTypeWarning
+    };
+    
+    HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
+    HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
+    ~HbMessageBox();
+    
+    /**
+    * Create new HbMessageBox and call emitDialogFinished after this one to finish the sequence.
+     */
+    void open( QObject* receiver = 0, const char* member = 0 );
+    
+    void emitDialogFinished( QObject* receiver, const char* member, int actionNum );
+
+    void show();
+    
+    void setAttribute(int attribute);
+    
     /** stubbed from HbMessgeBox */
-    static bool question(const QString &questionText,
-        const QString &primaryButtonText = QString(),
-        const QString &secondaryButtonText = QString(),
-        QGraphicsWidget *headWidget = 0,
-        QGraphicsScene *scene = 0,
-        QGraphicsItem *parent = 0);
+/*    static void question(const QString &questionText,
+                            QObject *receiver,
+                            const char *member,
+                            const QString &primaryButtonText = tr("Yes"),
+                            const QString &secondaryButtonText = tr("No"),
+                            QGraphicsWidget *headWidget = 0,
+                            QGraphicsScene *scene = 0,
+                            QGraphicsItem *parent = 0 );*/
 
     /** stubbed from HbMessgeBox */
     static void information(const QString &informationText,
@@ -47,8 +74,20 @@
         QGraphicsWidget *headWidget = 0,
         QGraphicsScene *scene = 0,
         QGraphicsItem *parent = 0 );
+    
+    QList<HbAction*> actions() const
+    {
+        return mActions;
+    }
+
+signals:
+
+    void finished(HbAction *action);
+    
+public:
+    
+    QList<HbAction*> mActions;
+    
 };
 
-
-
 #endif // HBMESSAGEBOX_H
--- a/videocollection/tsrc/stubs/inc/hbmessageboxdata.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbmessageboxdata.h	Fri May 14 15:14:51 2010 +0300
@@ -28,6 +28,10 @@
         mLatestTxt = "";
         mWarningCallCount = 0;
         mInformationCallCount = 0;
+        mType = -1;
+        mAttribute = -1;
+        mOpenCallCount = 0;
+        mShowCallCount = 0;
     }
     
 public: // data
@@ -35,8 +39,10 @@
     static QString mLatestTxt;
     static int mWarningCallCount;
     static int mInformationCallCount;
+    static int mType;
+    static int mAttribute;
+    static int mOpenCallCount;
+    static int mShowCallCount;
 };
 
-
-
 #endif // HBMESSAGEBOXDATA_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/inc/testobjectstore.h	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2008-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+#ifndef TESTOBJECTSTORE.h
+#define TESTOBJECTSTORE.h
+
+#include <qobject.h>
+#include <qpointer.h>
+#include <qlist.h>
+
+class TestObjectStore : public QObject
+{
+    Q_OBJECT
+
+public:
+    
+    static TestObjectStore &instance();
+    
+    void addObject(QObject *object);
+    
+private slots:
+
+    void objectDestroyed(QObject *obj);
+    
+private:
+    
+    TestObjectStore();
+
+    ~TestObjectStore();
+    
+    QList<QObject *> mObjects;
+    
+};
+
+#endif 
--- a/videocollection/tsrc/stubs/src/hbdocumentloader.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/hbdocumentloader.cpp	Fri May 14 15:14:51 2010 +0300
@@ -309,5 +309,9 @@
     {
         obj = new HbStackedWidget();
     }
+    else if(name == DOCML_NAME_LBL_MARKALL)
+    {
+        obj = new HbLabel();
+    }
     return obj;
 }
--- a/videocollection/tsrc/stubs/src/hbinputdialog.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/hbinputdialog.cpp	Fri May 14 15:14:51 2010 +0300
@@ -16,37 +16,61 @@
 */
 
 #include "hbinputdialog.h"
+#include "testobjectstore.h"
 
-bool HbInputDialog::mGetTextFails = false;
-QString HbInputDialog::mGetTextReturnValue = QString();
 int HbInputDialog::mGetTextCallCount = 0;
-
+int HbInputDialog::mAttribute = -1;
+QString HbInputDialog::mLastHeading = "";
+QString HbInputDialog::mLastText = "";
+QVariant HbInputDialog::mValueReturnValue = QVariant();
+int HbInputDialog::mValueCallCount = 0;
 
-QString HbInputDialog::getText(const QString &label,const QString &text,
-           bool *ok, QGraphicsScene *scene, QGraphicsItem *parent)
+HbInputDialog::HbInputDialog(QGraphicsItem *parent) : HbWidget(parent) 
 {
-   Q_UNUSED(label);
-   Q_UNUSED(scene);
-   Q_UNUSED(parent);
-   mGetTextCallCount++;
-   QString textReturn;
-   if(HbInputDialog::mGetTextReturnValue.isNull())
-   {
-       textReturn = text;
-   }
-   else
-   {
-       textReturn = mGetTextReturnValue;
-   }
-   if(mGetTextFails)
-   {
-       *ok = false;
-       textReturn = "";
-   }
-   else
-   {
-       *ok = true;            
-   }
-   return textReturn;
+    HbAction *action = new HbAction();
+    mActions.append(action);
+    action = new HbAction();
+    mActions.append(action);
+    
+    TestObjectStore::instance().addObject(this);
 }
 
+HbInputDialog::~HbInputDialog()
+{
+    while(!mActions.isEmpty())
+    {
+        delete mActions.takeFirst();
+    }
+}   
+
+void HbInputDialog::getText(const QString &heading
+        ,QObject *receiver
+        ,const char *member
+        ,const QString &text
+        ,QGraphicsScene *scene
+        ,QGraphicsItem *parent)
+{
+    Q_UNUSED(receiver);
+    Q_UNUSED(member);
+    Q_UNUSED(scene);
+    Q_UNUSED(parent);
+    
+    mLastHeading = heading;
+    mLastText = text;
+    mGetTextCallCount++;
+}
+
+void HbInputDialog::emitDialogFinished( QObject* receiver, const char* member, int actionNum )
+{
+    if(connect(this, SIGNAL(finished(HbAction *)), receiver, member))
+    {
+        emit finished(mActions.value(actionNum));
+        disconnect(this, SIGNAL(finished(HbAction *)), receiver, member);
+    }
+}
+
+void HbInputDialog::setAttribute(int attribute)
+{
+    HbInputDialog::mAttribute = attribute;
+}
+
--- a/videocollection/tsrc/stubs/src/hbmessagebox.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/hbmessagebox.cpp	Fri May 14 15:14:51 2010 +0300
@@ -19,27 +19,71 @@
 
 #include "hbmessagebox.h"
 #include "hbmessageboxdata.h"
+#include "testobjectstore.h"
 
 bool HbMessageBoxData::mQuestionReturnValue = false;
 QString HbMessageBoxData::mLatestTxt = "";
 int HbMessageBoxData::mWarningCallCount = 0;
 int HbMessageBoxData::mInformationCallCount = 0;
+int HbMessageBoxData::mType = -1;
+int HbMessageBoxData::mAttribute = -1;
+int HbMessageBoxData::mOpenCallCount = 0;
+int HbMessageBoxData::mShowCallCount = 0;
 
-bool HbMessageBox::question(const QString &questionText,
-    const QString &primaryButtonText,
-    const QString &secondaryButtonText,
-    QGraphicsWidget *headWidget,
-    QGraphicsScene *scene,
-    QGraphicsItem *parent)
+HbMessageBox::HbMessageBox(MessageBoxType type, QGraphicsItem *parent)
+{
+    Q_UNUSED(parent);
+    HbMessageBoxData::mType = type;
+
+    HbAction *action = new HbAction();
+    mActions.append(action);
+    action = new HbAction();
+    mActions.append(action);
+    
+    TestObjectStore::instance().addObject(this);
+}
+        
+HbMessageBox::HbMessageBox(const QString &text, MessageBoxType type, QGraphicsItem *parent)
 {
-    Q_UNUSED(primaryButtonText);
-    Q_UNUSED(secondaryButtonText);
-    Q_UNUSED(headWidget);
-    Q_UNUSED(scene);
     Q_UNUSED(parent);
+    HbMessageBoxData::mLatestTxt = text;
+    HbMessageBoxData::mType = type;
     
-    HbMessageBoxData::mLatestTxt = questionText;
-    return HbMessageBoxData::mQuestionReturnValue;
+    HbAction *action = new HbAction();
+    mActions.append(action);
+    action = new HbAction();
+    mActions.append(action);
+    
+    TestObjectStore::instance().addObject(this);
+}
+
+HbMessageBox::~HbMessageBox()
+{
+    while(!mActions.isEmpty())
+    {
+        delete mActions.takeFirst();
+    }
+}
+
+void HbMessageBox::show()
+{
+    HbMessageBoxData::mShowCallCount++;
+}
+
+void HbMessageBox::open( QObject* receiver, const char* member )
+{
+    Q_UNUSED(receiver);
+    Q_UNUSED(member);
+    HbMessageBoxData::mOpenCallCount++;
+}
+
+void HbMessageBox::emitDialogFinished( QObject* receiver, const char* member, int actionNum )
+{
+    if(connect(this, SIGNAL(finished(HbAction *)), receiver, member))
+    {
+        emit finished(mActions.value(actionNum));
+        disconnect(this, SIGNAL(finished(HbAction *)), receiver, member);
+    }
 }
 
 void HbMessageBox::information(const QString &informationText,
@@ -68,4 +112,9 @@
     HbMessageBoxData::mWarningCallCount++;
 }
 
+void HbMessageBox::setAttribute(int attribute)
+{
+    HbMessageBoxData::mAttribute = attribute;
+}
+
 // end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/testobjectstore.cpp	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2008-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+#include "testobjectstore.h"
+
+TestObjectStore::TestObjectStore()
+{
+    
+}
+
+TestObjectStore::~TestObjectStore()
+{
+    while(!mObjects.isEmpty())
+    {
+        QObject *obj = mObjects.takeFirst();
+        delete obj;
+    }
+}
+
+TestObjectStore &TestObjectStore::instance()
+{
+    static TestObjectStore _store;
+    return _store;
+}
+
+void TestObjectStore::addObject(QObject *object)
+{
+    if(connect(object, SIGNAL(destroyed(QObject *)), this, SLOT(objectDestroyed(QObject *))))
+    {
+        mObjects.append(object);
+    }
+}
+
+void TestObjectStore::objectDestroyed(QObject *obj)
+{
+    if(obj)
+    {
+        disconnect(obj, SIGNAL(destroyed(QObject *)), this, SLOT(objectDestroyed(QObject *)));
+        mObjects.removeOne(obj);
+    }
+}
--- a/videocollection/tsrc/stubs/src/videocollectionuiloader.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videocollectionuiloader.cpp	Fri May 14 15:14:51 2010 +0300
@@ -97,8 +97,9 @@
     storeOrphans(list);
 }
 
-QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name)
+QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name, bool loadIfNotFound)
 {
+    Q_UNUSED(loadIfNotFound);
     QGraphicsWidget *widget = 0;
     if(VideoCollectionUiLoaderData::mFindFailure)
     {
@@ -111,8 +112,9 @@
     return widget;
 }
 
-QObject* VideoCollectionUiLoader::doFindObject(const QString &name)
+QObject* VideoCollectionUiLoader::doFindObject(const QString &name, bool loadIfNotFound)
 {
+    Q_UNUSED(loadIfNotFound);
     QObject *object = 0;
     if(VideoCollectionUiLoaderData::mFindFailure)
     {
@@ -199,7 +201,7 @@
 QObject* VideoCollectionUiLoader::createObject(const QString& type,
     const QString &name)
 {
-    QObject* object = doFindObject(name);
+    QObject* object = doFindObject(name, true);
     if (!object)
     {
         if (name == DOCML_NAME_VIEW)
--- a/videocollection/tsrc/stubs/src/videolistselectiondialog.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videolistselectiondialog.cpp	Fri May 14 15:14:51 2010 +0300
@@ -144,4 +144,16 @@
     // not stubbed
 }
 
+void VideoListSelectionDialog::newAlbumNameDialogFinished(HbAction *action)
+{
+    Q_UNUSED(action);
+    // not stubbed
+}
+
+void VideoListSelectionDialog::finalize(QString albumName)
+{
+    Q_UNUSED(albumName);
+    // not stubbed
+}
+
 // end of file
--- a/videocollection/tsrc/stubs/src/videolistview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videolistview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -246,4 +246,10 @@
     // not stubbed
 }
 
+void VideoListView::createCollectionDialogFinished(HbAction *action)
+{
+    Q_UNUSED(action);
+    // not stubbed
+}
+
 // end of file
--- a/videocollection/tsrc/stubs/src/videolistwidget.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videolistwidget.cpp	Fri May 14 15:14:51 2010 +0300
@@ -133,12 +133,6 @@
     // not stubbed
 }
 
-void VideoListWidget::panGesture (const QPointF &point)
-{
-    Q_UNUSED(point);
-    // not stubbed
-}
-
 void VideoListWidget::openItemSlot()
 {
     // not stubbed
@@ -215,4 +209,22 @@
     // not stubbed
 }
 
+void VideoListWidget::renameDialogFinished(HbAction *action)
+{
+    Q_UNUSED(action);
+    // not stubbed
+}
+
+void VideoListWidget::deleteItemDialogFinished(HbAction *action)
+{
+    Q_UNUSED(action);
+    // not stubbed
+}
+
+void VideoListWidget::removeCollectionDialogFinished(HbAction *action)
+{
+    Q_UNUSED(action);
+    // not stubbed
+}
+
 // end of file
--- a/videocollection/tsrc/stubs/src/videoservicebrowse.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videoservicebrowse.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 3 %
+// Version : %version: 5 %
 
 #include <hbapplication.h>
 
@@ -30,8 +30,8 @@
     Constructor.
     \param parent, Pointer to the video services.
 */
-VideoServiceBrowse::VideoServiceBrowse(VideoServices* parent)
-    : XQServiceProvider( "TestListView" )
+VideoServiceBrowse::VideoServiceBrowse(VideoServices* parent, QLatin1String service)
+    : XQServiceProvider( service, parent  )
     , mRequestIndex( 0 )
     , mServiceApp( parent )
 {
@@ -94,4 +94,18 @@
     // not stubbed
 }
 
+/*!
+    Browse videos.
+    \param category, Category which type of videos are browsed.
+    \return None.
+*/
+void VideoServiceBrowse::browseVideos(int category,
+    int sortRole)
+{
+    Q_UNUSED(category);
+    Q_UNUSED(sortRole);
+    
+    // not stubbed
+}
+
 // End of file
--- a/videocollection/tsrc/stubs/src/videoservices.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videoservices.cpp	Fri May 14 15:14:51 2010 +0300
@@ -70,8 +70,8 @@
     mCurrentService(VideoServices::ENoService),
     mSortRole(0)
 {
-    mServiceUriFetch = new VideoServiceUriFetch(this);
-    mServiceBrowse = new VideoServiceBrowse(this);
+    mServiceUriFetch = new VideoServiceUriFetch(this, QLatin1String("TestListView"));
+    mServiceBrowse = new VideoServiceBrowse(this, QLatin1String("TestListView"));
 }
 
 VideoServices::~VideoServices()
--- a/videocollection/tsrc/stubs/src/videoserviceurifetch.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/src/videoserviceurifetch.cpp	Fri May 14 15:14:51 2010 +0300
@@ -18,8 +18,8 @@
 #include "videoserviceurifetch.h"
 #include "videoservices.h"
 
-VideoServiceUriFetch::VideoServiceUriFetch(VideoServices* parent):
-    XQServiceProvider("TestListView"),
+VideoServiceUriFetch::VideoServiceUriFetch(VideoServices* parent, QLatin1String service):
+    XQServiceProvider( service, parent ),
     mRequestIndex(0),
     mServiceApp(parent)
 {
@@ -61,6 +61,11 @@
     return QString();
 }
 
+void VideoServiceUriFetch::fetch()
+{
+    mServiceApp->setCurrentService(VideoServices::EUriFetcher);
+}
+
 void VideoServiceUriFetch::fetch(const QString& title)
 {
     Q_UNUSED(title);
--- a/videocollection/tsrc/stubs/stubs.pro	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/tsrc/stubs/stubs.pro	Fri May 14 15:14:51 2010 +0300
@@ -28,6 +28,7 @@
     -lxqservice.dll
 
 HEADERS_TEMP = \
+    inc/testobjectstore.h \
     inc/hbabstractitemview.h \
     inc/hbdocumentloader.h \
     inc/hbaction.h \
@@ -86,6 +87,7 @@
     ../../../videoplayerapp/videoplayerengine/inc/videoservicebrowse.h
 
 SOURCES_TEMP = \
+    src/testobjectstore.cpp \
     src/hbdocumentloader.cpp \
     src/hbaction.cpp \
     src/hbcheckbox.cpp \
Binary file videocollection/tsrc/videoservicestestapp/sis/Nokia_RnDCert_02.der has changed
--- a/videocollection/tsrc/videoservicestestapp/sis/Nokia_RnDCert_02.key	Fri Apr 30 09:52:11 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQC/TDP7KKIaf5+uW4OD2iVZuUMC2a+SeQTjf6srlKcOm+CpPNXn
-uLNm/8fdEnyOIuRXPRKmqhs1n0JkxEGHynELWMTuKXbQx9SRAGUXzyneGn+IJNnO
-vOKHWgKCouX2hfI8rtkdqJpqmO460gGsMgw+lsbeyWyW9lnfLxq+ZC7sqQIDAQAB
-AoGBALmUWZE8GBaQ3P4u9WUCSd3DJkkrmXIFSULSZeH/chlwCwDjbbhArHothVzo
-REE3hEFFlERvHbplZ+mNouzy7boduvgUzbksGrbGMLJ2qO1GzWWVwV+GzOWKd3ss
-/98Gwoy5R8pjnkqUE2wP1iJFw0FjvUTKcYv/z6t3LLJ0CsoBAkEA+c7ixvsviQ3J
-s0INytCKU2bf8fqFQJi1VI82ukxNsujGTQ9upVSjuvqPvWyDvvTdrUBHqO+3qPut
-sEh01Q8aiQJBAMQKDJPVRu4ud3mwUfEavzL5EjqwG1k9VCNGYsT4FwtrHcxu1oP/
-pk6M3rIZukqomoEEnHWPMwhrK3fhBqi0OSECQQDr40VXege4FnH5OI2Hj4afHMyp
-VdQQXGMWFyopnzXblFz0lXb43cTCIiorR9XcMqNFHybLypkWE5o+lRzlt55pAkBQ
-P/zeF5Sts//cpL0mgdh7OVKpC6ZmZaCnwAx2rUhhuDu+kDDoYCLoTOps5fNI1LRK
-1GRoC3LMo3Jr5IYhUYWBAkBpCpN6k4JU/mszq98EojHerQNxk8sPqvQKUzTutohT
-1gLX9yepGayB/TtT2EEJDkWOlnTy/dvN6W3vzbJYz97x
------END RSA PRIVATE KEY-----
Binary file videocollection/tsrc/videoservicestestapp/sis/videoservicestestapp.sisx has changed
--- a/videocollection/videocollectionview/data/videocollectionview.qrc	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/data/videocollectionview.qrc	Fri May 14 15:14:51 2010 +0300
@@ -3,9 +3,6 @@
         <file alias="collectionview.docml">collectionview.docml</file>
         <file alias="videolistselectiondialog.docml">videolistselectiondialog.docml</file>
     </qresource>
-    <qresource prefix="/" >
-        <file>images/qtg_mono_video_all.svg</file>
-    </qresource> 
     <qresource prefix="/style" >
         <file>hbdialog.css</file>
     </qresource>
--- a/videocollection/videocollectionview/inc/videocollectionuiloader.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/inc/videocollectionuiloader.h	Fri May 14 15:14:51 2010 +0300
@@ -78,24 +78,26 @@
      * Returns the requested widget casted to correct type
      *
      * @param name Name of the widget
+     * @param loadIfNotFound Should the widget be loaded if not found in cache.
      * @return Pointer to the widget
      */
     template<class T>
-    T* findWidget(const QString &name)
+    T* findWidget(const QString &name, bool loadIfNotFound = true)
     {
-        return qobject_cast<T*>(doFindWidget(name));
+        return qobject_cast<T*>(doFindWidget(name, loadIfNotFound));
     }
 
     /**
      * Returns the requested object casted to correct type
      *
      * @param name Name of the object
+     * @param loadIfNotFound Should the widget be loaded if not found in cache.
      * @return Pointer to the object
      */
     template<class T>
-    T* findObject(const QString &name)
+    T* findObject(const QString &name, bool loadIfNotFound = true)
     {
-        return qobject_cast<T*>(doFindObject(name));
+        return qobject_cast<T*>(doFindObject(name, loadIfNotFound));
     }
     
     /**
@@ -141,9 +143,10 @@
      * Loads widget from document.
      * 
      * @param name, Widget name.
+     * @param loadIfNotFound Should the widget be loaded if not found in cache.
      * @return QGraphicsWidget*.
      */
-    QGraphicsWidget* doFindWidget(const QString &name);
+    QGraphicsWidget* doFindWidget(const QString &name, bool loadIfNotFound);
     
     /**
      * Loads object from document.
@@ -151,7 +154,7 @@
      * @param name, Object name.
      * @return QObject*.
      */
-    QObject* doFindObject(const QString &name);
+    QObject* doFindObject(const QString &name, bool loadIfNotFound);
     
     /**
      * Adds a ui section to async loading queue.
--- a/videocollection/videocollectionview/inc/videolistview.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/inc/videolistview.h	Fri May 14 15:14:51 2010 +0300
@@ -380,6 +380,11 @@
      * Boolean for knowing when the model is ready.
      */
     bool mModelReady;
+    
+    /**
+     * Boolean for knowing when the view is ready.
+     */
+    bool mViewReady;
 
     /**
      * Hint level for the hint widget.
--- a/videocollection/videocollectionview/inc/videolistwidget.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/inc/videolistwidget.h	Fri May 14 15:14:51 2010 +0300
@@ -174,12 +174,6 @@
      * Saves current selected item's index to mCurrentIndex
      */
     void longPressedSlot(HbAbstractViewItem *item, const QPointF &point);
-
-    /**
-     * Re-implemented in case context menu is visible, the below list shoud not
-     * be panned.
-     */
-    void panGesture(const QPointF &point);
     
 private slots:
 
--- a/videocollection/videocollectionview/src/videocollectionuiloader.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/src/videocollectionuiloader.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 21 %
+// Version : %version: 22 %
 
 // INCLUDE FILES
 #include <qgraphicswidget.h>
@@ -199,7 +199,7 @@
 // doFindWidget
 // ---------------------------------------------------------------------------
 //
-QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name)
+QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name, bool loadIfNotFound)
 {
 	FUNC_LOG;
     QGraphicsWidget *widget = 0;
@@ -211,7 +211,7 @@
     }
 
     // 2. load from document and initialize
-    else
+    else if (loadIfNotFound)
     {
         // find object from queue
         int index = indexInQueue(name);
@@ -238,7 +238,7 @@
 // doFindObject
 // ---------------------------------------------------------------------------
 //
-QObject* VideoCollectionUiLoader::doFindObject(const QString &name)
+QObject* VideoCollectionUiLoader::doFindObject(const QString &name, bool loadIfNotFound)
 {
 	FUNC_LOG;
     QObject *object = 0;
@@ -250,7 +250,7 @@
     }
 
     // 2. load from document and initialize
-    else
+    else if (loadIfNotFound)
     {
         // find object from queue
         int index = indexInQueue(name);
@@ -373,10 +373,8 @@
                     wrapper.getModel(VideoCollectionCommon::EModelTypeAllVideos);
                 if(model)
                 {
-                    // open and sort model
-                    model->open(VideoCollectionCommon::ELevelVideos);
-                    VideoCollectionViewUtils::sortModel(model, true, VideoCollectionCommon::ELevelVideos);
-                    
+                	VideoCollectionViewUtils::sortModel(model, true, VideoCollectionCommon::ELevelVideos);
+                	
                     // init widget
                     VideoServices *videoServices = 0;
                     if (mIsService)
@@ -393,9 +391,8 @@
             		VideoCollectionCommon::EModelTypeCollections);
             if (model)
             {
-                model->open(VideoCollectionCommon::ELevelCategory);
                 VideoCollectionViewUtils::sortModel(model, true, VideoCollectionCommon::ELevelCategory);
-
+                
                 // initialize video collection widget
                 VideoListWidget *videoList =
                     qobject_cast<VideoListWidget*>(object);
@@ -417,6 +414,10 @@
             		VideoCollectionCommon::EModelTypeCollectionContent);
             if (model)
             {
+                // collection content contains always a list of videos so we use 
+                // ELevelVideos as target for sorting
+                VideoCollectionViewUtils::sortModel(model, false, VideoCollectionCommon::ELevelVideos);
+                
                 VideoListWidget *videoList = qobject_cast<VideoListWidget*>(object);
                 if (videoList)
                 {
--- a/videocollection/videocollectionview/src/videocollectionviewutils.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/src/videocollectionviewutils.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 37 %
+// Version : %version: 39 %
 
 // INCLUDE FILES
 #include <hbglobal.h>
@@ -32,6 +32,11 @@
 #include "videosortfilterproxymodel.h"
 #include "videocollectiontrace.h"
 
+// Object names.
+const char* const VIEW_UTILS_OBJECT_NAME_STATUS_MSG          = "vc:ViewUtilsStatusMessage";
+const char* const VIEW_UTILS_OBJECT_NAME_MESSAGE_BOX_WARNING = "vc:ViewUtilsMessageBoxWarning";
+
+// Cenrep constants.
 const int KVideoCollectionViewCenrepUid(0x2002BC63);
 const int KVideoCollectionViewCenrepServiceIconKey(0x2);
 const int KVideoCollectionViewCenrepServiceIconPressedKey(0x3);
@@ -40,15 +45,19 @@
 const int KVideoCollectionViewCenrepCollectionsSortingRoleKey(0x7);
 const int KVideoCollectionViewCenrepCollectionsSortingOrderKey(0x8);
 
+const int KAddToCollectionDataCount(2);
+const int KAddToCollectionCountIndex(0);
+const int KAddToCollectionNameIndex(1);
+
 // ---------------------------------------------------------------------------
 // instance
 // ---------------------------------------------------------------------------
 //
 VideoCollectionViewUtils& VideoCollectionViewUtils::instance()
 {
-	FUNC_LOG;
-     static VideoCollectionViewUtils _popupInstance;
-     return _popupInstance;
+    FUNC_LOG;
+    static VideoCollectionViewUtils _popupInstance;
+    return _popupInstance;
 }
 
 // ---------------------------------------------------------------------------
@@ -62,7 +71,6 @@
     mCollectionsSortOrder(Qt::AscendingOrder)
 {
 	FUNC_LOG;
-
 }
 
 // ---------------------------------------------------------------------------
@@ -72,7 +80,6 @@
 VideoCollectionViewUtils::~VideoCollectionViewUtils()
 {
 	FUNC_LOG;
-
 }
 
 // ---------------------------------------------------------------------------
@@ -335,11 +342,16 @@
         case VideoCollectionCommon::statusMultiRemoveFail:
             msg = hbTrId("txt_videos_info_unable_to_remove_some_collections");
         break;
-        case VideoCollectionCommon::statusVideosAddedToCollection:
-            format = hbTrId("txt_videos_dpopinfo_videos_added_to_1");
-            if(additional.isValid())
+        case VideoCollectionCommon::statusVideosAddedToCollection:            
+            // videos added to collection - status should containg both count and collection name
+            if(additional.isValid() && additional.toList().count() == KAddToCollectionDataCount)
             {
-                msg = format.arg(additional.toString());
+                int count = additional.toList().at(KAddToCollectionCountIndex).toInt();
+                QString name = additional.toList().at(KAddToCollectionNameIndex).toString();
+                if(count && name.length())
+                {
+                    msg = hbTrId("txt_videos_dpopinfo_ln_videos_added_to_1", count).arg(name);
+                }
             }
             error = false;
         break;
@@ -347,10 +359,9 @@
             msg = hbTrId("txt_videos_info_all_videos_already_added_to_this_c");
         break;
         case VideoCollectionCommon::statusDeleteInProgress:
-            format = hbTrId("txt_videos_dpopinfo_ln_videos_are_being_deleted");
             if(additional.isValid())
             {
-                msg = format.arg(additional.toString());
+                msg = hbTrId("txt_videos_dpopinfo_ln_videos_are_being_deleted", additional.toInt());
             }
             error = false;
         break;
@@ -362,7 +373,10 @@
     {
         if(error)
         {
-            HbMessageBox::warning(msg);
+            HbMessageBox *messageBox = new HbMessageBox(msg, HbMessageBox::MessageTypeWarning);
+            messageBox->setAttribute(Qt::WA_DeleteOnClose);
+            messageBox->setObjectName(VIEW_UTILS_OBJECT_NAME_MESSAGE_BOX_WARNING);
+            messageBox->show();
         }
         else
         {
@@ -371,8 +385,10 @@
             // only title can be two rows for HbNotificationDialog
             infoNote->setTitleTextWrapping(Hb::TextWordWrap);
             infoNote->setTitle(msg);
+            infoNote->setObjectName(VIEW_UTILS_OBJECT_NAME_STATUS_MSG);
             infoNote->show();
         }
     }
 }
 
+// End of file
--- a/videocollection/videocollectionview/src/videolistselectiondialog.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/src/videolistselectiondialog.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version: 25 %
+// Version : %version: 29 %
 
 // INCLUDE FILES
 #include <qgraphicsitem.h>
@@ -37,6 +37,12 @@
 #include "videocollectionclient.h"
 #include "videocollectiontrace.h"
 
+// Object names.
+const char* const SELECTION_DIALOG_OBJECT_NAME_LIST_WIDGET    = "vc:SelectionDialogListWidget";
+const char* const SELECTION_DIALOG_OBJECT_NAME_NEW_COLLECTION = "vc:SelectionDialogNewCollection";
+const char* const SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK      = "vc:SelectionDialogButtonOk";
+const char* const SELECTION_DIALOG_OBJECT_NAME_BUTTON_CANCEL  = "vc:SelectionDialogButtonCancel";
+
 /**
  * global qHash function required fo creating hash values for TMPXItemId -keys
  */
@@ -91,6 +97,7 @@
         }
         // disable list related animations to make dialog faster 
         mListWidget->setEnabledAnimations(HbAbstractItemView::None);
+        mListWidget->setObjectName(SELECTION_DIALOG_OBJECT_NAME_LIST_WIDGET);
     }
 }
 
@@ -175,6 +182,7 @@
         if(!mListWidget)
         {
             mListWidget = new VideoListWidget(mUiLoader);
+            mListWidget->setObjectName(SELECTION_DIALOG_OBJECT_NAME_LIST_WIDGET);
             if(mListWidget->initialize(*mModel) < 0)
             {
                 ERROR(-1, "VideoListSelectionDialog::initDialog() failed to setup VideoListWidget.");
@@ -217,11 +225,13 @@
     if(!mPrimaryAction)
     {
         mPrimaryAction = new HbAction(hbTrId("txt_common_button_ok"));
+        mPrimaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_OK);
         addAction(mPrimaryAction);
     }
     if(!mSecondaryAction)
     {
         mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"));
+        mSecondaryAction->setObjectName(SELECTION_DIALOG_OBJECT_NAME_BUTTON_CANCEL);
         addAction(mSecondaryAction);
     }
     
@@ -277,10 +287,8 @@
         mCheckboxContainer->setVisible(false);
         mListWidget->setSelectionMode(-1);   
         mListWidget->activate(VideoCollectionCommon::ELevelCategory);
-        // need to set primaryaction disabled here in order for it 
-        // get correctly updated at modelReady(), where it will be enabled
-        // if state would be same, no update will happen
-        mPrimaryAction->setDisabled(true);
+        // New collection button is always enabled for collection selection.
+        mPrimaryAction->setDisabled(false);
     }
     else
     {
@@ -290,10 +298,8 @@
         mCheckboxContainer->setVisible(true);
         mItemCount->setPlainText(tr("0/%1").arg(mModel->rowCount())); 
         mCheckBox->setChecked(false);
-        // need to set primaryaction enabled here in order for it 
-        // get correctly updated at modelReady(), where it will be disabled  
-        // if state would be same, no update will happen
-        mPrimaryAction->setDisabled(false);
+        // Add button will be enabled when videos are selected from the list.
+        mPrimaryAction->setDisabled(true);
     }
     mHeading->setPlainText(headingTxt);         
     // sort to make sure dialog has correctly filtered content
@@ -345,16 +351,18 @@
         return;
     }
     QString albumName("");
-    if( mTypeOfSelection == ESelectCollection )
+    if(mTypeOfSelection == ESelectCollection)
     {
         mTypeOfSelection = EAddToCollection;
-        if( mSelectedAlbumId == TMPXItemId::InvalidId())
+        if(mSelectedAlbumId == TMPXItemId::InvalidId())
         {
             QString label(hbTrId("txt_videos_title_enter_name"));
             HbInputDialog *dialog = new HbInputDialog();
+            dialog->setObjectName(SELECTION_DIALOG_OBJECT_NAME_NEW_COLLECTION);
             dialog->setAttribute(Qt::WA_DeleteOnClose);
-            dialog->getText(label, this, SLOT(newAlbumNameDialogFinished(HbAction *)), 
-                    hbTrId("txt_videos_dialog_entry_new_collection"));
+            dialog->setPromptText(label);
+            dialog->setValue(hbTrId("txt_videos_dialog_entry_new_collection"));
+            dialog->open(this, SLOT(newAlbumNameDialogFinished(HbAction *)));
        }
        else
        {
@@ -408,7 +416,10 @@
                 {
                     albumName = getSelectedName();
                 }
-                QVariant data = albumName;
+                QList<QVariant> dataList;
+                dataList.append(QVariant(mSelectedVideos.count()));
+                dataList.append(QVariant(albumName));
+                QVariant data = dataList;
                 VideoCollectionViewUtils::instance().showStatusMsgSlot(
                         VideoCollectionCommon::statusVideosAddedToCollection,
                         data);
@@ -522,7 +533,6 @@
 	FUNC_LOG;
     if(mTypeOfSelection == ESelectCollection)
     {
-        mPrimaryAction->setDisabled(false);
         if(!mModel->rowCount())
         {
             // in case there are no user defined albums, 
@@ -532,10 +542,6 @@
             return;
         }
     }
-    if(mTypeOfSelection != ESelectCollection)
-    {
-        mPrimaryAction->setDisabled(true);
-    }
     updateCounterSlot();
 }
 
@@ -676,7 +682,7 @@
             name = model->data(index, VideoCollectionCommon::KeyTitle).toString();
         }
     }
-    
     return name;
 }
 
+// End of file
--- a/videocollection/videocollectionview/src/videolistview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/src/videolistview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 101 %
+// Version : %version: 106 %
 
 // INCLUDE FILES
 #include <xqserviceutil.h>
@@ -47,6 +47,10 @@
 #include "mpxhbvideocommondefs.h"
 #include "videocollectiontrace.h"
 
+// Object names.
+const char* const LIST_VIEW_OBJECT_NAME_CREATE_COLLECTION = "vc::ListViewInputDialogCreateCollection";
+const char* const LIST_VIEW_OBJECT_NAME_OPTIONS_MENU      = "vc::ListViewOptionsMenu";
+
 // ---------------------------------------------------------------------------
 // Constructor
 // ---------------------------------------------------------------------------
@@ -58,6 +62,7 @@
     , mUiLoader( uiLoader )
     , mIsService( false )
     , mModelReady( false )
+    , mViewReady( false )
     , mHintLevel( VideoHintWidget::AllVideos )
     , mVideoServices( 0 )
     , mCurrentList( 0 )
@@ -302,8 +307,9 @@
 	
 	// if mModelReady is false, then it means that this is the first time modelReady
 	// signal fires. Signaling that view is ready.
-	if(!mModelReady)
+	if(!mViewReady)
 	{
+	    mViewReady = true;
 	    emit viewReady();
 	}
 	
@@ -322,12 +328,10 @@
 void VideoListView::layoutChangedSlot()
 {
 	FUNC_LOG;
+	// Note that showHint should be executed before updateSubLabel as it
+	// can modify the mModelReady flag.
+    showHint();
     updateSubLabel();
-    
-    if(mModelReady)
-    {
-        showHint();
-    }
 }
 
 // ---------------------------------------------------------------------------
@@ -351,8 +355,9 @@
                this, SLOT(handleAsyncStatusSlot(int, QVariant&)));
     
     HbMenu *menu = mUiLoader->findWidget<HbMenu>(DOCML_NAME_OPTIONS_MENU);
-    if (menu)
+    if(menu)
     {
+        menu->setObjectName(LIST_VIEW_OBJECT_NAME_OPTIONS_MENU);
         menu->hide();
     }
     
@@ -407,9 +412,9 @@
 int VideoListView::createToolbar()
 {
 	FUNC_LOG;
-    // Create actiongroup and add all actions to it. This ensures that only one is
+    
+	// Create actiongroup and add all actions to it. This ensures that only one is
     // active at certain moment.
-
     if(!mToolbarViewsActionGroup && !mToolbarCollectionActionGroup)
     {
     	mToolbarViewsActionGroup = new QActionGroup(this);
@@ -418,7 +423,7 @@
         // create toolbar item actions
 
         // All Videos tab
-        mToolbarActions[ETBActionAllVideos] = createAction(":/images/qtg_mono_video_all.svg",
+        mToolbarActions[ETBActionAllVideos] = createAction("qtg_mono_video",
                 mToolbarViewsActionGroup, SLOT(openAllVideosViewSlot()));
 
         // Collections tab
@@ -514,30 +519,34 @@
 
     VideoSortFilterProxyModel &model = mCurrentList->getModel();
     
-    // prepare hint widget
+    if(!mModelReady && model.rowCount() == 0)
+    {
+        return;
+    }
+    
+    mModelReady = true;
+    
+    // decide if the hintwidget needs to be shown or not.
+    show = show && model.rowCount() == 0;
+    
+    // If show is false, then hint widget is fetched only if it exists. If
+    // show is true then hint widget is also created and prepared if it does not exists.
     VideoHintWidget *hintWidget =
         mUiLoader->findWidget<VideoHintWidget>(
-            DOCML_NAME_VC_VIDEOHINTWIDGET);
+            DOCML_NAME_VC_VIDEOHINTWIDGET, show);
+    
     if (hintWidget)
     {
         hintWidget->setLevel(mHintLevel);
-        if (mModelReady &&
-            model.rowCount() == 0)
+        if (show)
         {
-            show ? hintWidget->activate() : hintWidget->deactivate();
-        }
-        else
-        {
-            show = false;
-            hintWidget->deactivate();
-        }
-        if(show)
-        {
+            hintWidget->activate();
             bool showHintBtns = (mCurrentList->getLevel() != VideoCollectionCommon::ELevelDefaultColl); 
             hintWidget->setButtonShown(showHintBtns);
         }
         else
         {
+            hintWidget->deactivate();
             hintWidget->setButtonShown(true);
         }
     }
@@ -595,7 +604,7 @@
         model = &mCurrentList->getModel(); 
     }
     
-    if (model)
+    if (model && mModelReady)
     {
         int itemCount = model->rowCount();
         
@@ -823,11 +832,10 @@
         mCurrentList = videoListWidget;
         mCurrentList->activate(VideoCollectionCommon::ELevelVideos);
 
-        // since collection is not to be opened at this point,
-        // we do not receive lauoutChanged for updating the hind -widget
-        // if needed, need to show it here is needed
         setHintLevel(VideoHintWidget::AllVideos);
-        showHint();
+        
+        // update the sublabel, as in most cases the data is already up to date.
+        updateSubLabel();
     }
 }
 
@@ -854,10 +862,11 @@
         
         VideoSortFilterProxyModel &model = mCurrentList->getModel(); 
 
-        VideoCollectionViewUtils::sortModel(&model, false, mCurrentList->getLevel());
-
-        // the collection view is not empty, so we can hide the hint in advance.
+        // the collection view is not empty, so we should hide the hint in advance.
         showHint(false);
+        
+        // also update the sublabel immediatelly, as the data is up to date almost always.
+        updateSubLabel();
     }
 }
 
@@ -1023,7 +1032,10 @@
     
     HbInputDialog *dialog = new HbInputDialog();
     dialog->setAttribute(Qt::WA_DeleteOnClose);
-    dialog->getText(label, this, SLOT(createCollectionDialogFinished(HbAction *)), text);
+    dialog->setObjectName(LIST_VIEW_OBJECT_NAME_CREATE_COLLECTION);
+    dialog->setPromptText(label);
+    dialog->setValue(text);
+    dialog->open(this, SLOT(createCollectionDialogFinished(HbAction *)));
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -1033,7 +1045,6 @@
 void VideoListView::createCollectionDialogFinished(HbAction *action)
 {
     FUNC_LOG;
-    Q_UNUSED(action);
     
     HbInputDialog *dialog = static_cast<HbInputDialog*>(sender());
     
@@ -1362,7 +1373,8 @@
         }
         
         // Start fetching content before changing.
-        collectionContentWidget->getModel().openItem(itemId);
+        VideoSortFilterProxyModel &model = collectionContentWidget->getModel();
+        model.openItem(itemId);
         
         // deactivat current widget.
         mCurrentList->deactivate();
@@ -1373,14 +1385,11 @@
 
         updateSubLabel();
 
-        // setup correct sorting, collection content contains always a list of videos so we use 
-        // ELevelVideos as target for sorting
-        VideoCollectionViewUtils::sortModel(&mCurrentList->getModel(), false, VideoCollectionCommon::ELevelVideos);
-        mCurrentList->getModel().invalidate();
+        model.invalidate();
         
         // update hint widget for correct content
+        mModelReady = model.rowCount() > 0;
         setHintLevel(VideoHintWidget::Collection);
-        showHint();
 
         // update toolbar for albums, default categories don't have one.
         if(level == VideoCollectionCommon::ELevelAlbum && 
@@ -1404,7 +1413,6 @@
     }
 	// restore animations for collection content widget
 	collectionContentWidget->setEnabledAnimations(animationState);
-	
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -1514,5 +1522,4 @@
     HbMessageBox::information(tr("Not implemented yet"));
 }
 
-// end of file
-
+// End of file
--- a/videocollection/videocollectionview/src/videolistwidget.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/src/videolistwidget.cpp	Fri May 14 15:14:51 2010 +0300
@@ -40,6 +40,23 @@
 #include "videocollectioncommon.h"
 #include "mpxhbvideocommondefs.h"
 
+// Object names.
+const char* const LIST_WIDGET_OBJECT_NAME_CONTEXT_MENU             = "vc:ListWidgetContextMenu";
+const char* const LIST_WIDGET_OBJECT_NAME_DELETE_VIDEO             = "vc:ListWidgetMessageBoxDeleteVideo";
+const char* const LIST_WIDGET_OBJECT_NAME_RENAME_VIDEO             = "vc:ListWidgetInputDialogRenameVideo";
+const char* const LIST_WIDGET_OBJECT_NAME_REMOVE_COLLECTION        = "vc:ListWidgetMessageBoxRemoveCollection";
+const char* const LIST_WIDGET_OBJECT_NAME_NAV_KEY_BACK             = "vc:ListWidgetNavKeyBack";
+const char* const LIST_WIDGET_OBJECT_NAME_NAV_KEY_QUIT             = "vc:ListWidgetNavKeyQuit";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_ATTACH            = "vc:ListWidgetActionAttach";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_PLAY              = "vc:ListWidgetActionPlay";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_DETAILS           = "vc:ListWidgetActionDetails";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_DELETE            = "vc:ListWidgetActionDelete";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_OPEN              = "vc:ListWidgetActionOpen";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_ADD_TO            = "vc:ListWidgetActionAddToCollection";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_REMOVE_FROM       = "vc:ListWidgetActionRemoveFromCollection";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_RENAME            = "vc:ListWidgetActionRename";
+const char* const LIST_WIDGET_OBJECT_NAME_ACTION_REMOVE_COLLECTION = "vc:ListWidgetActionRemoveCollection";
+
 // Interval in ms to report the scroll position.
 const int SCROLL_POSITION_TIMER_TIMEOUT = 100;
 
@@ -313,7 +330,6 @@
     }
     
     return isBrowsingService;
-
 }
 
 // ---------------------------------------------------------------------------
@@ -330,22 +346,21 @@
         if (isBrowsingService())
         {
             mNavKeyAction = new HbAction(Hb::QuitNaviAction);
-            if (mNavKeyAction)
-            {
-                connect(
-                    mNavKeyAction, SIGNAL(triggered()),
-                    mVideoServices, SLOT(browsingEnded()));
-            }
+            mNavKeyAction->setObjectName(LIST_WIDGET_OBJECT_NAME_NAV_KEY_QUIT);
+            connect(mNavKeyAction, SIGNAL(triggered()),
+                mVideoServices, SLOT(browsingEnded()));
         }
         else if (mModel)
         {
             if (VideoCollectionCommon::EModelTypeCollectionContent == mModel->getType())
             {
                 mNavKeyAction = new HbAction(Hb::BackNaviAction);
+                mNavKeyAction->setObjectName(LIST_WIDGET_OBJECT_NAME_NAV_KEY_BACK);
             }
             else
             {
                 mNavKeyAction = new HbAction(Hb::QuitNaviAction);
+                mNavKeyAction->setObjectName(LIST_WIDGET_OBJECT_NAME_NAV_KEY_QUIT);
             }
         }
     }
@@ -384,6 +399,7 @@
         
         HbMessageBox *messageBox = new HbMessageBox(text, HbMessageBox::MessageTypeQuestion);
         messageBox->setAttribute(Qt::WA_DeleteOnClose);
+        messageBox->setObjectName(LIST_WIDGET_OBJECT_NAME_DELETE_VIDEO);
         messageBox->open(this, SLOT(deleteItemDialogFinished(HbAction *)));
     }
 }
@@ -420,54 +436,77 @@
     }
     
     mContextMenu = new HbMenu();
-    if (mContextMenu)
+    mContextMenu->setDismissPolicy(HbPopup::TapAnywhere);
+    mContextMenu->setObjectName(LIST_WIDGET_OBJECT_NAME_CONTEXT_MENU);
+
+    VideoServices::TVideoService service = VideoServices::ENoService;
+    if (mIsService &&
+        mVideoServices)
     {
-        mContextMenu->setDismissPolicy(HbPopup::TapAnywhere);
+        service = mVideoServices->currentService();
+    }
+    
+    if (service == VideoServices::EUriFetcher)
+    {
+        mContextMenuActions[EActionAttach] = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_attach"), this, SLOT(openItemSlot()));
+        mContextMenuActions[EActionAttach]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_ATTACH);
         
-        VideoServices::TVideoService service = VideoServices::ENoService;
-        if (mIsService &&
-            mVideoServices)
-        {
-            service = mVideoServices->currentService();
-        }
+        mContextMenuActions[EActionPlay]    = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_play"), this, SLOT(playItemSlot()));
+        mContextMenuActions[EActionPlay]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_PLAY);
+        
+        mContextMenuActions[EActionDetails] = 
+                mContextMenu->addAction(hbTrId("txt_common_menu_details"), this, SLOT(openDetailsSlot()));
+        mContextMenuActions[EActionDetails]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_DETAILS);
+    }
+    else if (service == VideoServices::EBrowse)
+    {
+        mContextMenuActions[EActionPlay]    = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_play"), this, SLOT(playItemSlot()));
+        mContextMenuActions[EActionPlay]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_PLAY);
+        
+        mContextMenuActions[EActionDelete]           = 
+                mContextMenu->addAction(hbTrId("txt_common_menu_delete"), this, SLOT(deleteItemSlot()));
+        mContextMenuActions[EActionDelete]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_DELETE);
         
-        if (service == VideoServices::EUriFetcher)
-        {
-            mContextMenuActions[EActionAttach]    = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_attach"), this, SLOT(openItemSlot())); 
-            mContextMenuActions[EActionPlay]    = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_play"), this, SLOT(playItemSlot())); 
-            mContextMenuActions[EActionDetails] = 
-                    mContextMenu->addAction(hbTrId("txt_common_menu_details"), this, SLOT(openDetailsSlot()));
-        }
-        else if (service == VideoServices::EBrowse)
-        {
-            mContextMenuActions[EActionPlay]    = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_play"), this, SLOT(playItemSlot())); 
-            mContextMenuActions[EActionDelete]           = 
-                    mContextMenu->addAction(hbTrId("txt_common_menu_delete"), this, SLOT(deleteItemSlot()));
-            mContextMenuActions[EActionDetails] = 
-                    mContextMenu->addAction(hbTrId("txt_common_menu_details"), this, SLOT(openDetailsSlot()));
-        }
-        else
-        {
-            mContextMenuActions[EActionPlay]    = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_play"), this, SLOT(playItemSlot())); 
-            mContextMenuActions[EActionOpen]    = 
-                                mContextMenu->addAction(hbTrId("txt_common_menu_open"), this, SLOT(openItemSlot()));  
-            mContextMenuActions[EActionAddToCollection] = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_add_to_collection"), this, SLOT(addToCollectionSlot()));
-            mContextMenuActions[EActionRemove]           = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_remove_from_collection"), this, SLOT(removeFromCollectionSlot()));
-            mContextMenuActions[EActionRename]           = 
-                    mContextMenu->addAction(hbTrId("txt_common_menu_rename_item"), this, SLOT(renameSlot()));
-            mContextMenuActions[EActionRemoveCollection] = 
-                    mContextMenu->addAction(hbTrId("txt_videos_menu_remove_collection"), this, SLOT(removeCollectionSlot()));   
-            mContextMenuActions[EActionDelete]           = 
-                    mContextMenu->addAction(hbTrId("txt_common_menu_delete"), this, SLOT(deleteItemSlot()));
-            mContextMenuActions[EActionDetails]          = 
-                    mContextMenu->addAction(hbTrId("txt_common_menu_details"), this, SLOT(openDetailsSlot()));
-        }
+        mContextMenuActions[EActionDetails] = 
+                mContextMenu->addAction(hbTrId("txt_common_menu_details"), this, SLOT(openDetailsSlot()));
+        mContextMenuActions[EActionDetails]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_DETAILS);
+    }
+    else
+    {
+        mContextMenuActions[EActionPlay]    = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_play"), this, SLOT(playItemSlot()));
+        mContextMenuActions[EActionPlay]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_PLAY);
+        
+        mContextMenuActions[EActionOpen]    = 
+                            mContextMenu->addAction(hbTrId("txt_common_menu_open"), this, SLOT(openItemSlot()));
+        mContextMenuActions[EActionOpen]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_OPEN);
+        
+        mContextMenuActions[EActionAddToCollection] = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_add_to_collection"), this, SLOT(addToCollectionSlot()));
+        mContextMenuActions[EActionAddToCollection]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_ADD_TO);
+        
+        mContextMenuActions[EActionRemove]           = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_remove_from_collection"), this, SLOT(removeFromCollectionSlot()));
+        mContextMenuActions[EActionRemove]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_REMOVE_FROM);
+        
+        mContextMenuActions[EActionRename]           = 
+                mContextMenu->addAction(hbTrId("txt_common_menu_rename_item"), this, SLOT(renameSlot()));
+        mContextMenuActions[EActionRename]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_RENAME);
+        
+        mContextMenuActions[EActionRemoveCollection] = 
+                mContextMenu->addAction(hbTrId("txt_videos_menu_remove_collection"), this, SLOT(removeCollectionSlot()));
+        mContextMenuActions[EActionRemoveCollection]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_REMOVE_COLLECTION);
+        
+        mContextMenuActions[EActionDelete]           = 
+                mContextMenu->addAction(hbTrId("txt_common_menu_delete"), this, SLOT(deleteItemSlot()));
+        mContextMenuActions[EActionDelete]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_DELETE);
+        
+        mContextMenuActions[EActionDetails]          = 
+                mContextMenu->addAction(hbTrId("txt_common_menu_details"), this, SLOT(openDetailsSlot()));
+        mContextMenuActions[EActionDetails]->setObjectName(LIST_WIDGET_OBJECT_NAME_ACTION_DETAILS);
     }
 }
 
@@ -705,26 +744,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// panGesture
-// ---------------------------------------------------------------------------
-//
-void VideoListWidget::panGesture(const QPointF &point)
-{
-	FUNC_LOG_ADDR(this);
-    if (mContextMenu)
-    {
-        if (!mContextMenu->isVisible())
-        {
-            HbListView::panGesture(point);
-        }
-    }
-    else
-    {
-        HbListView::panGesture(point);
-    }
-}
-
-// ---------------------------------------------------------------------------
 // doDelayedsSlot
 // ---------------------------------------------------------------------------
 //
@@ -793,7 +812,10 @@
         
         HbInputDialog *dialog = new HbInputDialog();
         dialog->setAttribute(Qt::WA_DeleteOnClose);
-        dialog->getText(label, this, SLOT(renameDialogFinished(HbAction *)), albumName);
+        dialog->setObjectName(LIST_WIDGET_OBJECT_NAME_RENAME_VIDEO);
+        dialog->setPromptText(label);
+        dialog->setValue(albumName);
+        dialog->open(this, SLOT(renameDialogFinished(HbAction *)));
     }
 }
 
@@ -893,6 +915,7 @@
                 variant.toString());
         HbMessageBox *messageBox = new HbMessageBox(text, HbMessageBox::MessageTypeQuestion);
         messageBox->setAttribute(Qt::WA_DeleteOnClose);
+        messageBox->setObjectName(LIST_WIDGET_OBJECT_NAME_REMOVE_COLLECTION);            
         messageBox->open(this, SLOT(removeCollectionDialogFinished(HbAction *)));
     }
 }
--- a/videocollection/videocollectionview/tsrc/testlistview/src/testlistview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlistview/src/testlistview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 38 %
+// Version : %version: 41 %
 
 #define private public
 #include "videoservices.h"
@@ -406,7 +406,7 @@
 
 	HbAction* allVideos	= static_cast<HbAction*>(actions.at(0));
 	QVERIFY( allVideos->isCheckable() );
-	QCOMPARE( allVideos->icon().iconName(),	QString(":/images/qtg_mono_video_all.svg")	);
+	QCOMPARE( allVideos->icon().iconName(),	QString("qtg_mono_video") );
 	QVERIFY( allVideos->isChecked() );
 
 	HbAction* collections =	static_cast<HbAction*>(actions.at(1));
@@ -940,9 +940,18 @@
 {
     init();
     mTestView->mModelReady = false;
+    mTestView->mViewReady = false;
     connect( this, SIGNAL(testSignal()), mTestView, SLOT(modelReadySlot()) );
+    QSignalSpy spy(mTestView, SIGNAL(viewReady()));
     emit testSignal();
     QVERIFY(mTestView->mModelReady);
+    QVERIFY(mTestView->mViewReady);
+    QCOMPARE(spy.count(), 1);
+    spy.clear();
+    
+    emit testSignal();
+    QCOMPARE(spy.count(), 0);
+    
     cleanup();
 }
 
@@ -1246,6 +1255,7 @@
 {
 	init(true);
     setRowCount(1);
+    mTestView->mModelReady = true;
 	connect(this, SIGNAL(testLayoutChangedSignal()), mTestView, SLOT(layoutChangedSlot()));
 	connect(this, SIGNAL(testCollectionOpenedSignal(bool, const QString&, const QModelIndex&)), 
 	    mTestView, SLOT(collectionOpenedSlot(bool, const QString&, const QModelIndex&)));
@@ -1300,18 +1310,23 @@
     
     /////
     // hint widget showing
-    // model not ready (need to use another slot for this)
+    // model not ready, row count zero.
     mTestView->mModelReady = false;
+    setRowCount(0);
     mTestView->mCurrentList =  mUiLoader->findWidget<VideoListWidget>(DOCML_NAME_VC_COLLECTIONWIDGET);
-    connect(this, SIGNAL(testSignal()), mTestView, SLOT(openAllVideosViewSlot()));
-    emit testSignal();
+    emit testLayoutChangedSignal();
     QVERIFY(hintWidget->isVisible() == false );
     QVERIFY(VideoHintWidgetData::mSettedButtonShowLevel);
-    disconnect(this, SIGNAL(testSignal()), mTestView, SLOT(openAllVideosViewSlot()));
+    
+    // model not ready, row count not zero.
+    setRowCount(1);
+    emit testLayoutChangedSignal();    
+    QVERIFY(hintWidget->isVisible() == false );
+    QVERIFY(VideoHintWidgetData::mSettedButtonShowLevel);
+    QVERIFY(mTestView->mModelReady);
     
     // model ready, row count not zero
     mTestView->mModelReady = true;
-    setRowCount(1);
     emit testLayoutChangedSignal();    
     QVERIFY(hintWidget->isVisible() == false );
     QVERIFY(VideoHintWidgetData::mSettedButtonShowLevel);
@@ -1322,7 +1337,7 @@
     QVERIFY(hintWidget->isVisible() == true );
     QVERIFY(VideoHintWidgetData::mSettedButtonShowLevel);
 
-    // model ready, row count is zero show to be false
+    // model ready, row count is zero, show to be false
     connect(this, SIGNAL(testSignal()), mTestView, SLOT(openCollectionViewSlot()));
     emit testSignal();
     QVERIFY(hintWidget->isVisible() == false );
@@ -1519,6 +1534,8 @@
     init(false);
     QVERIFY(connect(this, SIGNAL(testSignal()), mTestView, SLOT(createCollectionSlot())));
 
+    HbInputDialog *dialog = new HbInputDialog(); 
+    
     // not initialized, no mCurrentList
     emit testSignal();
     QCOMPARE(HbInputDialog::mGetTextCallCount, 0);
@@ -1528,28 +1545,36 @@
     mTestView->activateView(TMPXItemId::InvalidId());
     
     // dialog canceled
-    HbInputDialog::mGetTextFails = true;
+    HbInputDialog::mValueCallCount = 0;
     emit testSignal();
+    dialog->emitDialogFinished(mTestView, SLOT(createCollectionDialogFinished(HbAction *)), 1);
     QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
     QVERIFY(VideoSortFilterProxyModelData::mLastAddedAlbumName == "");
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
     
     // empty name
-    HbInputDialog::mGetTextFails = false;
+    HbInputDialog::mValueCallCount = 0;
+    HbInputDialog::mValueReturnValue = "";
     HbInputDialog::mGetTextCallCount = 0;
-    HbInputDialog::mGetTextReturnValue = "";
     emit testSignal();
+    dialog->emitDialogFinished(mTestView, SLOT(createCollectionDialogFinished(HbAction *)), 0);
     QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
     QVERIFY(VideoSortFilterProxyModelData::mLastAddedAlbumName == "");
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
     
     // Good case.
-    HbInputDialog::mGetTextReturnValue = "testAlbum";
+    HbInputDialog::mValueCallCount = 0;
+    HbInputDialog::mValueReturnValue = "testAlbum";
     HbInputDialog::mGetTextCallCount = 0;
     emit testSignal();
+    dialog->emitDialogFinished(mTestView, SLOT(createCollectionDialogFinished(HbAction *)), 0);
     QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
     QVERIFY(VideoSortFilterProxyModelData::mLastAddedAlbumName == "testAlbum");
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
     
+    HbInputDialog::mValueCallCount = 0;
+    HbInputDialog::mValueReturnValue = "";
     HbInputDialog::mGetTextCallCount = 0;
-    HbInputDialog::mGetTextReturnValue = QString();
     VideoSortFilterProxyModelData::mLastAddedAlbumName = "";
     
     disconnect(this, SIGNAL(testSignal()), mTestView, SLOT(createCollectionSlot()));
--- a/videocollection/videocollectionview/tsrc/testlistwidget/inc/testlistwidget.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlistwidget/inc/testlistwidget.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 25 %
+// Version : %version: 26 %
 
 #ifndef __TESTLISTWIDGET_H__
 #define __TESTLISTWIDGET_H__
@@ -106,11 +106,6 @@
     void testLongPressedSlot();
     
     /**
-     * verifies panGesture
-     */
-    void testPanGesture();
-    
-    /**
      * verifies setContextMenu
      */
     void testSetContextMenu();
--- a/videocollection/videocollectionview/tsrc/testlistwidget/src/testlistwidget.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testlistwidget/src/testlistwidget.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 47 %
+// Version : %version: 49 %
 
 #include <qmap.h>
 #include <vcxmyvideosdefs.h>
@@ -86,14 +86,6 @@
     {
         VideoListWidget::longPressedSlot(item, point);
     }
-    
-    /**
-    * calls pangesture
-    */
-    void callPanGesture(const QPointF &point)
-    {
-        VideoListWidget::panGesture(point);
-    }
 };
 
 // ---------------------------------------------------------------------------
@@ -653,38 +645,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// testPanGesture
-// ---------------------------------------------------------------------------
-//
-void TestListWidget::testPanGesture()
-{
-    QPointF point(1,1);
-    // no context menu
-    mTestWidget->callPanGesture(point);
-    QVERIFY(HbListView::mPanGesturePoint == point);
-    
-    // create context menu
-    VideoCollectionWrapper &wrapper = VideoCollectionWrapper::instance();
-    VideoSortFilterProxyModel *model = wrapper.getModel(VideoCollectionCommon::EModelTypeAllVideos);
-    mTestWidget->initialize(*model);
-    connect(this, SIGNAL(testSignal()), mTestWidget, SLOT(doDelayedsSlot()));
-    emit testSignal();
-    disconnect(this, SIGNAL(testSignal()), mTestWidget, SLOT(doDelayedsSlot()));
-    
-    HbListView::mPanGesturePoint = QPointF();
-    
-    // context menu visible
-    mTestWidget->mContextMenu->setVisible(true);
-    mTestWidget->callPanGesture(point);
-    QVERIFY(HbListView::mPanGesturePoint != point);
-    
-    // context menu not visible
-    mTestWidget->mContextMenu->setVisible(false);
-    mTestWidget->callPanGesture(point);
-    QVERIFY(HbListView::mPanGesturePoint == point);
-}
-
-// ---------------------------------------------------------------------------
 // testSetContextMenu
 // ---------------------------------------------------------------------------
 //
@@ -901,7 +861,10 @@
     mTestWidget->initialize(*model);    
     connect(this, SIGNAL(testSignal()), mTestWidget, SLOT(deleteItemSlot()));    
     
+    HbMessageBox *box = new HbMessageBox(); 
+    
     // no model
+    VideoListDataModelData::mDataAccessCount = 0;
     VideoSortFilterProxyModel *tmp = mTestWidget->mModel;
     mTestWidget->mModel = 0;
     emit testSignal();
@@ -912,6 +875,7 @@
     mTestWidget->mModel = tmp;
     
     // data fetched from item is invalid
+    VideoListDataModelData::mDataAccessCount = 0;
     setRowCount(1);
     mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex()); 
     emit testSignal();
@@ -921,6 +885,7 @@
     setRowCount(0);
     
     // data is valid
+    VideoListDataModelData::mDataAccessCount = 0;
     setRowCount(1);
     QVariant data = QString("test");
     VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
@@ -929,7 +894,8 @@
     // messagebox question returns false
     HbMessageBoxData::mQuestionReturnValue = false;
     emit testSignal();
-    QVERIFY(VideoListDataModelData::dataAccessCount() == 2);
+    box->emitDialogFinished(mTestWidget, SLOT(deleteItemDialogFinished(HbAction *)), 1);
+    QVERIFY(VideoListDataModelData::dataAccessCount() == 1);
     QVERIFY(!HbMessageBoxData::mLatestTxt.isEmpty());
     QVERIFY(!VideoSortFilterProxyModelData::mLastIndex.isValid());
     HbMessageBoxData::mLatestTxt = "";
@@ -938,10 +904,12 @@
     VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
     
     // messagebox question returns true
+    VideoListDataModelData::mDataAccessCount = 0;
     VideoSortFilterProxyModelData::mDeleteItemsFails = false;
     HbMessageBoxData::mQuestionReturnValue = true;
     emit testSignal();
-    QVERIFY(VideoListDataModelData::dataAccessCount() == 3);
+    box->emitDialogFinished(mTestWidget, SLOT(deleteItemDialogFinished(HbAction *)), 0);
+    QVERIFY(VideoListDataModelData::dataAccessCount() == 1);
     QVERIFY(!HbMessageBoxData::mLatestTxt.isEmpty());
     QVERIFY(VideoSortFilterProxyModelData::mLastIndex.row() == 0);
     
@@ -957,6 +925,8 @@
     VideoCollectionWrapper &wrapper = VideoCollectionWrapper::instance();
     VideoSortFilterProxyModel *model = wrapper.getModel(VideoCollectionCommon::EModelTypeAllVideos);
     
+    HbInputDialog *dialog = new HbInputDialog();
+    
     connect(this, SIGNAL(testSignal()), mTestWidget, SLOT(renameSlot()));
     
     VideoSortFilterProxyModelData::reset();
@@ -965,7 +935,8 @@
     
     // Good case
     VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
-    HbInputDialog::mGetTextReturnValue = "renamedVideo";
+    HbInputDialog::mValueReturnValue = "renamedVideo";
+    HbInputDialog::mValueCallCount = 0;
     HbInputDialog::mGetTextCallCount = 0;
     setRowCount(1);
     VideoSortFilterProxyModelData::mItemIds.append(TMPXItemId(0, KVcxMvcMediaTypeAlbum));
@@ -973,61 +944,72 @@
     VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
     mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
     emit testSignal();
+    dialog->emitDialogFinished(mTestWidget, SLOT(renameDialogFinished(HbAction *)), 0);
     QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "renamedVideo");
     QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
-    
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
+        
     // New name is same as previous 
-    HbInputDialog::mGetTextReturnValue = QString();
+    HbInputDialog::mValueReturnValue = "";
+    HbInputDialog::mValueCallCount = 0;
     HbInputDialog::mGetTextCallCount = 0;
     VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
     data = QString("albumName");
     VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
     mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
     emit testSignal();
+    dialog->emitDialogFinished(mTestWidget, SLOT(renameDialogFinished(HbAction *)), 0);
+    QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
+    QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
+    
+    // Dialog canceled 
+    HbInputDialog::mValueReturnValue = "";
+    HbInputDialog::mValueCallCount = 0;
+    HbInputDialog::mGetTextCallCount = 0;
+    VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
+    data = QString("albumName");
+    VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
+    mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
+    emit testSignal();
+    dialog->emitDialogFinished(mTestWidget, SLOT(renameDialogFinished(HbAction *)), 1);
     QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
     QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
     
-    // Getting name from input dialog fails 
-    HbInputDialog::mGetTextFails = true;
+    // New name is empty.
     VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
-    HbInputDialog::mGetTextReturnValue = QString();
+    HbInputDialog::mValueReturnValue = "";
+    HbInputDialog::mValueCallCount = 0;
+    HbInputDialog::mGetTextCallCount = 0;
+    data = QString("albumName");
+    VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
+    mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
+    emit testSignal();
+    dialog->emitDialogFinished(mTestWidget, SLOT(renameDialogFinished(HbAction *)), 0);
+    QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
+    QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
+    QVERIFY(HbInputDialog::mValueCallCount == 1);
+    
+    // Item is video
+    VideoSortFilterProxyModelData::mItemIds.clear();
+    VideoSortFilterProxyModelData::mItemIds.append(TMPXItemId(0, KVcxMvcMediaTypeVideo));
+    VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
+    HbInputDialog::mValueReturnValue = "";
+    HbInputDialog::mValueCallCount = 0;
     HbInputDialog::mGetTextCallCount = 0;
     data = QString("albumName");
     VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
     mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
     emit testSignal();
     QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
-    QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
-
-    // New name is empty.
-    HbInputDialog::mGetTextFails = false;
-    VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
-    HbInputDialog::mGetTextReturnValue = "";
-    HbInputDialog::mGetTextCallCount = 0;
-    data = QString("albumName");
-    VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
-    mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
-    emit testSignal();
-    QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
-    QCOMPARE(HbInputDialog::mGetTextCallCount, 1);
-    
-    // Item is video
-    VideoSortFilterProxyModelData::mItemIds.clear();
-    VideoSortFilterProxyModelData::mItemIds.append(TMPXItemId(0, KVcxMvcMediaTypeVideo));
-    HbInputDialog::mGetTextFails = false;
-    VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
-    HbInputDialog::mGetTextReturnValue = "";
-    HbInputDialog::mGetTextCallCount = 0;
-    data = QString("albumName");
-    VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, data);
-    mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
-    emit testSignal();
-    QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
-    QCOMPARE(HbInputDialog::mGetTextCallCount, 0);    
+    QCOMPARE(HbInputDialog::mGetTextCallCount, 0);
+    QVERIFY(HbInputDialog::mValueCallCount == 0);
 
     // No model
     VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
-    HbInputDialog::mGetTextReturnValue = "renamedVideo";
+    HbInputDialog::mValueReturnValue = "renamedVideo";
+    HbInputDialog::mValueCallCount = 0;
     HbInputDialog::mGetTextCallCount = 0;
     VideoSortFilterProxyModelData::mItemIds.clear();
     VideoSortFilterProxyModelData::mItemIds.append(TMPXItemId(0, KVcxMvcMediaTypeAlbum));
@@ -1043,7 +1025,8 @@
     
     // Variant data is invalid
     VideoSortFilterProxyModelData::mLastAlbumNameInRename = "";
-    HbInputDialog::mGetTextReturnValue = "renamedVideo";
+    HbInputDialog::mValueReturnValue = "renamedVideo";
+    HbInputDialog::mValueCallCount = 0;
     HbInputDialog::mGetTextCallCount = 0;
     VideoSortFilterProxyModelData::mItemIds.clear();
     VideoSortFilterProxyModelData::mItemIds.append(TMPXItemId(0, KVcxMvcMediaTypeAlbum));
@@ -1052,7 +1035,7 @@
     mTestWidget->mCurrentIndex = model->index(0, 0, QModelIndex());
     emit testSignal();
     QVERIFY(VideoSortFilterProxyModelData::mLastAlbumNameInRename == "");
-    QCOMPARE(HbInputDialog::mGetTextCallCount, 0);    
+    QCOMPARE(HbInputDialog::mGetTextCallCount, 0);
     
     disconnect(this, SIGNAL(testSignal()), mTestWidget, SLOT(renameSlot()));
 }
@@ -1233,6 +1216,7 @@
     HbListView::mCurrentIndex = model->index(0, 0, QModelIndex());
     
     connect(this, SIGNAL(testSignal()), mTestWidget, SLOT(removeCollectionSlot()));
+    HbMessageBox *box = new HbMessageBox();
     
     setRowCount(2);
     TMPXItemId savedId = TMPXItemId(1,1);
@@ -1258,6 +1242,7 @@
     // valid data 
     VideoListDataModelData::setData(VideoCollectionCommon::KeyTitle, "test");
     emit testSignal();
+    box->emitDialogFinished(mTestWidget, SLOT(removeCollectionDialogFinished(HbAction *)), 0);
     QVERIFY(VideoSortFilterProxyModelData::mLastIndex.isValid());
     QVERIFY(VideoSortFilterProxyModelData::mLastIndex.row() == 1);
     QVERIFY(!HbMessageBoxData::mLatestTxt.isEmpty());
@@ -1267,6 +1252,7 @@
     HbMessageBoxData::mLatestTxt = "";
     HbMessageBoxData::mQuestionReturnValue = false;
     emit testSignal();
+    box->emitDialogFinished(mTestWidget, SLOT(removeCollectionDialogFinished(HbAction *)), 1);
     QVERIFY(!VideoSortFilterProxyModelData::mLastIndex.isValid());
     QVERIFY(!HbMessageBoxData::mLatestTxt.isEmpty());
     
--- a/videocollection/videocollectionview/tsrc/testvideocollectionuiloader/src/testvideocollectionuiloader.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideocollectionuiloader/src/testvideocollectionuiloader.cpp	Fri May 14 15:14:51 2010 +0300
@@ -211,6 +211,15 @@
     mTestObject->addData(params,
         this,
         SLOT(handleObjectReady(QObject*, const QString&)));
+    
+    // first test the findWidget with loadIfNotFound == false.
+    bannerWidget =
+        mTestObject->findWidget<HbGroupBox>(
+            DOCML_NAME_VC_HEADINGBANNER, false);
+    QVERIFY(!bannerWidget);
+    QVERIFY(!mObjects.contains(DOCML_NAME_VC_HEADINGBANNER));
+    
+    // then with default value.
     bannerWidget =
         mTestObject->findWidget<HbGroupBox>(
             DOCML_NAME_VC_HEADINGBANNER);
@@ -295,6 +304,13 @@
     // -object added in loading queue
     params.append(addToCollectionParam);
     mTestObject->addData(params, this, SLOT(handleObjectReady(QObject*, const QString&)));
+    
+    // first test with loadIfNotFound == false
+    addToCollection = mTestObject->findObject<HbAction>(DOCML_NAME_ADD_TO_COLLECTION, false);
+    QVERIFY(!addToCollection);
+    QVERIFY(!mObjects.contains(DOCML_NAME_ADD_TO_COLLECTION));
+    
+    // then with default value.
     addToCollection = mTestObject->findObject<HbAction>(DOCML_NAME_ADD_TO_COLLECTION);
     QVERIFY(addToCollection);
     QVERIFY(mObjects.contains(DOCML_NAME_ADD_TO_COLLECTION));
--- a/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/src/testvideolistselectiondialog.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionview/tsrc/testvideolistselectiondialog/src/testvideolistselectiondialog.cpp	Fri May 14 15:14:51 2010 +0300
@@ -22,10 +22,11 @@
 #include "hbdocumentloader.h"
 #include "hbstackedwidget.h"
 #include "hbcheckbox.h"
+#include "hbinputdialog.h"
 #include "hbdialog.h"
 #include "hbwidget.h"
 #include "hblistview.h"
-#include "hbinputdialog.h"
+#include "hbmessagebox.h"
 
 #include "testvideolistselectiondialog.h"
 
@@ -590,33 +591,35 @@
     QVERIFY(VideoSortFilterProxyModelData::mItemIds.at(0) == TMPXItemId(1,0));
     QVERIFY(VideoSortFilterProxyModelData::mItemIds.at(1) == TMPXItemId(2,0));
     
+    HbInputDialog *dialog = new HbInputDialog();
     
     VideoCollectionViewUtilsData::mLastError = -1;
     //  mSelectedAlbumId == TMPXItemId::InvalidId())
     mpxId = TMPXItemId::InvalidId();
-    //    queryNewAlbumSelected does not set selected
-    HbInputDialog::mGetTextFails = true;   
+    // query for new album name does not set selected
     mTestObject->setupContent(VideoListSelectionDialog::ESelectCollection, mpxId);
     mTestObject->mSelectedVideos.insert(TMPXItemId(1,0));
     mTestObject->mSelectedVideos.insert(TMPXItemId(2,0));
     VideoSortFilterProxyModelData::reset();
     VideoSortFilterProxyModelData::mNewAlbumId = TMPXItemId::InvalidId();
-    mTestObject->exec();     
+    mTestObject->exec();
+    dialog->emitDialogFinished(mTestObject, SLOT(newAlbumNameDialogFinished(HbAction *)), 1); // No selected.
     // type of selection does not change
-    QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::ESelectCollection);
+    QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EAddToCollection);
     // since there's no selected videos, status code does not change
     QVERIFY(VideoCollectionViewUtilsData::mLastError == -1);
     QVERIFY(VideoSortFilterProxyModelData::mLastItemId == TMPXItemId::InvalidId());
     QVERIFY(!VideoSortFilterProxyModelData::mItemIds.count());
  
-    //    queryNewAlbumSelected sets selected
-    HbInputDialog::mGetTextFails = false;   
+    // query for new album name sets selected
     mTestObject->setupContent(VideoListSelectionDialog::ESelectCollection, mpxId);
     mTestObject->mSelectedVideos.insert(TMPXItemId(1,0));
     mTestObject->mSelectedVideos.insert(TMPXItemId(2,0));
     VideoSortFilterProxyModelData::reset();
     VideoSortFilterProxyModelData::mNewAlbumId = TMPXItemId(1,2);
+    HbInputDialog::mValueReturnValue = QVariant(QString("testname"));
     mTestObject->exec();  
+    dialog->emitDialogFinished(mTestObject, SLOT(newAlbumNameDialogFinished(HbAction *)), 0); // Yes selected.
     // type of selection has changed
     QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EAddToCollection);
     // videos added into collection
@@ -679,13 +682,13 @@
     VideoCollectionViewUtilsData::mLastError = -1;
     // selected album exist, selected videos exists, name for selected album exist
     // (using ESelectCollection type to fetch albumname)
-    HbInputDialog::mGetTextFails = false;   
     mTestObject->setupContent(VideoListSelectionDialog::ESelectCollection, mpxId);
     mTestObject->mSelectedVideos.insert(TMPXItemId(1,0));
     mTestObject->mSelectedVideos.insert(TMPXItemId(2,0));
     VideoSortFilterProxyModelData::reset();
     VideoSortFilterProxyModelData::mNewAlbumId = TMPXItemId(1,2);
-    mTestObject->exec();  
+    mTestObject->exec();
+    dialog->emitDialogFinished(mTestObject, SLOT(newAlbumNameDialogFinished(HbAction *)), 0); // Yes selected.
     // type of selection has changed
     QVERIFY(mTestObject->mTypeOfSelection == VideoListSelectionDialog::EAddToCollection);
     // videos added into collection
--- a/videocollection/videocollectionwrapper/data/videocollectionwrapper.qrc	Fri Apr 30 09:52:11 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/icons" >
-        <file alias="default_thumbnail_video.svg" >icons/pri_large_video.svg</file>
-    </qresource>
-</RCC>
--- a/videocollection/videocollectionwrapper/inc/videodatasignalreceiver.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/inc/videodatasignalreceiver.h	Fri May 14 15:14:51 2010 +0300
@@ -112,6 +112,11 @@
      * @param itemId, item that has been modified.
      */
     virtual void itemModifiedSlot(const TMPXItemId &itemId) = 0;
+    
+    /**
+     * Signalled when list is complete.
+     */
+    virtual void listCompleteSlot() = 0;
 };
 
 #endif // __VIDEOMODELOBSERVER_H
--- a/videocollection/videocollectionwrapper/inc/videolistdatamodel_p.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/inc/videolistdatamodel_p.h	Fri May 14 15:14:51 2010 +0300
@@ -183,6 +183,11 @@
      * @param itemId, item that has been modified.
      */
     void itemModifiedSlot(const TMPXItemId &itemId);
+    
+    /**
+     * Signalled when list is complete.
+     */
+    void listCompleteSlot();
 
 public: // services 
     
--- a/videocollection/videocollectionwrapper/inc/videothumbnaildata_p.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/inc/videothumbnaildata_p.h	Fri May 14 15:14:51 2010 +0300
@@ -179,6 +179,17 @@
      *
      */
     const QIcon* defaultThumbnail(TMPXItemId mediaId);
+    
+    /**
+     * Loads icon from file or resource, the icon is scaled to size of the 
+     * video list view thumbnail.
+     * 
+     * @param iconName name of the file or resource.
+     * 
+     * @return HbIcon the icon load from resource or file.
+     * 
+     */
+    HbIcon loadIcon(QString iconName);
 
     /**
      * Starts timer that continues the background thumbnail fetching at timeout.
@@ -258,11 +269,6 @@
      *  - data is the actual thumbnail data.
      */
     QHash<TMPXItemId, HbIcon>       mDefaultThumbnails;
-    
-    /**
-     * Default thumbnail for a category.
-     */
-    QIcon                           *mDefaultTnCategory;
 
     /**
      * Current model, set at call to startBackgroundFetching.
--- a/videocollection/videocollectionwrapper/src/videocollectionlistener.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/src/videocollectionlistener.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version: 32 %
+// Version : %version: 33 %
 
 // INCLUDE FILES
 #include <mpxmediageneraldefs.h>
@@ -120,19 +120,25 @@
 
     if(categoryOrAlbumVideoList)
     {
+        // checks if there are new videos in the list that are not yet in our data model.
+        mSignalReceiver.newVideoListSlot(array);
+        
         mSignalReceiver.albumListAvailableSlot(pathId, array);
-
-        // Update also all video list in case this is a default category. 
-        if(pathId.iId2 == KVcxMvcMediaTypeCategory)
-		{
-            mSignalReceiver.newVideoListSlot(array);
-		}
     }
     else
     {
         mSignalReceiver.newVideoListSlot(array);
     }
- }
+    
+    int listCompleted(-1);
+    if(mVideoUtils.mediaValue<int>(&aEntries, KVcxMediaMyVideosInt32Value, listCompleted))
+    {
+        if(listCompleted == EVcxMyVideosVideoListComplete)
+        {
+            mSignalReceiver.listCompleteSlot();
+        }
+    }
+}
 
 // -----------------------------------------------------------------------------
 // HandleOpenL
--- a/videocollection/videocollectionwrapper/src/videolistdatamodel_p.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/src/videolistdatamodel_p.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version: 37 %
+// Version : %version: 38 %
 
 // INCLUDE FILES
 #include <hbglobal.h>
@@ -451,8 +451,8 @@
     // signal that album has been updated
     emit q_ptr->albumChanged();
 
-    // signal that model is ready
-    emit q_ptr->modelReady();
+    // signal that model has changed.
+    emit q_ptr->modelChanged();
 }
 
 
@@ -497,9 +497,8 @@
     {
         q_ptr->beginInsertRows(QModelIndex(), startIndex, endIndex);
         q_ptr->endInsertRows();
+        emit q_ptr->modelChanged();
     }
-
-	emit q_ptr->modelReady();
 }
 
 // -----------------------------------------------------------------------------
@@ -890,4 +889,13 @@
     }
 }
 
+// -----------------------------------------------------------------------------
+// listCompleteSlot 
+// -----------------------------------------------------------------------------
+//
+void VideoListDataModelPrivate::listCompleteSlot()
+{
+    emit q_ptr->modelReady();
+}
+
 // End of file
--- a/videocollection/videocollectionwrapper/src/videothumbnaildata_p.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/src/videothumbnaildata_p.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,12 +15,13 @@
 *
 */
 
-// Version : %version: 21 %
+// Version : %version: 24 %
 
 // INCLUDE FILES
 #include <qapplication.h>
 #include <qpixmap.h>
 #include <qtimer.h>
+#include <qpainter.h>
 #include <mpxmediageneraldefs.h>
 #include <hbicon.h>
 
@@ -45,12 +46,16 @@
 // Priority for background thumbnail fetches.
 const int BACKGROUND_FETCH_PRIORITY = 3000;
 
+// Size for default thumbnail, these match with large thumbnail in lists. 
+const int DEFAULT_THUMBNAIL_WIDTH = 114;
+const int DEFAULT_THUMBNAIL_HEIGHT = 64;
+
 /**
  * global qHash function required fo creating hash values for TMPXItemId -keys
  */
 inline uint qHash(TMPXItemId key) 
-{ 
-    QPair<uint, uint> keyPair(key.iId1, key.iId2); 
+{
+    QPair<uint, uint> keyPair(key.iId1, key.iId2);
 
     return qHash(keyPair);
 }
@@ -430,7 +435,7 @@
     {
         if(!mDefaultThumbnails.contains(defaultIdVideo))
         {
-            mDefaultThumbnails[defaultIdVideo] = HbIcon(":/icons/default_thumbnail_video.svg");
+            mDefaultThumbnails[defaultIdVideo] = loadIcon("qtg_large_video");
         }
         return &mDefaultThumbnails[defaultIdVideo].qicon();
     }
@@ -441,7 +446,7 @@
         {
             if(!mDefaultThumbnails.contains(defaultIdAlbum))
             {
-                mDefaultThumbnails[defaultIdAlbum] = HbIcon("qtg_large_video_collection");
+                mDefaultThumbnails[defaultIdAlbum] = loadIcon("qtg_large_video_collection");
             }
             return &mDefaultThumbnails[defaultIdAlbum].qicon();
         }
@@ -453,7 +458,7 @@
             {
                 if(!mDefaultThumbnails.contains(defaultIdDownloads))
                 {
-                    mDefaultThumbnails[defaultIdDownloads] = HbIcon("qtg_large_video_download");
+                    mDefaultThumbnails[defaultIdDownloads] = loadIcon("qtg_large_video_download");
                 }
                 return &mDefaultThumbnails[defaultIdDownloads].qicon();
             }
@@ -462,7 +467,7 @@
             {
                 if(!mDefaultThumbnails.contains(defaultIdCaptured))
                 {
-                    mDefaultThumbnails[defaultIdCaptured] = HbIcon("qtg_large_video_capture");
+                    mDefaultThumbnails[defaultIdCaptured] = loadIcon("qtg_large_video_capture");
                 }
                 return &mDefaultThumbnails[defaultIdCaptured].qicon();
             }
@@ -471,7 +476,7 @@
             {
                 if(!mDefaultThumbnails.contains(defaultIdAlbum))
                 {
-                    mDefaultThumbnails[defaultIdAlbum] = HbIcon("qtg_large_video_collection");
+                    mDefaultThumbnails[defaultIdAlbum] = loadIcon("qtg_large_video_collection");
                 }
                 return &mDefaultThumbnails[defaultIdAlbum].qicon();
             }
@@ -480,6 +485,56 @@
 }
 
 // -----------------------------------------------------------------------------
+// VideoThumbnailDataPrivate::loadIcon()
+// -----------------------------------------------------------------------------
+//
+HbIcon VideoThumbnailDataPrivate::loadIcon(QString iconName)
+{
+    HbIcon icon(iconName);
+    
+    if(!icon.isNull())
+    {
+        QPixmap dest = QPixmap(DEFAULT_THUMBNAIL_WIDTH, DEFAULT_THUMBNAIL_HEIGHT);
+
+        // Scale the icon into the thumbnail area.
+        QPixmap source = icon.pixmap();
+        // Smooth scaling is very expensive (size^2). Therefore we reduce the size
+        // to 2x of the destination size and using fast transformation before doing final smooth scaling.
+        if(source.size().width() > (6*dest.width()) || source.size().height() > (6*dest.height()))
+        {
+            QSize intermediate_size = QSize( dest.width() * 2, dest.height() * 2 );
+            source = source.scaled(intermediate_size, Qt::KeepAspectRatio, Qt::FastTransformation );
+        }
+        QPixmap scaled = source.scaled(dest.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
+
+        // Center the icon.
+        int xDiff = 0;
+        int yDiff = 0;
+        if(dest.width() > scaled.width())
+        {
+            xDiff = (dest.width() - scaled.width()) / 2;
+        }
+        if(dest.height() > scaled.height())
+        {
+            yDiff = (dest.height() - scaled.height()) / 2;
+        }
+        
+        // Paint it.
+        QPainter painter(&dest);
+        painter.setCompositionMode(QPainter::CompositionMode_Source);
+        painter.fillRect(dest.rect(), Qt::transparent);
+        painter.drawPixmap(xDiff, yDiff, scaled.width(), scaled.height(), scaled);
+        painter.end();
+        
+        return HbIcon(dest);
+    }
+    else
+    {
+        return HbIcon();
+    }
+}
+
+// -----------------------------------------------------------------------------
 // VideoThumbnailDataPrivate::removeThumbnail()
 // -----------------------------------------------------------------------------
 //
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionclient/stub/inc/stubcollectionsignalreceiver.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionclient/stub/inc/stubcollectionsignalreceiver.h	Fri May 14 15:14:51 2010 +0300
@@ -123,10 +123,18 @@
     /**
      * No implementation needed for these tests
      */
-    virtual void itemModifiedSlot(const TMPXItemId &itemId)
+    void itemModifiedSlot(const TMPXItemId &itemId)
     {
         Q_UNUSED(itemId);
     }
+    
+    /**
+     * No implementation needed for these tests
+     */
+    void listCompleteSlot()
+    {
+        
+    }
 };
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/inc/mediaobjectfactory.h	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Helper class for creating mediaobjects for testing CVideoListDataModel class methods*
+*/
+
+
+#ifndef __TESTVIDEOLISTMEDIAFACTORY_H__
+#define __TESTVIDEOLISTMEDIAFACTORY_H__
+
+#include <e32cmn.h>
+#include "mpxmedia.h"
+class CMPXMediaArray;
+
+
+class MediaObjectFactory 
+{
+
+public:
+    /**
+     * constructor.
+     */
+    MediaObjectFactory();
+    
+    /**
+     * destructor
+     */
+    ~MediaObjectFactory();
+    
+    /**
+     * returns pointer to new created media-array 
+     */
+    CMPXMediaArray* newMediaArray();
+ 
+    /**
+     * creates media-item
+     * If using default value for id (-1)
+     * no id will be saved to media
+     * 
+     * @id used as part of data values
+     * @MediaDetailSelection
+     * 
+     * @return CMPXMedia 
+     */
+    CMPXMedia* newMedia(int id = -1, int id2 = 0);
+    
+    /**
+     * appends media object to mediaarray
+     * 
+     * @whereToPut where to put
+     * @param whatToPut what value to put
+     * 
+     */
+    void putArrayContent(CMPXMediaArray *whereToPut, CMPXMedia *whatToPut);
+    
+    /**
+     * puts wanted type value to wanted attribute
+     * 
+     * @whereToPut where to put
+     * @attribute what attribute to pu
+     * @param value what value to put
+     * 
+     */
+    template<class T>
+    void putTValue(CMPXMedia *whereToPut, const TMPXAttributeData& attribute, T& value)
+    {
+        if(!whereToPut)
+        {
+            return;
+        }
+        TRAP_IGNORE(whereToPut->SetTObjectValueL<T>(attribute, value));
+    }
+    
+    /**
+     * puts given ptr to ptr with given attribute
+     * 
+     * @whereToPut where to put
+     * @attribute what attribute to pu
+     * @param ptrToPut what value to put
+     * 
+     */
+    template<class T>
+    void putValuePtr(CMPXMedia *whereToPut, const TMPXAttributeData& attribute, T* ptrToPut)
+    {
+        if(!whereToPut)
+        {
+            return;
+        }
+        TRAP_IGNORE(whereToPut->SetCObjectValueL<T>( attribute, ptrToPut ));
+
+    }
+    
+      
+private:
+    
+
+};
+
+
+#endif  // __TESTVIDEOLISTMEDIAFACTORY_H__
+
+// End of file
+    
+
+
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/src/mediaobjectfactory.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/src/mediaobjectfactory.cpp	Fri May 14 15:14:51 2010 +0300
@@ -58,7 +58,7 @@
 // newMedia
 // -----------------------------------------------------------------------------
 //
-CMPXMedia* MediaObjectFactory::newMedia(int id1, int id2  )
+CMPXMedia* MediaObjectFactory::newMedia(int id1, int id2)
 {
     CMPXMedia *media = NULL;
     TRAP_IGNORE(media = CMPXMedia::NewL());
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/src/testvideocollectionlistener.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/src/testvideocollectionlistener.cpp	Fri May 14 15:14:51 2010 +0300
@@ -187,7 +187,8 @@
     CMPXCollectionPath* collectionPath = 0;
     TRAP_IGNORE(
            collectionPath =  CMPXCollectionPath::NewL();
-           collectionPath->AppendL( KVcxUidMyVideosMpxCollection ););
+           collectionPath->AppendL( KVcxUidMyVideosMpxCollection );
+           );
     
     // empty array, path exists level incorrect (new video list, not category neither album level)     
     mMediaFactory->putValuePtr<CMPXCollectionPath>(media, KMPXMediaGeneralContainerPath, collectionPath); 
@@ -204,7 +205,8 @@
           collectionPath->AppendL( KVcxUidMyVideosMpxCollection );
           collectionPath->AppendL( KVcxMvcCategoryIdAll););
 
-    // array of items from different levels, everything is reported 
+    // array of items from different levels, everything is reported
+    // first call does not contain the KVcxMediaMyVideosInt32Value.
     mStubCollectionClient->setCollectionLevel(VideoCollectionCommon::ELevelCategory);
     mMediaFactory->putArrayContent(array, mMediaFactory->newMedia(1, 2));
     mMediaFactory->putValuePtr<CMPXCollectionPath>(media, KMPXMediaGeneralContainerPath, collectionPath); 
@@ -213,15 +215,19 @@
     arrayToTest = static_cast<CMPXMediaArray*>(mSignalReceiver->getLatestPointerAddr());
     QVERIFY(arrayToTest != 0);
     QVERIFY(arrayToTest->Count() == array->Count());
+    QVERIFY(mSignalReceiver->getListComplete() == false);
 
-    
     mStubCollectionClient->setCollectionLevel(VideoCollectionCommon::ELevelVideos);
     delete array;
-    array = mMediaFactory->newMediaArray();  
+    array = mMediaFactory->newMediaArray();
     mMediaFactory->putArrayContent(array, mMediaFactory->newMedia(1));
     mMediaFactory->putArrayContent(array, mMediaFactory->newMedia(2));
     mMediaFactory->putArrayContent(array, mMediaFactory->newMedia(3));
 
+    // second call contains the KVcxMediaMyVideosInt32Value, but it's not equal to EVcxMyVideosVideoListComplete
+    int invalid(-100);
+    mMediaFactory->putTValue<int>(media, KVcxMediaMyVideosInt32Value, invalid);
+    
     mMediaFactory->putValuePtr<CMPXMediaArray>(media, KMPXMediaArrayContents, array);
     mMediaFactory->putValuePtr<CMPXCollectionPath>(media, KMPXMediaGeneralContainerPath, collectionPath); 
     mStubCollection->callHandleOpenLFunc(*media, 0, true, 0 );    
@@ -229,6 +235,7 @@
     arrayToTest = static_cast<CMPXMediaArray*>(mSignalReceiver->getLatestPointerAddr());
     QVERIFY(arrayToTest != 0);
     QVERIFY(arrayToTest->Count() == array->Count());
+    QVERIFY(mSignalReceiver->getListComplete() == false);
     
     delete collectionPath;
     collectionPath = 0;
@@ -238,12 +245,16 @@
          collectionPath->AppendL( KVcxMvcMediaTypeCategory););
     mMediaFactory->putValuePtr<CMPXCollectionPath>(media, KMPXMediaGeneralContainerPath, collectionPath); 
     
+    // third call contains KVcxMediaMyVideosInt32Value with value EVcxMyVideosVideoListComplete.
+    int listComplete(EVcxMyVideosVideoListComplete);
+    mMediaFactory->putTValue<int>(media, KVcxMediaMyVideosInt32Value, listComplete);
+    
     mStubCollection->callHandleOpenLFunc(*media, 0, true, 0 );    
        
     arrayToTest = static_cast<CMPXMediaArray*>(mSignalReceiver->getLatestPointerAddr());
     QVERIFY(arrayToTest != 0);
     QVERIFY(arrayToTest->Count() == array->Count());
-    
+    QVERIFY(mSignalReceiver->getListComplete());
     
     CMPXMediaArray *gottenArray = static_cast<CMPXMediaArray*>(mSignalReceiver->getLatestPointerAddr());
     QVERIFY(gottenArray->Count() == 3);
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/inc/stubsignalreceiver.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/inc/stubsignalreceiver.h	Fri May 14 15:14:51 2010 +0300
@@ -74,6 +74,11 @@
      */
     int getLatestIntegerData();
     
+    /**
+     * return mListComplete
+     */
+    bool getListComplete();
+    
 public slots:
 
     /**
@@ -133,6 +138,11 @@
      */
     virtual void itemModifiedSlot(const TMPXItemId &itemId);
     
+    /**
+     * Sets boolean mListComplete to true;
+     */
+    void listCompleteSlot();
+    
 private:
     /**
      * Contains address of latest pointer passed to object
@@ -158,6 +168,11 @@
      * contains contents of list received from signal
      */
     QList<TMPXItemId> mLatesListData;
+    
+    /**
+     * True if listCompleteSlot has been called.
+     */
+    bool mListComplete;
 };
 
 #endif
--- a/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/src/stubsignalreceiver.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideocollectionlistener/stub/src/stubsignalreceiver.cpp	Fri May 14 15:14:51 2010 +0300
@@ -25,7 +25,8 @@
 mLatestPtr(0),
 mLatestItemId(TMPXItemId::InvalidId()),
 mLatestModifiedItemId(TMPXItemId::InvalidId()),
-mLatestInteger(-1)
+mLatestInteger(-1),
+mListComplete(false)
 {
     
 }
@@ -50,6 +51,7 @@
     mLatestModifiedItemId = TMPXItemId::InvalidId();
     mLatesListData.clear();
     mLatestInteger = -1;
+    mListComplete = false;
 }
 
 // -----------------------------------------------------------------------------
@@ -99,6 +101,15 @@
 }
 
 // -----------------------------------------------------------------------------
+// getListComplete
+// -----------------------------------------------------------------------------
+//
+bool StubSignalReceiver::getListComplete()
+{
+    return mListComplete;
+}
+
+// -----------------------------------------------------------------------------
 // newVideoListSlot
 // -----------------------------------------------------------------------------
 //
@@ -204,6 +215,15 @@
 }
 
 // -----------------------------------------------------------------------------
+// listCompleteSlot
+// -----------------------------------------------------------------------------
+//
+void StubSignalReceiver::listCompleteSlot()
+{
+    mListComplete = true;
+}
+
+// -----------------------------------------------------------------------------
 // albumRemoveFailureSlot
 // -----------------------------------------------------------------------------
 //
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/inc/videolistdatamodel_p.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/inc/videolistdatamodel_p.h	Fri May 14 15:14:51 2010 +0300
@@ -315,7 +315,12 @@
      * not used in stub
      */
     void itemDeletedSlot(TMPXItemId id);
-
+    
+    /**
+     * not used in stub
+     */
+    void listCompleteSlot();
+    
 public:    
     
     /**
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp	Fri May 14 15:14:51 2010 +0300
@@ -515,4 +515,12 @@
     Q_UNUSED(id);    
 }
 
+// -----------------------------------------------------------------------------
+// listCompleteSlot
+// -----------------------------------------------------------------------------
+// 
+void VideoListDataModelPrivate::listCompleteSlot()
+{
+}
+
 // End of file
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/inc/testvideomodel_p.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/inc/testvideomodel_p.h	Fri May 14 15:14:51 2010 +0300
@@ -88,6 +88,11 @@
     */
    void signalVideoDetailsCompleted(CMPXMedia*);
    
+   /**
+    * emitted to get listCompleteSlot to be called.
+    */
+   void signalListCompleteSlot();
+   
     // test functions for the test framework
 private slots:
     /**
@@ -248,6 +253,11 @@
      * verifies getMediaIdFromIndex when fetching collections
      */
     void testGetCollectionIdFromIndex();
+    
+    /**
+     * verifies listCompleteSlot
+     */
+    void testListCompleteSlot();
 
 private:
   
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/src/mediaobjectfactory.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/src/mediaobjectfactory.cpp	Fri May 14 15:14:51 2010 +0300
@@ -397,7 +397,7 @@
         
         TDateTime dateTime;
 
-        dateTime.Set(date.date().year(), TMonth(date.date().month() - 1), date.date().day(), 
+        dateTime.Set(date.date().year(), TMonth(date.date().month() - 1), date.date().day() - 1, 
                           date.time().hour(), date.time().minute(), 
                               date.time().second(), date.time().msec());
         TTime ttimeDate(dateTime);
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/src/testvideomodel_p.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel_p/src/testvideomodel_p.cpp	Fri May 14 15:14:51 2010 +0300
@@ -717,7 +717,7 @@
     VideoListDataModel::mFirstRemoved = -1;
     VideoListDataModel::mLastRemoved = -1;    
     
-    QSignalSpy spyModelReady(mStubModel, SIGNAL(modelReady()));
+    QSignalSpy spyModelChanged(mStubModel, SIGNAL(modelChanged()));
     
     mMediaFactory->removeArray();
     mMediaFactory->createMediaItems(MEDIA_COUNT);
@@ -728,8 +728,8 @@
     QVERIFY(VideoListDataModel::mLastInserted == MEDIA_COUNT - 1);
     QVERIFY(VideoListDataModel::mFirstRemoved == -1);
     QVERIFY(VideoListDataModel::mLastRemoved == -1); 
-    QCOMPARE(spyModelReady.count(), 1);
-    spyModelReady.clear();
+    QCOMPARE(spyModelChanged.count(), 1);
+    spyModelChanged.clear();
     VideoListDataModel::mFirstInserted = -1;
     VideoListDataModel::mLastInserted = -1;
     VideoListDataModel::mFirstRemoved = -1;
@@ -743,7 +743,7 @@
     QVERIFY(VideoListDataModel::mLastInserted == -1);
     QVERIFY(VideoListDataModel::mFirstRemoved == -1);
     QVERIFY(VideoListDataModel::mLastRemoved == -1); 
-    QCOMPARE(spyModelReady.count(), 0);
+    QCOMPARE(spyModelChanged.count(), 0);
     VideoListDataModel::mFirstInserted = -1;
     VideoListDataModel::mLastInserted = -1;
     VideoListDataModel::mFirstRemoved = -1;
@@ -758,8 +758,8 @@
     QVERIFY(VideoListDataModel::mLastInserted == -1);
     QVERIFY(VideoListDataModel::mFirstRemoved == -1);
     QVERIFY(VideoListDataModel::mLastRemoved == -1); 
-    QCOMPARE(spyModelReady.count(), 1);
-    spyModelReady.clear();
+    QCOMPARE(spyModelChanged.count(), 0);
+    spyModelChanged.clear();
     VideoListDataModel::mFirstInserted = -1;
     VideoListDataModel::mLastInserted = -1;
     VideoListDataModel::mFirstRemoved = -1;
@@ -773,8 +773,8 @@
     QVERIFY(VideoListDataModel::mLastInserted == -1);
     QVERIFY(VideoListDataModel::mFirstRemoved == -1);
     QVERIFY(VideoListDataModel::mLastRemoved == -1); 
-    QCOMPARE(spyModelReady.count(), 1);
-    spyModelReady.clear();
+    QCOMPARE(spyModelChanged.count(), 0);
+    spyModelChanged.clear();
     VideoListDataModel::mFirstInserted = -1;
     VideoListDataModel::mLastInserted = -1;
     VideoListDataModel::mFirstRemoved = -1;
@@ -818,6 +818,7 @@
     // send 10 videos
     mMediaFactory->createMediaItems(10);
     emit signalNewVideoList(mMediaFactory->copyOfMediaArray());
+    spyModelChanged.clear();
     VideoListDataModel::mFirstInserted = -1;
     VideoListDataModel::mLastInserted = -1;
     
@@ -1413,6 +1414,18 @@
     disconnect(this, SIGNAL(signalNewVideoList(CMPXMediaArray*)), mTestObject, SLOT(newVideoListSlot(CMPXMediaArray*)));  
 }
 
+// -----------------------------------------------------------------------------
+// testListCompleteSlot
+// -----------------------------------------------------------------------------
+//
+void TestVideoModel_p::testListCompleteSlot()
+{
+    QVERIFY(connect(this, SIGNAL(signalListCompleteSlot()), mTestObject, SLOT(listCompleteSlot())));
+    QSignalSpy spy(mStubModel, SIGNAL(modelReady()));
+    emit signalListCompleteSlot();
+    QCOMPARE(spy.count(), 1);
+}
+
 // End of file
     
 
--- a/videocollection/videocollectionwrapper/videocollectionwrapper.pro	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videocollectionwrapper/videocollectionwrapper.pro	Fri May 14 15:14:51 2010 +0300
@@ -75,5 +75,3 @@
         -lestor.dll \
         -lcentralrepository.dll \
         -lflogger.dll
-        
-RESOURCES += data/videocollectionwrapper.qrc
--- a/videocollection/videofiledetailsview/data/pri_large_video.svg	Fri Apr 30 09:52:11 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 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="98px" height="98px" viewBox="0 0 98 98" enable-background="new 0 0 98 98" xml:space="preserve">
-<defs>
-</defs>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="48.9995" y1="19" x2="48.9995" y2="79.0015">
-	<stop  offset="0" style="stop-color:#757575"/>
-	<stop  offset="0.2424" style="stop-color:#000000"/>
-	<stop  offset="0.8606" style="stop-color:#000000"/>
-	<stop  offset="1" style="stop-color:#363636"/>
-</linearGradient>
-<path fill="url(#SVGID_1_)" d="M84.5,19h-71c-1.105,0-2,0.896-2,2v56.001c0,1.105,0.895,2,2,2h71c1.104,0,2-0.895,2-2V21
-	C86.5,19.896,85.603,19,84.5,19z M20.5,75.001c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4
-	c0.549,0,1,0.451,1,1V75.001z M20.5,25c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1
-	V25z M29.5,75.001c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V75.001z M29.5,25
-	c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V25z M38.5,75.001c0,0.551-0.451,1-1,1
-	h-4c-0.55,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V75.001z M38.5,25c0,0.551-0.451,1-1,1h-4
-	c-0.55,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V25z M47.5,75.001c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1
-	v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V75.001z M47.5,25c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2
-	c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V25z M56.5,75.001c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1
-	h4c0.549,0,1,0.451,1,1V75.001z M56.5,25c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4
-	c0.549,0,1,0.451,1,1V25z M65.5,75.001c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1
-	V75.001z M65.5,25c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V25z M74.5,75.001
-	c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V75.001z M74.5,25c0,0.551-0.451,1-1,1
-	h-4c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V25z M83.5,75.001c0,0.551-0.451,1-1,1h-4
-	c-0.551,0-1-0.449-1-1v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V75.001z M83.5,25c0,0.551-0.451,1-1,1h-4c-0.551,0-1-0.449-1-1
-	v-2c0-0.549,0.449-1,1-1h4c0.549,0,1,0.451,1,1V25z"/>
-<path opacity="0.55" fill="#FFFFFF" d="M84.5,19h-71c-1.105,0-2,0.896-2,2v1c0-1.104,0.895-2,2-2h71c1.104,0,2,0.896,2,2v-1
-	C86.5,19.896,85.603,19,84.5,19z"/>
-<path opacity="0.1" fill="#FFFFFF" d="M13.5,79.001h71c1.104,0,2-0.895,2-2v-1c0,1.105-0.896,2-2,2h-71c-1.105,0-2-0.895-2-2v1
-	C11.5,78.106,12.395,79.001,13.5,79.001z"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="48.9995" y1="29.1592" x2="48.9995" y2="69.1606">
-	<stop  offset="0" style="stop-color:#000000"/>
-	<stop  offset="0.5" style="stop-color:#666666"/>
-	<stop  offset="1" style="stop-color:#000000"/>
-</linearGradient>
-<rect x="11.5" y="29" fill="url(#SVGID_2_)" width="75" height="40.001"/>
-<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="49" y1="69.001" x2="49" y2="29.0005">
-	<stop  offset="0" style="stop-color:#36B5FF"/>
-	<stop  offset="1" style="stop-color:#1B66D8"/>
-</linearGradient>
-<path fill="url(#SVGID_3_)" d="M83.5,67.001c0,1.1-0.9,2-2,2h-65c-1.1,0-2-0.9-2-2V31c0-1.1,0.9-2,2-2h65c1.1,0,2,0.9,2,2V67.001z"
-	/>
-<path opacity="0.5" fill="#FFFFFF" d="M81.5,67.001h-65c-1.1,0-2,0.1-2-1l0,0c0,1.1,0.9,2,2,2h65c1.1,0,2-0.9,2-2l0,0
-	C83.5,67.101,82.599,67.001,81.5,67.001z"/>
-<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="48.9995" y1="29" x2="48.9995" y2="69.1607">
-	<stop  offset="0" style="stop-color:#000000"/>
-	<stop  offset="1" style="stop-color:#404040"/>
-</linearGradient>
-<path fill="url(#SVGID_4_)" d="M81.5,30c0.551,0,1,0.449,1,1v36.001c0,0.553-0.449,1-1,1h-65c-0.551,0-1-0.447-1-1V31
-	c0-0.551,0.449-1,1-1H81.5 M81.5,29h-65c-1.1,0-2,0.9-2,2v36.001c0,1.1,0.9,2,2,2h65c1.1,0,2-0.9,2-2V31
-	C83.5,29.9,82.599,29,81.5,29L81.5,29z"/>
-<path opacity="0.2" fill="#FFFFFF" d="M81.5,41.001V33c0-1.104-0.896-2-2-2h-61c-1.105,0-2,0.896-2,2v13.001L81.5,41.001z"/>
-<rect fill="none" width="98" height="98.001"/>
-</svg>
--- a/videocollection/videofiledetailsview/data/videofiledetails.qrc	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videofiledetailsview/data/videofiledetails.qrc	Fri May 14 15:14:51 2010 +0300
@@ -2,7 +2,4 @@
     <qresource prefix="/xml" >
         <file alias="videofiledetails.docml">videofiledetails.xml</file>
     </qresource>
-    <qresource prefix="/gfx" >
-        <file alias="pri_large_video.svg">pri_large_video.svg</file>
-    </qresource>
 </RCC>
--- a/videocollection/videofiledetailsview/data/videofiledetails.xml	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videofiledetailsview/data/videofiledetails.xml	Fri May 14 15:14:51 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.0">
     <object name="mOptionsDelete" type="HbAction">
         <string locid="txt_common_opt_delete" name="text" value="Delete"/>
     </object>
@@ -20,7 +20,7 @@
                     <linearitem itemname="mDetailsList"/>
                 </layout>
             </widget>
-            <widget name="mThumbRating" type="HbWidget">
+            <widget name="mThumbContainer" type="HbWidget">
                 <widget name="mDetailsLabel" type="HbStackedWidget">
                     <real name="z" value="2"/>
                     <sizehint height="34.47761un" type="PREFERRED" width="47.91045un"/>
@@ -34,32 +34,22 @@
                     <anchoritem dst="mDetailsLabel" dstEdge="TOP" spacing="1.34328un" src="" srcEdge="TOP"/>
                 </layout>
             </widget>
+            <widget name="mButton" type="HbPushButton">
+                <real name="z" value="3"/>
+            </widget>
         </widget>
     </widget>
     <section name="portrait">
-        <widget name="mDetailsContainer" type="HbWidget">
-            <widget name="mButton" type="HbPushButton">
-                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                <sizehint height="7.46269un" type="PREFERRED" width="14.92537un"/>
-                <sizehint height="7.46269un" type="MINIMUM" width="7.46269un"/>
-                <sizehint height="7.46269un" type="MAXIMUM" width="74.62687un"/>
-                <string name="state" value="normal"/>
-            </widget>
-            <sizehint height="49.55224un" type="PREFERRED" width="50.74626un"/>
-            <layout orientation="Vertical" type="linear">
-                <linearitem itemname="mDetailsList"/>
-                <linearitem itemname="mButton"/>
-            </layout>
-        </widget>
         <widget name="mContent" role="HbView:widget" type="HbWidget">
-            <widget name="mThumbRating" type="HbWidget">
+            <widget name="mThumbContainer" type="HbWidget">
                 <widget name="mDetailsLabel" type="HbStackedWidget">
                     <real name="z" value="2"/>
-                    <sizehint height="28.54477688un" type="FIXED" width="50.74627un"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="28.54478un" type="FIXED" width="50.74627un"/>
                     <string name="state" value=""/>
                 </widget>
                 <real name="z" value="1"/>
-                <sizehint height="28.69402688un" type="PREFERRED" width="50.74626un"/>
+                <sizehint height="28.69403un" type="PREFERRED" width="50.74626un"/>
                 <layout type="anchor">
                     <anchoritem dst="mDetailsLabel" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
                     <anchoritem dst="mDetailsLabel" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
@@ -67,16 +57,40 @@
                     <anchoritem dst="mDetailsLabel" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 </layout>
             </widget>
+            <widget name="mDetailsContainer" type="HbWidget">
+                <widget name="mDetailsList" type="HbListWidget">
+                    <real name="z" value="0"/>
+                    <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+                    <sizehint height="38.50746un" type="PREFERRED" width="48.0597un"/>
+                    <bool name="visible" value="TRUE"/>
+                </widget>
+                <real name="z" value="2"/>
+                <sizehint height="42.68657un" type="PREFERRED" width="50.89551un"/>
+                <layout type="anchor">
+                    <anchoritem dst="mDetailsList" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="mDetailsList" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                    <anchoritem dst="mDetailsList" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="mDetailsList" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                </layout>
+            </widget>
+            <widget name="mButton" type="HbPushButton">
+                <real name="z" value="5"/>
+                <sizehint height="7.17164un" type="PREFERRED" width="50.74626un"/>
+            </widget>
             <layout type="anchor">
                 <anchoritem dst="mLblTitle" dstEdge="TOP" spacing="1.04478un" src="" srcEdge="TOP"/>
                 <anchoritem dst="mLblTitle" dstEdge="LEFT" spacing="1.49254un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="mLblTitle" dstEdge="RIGHT" spacing="-1.49254un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="mThumbContainer" dstEdge="TOP" spacing="6.71642un" src="" srcEdge="TOP"/>
+                <anchoritem dst="mThumbContainer" dstEdge="LEFT" spacing="1.49254un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="mThumbContainer" dstEdge="RIGHT" spacing="-1.49254un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="mButton" dstEdge="LEFT" spacing="1un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="mButton" dstEdge="TOP" spacing="0un" src="mDetailsContainer" srcEdge="BOTTOM"/>
+                <anchoritem dst="mButton" dstEdge="RIGHT" spacing="-1un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="mButton" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="mDetailsContainer" dstEdge="BOTTOM" spacing="-7.5un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="mDetailsContainer" dstEdge="RIGHT" spacing="-1.19405un" src="" srcEdge="RIGHT"/>
                 <anchoritem dst="mDetailsContainer" dstEdge="LEFT" spacing="1.49254un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="mDetailsContainer" dstEdge="RIGHT" spacing="-1.49254un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="mDetailsContainer" dstEdge="BOTTOM" spacing="-1.49254un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="mThumbRating" dstEdge="TOP" spacing="6.71642un" src="" srcEdge="TOP"/>
-                <anchoritem dst="mThumbRating" dstEdge="LEFT" spacing="1.49254un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="mThumbRating" dstEdge="RIGHT" spacing="-1.49254un" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
     </section>
@@ -84,55 +98,54 @@
         <widget name="mContent" role="HbView:widget" type="HbWidget">
             <widget name="mDetailsContainer" type="HbWidget">
                 <widget name="mDetailsList" type="HbListWidget">
-                    <sizehint height="26.71642un" type="PREFERRED" width="42.83582un"/>
+                    <real name="z" value="0"/>
+                    <sizehint height="35.37314un" type="PREFERRED" width="48.0597un"/>
+                    <bool name="visible" value="TRUE"/>
                 </widget>
                 <real name="z" value="2"/>
-                <sizehint height="37.01493un" type="PREFERRED" width="45.52239un"/>
+                <sizehint height="35.97015un" type="PREFERRED" width="42.98507un"/>
                 <layout type="anchor">
-                    <anchoritem dst="mDetailsList" dstEdge="LEFT" spacing="1.34328un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="mDetailsList" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
                     <anchoritem dst="mDetailsList" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                    <anchoritem dst="mDetailsList" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
                     <anchoritem dst="mDetailsList" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 </layout>
             </widget>
-            <widget name="mThumbRating" type="HbWidget">
+            <widget name="mThumbContainer" type="HbWidget">
                 <widget name="mDetailsLabel" type="HbStackedWidget">
-                    <real name="z" value="2"/>
-                    <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                    <sizehint height="26.865675un" type="FIXED" width="47.7612un"/>
-                    <string name="state" value=""/>
-                </widget>
-                <widget name="mButton" type="HbPushButton">
-                    <real name="z" value="3"/>
-                    <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                    <sizehint height="7.46269un" type="PREFERRED" width="45.07463un"/>
-                    <sizehint height="7.46269un" type="MINIMUM" width="7.46269un"/>
-                    <sizehint height="7.46269un" type="MAXIMUM" width="74.62687un"/>
+                    <real name="z" value="5"/>
+                    <sizehint height="29.49253un" type="PREFERRED" width="48.35821un"/>
+                    <bool name="visible" value="TRUE"/>
                     <string name="state" value=""/>
                 </widget>
-                <real name="z" value="1"/>
-                <sizehint height="37.31343un" type="PREFERRED" width="47.7612un"/>
+                <sizehint height="30.29851un" type="PREFERRED" width="49.04478un"/>
                 <layout type="anchor">
-                    <anchoritem dst="mButton" dstEdge="LEFT" spacing="1.34328un" src="" srcEdge="LEFT"/>
-                    <anchoritem dst="mButton" dstEdge="TOP" spacing="28.50746un" src="" srcEdge="TOP"/>
                     <anchoritem dst="mDetailsLabel" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="mDetailsLabel" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
                     <anchoritem dst="mDetailsLabel" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                    <anchoritem dst="mDetailsLabel" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                    <anchoritem dst="mDetailsLabel" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 </layout>
             </widget>
+            <widget name="mButton" type="HbPushButton">
+                <real name="z" value="6"/>
+                <sizehint height="7.5un" type="PREFERRED" width="43.88059un"/>
+            </widget>
             <layout type="anchor">
+                <anchoritem dst="mLblTitle" dstEdge="TOP" spacing="1.04478un" src="" srcEdge="TOP"/>
                 <anchoritem dst="mLblTitle" dstEdge="LEFT" spacing="1.49254un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="mLblTitle" dstEdge="TOP" spacing="1.04478un" src="" srcEdge="TOP"/>
-                <anchoritem dst="mLblTitle" dstEdge="RIGHT" spacing="1.49254un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="mDetailsContainer" dstEdge="TOP" spacing="6.71642un" src="" srcEdge="TOP"/>
-                <anchoritem dst="mDetailsContainer" dstEdge="LEFT" spacing="49.40299un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="mThumbRating" dstEdge="LEFT" spacing="1.49254un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="mThumbRating" dstEdge="TOP" spacing="6.71642un" src="" srcEdge="TOP"/>
-                <anchoritem dst="mDetailsContainer" dstEdge="LEFT" spacing="0.14925un" src="mThumbRating" srcEdge="RIGHT"/>
+                <anchoritem dst="mLblTitle" dstEdge="RIGHT" spacing="-1.49254un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="mButton" dstEdge="LEFT" spacing="1un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="mButton" dstEdge="RIGHT" spacing="-1un" src="mDetailsContainer" srcEdge="LEFT"/>
+                <anchoritem dst="mButton" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="mDetailsContainer" dstEdge="LEFT" spacing="51.04478un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="mDetailsContainer" dstEdge="TOP" spacing="6.2un" src="" srcEdge="TOP"/>
+                <anchoritem dst="mDetailsContainer" dstEdge="RIGHT" spacing="-1.34329un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="mDetailsContainer" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="mThumbContainer" dstEdge="RIGHT" spacing="-0.91045un" src="mDetailsContainer" srcEdge="LEFT"/>
+                <anchoritem dst="mThumbContainer" dstEdge="TOP" spacing="6.2un" src="" srcEdge="TOP"/>
+                <anchoritem dst="mThumbContainer" dstEdge="LEFT" spacing="1un" src="" srcEdge="LEFT"/>
             </layout>
         </widget>
-        <widget name="mLayoutVideoInfo" role="HbScrollArea:contents" type="HbWidget">
-            <layout orientation="Vertical" type="linear"/>
-        </widget>
     </section>
     <metadata activeUIState="portrait" display="NHD portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
--- a/videocollection/videofiledetailsview/src/videofiledetailsviewplugin.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videofiledetailsview/src/videofiledetailsviewplugin.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 73 %
+// Version : %version: 76 %
 
 // INCLUDE FILES
 #include <qcoreapplication.h>
@@ -46,10 +46,18 @@
 #include "videodetailslabel.h"
 #include "videocollectiontrace.h"
 
+// Object names.
+const char* const VIDEO_DETAILS_OBJECT_NAME_THUMBLABEL          = "vc:FileDetailsThumbnailLabel";
+const char* const VIDEO_DETAILS_OBJECT_NAME_DELETE_VIDEO        = "vc:FileDetailsMessageBoxDeleteVideo";
+const char* const VIDEO_DETAILS_OBJECT_NAME_MESSAGE_BOX_WARNING = "vc:FileDetailsMessageBoxWarning";
+const char* const VIDEO_DETAILS_OBJECT_NAME_DELETE_ACTION       = "vc:FileDetailsDelete";
+const char* const VIDEO_DETAILS_OBJECT_NAME_NAVKEY_BACK         = "vc:FileDetailsNavKeyBack";
+const char* const VIDEO_DETAILS_OBJECT_NAME_TITLE_ANIM          = "vc:FileDetailsTitleAnim";
+
+// Docml constants.
 const char* const VIDEO_DETAILS_DOCML             = ":/xml/videofiledetails.docml";
 const char* const VIDEO_DETAILS_PORTRAIT          = "portrait";
 const char* const VIDEO_DETAILS_LANDSCAPE         = "landscape";
-const char* const VIDEO_DETAILS_GFX_DEFAULT       = ":/gfx/pri_large_video.svg";
 const char* const VIDEO_DETAILS_VIEW              = "videofiledetailsview";
 const char* const VIDEO_DETAILS_TITLE             = "mLblTitle";
 const char* const VIDEO_DETAILS_THUMBNAIL         = "mDetailsLabel";
@@ -57,6 +65,11 @@
 const char* const VIDEO_DETAILS_MENUACTION_DELETE = "mOptionsDelete";
 const char* const VIDEO_DETAILS_LISTWIDGET        = "mDetailsList";
 
+// Default thumbnail.
+const char* const VIDEO_DETAILS_GFX_DEFAULT       = "qtg_large_video";
+
+const int VIDEO_DETAILS_SECONDARY_TEXT_ROW_COUNT  = 255;
+
 // ---------------------------------------------------------------------------
 // Constructor
 // ---------------------------------------------------------------------------
@@ -136,6 +149,7 @@
     spec.setRole( HbFontSpec::Primary );
     mTitleAnim->setFontSpec( spec );
     mTitleAnim->setLoopCount(-1);
+    mTitleAnim->setObjectName(VIDEO_DETAILS_OBJECT_NAME_TITLE_ANIM);
 
 	connect(mModel->sourceModel(),
 			SIGNAL(shortDetailsReady(TMPXItemId)),
@@ -160,9 +174,9 @@
 	// no deallocation needed for this since
 	// stackedwidget takes ownership
 	mThumbLabel = new VideoDetailsLabel;
-
 	mThumbLabel->setAlignment(Qt::AlignCenter);
-
+	mThumbLabel->setObjectName(VIDEO_DETAILS_OBJECT_NAME_THUMBLABEL);
+	
 	connect(mThumbLabel, SIGNAL(clicked(bool)), this, SLOT(startPlaybackSlot()));
 
 	thumbWidget->addWidget(mThumbLabel);
@@ -183,6 +197,7 @@
         ERROR(-1, "VideoFileDetailsViewPlugin::createView() failed to delete action.");
         return;
     }
+    deleteAction->setObjectName(VIDEO_DETAILS_OBJECT_NAME_DELETE_ACTION);
 
 	if (mIsService)
 	{
@@ -195,7 +210,8 @@
 
 	// Create navigation keys.
 	mNavKeyBackAction = new HbAction(Hb::BackNaviAction);
-
+	mNavKeyBackAction->setObjectName(VIDEO_DETAILS_OBJECT_NAME_NAVKEY_BACK);
+	
 	if (!mThumbnailManager)
 	{
 		mThumbnailManager = new ThumbnailManager();
@@ -212,7 +228,6 @@
     }
     
     list->setEnabledAnimations(HbAbstractItemView::None);
-
 }
 
 // ---------------------------------------------------------------------------
@@ -484,19 +499,17 @@
         list->clear();
     }
 
-    //TODO: define maximum line count once >3 supported
     HbListViewItem *prototype = list->listItemPrototype();
-    prototype->setSecondaryTextRowCount(1, 3);
+    prototype->setSecondaryTextRowCount(1, VIDEO_DETAILS_SECONDARY_TEXT_ROW_COUNT);
 
     for(int i = 0; i< detailCount; i++) {
         if (metadata.contains(VideoDetailLabelKeys[i]))
         {
             HbListWidgetItem* listWidgetItem = new HbListWidgetItem();
             listWidgetItem->setEnabled(false);
-
-            listWidgetItem->setText( hbTrId(VideoDetailLabels[i]) );
-            listWidgetItem->setSecondaryText( metadata[VideoDetailLabelKeys[i]].toString() );
-            list->addItem( listWidgetItem );
+            listWidgetItem->setText( hbTrId(VideoDetailLabels[i]));
+            listWidgetItem->setSecondaryText(metadata[VideoDetailLabelKeys[i]].toString());
+            list->addItem(listWidgetItem);
         }
     }
 
@@ -578,8 +591,8 @@
 
             HbMessageBox *messageBox = new HbMessageBox(text, HbMessageBox::MessageTypeQuestion);
             messageBox->setAttribute(Qt::WA_DeleteOnClose);
+            messageBox->setObjectName(VIDEO_DETAILS_OBJECT_NAME_DELETE_VIDEO);
             messageBox->open(this, SLOT(deleteVideoDialogFinished(HbAction *)));
-            
         }
     }
 }
@@ -613,7 +626,6 @@
     mModel->deleteItems(list);
 }
 
-
 // ---------------------------------------------------------------------------
 // Slot: rowsRemovedSlot
 // ---------------------------------------------------------------------------
@@ -643,7 +655,7 @@
     QString msg("");
     if(errorCode == VideoCollectionCommon::statusSingleDeleteFail)
     {
-        QString format = hbTrId("txt_videos_info_unable_to_delete_1_it_is_current"); 
+        QString format = hbTrId("txt_videos_info_unable_to_delete_1_it_is_current");
         if(additional.isValid())
         {
            msg = format.arg(additional.toString());
@@ -652,7 +664,10 @@
     if(msg.count() > 0)
     {
         // show msg box if there's something to show
-        HbMessageBox::warning(msg);
+        HbMessageBox *messageBox = new HbMessageBox(msg, HbMessageBox::MessageTypeWarning);
+        messageBox->setAttribute(Qt::WA_DeleteOnClose);
+        messageBox->setObjectName(VIDEO_DETAILS_OBJECT_NAME_MESSAGE_BOX_WARNING);
+        messageBox->show();
     }
 }
 
@@ -854,4 +869,4 @@
 
 XQ_EXPORT_PLUGIN2( videofiledetailsview, VideoFileDetailsViewPlugin );
 
-// end of file
+// End of file
--- a/videocollection/videofiledetailsview/tsrc/testplugin/src/testvideofiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videofiledetailsview/tsrc/testplugin/src/testvideofiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -47,7 +47,7 @@
 #include "videofiledetailsviewplugin.h"
 #undef private
 
-const char *TEST_VIDEO_DETAILS_GFX_DEFAULT = ":/gfx/pri_large_video.svg";
+const char *TEST_VIDEO_DETAILS_GFX_DEFAULT = "qtg_large_video";
 const char *TEST_VIDEO_DETAILS_VIEW = "videofiledetailsview";
 const char *TEST_VIDEO_DETAILS_WIDGET = "mContent";
 const char *TEST_VIDEO_DETAILS_TITLE = "mLblTitle";
@@ -595,7 +595,7 @@
     
     QVERIFY( deleteAction != 0 ); 
     deleteAction->trigger();
-    QCOMPARE( mDummyModel->dataAccessCount(), 0 );    
+    QCOMPARE( mDummyModel->dataAccessCount(), 0 );
     mPlugin->mVideoId = (0,0);
 
     mDummyModel->setDataReturnInvalid(true);
@@ -612,6 +612,8 @@
     QCOMPARE( mDummyModel->dataAccessCount(), 2 );
     QVERIFY( mDummyModel->lastIndex() == expected );
     QCOMPARE( mDummyModel->deleteFileIndex(), -1 ); // verify that no file was deleted.
+
+    HbMessageBox *msgBox = new HbMessageBox();
     
     QStringList display;
     display.append("first row");
@@ -620,16 +622,15 @@
     
     QString expectedText = hbTrId("txt_videos_info_do_you_want_to_delete_1").arg(
             display.first());
-    
-    HbMessageBox::mQuestionReturnValue = true;
     deleteAction->trigger();
+    msgBox->emitDialogFinished(mPlugin, SLOT(deleteVideoDialogFinished(HbAction *)), 0); // Yes selected
     QCOMPARE( mDummyModel->dataAccessCount(), 3 );
     QVERIFY( mDummyModel->lastIndex() == expected );
     QCOMPARE( mDummyModel->deleteFileIndex(), expected.row() );
     QCOMPARE( HbMessageBox::mLatestTxt, expectedText );
     
-    HbMessageBox::mQuestionReturnValue = false;
     deleteAction->trigger();
+    msgBox->emitDialogFinished(mPlugin, SLOT(deleteVideoDialogFinished(HbAction *)), 1); // No selected
     QCOMPARE( mDummyModel->dataAccessCount(), 4 );
     QVERIFY( mDummyModel->lastIndex() == expected );
     QCOMPARE( mDummyModel->deleteFileIndex(), expected.row() );
@@ -637,13 +638,14 @@
     
 
     mDummyModel->reset();
-    HbMessageBox::mQuestionReturnValue = false;
     deleteAction->trigger();
+    msgBox->emitDialogFinished(mPlugin, SLOT(deleteVideoDialogFinished(HbAction *)), 1); // No selected
     QCOMPARE( mDummyModel->dataAccessCount(), 1 );
     QVERIFY( mDummyModel->lastIndex() == expected );
     QCOMPARE( mDummyModel->deleteFileIndex(), -1 ); // verify that no file was deleted.
     QCOMPARE( HbMessageBox::mLatestTxt, expectedText );
     
+    delete msgBox;
     cleanup();
 }
 
--- a/videocollection/videofiledetailsview/tsrc/testplugin/stub/inc/hbmessagebox.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videofiledetailsview/tsrc/testplugin/stub/inc/hbmessagebox.h	Fri May 14 15:14:51 2010 +0300
@@ -19,23 +19,37 @@
 #ifndef HBMESSAGEBOX_H
 #define HBMESSAGEBOX_H
 
+#include <QObject>
 #include <QString>
+#include <QGraphicsItem>
 
+#include <hbaction.h>
+
+class HbMessageBox : public QObject 
+{
+    Q_OBJECT
+public:
 
-class HbMessageBox 
-{
-   
-public:
+    enum MessageBoxType {
+        MessageTypeInformation,
+        MessageTypeQuestion,
+        MessageTypeWarning
+    };
+    
+    HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
+    HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
+    ~HbMessageBox();
+    
+    void show();
     
     /**
-     * saves provided text to mLatestTxt
-     * returns mQuestionReturnValue
+     * Create new HbMessageBox and call emitDialogFinished after this one to finish the sequence.
      */
-    static bool question(QString text)
-    {
-        mLatestTxt = text;
-        return mQuestionReturnValue;
-    }
+    void open( QObject* receiver = 0, const char* member = 0 );
+    
+    void emitDialogFinished( QObject* receiver, const char* member, int actionNum );
+    
+    void setAttribute(int attribute);
     
     /**
      * saves provided text to mLatestTxt
@@ -53,18 +67,26 @@
         mLatestTxt = text;
     }
     
-    /**
-     * returned from question
-     */
-    static bool mQuestionReturnValue;
+    QList<HbAction*> actions() const
+    {
+        return mActions;
+    }
     
     /**
      * saved text
      */
     static QString mLatestTxt;
     
+    static int mType;
+    static int mAttribute;
+    static int mOpenCallCount;
+    static int mShowCallCount;
+    
+    QList<HbAction*> mActions;
+    
+signals:
+
+    void finished(HbAction *action);
 };
 
-
-
 #endif // HBMESSAGEBOX_H
--- a/videocollection/videofiledetailsview/tsrc/testplugin/stub/src/hbmessagebox.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videocollection/videofiledetailsview/tsrc/testplugin/stub/src/hbmessagebox.cpp	Fri May 14 15:14:51 2010 +0300
@@ -17,10 +17,65 @@
 
 #include "hbmessagebox.h"
 
-bool HbMessageBox::mQuestionReturnValue = false;
+QString HbMessageBox::mLatestTxt = "";
+int HbMessageBox::mType = -1;
+int HbMessageBox::mAttribute = -1;
+int HbMessageBox::mOpenCallCount = 0;
+int HbMessageBox::mShowCallCount = 0;
 
-QString HbMessageBox::mLatestTxt = "";
+HbMessageBox::HbMessageBox(MessageBoxType type, QGraphicsItem *parent)
+{
+    Q_UNUSED(parent);
+    HbMessageBox::mType = type;
+    
+    HbAction *action = new HbAction();
+    mActions.append(action);
+    action = new HbAction();
+    mActions.append(action);   
+}
+
+HbMessageBox::HbMessageBox(const QString &text, MessageBoxType type, QGraphicsItem *parent)
+{
+    Q_UNUSED(parent);
+    HbMessageBox::mLatestTxt = text;
+    HbMessageBox::mType = type;
+    
+    HbAction *action = new HbAction();
+    mActions.append(action);
+    action = new HbAction();
+    mActions.append(action);   
+}
 
+HbMessageBox::~HbMessageBox()
+{
+    while(!mActions.isEmpty())
+    {
+        delete mActions.takeFirst();
+    }
+}
 
+void HbMessageBox::show()
+{
+    HbMessageBox::mShowCallCount++;
+}
 
+void HbMessageBox::open( QObject* receiver, const char* member )
+{
+    Q_UNUSED(receiver);
+    Q_UNUSED(member);
+    HbMessageBox::mOpenCallCount++;
+}
 
+void HbMessageBox::emitDialogFinished( QObject* receiver, const char* member, int actionNum )
+{
+    if(connect(this, SIGNAL(finished(HbAction *)), receiver, member))
+    {
+        emit finished(mActions.value(actionNum));
+        disconnect(this, SIGNAL(finished(HbAction *)), receiver, member);
+    }
+}
+
+void HbMessageBox::setAttribute(int attribute)
+{
+    HbMessageBox::mAttribute = attribute;
+}
--- a/videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackfiledetailswidget.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackfiledetailswidget.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 10 %
+// Version : %version: 11 %
 
 
 
@@ -37,7 +37,6 @@
     public:
         QMPXVideoPlaybackFileDetailsWidget( QMPXVideoPlaybackControlsController* controller );
         virtual ~QMPXVideoPlaybackFileDetailsWidget();
-        void initialize();
 
     public:
         void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details );
--- a/videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackprogressbar.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackprogressbar.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#11 %
+// Version : %version: da1mmcf#12 %
 
 
 
@@ -26,7 +26,6 @@
 #include <mpxplaybackframeworkdefs.h>
 
 class QTimer;
-class HbFrameItem;
 class HbProgressSlider;
 class QMPXVideoPlaybackViewFileDetails;
 class QMPXVideoPlaybackControlsController;
@@ -59,7 +58,6 @@
     private:
         QMPXVideoPlaybackControlsController *mController;
         HbProgressSlider                    *mProgressSlider;
-        HbFrameItem                         *mFrameItem;
 
         int     mDuration;
         int     mDraggingPosition;
--- a/videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackstatuspanecontrol.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackstatuspanecontrol.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 9 %
+// Version : %version: 10 %
 
 
 
@@ -28,7 +28,8 @@
 
 class HbLabel;
 class HbAction;
-class HbFrameItem;
+class HbGroupBox;
+class QGraphicsWidget;
 class QMPXVideoPlaybackViewFileDetails;
 class QMPXVideoPlaybackControlsController;
 
@@ -73,7 +74,8 @@
         bool                     mVisible;
         HbAction                *mActionBack;
         HbLabel                 *mTitleLabel;
-        HbFrameItem             *mFrameItem;
+        HbGroupBox              *mTitleGroupBox;
+        QGraphicsWidget         *mTitleLayout;
 };
 
 #endif /*MPXVIDEOPLAYBACKSTATUSPANECONTROL_H_*/
--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackcontrolscontroller.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackcontrolscontroller.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#37 %
+// Version : %version: da1mmcf#39 %
 
 
 
@@ -26,18 +26,15 @@
 #include <f32file.h>
 
 #include <QTimer>
-#include <QFileInfo>
 #include <thumbnailmanager_qt.h>
 #include <xqserviceutil.h>
 
 #include <hblabel.h>
-#include <hbiconitem.h>
-#include <hbratingslider.h>
-#include <hbiconanimator.h>
 #include <hbvolumesliderpopup.h>
 #include <hbtransparentwindow.h>
 #include <hbiconanimationmanager.h>
 #include <shareui.h>
+#include <hbinstance.h>
 
 #include "mpxvideoviewwrapper.h"
 #include "hbvideobaseplaybackview.h"
@@ -93,12 +90,22 @@
 {
     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackControlsController::initializeController()"));
 
+    mOrientation = hbInstance->allMainWindows()[0]->orientation();
+    bool ok = connect( hbInstance->allMainWindows()[0], SIGNAL( orientationChanged( Qt::Orientation ) ),
+                       this, SLOT( handleOrientationChanged( Qt::Orientation ) ) );
+
+    MPX_DEBUG(
+        _L("QMPXVideoPlaybackControlsController::initializeController() orientation = %d, ok =%d"), 
+        mOrientation, ok );
+
     setParent( mView );
 
+    mView->hideItems( Hb::AllItems );
+
     //
     // Create layout loader
     //
-    bool ok = false;
+    ok = false;
     mLoader = new QMPXVideoPlaybackDocumentLoader( this );
     mLoader->load( KMPXPLAYBACKVIEW_XML, &ok );
 
@@ -180,9 +187,10 @@
     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackControlsController::~QMPXVideoPlaybackControlsController()"));
 
     disconnect( mControlsConfig, SIGNAL( controlListUpdated() ), this, SLOT( controlsListUpdated() ) );
-
     disconnect( mView, SIGNAL( tappedOnScreen() ), this, SLOT( handleTappedOnScreen() ) );
     disconnect( mControlsTimer, SIGNAL( timeout() ), this, SLOT( hideAllControls() ) );
+    disconnect( hbInstance->allMainWindows()[0], SIGNAL( orientationChanged( Qt::Orientation ) ),
+                this, SLOT( handleOrientationChanged( Qt::Orientation ) ) );
 
     mView->setWidget( NULL );
 
@@ -280,21 +288,6 @@
         mVolumeControl->setValue( 0 );
         mVolumeControl->setEnabled( false );
     }
-
-    //
-    // If title is not available, show clip name
-    //
-    QString title = mFileDetails->mTitle;
-
-    if ( title.count() == 0 )
-    {
-        QFileInfo fileInfo( mFileDetails->mClipName );
-        title = fileInfo.baseName ();
-    }
-
-    QGraphicsWidget *widget = mLoader->findWidget( QString( "title" ) );
-    HbLabel *titleLabel = qobject_cast<HbLabel*>( widget );
-    titleLabel->setPlainText( title );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -578,7 +571,6 @@
             QGraphicsWidget *widget = mLoader->findWidget( QString( "fileDetailsLayout" ) );
             QMPXVideoPlaybackFileDetailsWidget *fileDetails = 
                 qobject_cast<QMPXVideoPlaybackFileDetailsWidget*>( widget );
-            fileDetails->initialize();
 
             control = new QMPXVideoPlaybackFullScreenControl( this,
                                                               controlIndex,
@@ -713,7 +705,7 @@
 
     resetDisappearingTimers( EMPXTimerReset );
 
-    if ( ! mViewTransitionIsGoingOn )
+    if ( ! mViewTransitionIsGoingOn && mOrientation == Qt::Horizontal )
     {
         for ( int i = 0 ; i < mControls.count() ; i++ )
         {
@@ -728,7 +720,7 @@
 //
 bool QMPXVideoPlaybackControlsController::isVisible()
 {
-    bool visible = EFalse;
+    bool visible = false;
 
     for ( int i = 0 ; i < mControls.count() ; i++ )
     {
@@ -736,7 +728,7 @@
         {
             if ( mControls[i]->isVisible() )
             {
-                visible = ETrue;
+                visible = true;
             }
 
             break;
@@ -877,7 +869,7 @@
 //
 bool QMPXVideoPlaybackControlsController::realFormat( QString filename )
 {
-    bool realFormat = EFalse;
+    bool realFormat = false;
 
     if ( !filename.isNull() && !filename.isEmpty() )
     {
@@ -904,7 +896,7 @@
 //
 bool QMPXVideoPlaybackControlsController::realFormatForStreaming( const TDesC& des )
 {
-    bool realFormat = EFalse;
+    bool realFormat = false;
     TParse filePath;
 
     _LIT(KMPXRMEXT, ".R" );
@@ -967,7 +959,7 @@
         // RealMedia Branding
         if ( ! buf.Compare( KMPXRMEXT ) )
         {
-            realFormat = ETrue;
+            realFormat = true;
         }
     }
 
@@ -992,7 +984,7 @@
     {
         realFormat = true;
     }
-        
+
     MPX_DEBUG(_L("QMPXVideoPlaybackControlsController::realFormatForLocal() [%d]"), realFormat);
 
     return realFormat;
@@ -1048,7 +1040,7 @@
 //
 bool QMPXVideoPlaybackControlsController::isSoftKeyVisible( int /*value*/ )
 {
-    bool visible = EFalse;
+    bool visible = false;
 
     for ( int i = 0 ; i < mControls.count() ; i++ )
     {
@@ -1056,7 +1048,7 @@
         {
             if ( mControls[i]->isVisible() )
             {
-                visible = ETrue;
+                visible = true;
             }
 
             break;
@@ -1345,18 +1337,6 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-// QMPXVideoPlaybackControlsController::isAttachOperation
-// -------------------------------------------------------------------------------------------------
-//
-bool QMPXVideoPlaybackControlsController::isAttachOperation()
-{        
-    MPX_DEBUG(_L("QMPXVideoPlaybackControlsController::isAttachOperation() ret %d"), 
-	    mIsAttachOperation );
-    
-    return mIsAttachOperation;
-}
-
-// -------------------------------------------------------------------------------------------------
 // QMPXVideoPlaybackControlsController::attachVideo()
 // -------------------------------------------------------------------------------------------------
 //
@@ -1400,4 +1380,22 @@
     dlg.send( fileList, true );   
 }
 
+// -------------------------------------------------------------------------------------------------
+// QMPXVideoPlaybackControlsController::handleOrientationChanged()
+// -------------------------------------------------------------------------------------------------
+//
+void QMPXVideoPlaybackControlsController::handleOrientationChanged( Qt::Orientation orientation )
+{
+    MPX_ENTER_EXIT(_L("QMPXVideoPlaybackControlsController::handleOrientationChanged()"),
+                   _L("old orientation %d, new orientation = %d"), mOrientation, orientation );
+
+    Qt::Orientation  oldOrientaiton = mOrientation;
+    mOrientation = orientation;
+
+    if ( oldOrientaiton == Qt::Vertical && orientation == Qt::Horizontal )
+    {
+        showControls();
+    }
+}
+
 // End of File
--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackfiledetailswidget.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackfiledetailswidget.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  23 %
+// Version : %version:  25 %
 
 
 #include <QDir>
@@ -28,6 +28,7 @@
 #include <hblistwidget.h>
 #include <hblistviewitem.h>
 #include <hbextendedlocale.h>
+#include <hbanchorlayout.h>
 
 #include "mpxvideo_debug.h"
 #include "mpxvideoplaybackdocumentloader.h"
@@ -57,22 +58,6 @@
 QMPXVideoPlaybackFileDetailsWidget::~QMPXVideoPlaybackFileDetailsWidget()
 {
     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackFileDetailsWidget::~QMPXVideoPlaybackFileDetailsWidget()"));
-
-    if ( mListWidget ) 
-    {
-        delete mListWidget;
-    }
-}
-
-// -------------------------------------------------------------------------------------------------
-// QMPXVideoPlaybackFileDetailsWidget::initialize
-// -------------------------------------------------------------------------------------------------
-//
-void QMPXVideoPlaybackFileDetailsWidget::initialize()
-{
-    MPX_ENTER_EXIT(_L("QMPXVideoPlaybackFileDetailsWidget::initialize"));
-
-    updateWithFileDetails( mController->fileDetails() );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -101,25 +86,24 @@
         //
         HbListViewItem *prototype = mListWidget->listItemPrototype();
         prototype->setSecondaryTextRowCount( 1, 30 );
-        
+
+        //
+        // Title
+        //            
+        makeTitleItem( details );
+
         if ( ! mFileDetailsUpdated )
         {
             HbExtendedLocale locale = HbExtendedLocale::system();
 
             mFileDetailsUpdated = true;
-            
-            //
-            // Title
-            //            
-            makeTitleItem( details );
-            
+
             //
             // Description
             //
             addItemToListWidget( 
                     hbTrId( "txt_videos_list_description" ), details->mDescription ); 
 
-            
             //
             // Duration
             //
@@ -132,11 +116,11 @@
                 value = value % 60;
                 QString sec = locale.toString( value );
 
-                addItemToListWidget( 
+                addItemToListWidget(
                         hbTrId( "txt_videos_list_duration" ),
-                        hbTrId( "txt_videos_list_l1_l2_l3" ).arg( hour ).arg( min ).arg( sec ) );                                                                        
+                        hbTrId( "txt_videos_list_l1l2l3" ).arg( hour ).arg( min ).arg( sec ) );                                                                        
             }    
-            
+
             //
             // Date/Time
             //
@@ -146,27 +130,27 @@
             // Location
             //
             addItemToListWidget( hbTrId( "txt_videos_list_location" ), details->mLocation );                                                
-            
+
             //
             // Author
             //
             addItemToListWidget( hbTrId( "txt_videos_list_author" ), details->mArtist );                                            
-            
+
             //
             // Copyright
             //
             addItemToListWidget( hbTrId( "txt_videos_list_copyright" ), details->mCopyright );                                        
-            
+
             //
             // Language
             //
             addItemToListWidget( hbTrId( "txt_videos_list_language" ), details->mLanguage );                                    
-            
+
             //
             // Keywords
             //
             addItemToListWidget( hbTrId( "txt_videos_list_keywords" ), details->mKeywords );                                
-            
+
             //
             // Size
             //
@@ -182,17 +166,17 @@
                        .arg( locale.toString( details->mVideoHeight ) );            
                 addItemToListWidget( hbTrId( "txt_videos_list_resolution" ), resolution );                    
             }
-            
+
             //
             // Format
             //
             addItemToListWidget( hbTrId( "txt_videos_list_format" ), details->mMimeType );                    
-            
+
             //
             // Bitrate
             //
             makeBitRateItem( details );
-            
+
             //
             // Folder
             //
@@ -203,29 +187,44 @@
                 QString folder = fileInfo.dir().dirName();
                 addItemToListWidget( hbTrId( "txt_videos_list_collection_name" ), folder );
             }
-            
         }
 
         //
         // Set the rect size dynamically based on the view mode
         //
-        QString sectionName;
+        QGraphicsWidget *content = loader->findWidget( QString( "content" ) );
+        HbAnchorLayout *layout = static_cast<HbAnchorLayout*>( content->layout() );
 
-        if ( mController->viewMode() == EDetailsView )
-        {
-            sectionName = "detailsView";
-        }
-        else if ( mController->viewMode() == EAudioOnlyView )
+        if ( layout )
         {
-            sectionName = "audioOnlyView";
-        }
+            QGraphicsWidget *titleLayout = loader->findWidget( QString( "titleLayout" ) );
+            QRectF titleRect = titleLayout->geometry();
+
+            switch ( mController->viewMode() )
+            {
+                case EDetailsView:
+                {
+                    layout->setAnchor( titleLayout, Hb::BottomEdge, this, Hb::TopEdge, 0 );
+                    layout->setAnchor( layout, Hb::BottomEdge, this, Hb::BottomEdge, 0 );
 
-        bool ok = false;
-        loader->load( KMPXPLAYBACKVIEW_XML, sectionName, &ok );
+                    break;
+                }
+                case EAudioOnlyView:
+                {
+                    QGraphicsWidget *controlLayout = loader->findWidget( QString( "controlBarLayout" ) );
+                    QRectF controlRect = controlLayout->geometry();
 
-        if ( ! ok )
-        {
-            MPX_DEBUG(_L("QMPXVideoPlaybackFileDetailsWidget failed to load section"));
+                    layout->setAnchor(
+                            this, Hb::TopEdge, titleLayout,
+                            Hb::BottomEdge, titleRect.bottom() - titleRect.top() );
+
+                    layout->setAnchor(
+                            this, Hb::BottomEdge,
+                            layout, Hb::BottomEdge, layout->geometry().height() - controlRect.top() );
+
+                    break;
+                }
+            }
         }
     }
 }
--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackprogressbar.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackprogressbar.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#21 %
+// Version : %version: da1mmcf#22 %
 
 
 
@@ -44,7 +44,6 @@
 QMPXVideoPlaybackProgressBar::QMPXVideoPlaybackProgressBar( 
         QMPXVideoPlaybackControlsController* controller )
     : mController( controller )
-    , mFrameItem( NULL )
     , mDuration( -1 )
     , mDraggingPosition( 0 )
     , mSetPosition( -1 )
@@ -133,12 +132,11 @@
         //
         // Set framedrawer for semi transparent background
         //
-        mFrameItem = new HbFrameItem ( parentItem() );
-        mFrameItem->setGeometry( boundingRect() );
-        mFrameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_multimedia_trans" );
-        mFrameItem->frameDrawer().setFrameType( HbFrameDrawer::NinePieces );
-        mFrameItem->frameDrawer().setFillWholeRect( true );
-        mFrameItem->setVisible( false );
+        HbFrameItem *frameItem = new HbFrameItem();
+        frameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_multimedia_trans" );
+        frameItem->frameDrawer().setFrameType( HbFrameDrawer::NinePieces );
+        frameItem->frameDrawer().setFillWholeRect( true );
+        setBackgroundItem( frameItem );
     }
 }
 
@@ -375,7 +373,7 @@
         mProgressSlider->setEnabled( true );
     }
 
-    mFrameItem->setVisible( ( mController->viewMode() == EFullScreenView )? ETrue:EFalse );
+    backgroundItem()->setVisible( ( mController->viewMode() == EFullScreenView )? ETrue:EFalse );
 }
 
 // -------------------------------------------------------------------------------------------------
--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackstatuspanecontrol.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackstatuspanecontrol.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,12 +15,16 @@
 *
 */
 
-// Version : %version: 15 %
+// Version : %version: 16 %
+
 
 
+#include <QFileInfo>
+
 #include <hbmenu.h>
 #include <hblabel.h>
 #include <hbaction.h>
+#include <hbgroupbox.h>
 #include <hbinstance.h>
 #include <hbframeitem.h>
 #include <hbframedrawer.h>
@@ -45,10 +49,14 @@
         TUint controlproperties )
     : QMPXVideoPlaybackFullScreenControl( controller, index, widget, controlproperties )
     , mActionBack( NULL )
-    , mFrameItem( NULL )
+    , mTitleLabel( NULL )
+    , mTitleGroupBox( NULL )
+    , mTitleLayout( NULL )
 {
     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackStatusPaneControl::QMPXVideoPlaybackStatusPaneControl()"));
 
+    Q_UNUSED( widget );
+
     mActionBack = new HbAction( Hb::BackNaviAction );
 
     //
@@ -59,9 +67,6 @@
 
     connect( mController->view()->menu(), SIGNAL( aboutToShow() ), this, SLOT( handleAboutToShow() ) );
     connect( mController->view()->menu(), SIGNAL( aboutToHide() ), this, SLOT( handleAboutToHide() ) );
-
-    QGraphicsWidget *widget1 = mController->layoutLoader()->findWidget( QString( "title" ) );
-    mTitleLabel = qobject_cast<HbLabel*>( widget1 );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -104,7 +109,7 @@
         if ( mController->viewMode() == EFullScreenView ||
              mController->viewMode() == EDetailsView )
         {
-            mTitleLabel->setVisible( true );
+            mTitleLayout->setVisible( true );
         }
     }
     else
@@ -113,7 +118,7 @@
         mController->view()->setTitleBarVisible( false );
         mController->view()->setStatusBarVisible( false );
 
-        mTitleLabel->setVisible( false );
+        mTitleLayout->setVisible( false );
     }
 }
 
@@ -164,6 +169,39 @@
 {
     MPX_DEBUG(_L("QMPXVideoPlaybackStatusPaneControl::updateControlsWithFileDetails()"));
 
+    if ( ! mTitleLabel )
+    {
+        //
+        // If title is not available, show clip name
+        //
+        QString title = mController->fileDetails()->mTitle;
+
+        if ( title.count() == 0 )
+        {
+            QFileInfo fileInfo( mController->fileDetails()->mClipName );
+            title = fileInfo.baseName ();
+        }
+
+        QGraphicsWidget *qWidget = mController->layoutLoader()->findWidget( QString( "title" ) );
+        mTitleLabel = qobject_cast<HbLabel*>( qWidget );
+        mTitleLabel->setPlainText( title );
+
+        qWidget = mController->layoutLoader()->findWidget( QString( "titleGroupBox" ) );
+        mTitleGroupBox = qobject_cast<HbGroupBox*>( qWidget );
+        mTitleGroupBox->setHeading( title );
+
+        mTitleLayout = mController->layoutLoader()->findWidget( QString( "titleLayout" ) );
+
+        //
+        // Set framedrawer for semi transparent background
+        //
+        HbFrameItem *frameItem = new HbFrameItem();
+        frameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_multimedia_trans" );
+        frameItem->frameDrawer().setFrameType( HbFrameDrawer::NinePieces );
+        frameItem->frameDrawer().setFillWholeRect( true );
+        mTitleLabel->setBackgroundItem( frameItem );
+    }
+
     switch( mController->viewMode() )
     {
         case EFullScreenView:
@@ -176,6 +214,10 @@
 
             mController->view()->setViewFlags( 
                     HbView::HbViewFlags( HbView::ViewTitleBarTransparent | HbView::ViewStatusBarTransparent ) );
+
+            mTitleLabel->setVisible( true );
+            mTitleGroupBox->setVisible( false );
+
             break;
         }
         case EDetailsView:
@@ -188,6 +230,9 @@
 
             mController->view()->setViewFlags( HbView::ViewFlagNone );
 
+            mTitleGroupBox->setVisible( true );
+            mTitleLabel->setVisible( false );
+
             break;
         }
         case EAudioOnlyView:
@@ -204,20 +249,6 @@
     }
 
     setMenu( details );
-
-    //
-    // Set framedrawer for semi transparent background
-    //
-    if ( ! mFrameItem )
-    {
-        mFrameItem = new HbFrameItem ( mTitleLabel );
-        mFrameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_multimedia_trans" );
-        mFrameItem->frameDrawer().setFrameType( HbFrameDrawer::NinePieces );
-        mFrameItem->frameDrawer().setFillWholeRect( true );
-    }
-
-    mFrameItem->setGeometry( mTitleLabel->boundingRect() );
-    mFrameItem->setVisible( ( mController->viewMode() == EFullScreenView )? ETrue:EFalse ); 
 }
 
 // -------------------------------------------------------------------------------------------------
--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybacktoolbar.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybacktoolbar.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  3 %
+// Version : %version:  4 %
 
 
 
@@ -500,7 +500,7 @@
 
         if ( mButtons.count() )
         {
-            disconnect( mButtons[EMPX1stButton], SIGNAL( released() ) );
+            disconnect( mButtons[EMPX1stButton], SIGNAL( released() ), 0, 0 );
             connect( mButtons[EMPX1stButton], SIGNAL( released() ),
                      mController, SLOT( attachVideo() ) );
         }
@@ -539,7 +539,7 @@
 
                 if ( mButtons.count() )
                 {
-                    disconnect( mButtons[EMPX1stButton], SIGNAL( released() ) );
+                    disconnect( mButtons[EMPX1stButton], SIGNAL( released() ), 0, 0 );
                     connect( mButtons[EMPX1stButton], SIGNAL( released() ),
                              this, SLOT( changeAspectRatio() ) );
                 }
@@ -569,7 +569,7 @@
 
                 if ( mButtons.count() )
                 {
-                    disconnect( mButtons[EMPX1stButton], SIGNAL( released() ) );
+                    disconnect( mButtons[EMPX1stButton], SIGNAL( released() ), 0, 0 );
                     connect( mButtons[EMPX1stButton], SIGNAL( released() ), 
                              mController, SLOT( sendVideo() ) );
                 }
--- a/videoplayback/hbvideoplaybackview/inc/mpxvideoplaybackcontrolscontroller.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/inc/mpxvideoplaybackcontrolscontroller.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#17 %
+// Version : %version: da1mmcf#18 %
 
 
 
@@ -146,7 +146,7 @@
 
         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
 
-        bool isAttachOperation();
+        inline bool isAttachOperation();
 
     private:
         /**
@@ -266,6 +266,7 @@
         void controlsListUpdated();
         void attachVideo();
         void sendVideo();
+        void handleOrientationChanged( Qt::Orientation orientation );
 
     private:
         HbVideoBasePlaybackView                   *mView;
@@ -292,6 +293,7 @@
 
         TMPXPlaybackState                          mState;
         TPlaybackViewMode                          mViewMode;
+        Qt::Orientation                            mOrientation;
 };
 
 // INLINE METHODS
@@ -358,6 +360,19 @@
     return mViewMode;
 }
 
+// -------------------------------------------------------------------------------------------------
+// QMPXVideoPlaybackControlsController::isAttachOperation
+// -------------------------------------------------------------------------------------------------
+//
+inline
+bool QMPXVideoPlaybackControlsController::isAttachOperation()
+{        
+    MPX_DEBUG(_L("QMPXVideoPlaybackControlsController::isAttachOperation() ret %d"), 
+        mIsAttachOperation );
+    
+    return mIsAttachOperation;
+}
+
 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
 
 // End of File
--- a/videoplayback/hbvideoplaybackview/resources/hbvideoplaybackview.docml	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/resources/hbvideoplaybackview.docml	Fri May 14 15:14:51 2010 +0300
@@ -4,17 +4,69 @@
         <widget name="bufferingIcon" type="HbLabel">
             <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
             <icon iconName="frame_anim_looping" name="icon"/>
-            <real name="z" value="5"/>
+            <real name="z" value="6"/>
             <sizehint height="70" type="PREFERRED" width="70"/>
             <bool name="visible" value="FALSE"/>
         </widget>
+        <widget name="titleLayout" type="HbWidget">
+            <widget name="title" type="HbLabel">
+                <enums name="alignment" value="AlignLeft|AlignVCenter|AlignLeading"/>
+                <real name="z" value="0"/>
+                <string name="plainText"/>
+            </widget>
+            <widget name="titleGroupBox" type="HbGroupBox">
+                <real name="z" value="1"/>
+                <bool name="collapsable" value="FALSE"/>
+                <string name="heading" value="Group Box"/>
+            </widget>
+            <real name="z" value="2"/>
+            <sizehint height="35" type="PREFERRED" width="640"/>
+            <bool name="visible" value="FALSE"/>
+            <layout type="stacked">
+                <stackitem itemname="title"/>
+                <stackitem itemname="titleGroupBox"/>
+            </layout>
+        </widget>
+        <widget name="transparentWindow" type="HbTransparentWindow">
+            <real name="z" value="0"/>
+            <bool name="visible" value="FALSE"/>
+            <layout type="anchor"/>
+        </widget>
+        <widget name="controlBarLayout" type="HbWidget">
+            <widget name="progressBarLayout" type="HbWidget">
+                <widget name="progressSlider" type="HbProgressSlider">
+                    <integer name="progressValue" value="70"/>
+                    <bool name="minMaxTextVisible" value="TRUE"/>
+                    <enums name="minMaxTextAlignment" value="AlignVCenter|AlignHCenter"/>
+                    <string name="minText"/>
+                    <enums name="orientation" value="Horizontal"/>
+                    <integer name="sliderValue" value="30"/>
+                    <string name="maxText"/>
+                    <bool name="textVisible" value="FALSE"/>
+                    <string name="textAlignment" value="AlignBottom"/>
+                </widget>
+                <real name="z" value="3"/>
+                <bool name="visible" value="TRUE"/>
+                <layout type="anchor">
+                    <anchoritem dst="progressSlider" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="progressSlider" dstEdge="CENTERV" spacing="0" src="" srcEdge="CENTERV"/>
+                    <anchoritem dst="progressSlider" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
+                </layout>
+            </widget>
+            <real name="z" value="1"/>
+            <sizehint height="160" type="PREFERRED" width="80"/>
+            <bool name="visible" value="FALSE"/>
+            <layout orientation="Vertical" spacing="0px" type="linear">
+                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
+                <linearitem itemname="progressBarLayout"/>
+            </layout>
+        </widget>
         <widget name="fileDetailsLayout" type="HbWidget">
             <widget name="fileDetails" type="HbListWidget"/>
-            <real name="z" value="2"/>
-            <sizehint height="193" type="PREFERRED" width="320"/>
+            <real name="z" value="3"/>
             <bool name="visible" value="FALSE"/>
             <layout orientation="Vertical" type="linear">
-                <contentsmargins bottom="9px" left="9px" right="9px" top="9px"/>
+                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
                 <linearitem itemname="fileDetails"/>
             </layout>
         </widget>
@@ -39,7 +91,7 @@
                 <icon iconName="qtg_large_tv_out" name="icon"/>
                 <bool name="visible" value="FALSE"/>
             </widget>
-            <real name="z" value="1"/>
+            <real name="z" value="5"/>
             <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
             <sizehint height="193" type="PREFERRED" width="320"/>
             <sizehint height="18" type="MINIMUM" width="18"/>
@@ -62,7 +114,7 @@
                     <string name="state" value="normal"/>
                 </widget>
                 <real name="z" value="0"/>
-                <sizehint height="229" type="PREFERRED"/>
+                <sizehint height="220" type="PREFERRED" width="360"/>
                 <layout type="anchor">
                     <anchoritem dst="detailsViewPlayButton" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
                     <anchoritem dst="detailsViewPlayButton" dstEdge="CENTERV" spacing="0" src="" srcEdge="CENTERV"/>
@@ -83,61 +135,20 @@
                     <string name="state" value="normal"/>
                 </widget>
                 <real name="z" value="0"/>
-                <sizehint height="40" type="PREFERRED" width="320"/>
+                <sizehint height="50" type="PREFERRED" width="320"/>
                 <layout type="stacked">
                     <stackitem itemname="detailsAttachButton"/>
                     <stackitem itemname="detailsShareButton"/>
                 </layout>
             </widget>
             <real name="z" value="4"/>
-            <sizehint height="160" type="PREFERRED" width="80"/>
             <bool name="visible" value="FALSE"/>
-            <layout orientation="Vertical" type="linear">
+            <layout orientation="Vertical" spacing="3px" type="linear">
                 <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
                 <linearitem itemname="small_transparentWindow"/>
                 <linearitem itemname="attachShareButton"/>
             </layout>
         </widget>
-        <widget name="title" type="HbLabel">
-            <enums name="alignment" value="AlignLeft|AlignVCenter|AlignLeading"/>
-            <real name="z" value="6"/>
-            <sizehint height="33" type="PREFERRED" width="640"/>
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="transparentWindow" type="HbTransparentWindow">
-            <real name="z" value="0"/>
-            <bool name="visible" value="FALSE"/>
-            <layout type="anchor"/>
-        </widget>
-        <widget name="controlBarLayout" type="HbWidget">
-            <widget name="progressBarLayout" type="HbWidget">
-                <widget name="progressSlider" type="HbProgressSlider">
-                    <integer name="progressValue" value="70"/>
-                    <bool name="minMaxTextVisible" value="TRUE"/>
-                    <bool name="textVisible" value="FALSE"/>
-                    <enums name="minMaxTextAlignment" value="AlignVCenter|AlignHCenter"/>
-                    <string name="minText" value=""/>
-                    <enums name="orientation" value="Horizontal"/>
-                    <integer name="sliderValue" value="30"/>
-                    <enums name="textAlignment" value="AlignBottom"/>
-                    <string name="maxText" value=""/>
-                </widget>
-                <real name="z" value="3"/>
-                <bool name="visible" value="TRUE"/>
-                <layout type="anchor">
-                    <anchoritem dst="progressSlider" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
-                    <anchoritem dst="progressSlider" dstEdge="CENTERV" spacing="0" src="" srcEdge="CENTERV"/>
-                    <anchoritem dst="progressSlider" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
-                </layout>
-            </widget>
-            <real name="z" value="1"/>
-            <sizehint height="160" type="PREFERRED" width="80"/>
-            <bool name="visible" value="FALSE"/>
-            <layout orientation="Vertical" spacing="0px" type="linear">
-                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
-                <linearitem itemname="progressBarLayout"/>
-            </layout>
-        </widget>
         <size height="360" name="size" width="640"/>
         <real name="z" value="1"/>
         <rect height="360" name="geometry" width="640" x="0" y="0"/>
@@ -145,22 +156,10 @@
         <layout type="anchor">
             <anchoritem dst="bufferingIcon" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
             <anchoritem dst="bufferingIcon" dstEdge="CENTERV" spacing="0" src="" srcEdge="CENTERV"/>
-            <anchoritem dst="title" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
-            <anchoritem dst="title" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="title" dstEdge="TOP" spacing="62" src="" srcEdge="TOP"/>
-            <anchoritem dst="title" dstEdge="BOTTOM" spacing="100" src="" srcEdge="TOP"/>
-            <anchoritem dst="fileDetailsLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="CENTERH"/>
-            <anchoritem dst="fileDetailsLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="fileDetailsLayout" dstEdge="TOP" spacing="62" src="" srcEdge="TOP"/>
-            <anchoritem dst="fileDetailsLayout" dstEdge="BOTTOM" spacing="-110" src="" srcEdge="BOTTOM"/>
-            <anchoritem dst="bitmapLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
-            <anchoritem dst="bitmapLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="CENTERH"/>
-            <anchoritem dst="bitmapLayout" dstEdge="TOP" spacing="62" src="" srcEdge="TOP"/>
-            <anchoritem dst="bitmapLayout" dstEdge="BOTTOM" spacing="-110" src="" srcEdge="BOTTOM"/>
-            <anchoritem dst="detailsPlaybackWindow" dstEdge="TOP" spacing="0" src="title" srcEdge="BOTTOM"/>
-            <anchoritem dst="detailsPlaybackWindow" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
-            <anchoritem dst="detailsPlaybackWindow" dstEdge="RIGHT" spacing="0" src="" srcEdge="CENTERH"/>
-            <anchoritem dst="detailsPlaybackWindow" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
+            <anchoritem dst="titleLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
+            <anchoritem dst="titleLayout" dstEdge="TOP" spacing="62" src="" srcEdge="TOP"/>
+            <anchoritem dst="titleLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
+            <anchoritem dst="titleLayout" dstEdge="BOTTOM" spacing="100" src="" srcEdge="TOP"/>
             <anchoritem dst="transparentWindow" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
             <anchoritem dst="transparentWindow" dstEdge="TOP" spacing="0" src="" srcEdge="TOP"/>
             <anchoritem dst="transparentWindow" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
@@ -169,34 +168,20 @@
             <anchoritem dst="controlBarLayout" dstEdge="TOP" spacing="-110" src="" srcEdge="BOTTOM"/>
             <anchoritem dst="controlBarLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
             <anchoritem dst="controlBarLayout" dstEdge="BOTTOM" spacing="-60" src="" srcEdge="BOTTOM"/>
+            <anchoritem dst="detailsPlaybackWindow" dstEdge="TOP" spacing="0" src="titleLayout" srcEdge="BOTTOM"/>
+            <anchoritem dst="detailsPlaybackWindow" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
+            <anchoritem dst="detailsPlaybackWindow" dstEdge="RIGHT" spacing="0" src="" srcEdge="CENTERH"/>
+            <anchoritem dst="detailsPlaybackWindow" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
+            <anchoritem dst="bitmapLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
+            <anchoritem dst="bitmapLayout" dstEdge="TOP" spacing="0" src="titleLayout" srcEdge="TOP"/>
+            <anchoritem dst="bitmapLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="CENTERH"/>
+            <anchoritem dst="bitmapLayout" dstEdge="BOTTOM" spacing="0" src="controlBarLayout" srcEdge="TOP"/>
+            <anchoritem dst="fileDetailsLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="CENTERH"/>
+            <anchoritem dst="fileDetailsLayout" dstEdge="TOP" spacing="0" src="titleLayout" srcEdge="BOTTOM"/>
+            <anchoritem dst="fileDetailsLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
+            <anchoritem dst="fileDetailsLayout" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
         </layout>
     </widget>
-    <section name="detailsView">
-        <widget name="content" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="fileDetailsLayout" dstEdge="TOP" spacing="0" src="title" srcEdge="BOTTOM"/>
-                <anchoritem dst="fileDetailsLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="CENTERH"/>
-                <anchoritem dst="fileDetailsLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="fileDetailsLayout" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="fileDetailsLayout" type="HbWidget">
-            <sizehint height="264" type="PREFERRED" width="320"/>
-        </widget>
-    </section>
-    <section name="audioOnlyView">
-        <widget name="content" type="HbWidget">
-            <layout type="anchor">
-                <anchoritem dst="fileDetailsLayout" dstEdge="TOP" spacing="62" src="" srcEdge="TOP"/>
-                <anchoritem dst="fileDetailsLayout" dstEdge="LEFT" spacing="0" src="" srcEdge="CENTERH"/>
-                <anchoritem dst="fileDetailsLayout" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="fileDetailsLayout" dstEdge="BOTTOM" spacing="-110" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <widget name="fileDetailsLayout" type="HbWidget">
-            <sizehint height="198" type="PREFERRED" width="320"/>
-        </widget>
-    </section>
     <metadata activeUIState="Common ui state" display="NHD landscape" unit="px">
         <resource location="hbvideoplaybackview.qrc"/>
         <uistate name="Common ui state" sections="#common"/>
--- a/videoplayback/hbvideoplaybackview/tsrc/testcontrolconfiguration/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testcontrolconfiguration/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testcontrolconfiguration/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testcontrolconfiguration/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   1 %
+// Version : %version:   2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 1 %
+// Version : %version: 2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/src/mpxvideoplaybackfiledetailswidget.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/src/mpxvideoplaybackfiledetailswidget.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -65,7 +65,7 @@
 void QMPXVideoPlaybackFileDetailsWidget::updateWithFileDetails(
         QMPXVideoPlaybackViewFileDetails* details )
 {
-
+    Q_UNUSED( details );
 }
 
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testfullscreencontrol/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   1 %
+// Version : %version:   2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   1 %
+// Version : %version:   2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/src/hbeffect.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/src/hbeffect.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   2 %
+// Version : %version:   3 %
 
 
 
@@ -100,6 +100,7 @@
     MPX_DEBUG(_L("HbEffect::effectRunning"));
 
     Q_UNUSED( item );
+    Q_UNUSED( effectEvent );
 
     return false;
 }
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   1 %
+// Version : %version:   2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackdocumentloader/stub/src/mpxvideoplaybackcontrolscontroller.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackdocumentloader/stub/src/mpxvideoplaybackcontrolscontroller.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 1 %
+// Version : %version: 2 %
 
 
 
@@ -67,6 +67,7 @@
 {
     MPX_DEBUG(_L("QMPXVideoPlaybackControlsController::changeViewMode()"));
 
+    Q_UNUSED( transitionEffect );
     mViewMode = viewMode;
 }
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  2 %
+// Version : %version:  3 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/hbglobal.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/hbglobal.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   2 %
+// Version : %version:   3 %
 
 
 
@@ -89,7 +89,7 @@
     {
         loc = "Bitrate";
     }
-    else if ( string == "txt_videos_list_l1_l2_l3" )
+    else if ( string == "txt_videos_list_l1l2l3" )
     {
         loc = "%L1 hr %L2 min %L3 sec";
     }
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/mpxvideoplaybackdocumentloader.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/mpxvideoplaybackdocumentloader.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -88,6 +88,12 @@
         object->setObjectName( name );
         mWidgets.append( object );
     }
+    else if ( name == "content" )
+    {
+        object = new QGraphicsWidget();
+        object->setObjectName( name );
+        mWidgets.append( object );
+    }
 
     return object;
 }
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackfiledetailswidget/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  2 %
+// Version : %version:  3 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/src/testmpxvideoplaybacktoolbar.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/src/testmpxvideoplaybacktoolbar.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version:  2 %
+// Version : %version:  3 %
 
 
 #include <qdebug>
@@ -418,7 +418,6 @@
     details->mVideoHeight = 1;
     details->mVideoWidth = 1;
     details->mTvOutConnected = false;
-    details->mTvOutPlayAllowed = true;
     details->mSeekable = true;
     details->mPausableStream = true;
     mController->mViewMode = EFullScreenView;
@@ -455,7 +454,6 @@
     details->mVideoHeight = 0;
     details->mVideoWidth = 1;
     details->mTvOutConnected = true;
-    details->mTvOutPlayAllowed = true;
     details->mSeekable = false;
     details->mPausableStream = false;
 
@@ -474,7 +472,6 @@
     details->mVideoHeight = 0;
     details->mVideoWidth = 1;
     details->mTvOutConnected = true;
-    details->mTvOutPlayAllowed = true;
     details->mSeekable = false;
     details->mPausableStream = false;
     mController->mViewMode = EAudioOnlyView;
@@ -516,7 +513,6 @@
     details->mVideoHeight = 1;
     details->mVideoWidth = 1;
     details->mTvOutConnected = false;
-    details->mTvOutPlayAllowed = true;
     details->mSeekable = true;
     details->mPausableStream = true;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/src/testmpxvideoviewwrapper.cpp	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,605 @@
+/**
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   tester for methods in VideoSortFilterProxyModel
+* 
+*/
+
+// Version : %version:  %
+
+#include <e32err.h>
+#include <w32std.h>
+
+#include <hbapplication.h>
+#include <hbinstance.h>
+#include <QDebug>
+
+#include <mpxplaybackframeworkdefs.h>
+#include <mpxplaybackutility.h>
+#include <mpxcommonvideoplaybackview.hrh>
+#include <mpxmessagegeneraldefs.h>
+#include <mpxplaybackmessage.h>
+#include <mpxmediageneraldefs.h>
+#include <mpxmediavideodefs.h>
+
+#include "testmpxvideoviewwrapper.h"
+
+#include "../stub/inc/hbvideobaseplaybackview.h"
+#include "../stub/inc/mpxvideoplaybackviewfiledetails.h"
+#include "../stub/inc/mpxplaybackutilityimpl.h"
+#include "../stub/inc/mpxvideoplaybackdisplayhandler.h"
+#include "../stub/inc/mpxvideoplaybackcontrolscontroller.h"
+
+
+
+#define protected public
+#include "mpxvideoviewwrapper.h"
+#undef protected
+
+
+// ---------------------------------------------------------------------------
+// main
+// ---------------------------------------------------------------------------
+//
+int main(int argc, char *argv[])
+{
+    HbApplication app(argc, argv);
+    HbMainWindow window;
+    
+    TestMPXVideoViewWrapper tv;
+
+    char *pass[3];
+    pass[0] = argv[0];
+    pass[1] = "-o";
+    pass[2] = "c:\\data\\TestMPXVideoViewWrapper.txt";
+    
+    int res = QTest::qExec(&tv, 3, pass);
+    
+    return res;
+}
+
+
+// ---------------------------------------------------------------------------
+// init
+// ---------------------------------------------------------------------------
+//
+void TestMPXVideoViewWrapper::init()
+{	  
+	  mBaseVideoView    = new HbVideoBasePlaybackView();
+	  TRAPD( err, mVideoViewWrapper = CMPXVideoViewWrapper::NewL( mBaseVideoView ) );	  
+	  QVERIFY( err == KErrNone );
+}
+
+// ---------------------------------------------------------------------------
+// cleanup
+// ---------------------------------------------------------------------------
+//
+void TestMPXVideoViewWrapper::cleanup()
+{
+    delete mVideoViewWrapper;
+    mVideoViewWrapper = NULL;
+    
+    delete mBaseVideoView;
+    mBaseVideoView = NULL;
+}
+
+
+void TestMPXVideoViewWrapper::testRequestMedia()
+{
+    init();
+
+    TRAPD(err, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( err == KErrNone );
+	        
+    QVERIFY( mVideoViewWrapper->iMediaRequested == true );
+    
+    cleanup();
+
+}
+
+void TestMPXVideoViewWrapper::testIsLive()
+{
+    init();
+
+    TRAPD(err, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( err == KErrNone );
+    
+    mVideoViewWrapper->IsLive();       
+    
+    mVideoViewWrapper->iFileDetails->clearFileDetails();
+    
+    QVERIFY( ! mVideoViewWrapper->IsLive() );
+                
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testIsPlaylist()
+{
+    init();
+
+    mVideoViewWrapper->IsPlaylist();
+            
+    QVERIFY( mVideoViewWrapper->IsPlaylist() == false );
+        
+    cleanup();
+
+}
+
+
+void TestMPXVideoViewWrapper::testHandleCommand()
+{
+    init();
+    
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errHdlCmd, mVideoViewWrapper->HandleCommandL( EMPXPbvCmdPlay ));    
+    QVERIFY( errHdlCmd == KErrNone );
+
+    int state;
+    TRAPD(errState, state = mVideoViewWrapper->iPlaybackUtility->StateL());
+    QVERIFY( errState == KErrNone );
+    
+    QVERIFY( state == EPbStatePlaying );        
+    
+    cleanup();
+
+}
+
+
+
+void TestMPXVideoViewWrapper::testHandlePluginError()
+{
+    init();
+
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    mVideoViewWrapper->HandlePluginError( KErrNotSupported );
+    
+    QVERIFY( mVideoViewWrapper->iView->mCurrentError == KErrNotSupported );
+    
+    cleanup();
+
+}
+
+
+void TestMPXVideoViewWrapper::testHandlePlaybackMessage()
+{
+    init();
+
+    //***************************
+    // Test Video Msg
+    //***************************
+    CMPXMessage* message = NULL;
+    TRAP_IGNORE( 
+        message = CMPXMessage::NewL();    
+        message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, KMPXMediaIdVideoPlayback );
+        message->SetTObjectValueL<TMPXVideoPlaybackCommand>
+                                            ( KMPXMediaVideoPlaybackCommand, EPbCmdTvOutEvent );
+        message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutConnected, ETrue );
+    );
+    mVideoViewWrapper->HandlePlaybackMessage( message, KErrNone );
+    QVERIFY( mVideoViewWrapper->iFileDetails->mTvOutConnected );    
+    if ( message )
+    {
+        delete message;
+        message = NULL;
+    }    
+
+    
+    
+    //***************************
+    // Test General Msg
+    //***************************
+    TRAP_IGNORE(     
+        message = CMPXMessage::NewL();
+        message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, KMPXMessageGeneral );
+        message->SetTObjectValueL<TInt>( KMPXMessageGeneralEvent, 28 );   // EReachedEndOfPlaylist = 28 
+        message->SetTObjectValueL<TInt>( KMPXMessageGeneralType, 0 );
+        message->SetTObjectValueL<TInt>( KMPXMessageGeneralData, 0 );   
+    );
+    mVideoViewWrapper->HandlePlaybackMessage( message, KErrNone );    
+    QVERIFY( ! mVideoViewWrapper->iView->mViewActive );    
+    if ( message )
+    {
+        delete message;
+        message = NULL;
+    } 
+    
+      
+    //***************************
+    // Test Video Msg with err
+    //***************************
+    TRAP_IGNORE( message = CMPXMessage::NewL() );
+    mVideoViewWrapper->HandlePlaybackMessage( message, KErrNotFound );
+    QVERIFY( mVideoViewWrapper->iView->mCurrentError == KErrNotFound );    
+    if ( message )
+    {
+        delete message;
+        message = NULL;
+    } 
+        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testSetProperty()
+{
+    init();
+
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errSetProp, mVideoViewWrapper->SetPropertyL( EPbPropertyMute, 1 ) );   // 0=>noraml  1=>muted
+    QVERIFY( errSetProp == KErrNone );
+    
+    QVERIFY( ! mVideoViewWrapper->iFileDetails->mAudioEnabled );
+            
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testHandleProperty()
+{
+    init();
+    
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errHdlProp, mVideoViewWrapper->HandlePropertyL( EPbPropertyDuration, 5000, KErrNone ));   
+    QVERIFY( errHdlProp == KErrNone );
+    
+    QVERIFY( mVideoViewWrapper->iFileDetails->mDuration == 5000 );
+            
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testRetrieveFileNameAndMode()
+{
+    init();
+    
+    mVideoViewWrapper->iFileDetails->clearFileDetails();  
+    
+    CMPXCommand* cmd = NULL;
+    
+    TRAP_IGNORE( cmd = CMPXCommand::NewL() );
+
+    TRAPD(errRetFileName, mVideoViewWrapper->RetrieveFileNameAndModeL( cmd ) );
+    QVERIFY( errRetFileName == KErrNone );
+    
+    int state;
+    TRAPD(errState, state = mVideoViewWrapper->iPlaybackUtility->StateL());
+    QVERIFY( errState == KErrNone );    
+    
+    QVERIFY( state == EPbStateInitialised );
+    
+    QCOMPARE( mVideoViewWrapper->iFileDetails->mClipName, QString("testClip.3gp"));
+    
+    delete cmd;
+    cmd = NULL;
+    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testActivateClosePlayerActiveObject()
+{
+    init();
+        
+    mVideoViewWrapper->ActivateClosePlayerActiveObject();
+        
+    QVERIFY( mVideoViewWrapper->iCloseAO->IsActive() );
+    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testDoClosePlayer()
+{
+    init();
+        
+    TRAPD(err, mVideoViewWrapper->DoClosePlayerL());
+    QVERIFY( err == KErrNone );  
+        
+    QVERIFY( ! mVideoViewWrapper->iView->mViewActive );
+    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testIssuePlayCommand()
+{
+    init();
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errIssuePlay, mVideoViewWrapper->IssuePlayCommandL());
+    QVERIFY( errIssuePlay == KErrNone );
+    
+    
+    int state;
+    TRAPD(errState, state = mVideoViewWrapper->iPlaybackUtility->StateL());
+    QVERIFY( errState == KErrNone );    
+    
+    QVERIFY( state == EPbStatePlaying );    
+    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testSetAspectRatio()
+{
+    init();
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errHdlCmd, mVideoViewWrapper->HandleCommandL(EMPXPbvCmdStretchAspectRatio));
+    QVERIFY( errHdlCmd == KErrNone );
+            
+    QVERIFY( mVideoViewWrapper->iDisplayHandler->iCurrentIndexForAspectRatio == 1 );
+        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testIsAppInFront()
+{
+    init();
+    
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    bool front = false;
+    TRAPD(errIsAppInFrnt, front = mVideoViewWrapper->IsAppInFrontL());
+    
+    QVERIFY( errIsAppInFrnt == KErrNone );
+        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testClosePlaybackView()
+{
+    init();
+        
+    TRAPD(err, mVideoViewWrapper->ClosePlaybackViewL());
+    QVERIFY( err == KErrNone );
+        
+    QVERIFY( ! mVideoViewWrapper->iView->mViewActive );
+    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testHandleVolumeCmd()
+{
+    init();
+        
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errIssuePlay, mVideoViewWrapper->IssuePlayCommandL());
+    QVERIFY( errIssuePlay == KErrNone );
+    
+    TRAPD(errHdlCmd, mVideoViewWrapper->HandleCommandL(EMPXPbvCmdDecreaseVolume));
+    QVERIFY( errHdlCmd == KErrNone );    
+        
+    QVERIFY( mVideoViewWrapper->iFileDetails->mAudioEnabled );
+    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testHandleShortPressBackward()
+{
+    init();
+        
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errIssuePlay, mVideoViewWrapper->IssuePlayCommandL());
+    QVERIFY( errIssuePlay == KErrNone );
+    
+    TRAPD(errHdlCmd, mVideoViewWrapper->HandleCommandL(EMPXPbvCmdShortPressBackward));
+    QVERIFY( errHdlCmd == KErrNone );  
+            
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testIssueVideoAppForegroundCmd()
+{
+    init();
+        
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    TRAPD(errIssuePlay, mVideoViewWrapper->IssuePlayCommandL());
+    QVERIFY( errIssuePlay == KErrNone );
+    
+    TRAPD(errIssueVidAppFGCmd, mVideoViewWrapper->IssueVideoAppForegroundCmdL( ETrue ));
+    QVERIFY( errIssueVidAppFGCmd == KErrNone );
+                    
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testCreateControls()
+{
+    init();
+        
+    TRAPD(err, mVideoViewWrapper->CreateControlsL());
+    QVERIFY( err == KErrNone );
+    
+    QVERIFY( mVideoViewWrapper->iControlsController );
+                        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testIsMultiItemPlaylist()
+{
+    init();
+        
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+    
+    QVERIFY( ! mVideoViewWrapper->IsMultiItemPlaylist() );
+                        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testUpdateVideoRect()
+{
+    init();
+        
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+        
+    mVideoViewWrapper->UpdateVideoRect(0,0,50,50,false);
+        
+    float brY = 50;
+    
+    QCOMPARE(mVideoViewWrapper->iDisplayHandler->iBrYDiff, brY);
+                        
+    cleanup();
+}
+
+void TestMPXVideoViewWrapper::testUpdateVideoRectDone()
+{
+    init();
+        
+    TRAPD(errReqMedia, mVideoViewWrapper->RequestMediaL());
+    QVERIFY( errReqMedia == KErrNone );
+        
+    mVideoViewWrapper->UpdateVideoRectDone();
+                                    
+    cleanup();
+}
+
+
+
+void TestMPXVideoViewWrapper::testHandleBufferingState()
+{
+    init();
+        
+    TRAPD(err, mVideoViewWrapper->HandleBufferingStateL());
+    QVERIFY( err == KErrNone );
+                        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testHandleVideoPlaybackMessage()
+{
+    init();
+
+    CMPXMessage* message = NULL;
+    TRAP_IGNORE(
+        message = CMPXMessage::NewL();     
+        message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, KMPXMediaIdVideoPlayback );
+        message->SetTObjectValueL<TMPXVideoPlaybackCommand>
+                                            ( KMPXMediaVideoPlaybackCommand, EPbCmdPluginError );
+        message->SetTObjectValueL<TInt>( KMPXMediaVideoError, KErrNotSupported );
+    );
+    
+    mVideoViewWrapper->HandleVideoPlaybackMessage( message );    
+    
+    QCOMPARE( mVideoViewWrapper->iView->mCurrentError, KErrNotSupported );   
+    if ( message )
+    {
+        delete message;
+        message = NULL;            
+    }
+                        
+    cleanup();
+}
+
+
+
+
+void TestMPXVideoViewWrapper::testCreateGeneralPlaybackCommand()
+{
+    init();
+
+    TRAPD(err, mVideoViewWrapper->CreateGeneralPlaybackCommandL( EPbCmdDecreaseVolume ));  
+    QVERIFY( err == KErrNone );
+    
+    QVERIFY( ! mVideoViewWrapper->iFileDetails->mAudioEnabled );         
+                        
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testHandlePlaybackCommandComplete()
+{
+    init();
+
+	  CMPXCommand* cmd = NULL;
+	  
+    TRAP_IGNORE( cmd = CMPXCommand::NewL() );
+    
+    mVideoViewWrapper->HandlePlaybackCommandComplete( cmd, KErrNone );    
+    
+    QVERIFY( mVideoViewWrapper );
+    
+    delete cmd;
+    cmd = NULL;    
+                            
+    cleanup();
+}
+
+
+void TestMPXVideoViewWrapper::testHandleMedia()
+{
+    init();
+        
+    CMPXMedia* media = NULL;
+    
+    TRAP_IGNORE(
+        RArray<TInt> suppIds;
+        CleanupClosePushL( suppIds );            
+        suppIds.AppendL( KMPXMediaIdGeneral );
+        suppIds.AppendL( KMPXMediaIdVideo );
+    
+        media = CMPXMedia::NewL( suppIds.Array() );
+        CleanupStack::PopAndDestroy( &suppIds );
+    
+        media->SetTObjectValueL<TInt>( TMPXAttribute( KMPXMediaVideoError ), 
+                                       KErrCancel );
+    );
+    
+    TRAPD(err, mVideoViewWrapper->HandleMediaL( *media, KErrNone ) );
+    QVERIFY( err == KErrNone );
+    
+    QCOMPARE( mVideoViewWrapper->iView->mCurrentError, KErrCancel );
+
+    if ( media )
+    {    
+        delete media;
+        media = NULL;      
+    }
+  
+                            
+    cleanup();
+}
+
+
+// End of file
+    
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxplaybackutilityimpl.h	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,656 @@
+/*
+* Copyright (c) 2006 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of interface for playbackutility
+*
+*/
+
+// Version : %version:  3 %
+
+#ifndef CMPXPLAYBACKUTILITY_H
+#define CMPXPLAYBACKUTILITY_H
+
+#include <e32base.h>
+#include <f32file.h>
+#include <mpxplaybackobserver.h>
+#include <mpxplaybackmessage.h>
+#include <mpxsession.h>
+#include <mpxmessageobserver.h>
+#include "mpxplaybackutility.h"
+
+class CMPXMessageMonitor;
+class CMPXTaskQueue;
+
+NONSHARABLE_STRUCT( TMPXPlaybackUtilityStruct )
+    {
+    // Default mode playback utility
+    MMPXPlaybackUtility* iDefaultPlaybackUtility;
+    };
+
+/**
+*  Implementation of playback utility interface
+*  this interface:
+*/
+NONSHARABLE_CLASS(CMPXPlaybackUtility) : public MMPXPlaybackUtility,
+                                         public MMPXSource,
+                                         public MMPXPlayerManager
+    {
+public:
+    /**
+    * Two-phased constructor
+    *
+    * @param aModeId playback mode id
+    * @param aObs observer
+	* @param aCategory category of client / engine
+    * @return object of constructed
+    */
+    static CMPXPlaybackUtility* NewL(const TUid& aModeId,
+                                     MMPXPlaybackObserver* aObs,
+                                     const TMPXCategory aCategory);
+
+    /**
+    * Gets the interface for the client, or creates a new one.
+    * This interface could be a singleton
+    */
+    static MMPXPlaybackUtility* UtilityL( const TUid& aModeId,
+                                        const TMPXCategory aCategory);										
+
+private:
+    /**
+    * Destructor
+    */
+    ~CMPXPlaybackUtility();
+
+    /**
+    * C++ constructor
+    */
+    CMPXPlaybackUtility();
+
+    /**
+    * Second phase constructor
+    *
+    * @param aModeId playback mode id
+    * @param aObs observer
+	* @param aCategory category of client / engine
+    */
+    void ConstructL(const TUid& aModeId, MMPXPlaybackObserver* aObs, const TMPXCategory aCategory);
+    /**
+    * Second phase constructor
+    *
+    * @param aObs observer
+    */
+    void ConstructL(MMPXPlaybackObserver* aObs);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Add a Observer. Clients only receive events from the engine corresponding
+    *  to the specific mode the interface was created in
+    *
+    *  @param aObs, observer to be added
+    */
+    void AddObserverL(MMPXPlaybackObserver& aObs);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Remove a observer.
+    *
+    *  @param aObs, observer to be removed
+    */
+    void RemoveObserverL(MMPXPlaybackObserver& aObs);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Returns PIds of clients that are using the engine in the mode this
+    *  interface was created in. For example, if a client was interested in all
+    *  the clients' pids with an active engine, they would:
+    *
+    *       MMPXPlaybackUtility* m=MMPXPlaybackUtility::NewL(EActivePlayer);
+    *       RArray<TProcessId> pids;
+    *       m->GetClients(pids);
+    *       .........
+    *       pids->Close();
+    *       m->Close();
+    *
+    *  @param aClients Array of Pids returned.
+    */
+    void GetClientsL(RArray<TProcessId>& aClients);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Initializes a track given by aCollectionPath
+    *
+    *  @param aCollectionPath collection path
+    *  @param aPlay Whether to initialize for playback, or
+    *               else just to setup the engine first
+    */
+    virtual void InitL(const CMPXCollectionPlaylist& aPlaylist,
+                       TBool aPlay=ETrue);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Inititialises with a single item, may not be part of any collection
+    *
+    *  @param aUri URI of the item
+    *  @param aType the mime type of the item
+    */
+    void InitL(const TDesC& aUri,const TDesC8* aType=NULL);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Inititialises with a single item, may not be part of any collection
+    *  Before this function can be called, the file server session which owns
+    *  this file handle must first be marked as shareable by calling
+    *  RFs::ShareProtected().
+    *
+    *  @param aFile file handle
+    */
+    void InitL(RFile& aShareableFile);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Frees up client side resources only; a player is freed when there are no
+    *  clients using it, and all resources are freed when the last client closed
+    */
+    void Close();
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Stops any async operations that are currently under way
+    */
+    void CancelRequest();
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Issue player commands, with optional data. ECommandReceived and
+    *  ECommandComplete events should follow
+    *
+    *  @param aCmd the command
+    *  @param aData optional data
+    */
+    void CommandL(TMPXPlaybackCommand aCmd,TInt aData=0);
+
+    /**
+     *  From MMPXPlaybackUtility
+     *  Send a command to the playback server
+     *
+     *  @param aCmd, reference to command object
+     *  @param aCallback, call back when command exection completed.
+     *                    Asynchronously command only
+     */
+    void CommandL(CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Current state of player
+    *  @return current state
+    */
+    TMPXPlaybackState StateL() const;
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Current source being played, NULL if none was supplied
+    *
+    *  @return source object
+    */
+    MMPXSource* Source();
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Player manager
+    *
+    *  @return reference to player manager
+    */
+    MMPXPlayerManager& PlayerManager();
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Set playback property, EPropertyChanged event when complete
+    *
+    *  @param aProperty the property to be set
+    *  @param aValue the the value of the property
+    */
+    void SetL(TMPXPlaybackProperty aProperty,TInt aValue);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Get value of a playback property, Asyc
+    *
+    *  @param aCallback playback callback
+    *  @param aProperty the property
+    */
+    void ValueL(MMPXPlaybackCallback& aCallback,TMPXPlaybackProperty aProperty);
+
+    /**
+     *  Get value of a playback property, Asyc
+     *  Result will be called back in HandleProperty
+     *
+     *  @param aCallback playback callback
+     *  @param aProperty the property
+     */
+    void PropertyL(MMPXPlaybackCallback& aCallback,
+                   TMPXPlaybackProperty aProperty);
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Return a list of mime types supported by playback framework
+    *
+    *  @return an array of mime types
+    */
+    virtual CDesCArray* SupportedMimeTypes();
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Return a list of file extensions supported by playback framework
+    *
+    *  @return an array of extensions
+    */
+    virtual CDesCArray* SupportedExtensions();
+
+    /**
+    *  From MMPXPlaybackUtility
+    *  Return a list of schemas supported by playback framework
+    *
+    *  @return an array of schemas
+    */
+    virtual CDesCArray* SupportedSchemas();
+
+    /**
+    *  Sets the priority of the playback utility
+    *
+    *  @param aPriority Priority to set
+    */
+    virtual void SetPriority( TInt aPriority );
+
+    /**
+    * Adds a message subscription for this client.
+    * @param aSubscription subscription to be added
+    */
+    void AddSubscriptionL(const CMPXSubscription& aSubscription);
+
+    /**
+    * Removes a message subscription for this client.
+    * @param aSubscription subscription to be removed.
+    */
+    void RemoveSubscriptionL(const CMPXSubscription& aSubscription);
+
+    /**
+    * Removes all message subscriptions for this client.
+    */
+    void ClearSubscriptionsL();
+
+    /**
+    *  From MMPXPlayerManager
+    *  Typically, a client will obtain the list of all the (non-duplicated)
+    *  player 'types' in the system from GetPlayerTypesL and present localized
+    *  type names (e.g. "Local","Home network", if possible, else if
+    *  non-standard type,should use PlayerTypeDisplayNameL to get text from
+    *  player).
+    *
+    *  User should be given opportunity to choose IF there is more than one
+    *  type available, or if there is one type but more than one sub players,
+    *  the user could be presented with the sub player list.
+    *
+    *  @param aTypes the list of player types
+    */
+    void GetPlayerTypesL(RArray<TMPXPlaybackPlayerType>& aTypes);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Returns display name for custom types; standard types should be
+    *  recognized by client and localized - calling this method would then not
+    *  be required
+    *
+    *  @param aType playback type
+    */
+    HBufC* PlayerTypeDisplayNameL(TMPXPlaybackPlayerType aType);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Get the list of UIDs of all players
+    *
+    *  @param aPlayers All the players' uids in the system
+    */
+    void GetPlayerListL(RArray<TUid>& aPlayers);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Get the list of UIDs of players with the specific type
+    *
+    *  @param aPlayers All the players' uids with the same type
+    *  @param aType the type of players
+    */
+    void GetPlayerListL(RArray<TUid>& aPlayers,TMPXPlaybackPlayerType aType);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Get the list of sub player names, Async
+    *
+    *  @param aCallback sub players returned in call back interface
+    *  @param aPlayer UID of the player
+    */
+    void SubPlayerNamesL(MMPXPlaybackCallback& aCallback,TUid aPlayer);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Client selects all players with the type aType, the specific player used
+    *  then being resolved on the basis of the content.
+    *
+    *  @param aType the type of player
+    */
+    void SelectPlayersL(TMPXPlaybackPlayerType aType);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Client selects specific player aPlayer and sub player aSubPlayerIndex
+    *  from array returned by SubPlayerNamesL
+    *
+    *  @param aPlayer the UID of player
+    *  @param aSubPlayerIndex the index of the sub player
+    */
+    void SelectSubPlayerL(TUid aPlayer,TInt aSubPlayerIndex);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Client selects a specific player
+    *
+    *  @param aPlayer the UID of the player
+    */
+    void SelectPlayerL(TUid aPlayer);
+
+    /**
+    *  From MMPXPlayerManager
+    *  Clears all selection criteria. Essentially the same as
+    *  SelectPlayersL(EPbLocal).
+    */
+    void ClearSelectPlayersL();
+
+    /**
+    *  From MMPXPlayerManager
+    *  Retreives the current selection: KNullUid and KErrNotFound are possible
+    *  return values for aPlayer and aSubPlayerIndex respectively if none are
+    *  explicitly selected
+    *
+    *  @param aType player type
+    *  @param aPlayer the UID of player
+    *  @param aSubPlayerIndex index of the subplayer
+    *  @param aSubPlayerName friendly name of the subplayer
+    *         Notes: Client owns the returned aSubPlayerName object.
+    */
+    void GetSelectionL(TMPXPlaybackPlayerType& aType,
+                       TUid& aPlayer,
+                       TInt& aSubPlayerIndex,
+                       HBufC*& aSubPlayerName);
+
+    /**
+    *  From MMPXPlayerManager
+    *  The current player, may change with each item, NULL if none found
+    *
+    *  @return object of current player
+    */
+    MMPXPlayer* CurrentPlayer();
+
+    /**
+    *  From MMPXPlayer
+    *  The 'type' of the player. Built-in types are EPbLocal and EPbRemote, but
+    *  the plug-ins could extend this if they desire to be a different type
+    *  which can be selected by the user
+    *
+    *  @return player type
+    */
+    TMPXPlaybackPlayerType TypeL();
+
+    /**
+    *  From MMPXPlayer
+    *  If TypeL returns a value that is not known to the UI (and therefore
+    *  can't localize it),then TypeNameL can be used for unlocalized display
+    *  purposes.
+    *
+    *  @return player name.
+    */
+    HBufC* TypeNameL();
+
+    /**
+    *  From MMPXPlayer
+    *  If the player supports other 'players', else array count == 0.
+    *
+    *  @param aCallback sub players returned in the callback
+    */
+    void SubPlayerNamesL(MMPXPlaybackCallback& aCallback);
+
+    /**
+    *  From MMPXPlayer
+    *  Selected sub player index, corresponding to sub player names array.
+    *
+    *  @return sub player index. KErrNotFound if none
+    */
+    TInt SubPlayerL() const;
+
+    /**
+    *  From MMPXPlayer
+    *  The UID identifying this player
+    *
+    *  @return UID of the player
+    */
+    TUid UidL() const;
+
+    /**
+    *  From MMPXSource
+    *  Path to the collection, or NULL if not in any collection
+    *  Ownership transferred
+    *
+    *  @return collection path
+    */
+    CMPXCollectionPlaylist* PlaylistL();
+
+    /**
+    *  From MMPXSource
+    *  File passed in, or NULL if none passed in
+    *
+    *  @return pointer to file handle
+    */
+    RFile* FileL();
+
+    /**
+    *  From MMPXSource
+    *  URI of current item
+    *
+    *  @return URI of the item
+    */
+    HBufC* UriL();
+
+    /**
+    *  From MMPXSource
+    *
+    *  DEPRECATED
+    *
+    *  Media request
+    *  HandleMediaL of the callback
+    *
+    *  @param aAttrs attributes requested
+    *  @param aCallback playback callback
+    */
+    void MediaL(const TArray<TMPXAttribute>& aAttrs,
+                MMPXPlaybackCallback& aCallback);
+
+    /**
+    *  From MMPXSource
+    *  Media request
+    *  HandleMediaL of the callback
+    *
+    *  @param aAttrs attributes requested
+    *  @param aCallback playback callback
+    *  @param aSpecs, specifications for attributes
+    */
+    void MediaL(const TArray<TMPXAttribute>& aAttrs,
+                MMPXPlaybackCallback& aCallback,
+                CMPXAttributeSpecs* aSpecs);
+
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+    /**
+    *  From MMPXSource
+    *  File passed in, or NULL if none passed in
+    *
+    *  @return pointer to file handle
+    */
+    RFile64* File64L();
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+    /**
+    * From CActive
+    * Handles an active object's request completion event
+    */
+    void RunL();
+
+    /**
+    * From CActive
+    * Implements cancellation of an outstanding request.
+    */
+    void DoCancel();
+
+    /**
+    * From CActive
+    * Handles a leave occurring in the request completion event handler RunL()
+    *
+    * @param aError error code
+    */
+    TInt RunError(TInt aError);
+
+    /**
+     * From MMPXMessageObserver
+     * Message received
+     * @param aMsgData message data
+     * @param aError error code
+     */
+    void MessageReceived(TInt aMsgData, TInt aError);
+    
+    /**
+    *  Inititialises for streaming with URI and Access Point
+    *
+    *  @since S60 9.2
+    *  @param aUri URI of the item
+    *  @param aType the mime type of the item
+    *  @param aAccessPoint the access point of the item
+    */
+    virtual void InitStreamingL(const TDesC& aUri, const TDesC8* aType, const TInt aAccessPoint);
+
+    /**
+    *  Inititialises for streaming with URI and Access Point, the file may not be part of any collection
+    *  Before this function can be called, the file server session which owns
+    *  this file handle must first be marked as shareable by calling
+    *  RFs::ShareProtected().
+    *
+    *  @since S60 9.2
+    *  @param aShareableFile shareable file handle
+    *  @param aAccessPoint the access point of the item
+    */
+    virtual void InitStreamingL(RFile& aShareableFile, const TInt aAccessPoint); 
+
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+    /** 
+    *  Inititialises with a single item, may not be part of any collection 
+    *  Before this function can be called, the file server session which owns 
+    *  this file handle must first be marked as shareable by calling 
+    *  RFs::ShareProtected(). 
+    * 
+    *  @since S60 9.2 
+    *  @param aShareableFile shareable RFile64 file handle 
+    */ 
+    virtual void Init64L(RFile64& aShareableFile);
+     
+    /** 
+     *  Inititialises for streaming with URI and Access Point, the file may not be part of any collection 
+     *  Before this function can be called, the file server session which owns 
+     *  this file handle must first be marked as shareable by calling 
+     *  RFs::ShareProtected(). 
+     * 
+     *  @since S60 9.2 
+     *  @param aShareableFile shareable RFile64 file handle 
+     *  @param aAccessPoint the access point of the item 
+     */ 
+    virtual void InitStreaming64L(RFile64& aShareableFile, const TInt aAccessPoint);
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+    
+private:
+
+
+    /**
+    * Helper to return a descriptor buffer
+    *
+    * @param aSize size of the buffer
+    */
+    HBufC* DesL(TInt aSize);
+
+    /**
+    *  Add a request
+    *
+    *  @param aFunction function code
+    *  @param aCallback callback
+    *  @param aParamData data
+    *  @param aBuf buffer data, ownership transferred
+    *  @param aPtr, pointer to a object
+    *  @param aAlivePtr1, object to keep alive for a task
+    *                     ownership transferred
+    *  @leave leave with system error code when failed
+    */
+    void AddRequestL(TMPXPlaybackServerOp aFunction,
+                     MMPXPlaybackCallback* aCallback=NULL,
+                     TInt aParamData=0,
+                     CBufBase* aBuf=NULL,
+                     TAny* aPtr=NULL,
+                     CBase* aAlivePtr=NULL);
+
+    /**
+    *  Send next request to server
+    */
+    void ExecuteNextRequest();
+
+    /**
+     *  Handle message from message queue
+     *  @param aMsgData message data
+     *  @param aError error code
+     */
+    void HandleMessageL(TInt aMsgData, TInt aError);
+
+    /**
+     * Handles error in RunL
+     *
+     * @param aError error code
+     */
+    void HandleRunErrorL(TInt aError);
+
+
+public:
+	
+	TMPXPlaybackState iState;
+
+    RArray<MMPXPlaybackObserver*> iObservers;
+    CMPXMessageMonitor* iMsgMonitor;
+    CMPXTaskQueue* iTaskQueue;
+    RMPXSession iPbs;
+    CBufBase* iBuffer;
+    TPckgBuf<TInt> iPropertyValuePckg;
+    TPckgBuf<TBool> iCompletePckg;
+    TPckgBuf<TInt> iResultSizePckg;
+    RFile iFile;
+    TBool iCallbackOngoing; // whether client is processing callback or not
+#ifdef _ENABLE_GUARD_TIMER
+    CPeriodic* iGuardTimer; // guard timer for async request
+#endif
+    CMPXMedia* iMediaOnError; // media object while handling error
+    TInt iRefCount;
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+    RFile64 iFile64;
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+    };
+
+#endif // CMPXPLAYBACKUTILITY_H
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 4 %
+// Version : %version: 5 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxplaybackutilityimpl.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxplaybackutilityimpl.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: %
+// Version : %version: 4 %
 
 #include <bamdesca.h>
 #include <s32mem.h>
@@ -258,6 +258,7 @@
 //
 MMPXPlayerManager& CMPXPlaybackUtility::PlayerManager()
     {
+    return *this;
     }
 
 // ----------------------------------------------------------------------------
@@ -534,6 +535,7 @@
 //
 TUid CMPXPlaybackUtility::UidL() const
     {
+    return TUid::Uid( 0 );
     }
 
 // ----------------------------------------------------------------------------
--- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  4 %
+// Version : %version:  5 %
 
 
 
@@ -64,7 +64,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
     mMultiItemPlaylist = false;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testprogressbar/src/testprogressbar.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testprogressbar/src/testprogressbar.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version:  3 %
+// Version : %version:  4 %
 
 
 #include <qdebug>
@@ -255,9 +255,8 @@
     // test for tv-out
     mController->mFileDetails->mPlaybackMode = EMPXVideoLocal; 
     mController->mFileDetails->mTvOutConnected = true;
-    mController->mFileDetails->mTvOutPlayAllowed = false;
     mProgBar->updateWithFileDetails( mController->mFileDetails );
-    QVERIFY( ! mProgBar->mProgressSlider->isEnabled() );
+    QVERIFY( mProgBar->mProgressSlider->isEnabled() );
 
     // live streaming
     mController->mFileDetails->mPlaybackMode = EMPXVideoLiveStreaming; 
--- a/videoplayback/hbvideoplaybackview/tsrc/testprogressbar/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testprogressbar/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testprogressbar/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testprogressbar/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 100;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/src/teststatuspanecontrol.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/src/teststatuspanecontrol.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version:  5 %
+// Version : %version:  6 %
 
 
 #include <hbapplication.h>
@@ -34,6 +34,7 @@
 #include "hbvideobaseplaybackview.h"
 #include "mpxvideoplaybackdocumentloader.h"
 #include "hblabel.h"
+#include "hbgroupbox.h"
 
 #define private public
 #define protected public
@@ -88,12 +89,11 @@
     
     mControlsController = new QMPXVideoPlaybackControlsController( mBaseVideoView, 
                                                                    mFileDetails );
-                                                                            
+
     mStatusPane = new QMPXVideoPlaybackStatusPaneControl( mControlsController, 
                                                           EMPXStatusPane,
                                                           NULL, 
-                                                          0 );                                                                
-
+                                                          0 );
 }
 
 // ---------------------------------------------------------------------------
@@ -104,6 +104,12 @@
 {
     MPX_ENTER_EXIT(_L("TestStatusPaneControl::cleanup()"));
 
+    if ( mStatusPane )
+    {
+        delete mStatusPane;
+        mStatusPane = NULL;    
+    }
+
     if ( mBaseVideoView )
     {
         delete mBaseVideoView;
@@ -121,12 +127,6 @@
         delete mControlsController;
         mControlsController = NULL;    
     }
-    
-    if ( mStatusPane )
-    {
-        delete mStatusPane;
-        mStatusPane = NULL;    
-    }
 }
 
 // ---------------------------------------------------------------------------
@@ -145,6 +145,8 @@
     mStatusPane->setMenu( mFileDetails );
     
     QVERIFY( mControlsController->view()->menu()->isEmpty() );
+
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -156,17 +158,22 @@
     MPX_ENTER_EXIT(_L("TestStatusPaneControl::testSetVisible()"));
 
     setup();    
-    
+    mStatusPane->updateControlsWithFileDetails( mFileDetails );
+
     // 1. Set visible
     mStatusPane->setVisible( true );    
-    QVERIFY( mStatusPane->isVisible() );  
-    QVERIFY( mStatusPane->mTitleLabel->isVisible() ); 
-    
+    QVERIFY( mControlsController->view()->mStatusBarVisible );  
+    QVERIFY( mControlsController->view()->mTitleBarVisible );  
+    QVERIFY( mStatusPane->mTitleLayout->isVisible() ); 
+
     // 2. Set invisible
-    mStatusPane->setVisible( false );    
-    QVERIFY( ! mStatusPane->isVisible() );  
-    QVERIFY( ! mStatusPane->mTitleLabel->isVisible() );     
-    
+    mStatusPane->setVisible( false );
+    QVERIFY( mControlsController->view()->menu()->isEmpty() ); 
+    QVERIFY( ! mControlsController->view()->mStatusBarVisible );  
+    QVERIFY( ! mControlsController->view()->mTitleBarVisible );  
+    QVERIFY( ! mStatusPane->mTitleLayout->isVisible() );
+
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -178,34 +185,36 @@
     MPX_ENTER_EXIT(_L("TestStatusPaneControl::testUpdateControlsWithFileDetails()"));
 
     setup(); 
-    
+
+    QString title = "Title";
+
     // 1. test for full creen mode
     mControlsController->mViewMode = EFullScreenView;
-    
-    mFileDetails->mTvOutConnected = true;
-    
+    mControlsController->mFileDetails->mTitle = title;
     mStatusPane->updateControlsWithFileDetails( mFileDetails );
-    
+
+    QVERIFY( mStatusPane->mTitleLabel->mString == title );
+    QVERIFY( mStatusPane->mTitleGroupBox->mString == title );
+    QVERIFY( mStatusPane->mTitleLabel->isVisible() );
+    QVERIFY( ! mStatusPane->mTitleGroupBox->isVisible() );
     QVERIFY( mControlsController->view()->viewFlags() == 
             HbView::HbViewFlags( HbView::ViewTitleBarTransparent | HbView::ViewStatusBarTransparent ));
-    
+
     // 2. test for detial view mode    
-    mControlsController->mViewMode = EDetailsView;
-    
-    mFileDetails->mTvOutConnected = true;
-    
+    mControlsController->mViewMode = EDetailsView;    
+    mStatusPane->updateControlsWithFileDetails( mFileDetails );
+
+    QVERIFY( mControlsController->view()->viewFlags() == HbView::ViewFlagNone );
+    QVERIFY( ! mStatusPane->mTitleLabel->isVisible() );     
+    QVERIFY( mStatusPane->mTitleGroupBox->isVisible() );
+
+    // 3. test for audio only mode    
+    mControlsController->mViewMode = EAudioOnlyView;
     mStatusPane->updateControlsWithFileDetails( mFileDetails );
 
     QVERIFY( mControlsController->view()->viewFlags() == HbView::ViewFlagNone );
 
-    // 3. test for audio only mode    
-    mControlsController->mViewMode = EAudioOnlyView;
-    
-    mFileDetails->mTvOutConnected = true;
-    
-    mStatusPane->updateControlsWithFileDetails( mFileDetails );
-
-    QVERIFY( mControlsController->view()->viewFlags() == HbView::ViewFlagNone );
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -225,6 +234,8 @@
     // 2. test for second block of cases:
     mStatusPane->setVisibility( EPbStateInitialising );        
     QVERIFY( mControlsController->view()->menu()->isEmpty() );
+
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -240,6 +251,8 @@
     mStatusPane->controlListUpdated( mFileDetails );    
         
     QVERIFY( mControlsController->view()->menu()->isEmpty() );
+
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -259,6 +272,8 @@
     QVERIFY( mControlsController->mTimerAction == EMPXTimerCancel ); 
     
     disconnect( this, SIGNAL( commandSignal() ), mStatusPane, SLOT( handleAboutToShow() ) );
+
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -277,7 +292,9 @@
     
     QVERIFY( mControlsController->mTimerAction == EMPXTimerReset ); 
     
-    disconnect( this, SIGNAL( commandSignal() ), mStatusPane, SLOT( handleAboutToHide() ) );    
+    disconnect( this, SIGNAL( commandSignal() ), mStatusPane, SLOT( handleAboutToHide() ) );
+
+    cleanup();
 }
 
 // ---------------------------------------------------------------------------
@@ -297,6 +314,8 @@
     QVERIFY( mControlsController->mViewMode  == EFullScreenView ); 
     
     disconnect( this, SIGNAL( commandSignal() ), mStatusPane, SLOT( openFullScreenView() ) );
+
+    cleanup();
 }
 
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hbgroupbox.h	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Stub Implementation of HbGroupBox
+*
+*/
+
+// Version : %version:   1 %
+
+
+
+#ifndef HBGROUPBOX_H_
+#define HBGROUPBOX_H_
+
+#include <hbwidget.h>
+
+
+class HbGroupBox : public HbWidget
+{
+    Q_OBJECT
+
+    public:
+        HbGroupBox();
+        virtual ~HbGroupBox();
+
+    public:
+        void setVisible( bool visible );       
+        bool isVisible();
+        void setHeading( QString string );
+
+    public:
+        bool mVisible;
+        QString mString;
+};
+
+#endif /*HBGROUPBOX_H_*/
+
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hblabel.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hblabel.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -34,13 +34,14 @@
         virtual ~HbLabel();
 
     public:
-        void setVisible( bool visible );
-       
+        void setVisible( bool visible );       
         bool isVisible();
+        void setPlainText( QString string );
 
     public:
         bool mVisible;
+        QString mString;
 };
 
-#endif /*HBPUSHBUTTON_H*/
+#endif /*HBLABEL_H_*/
 
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hbvideobaseplaybackview.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/hbvideobaseplaybackview.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:   5 %
+// Version : %version:   6 %
 
 
 
@@ -25,16 +25,18 @@
 #define __HBVIDEOBASEPLAYBACKVIEW_H__
 
 //  Include Files
+#include <hbwidget.h>
 #include <hbview.h>
 
-
 //  Constants
 
 //  Forward Declarations
 
 //  Class Definitions
+class HbAction;
+class HbMenu;
 
-class HbVideoBasePlaybackView : public HbView
+class HbVideoBasePlaybackView : public HbWidget
 {
     Q_OBJECT
 
@@ -55,14 +57,21 @@
         void setViewFlags( HbView::HbViewFlags flags );
         HbView::HbViewFlags viewFlags();
 
-    protected slots:
+        void setTitleBarVisible( bool visible );
+        void setStatusBarVisible( bool visible );
+        void setNavigationAction(HbAction *action);
+        HbMenu *menu();
 
+    public slots:
         virtual void closePlaybackView();
 
     public:
         bool mViewActive;
+        bool mTitleBarVisible;
+        bool mStatusBarVisible;
+
+        HbMenu *mMenu;
         HbView::HbViewFlags mFlag;
-        				
 };
 
 #endif  // __HBVIDEOBASEPLAYBACKVIEW_H__
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hbgroupbox.cpp	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of HbGroupBox
+*
+*/
+
+// Version : %version:   1 %
+
+
+#include "hbgroupbox.h"
+
+// -------------------------------------------------------------------------------------------------
+// HbGroupBox::HbGroupBox
+// -------------------------------------------------------------------------------------------------
+//
+HbGroupBox::HbGroupBox()
+{
+}
+
+// -------------------------------------------------------------------------------------------------
+// HbGroupBox::~HbGroupBox
+// -------------------------------------------------------------------------------------------------
+//
+HbGroupBox::~HbGroupBox()
+{
+}
+
+// -------------------------------------------------------------------------------------------------
+// HbGroupBox::setVisible
+// -------------------------------------------------------------------------------------------------
+//
+void HbGroupBox::setVisible( bool visible )
+{
+    mVisible = visible;
+}
+
+// -------------------------------------------------------------------------------------------------
+// HbGroupBox::isVisible
+// -------------------------------------------------------------------------------------------------
+//
+bool HbGroupBox::isVisible()
+{
+    return mVisible;
+}
+
+// -------------------------------------------------------------------------------------------------
+// HbGroupBox::setHeading
+// -------------------------------------------------------------------------------------------------
+//
+void HbGroupBox::setHeading( QString string )
+{
+    mString = string;
+}
+
+// End of file
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hblabel.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hblabel.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,13 +15,13 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 #include "hblabel.h"
 
 // -------------------------------------------------------------------------------------------------
-// HbPushButton::HbPushButton
+// HbLabel::HbLabel
 // -------------------------------------------------------------------------------------------------
 //
 HbLabel::HbLabel()
@@ -54,5 +54,13 @@
     return mVisible;
 }
 
+// -------------------------------------------------------------------------------------------------
+// HbLabel::setPlainText
+// -------------------------------------------------------------------------------------------------
+//
+void HbLabel::setPlainText( QString string )
+{
+    mString = string;
+}
 
 // End of file
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hbvideobaseplaybackview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/hbvideobaseplaybackview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,12 +15,14 @@
 *
 */
 
-// Version : %version:   4 %
+// Version : %version:   5 %
 
 
 
 //  Include Files
 #include <hbinstance.h>
+#include <HbAction.h>
+#include <HbMenu.h>
 
 #include "../inc/hbvideobaseplaybackview.h"
 
@@ -33,6 +35,7 @@
 //
 HbVideoBasePlaybackView::HbVideoBasePlaybackView()
 {
+    mMenu = new HbMenu();
     mViewActive = false;
 }
 
@@ -42,6 +45,11 @@
 //
 HbVideoBasePlaybackView::~HbVideoBasePlaybackView()
 {
+    if ( mMenu )
+    {
+        delete mMenu;
+        mMenu = NULL;
+    }
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -116,4 +124,39 @@
     return mFlag;
 }
 
+// -------------------------------------------------------------------------------------------------
+//   HbVideoBasePlaybackView::setTitleBarVisible()
+// -------------------------------------------------------------------------------------------------
+//
+void HbVideoBasePlaybackView::setTitleBarVisible( bool visible )
+{
+    mTitleBarVisible = visible;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   HbVideoBasePlaybackView::setStatusBarVisible()
+// -------------------------------------------------------------------------------------------------
+//
+void HbVideoBasePlaybackView::setStatusBarVisible( bool visible )
+{
+    mStatusBarVisible = visible;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   HbVideoBasePlaybackView::setNavigationAction()
+// -------------------------------------------------------------------------------------------------
+//
+void HbVideoBasePlaybackView::setNavigationAction( HbAction *action )
+{
+}
+
+// -------------------------------------------------------------------------------------------------
+//   HbVideoBasePlaybackView::menu()
+// -------------------------------------------------------------------------------------------------
+//
+HbMenu* HbVideoBasePlaybackView::menu()
+{
+    return mMenu;
+}
+
 // EOF
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/mpxvideoplaybackdocumentloader.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/mpxvideoplaybackdocumentloader.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,12 +15,13 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
-#include <hbwidget.h>
-#include <hbtransparentwindow.h>
-#include <hblabel.h>
+#include <QGraphicsWidget>
+
+#include "hblabel.h"
+#include "hbgroupbox.h"
 
 #include "mpxvideo_debug.h"
 #include "mpxvideoplaybackdocumentloader.h"
@@ -83,14 +84,11 @@
 
     QGraphicsWidget *object = NULL;
         
-    if ( name == "transparentWindow" )
-    {
-        MPX_DEBUG(_L("QMPXVideoPlaybackDocumentLoader::creating transparentWindow") );
-        
-        object = new HbTransparentWindow();
+    if ( name == "titleLayout" )
+    {        
+        object = new QGraphicsWidget();
 		object->setObjectName( name );
         
-        MPX_DEBUG(_L("QMPXVideoPlaybackDocumentLoader::appending to object list") );
         mWidgets.append( object );                
     }
     else if ( name == "title" )
@@ -99,6 +97,12 @@
 		object->setObjectName( name );
         mWidgets.append( object );
     }
+    else if ( name == "titleGroupBox" )
+    {
+        object = new HbGroupBox();
+        object->setObjectName( name );
+        mWidgets.append( object );
+    }
 
     return object;
 }
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/teststatuspanecontrol.pro	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/teststatuspanecontrol/teststatuspanecontrol.pro	Fri May 14 15:14:51 2010 +0300
@@ -14,7 +14,7 @@
 # Description: Project file for building teststatuspanecontrol
 #
 #
-# Version : %version: 2 %
+# Version : %version: 3 %
 
 
 TEMPLATE = app
@@ -41,7 +41,8 @@
            hbvideobaseplaybackview.h \
            mpxvideoplaybackdocumentloader.h \
            mpxvideoplaybackfullscreencontrol.h \
-           hblabel.h
+           hblabel.h \
+           hbgroupbox.h
 
 SOURCES += ../../../controlsrc/mpxvideoplaybackstatuspanecontrol.cpp \
            src/teststatuspanecontrol.cpp \				 
@@ -50,5 +51,6 @@
            hbvideobaseplaybackview.cpp \
            mpxvideoplaybackdocumentloader.cpp \
            mpxvideoplaybackfullscreencontrol.cpp \
-           hblabel.cpp
+           hblabel.cpp \
+           hbgroupbox.cpp
            
\ No newline at end of file
--- a/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 1 %
+// Version : %version: 2 %
 
 
 
@@ -65,7 +65,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/centralrepository.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/centralrepository.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 1 %
+// Version : %version: 2 %
 
 
 
@@ -25,7 +25,7 @@
 #include "centralrepository.h"
 
 
-CRepository* CRepository::NewLC( TUid aRepositoryUid )
+CRepository* CRepository::NewLC( TUid /* aRepositoryUid */ )
 {
     CRepository* self = new (ELeave) CRepository();
     
@@ -35,9 +35,9 @@
 }
 
 
-TInt CRepository::Get(TUint32 aKey, TInt& aValue)
+TInt CRepository::Get( TUint32 /* aKey */, TInt& aValue )
 {
-		aValue = 10;
+    aValue = 10;
     return KErrNone;        
 }
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -58,7 +58,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
     mMultiItemPlaylist = false;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/mpxvideoviewwrapper.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testuserinputhandler/stub/src/mpxvideoviewwrapper.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 2 %
+// Version : %version: 3 %
 
 
 
@@ -202,7 +202,6 @@
     iFileDetails->mRNFormat = false;
     iFileDetails->mDuration = 100;
     iFileDetails->mTvOutConnected  = false;
-    iFileDetails->mTvOutPlayAllowed = true;
     iFileDetails->mDrmProtected = false;
     iFileDetails->mMultiItemPlaylist = false;
     iFileDetails->mVideoHeight = 320;
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 2 %
+// Version : %version: 3 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  2 %
+// Version : %version:  3 %
 
 
 
@@ -64,7 +64,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
     mMultiItemPlaylist = false;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/src/mpxvideoviewwrapper.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideodisplayhandler/stub/src/mpxvideoviewwrapper.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 3 %
+// Version : %version: 4 %
 
 
 
@@ -228,7 +228,6 @@
     iFileDetails->mRNFormat = false;
     iFileDetails->mDuration = 100;
     iFileDetails->mTvOutConnected  = false;
-    iFileDetails->mTvOutPlayAllowed = true;
     iFileDetails->mDrmProtected = false;
     iFileDetails->mMultiItemPlaylist = false;
     iFileDetails->mVideoHeight = 320;
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/inc/testmpxvideoplaybackcontrolscontroller.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/inc/testmpxvideoplaybackcontrolscontroller.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version:  3 %
+// Version : %version:  4 %
 
 #ifndef __TESTMPXVIDEOPLAYBACKCONTROLSCONTROLLER_H__
 #define __TESTMPXVIDEOPLAYBACKCONTROLSCONTROLLER_H__
@@ -56,14 +56,7 @@
     
 private slots:
     
-    //
-    // test addFileDetails()
-    //
     void testAddFileDetails();
-    
-    //
-    // test handleEvent()
-    //
     void testHandleEventSetPosition();
     void testHandleEventSetDuration();
     void testHandleEventStateChanged();
@@ -117,11 +110,16 @@
     //
     // test private slot attachVideo()
     //
-    void testslot_sendVideo();  
+    void testslot_sendVideo();
+
+    //
+    // test private slot handleOrientationChanged()
+    //
+    void testslot_handleOrientationChanged();
   
 signals:
-
     void commandSignal();
+    void commandSignal( Qt::Orientation );
     
 private:
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/src/testmpxvideoplaybackcontrolscontroller.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/src/testmpxvideoplaybackcontrolscontroller.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version:  6 %
+// Version : %version:  8 %
 
 #include <e32err.h>
 #include <w32std.h>
@@ -339,6 +339,8 @@
 {
     MPX_DEBUG(_L("TestMPXVideoPlaybackControlsController::verifyHandleEventStateChangedResult()"));  
 
+    mController->mOrientation = Qt::Horizontal;
+
     if ( value == EPbStateInitialised && 
             ( mController->mFileDetails->mPlaybackMode == EMPXVideoStreaming ||
               mController->mFileDetails->mPlaybackMode == EMPXVideoLiveStreaming ) )
@@ -578,7 +580,6 @@
         QVERIFY( ( mController->mFileDetails->mPlaybackMode == EMPXVideoLocal )? 
                    mController->mThumbNailState == EThumbNailRequsted : 
                    mController->mThumbNailState == EThumbNailNotAvailable ); 
-        QVERIFY( mController->mFileDetails->mTvOutPlayAllowed == value );      
         QVERIFY( mController->mViewMode == EAudioOnlyView );          
         QVERIFY( mController->mControlsConfig->mState == EMPXControlCmdTvOutConnected );          
         QVERIFY( mController->mThumbnailManager->mThumbSize == ThumbnailManager::ThumbnailLarge );          
@@ -588,13 +589,11 @@
     else if ( mController->mFileDetails->mVideoEnabled )
     {
         QVERIFY( mController->mViewTransitionIsGoingOn == true );          
-        QVERIFY( mController->mFileDetails->mTvOutPlayAllowed == true );      
         QVERIFY( mController->mViewMode == EFullScreenView );          
     }
     else if ( ! mController->mFileDetails->mVideoEnabled )
     {
         QVERIFY( mController->mViewTransitionIsGoingOn == false );          
-        QVERIFY( mController->mFileDetails->mTvOutPlayAllowed == true );      
         QVERIFY( mController->mViewMode == EAudioOnlyView );          
     }
 
@@ -782,7 +781,8 @@
     MPX_DEBUG(_L("TestMPXVideoPlaybackControlsController::testHandleTappedOnScreen()") );
     
     init();    
-    
+    mController->mOrientation = Qt::Horizontal;
+
     //
     // preset variables
     //
@@ -792,23 +792,23 @@
     //
     // playing state
     //
-    mController->mState = EPbStatePlaying;                
-    mBaseVideoView->mouseReleaseEvent(0);    
+    mController->mState = EPbStatePlaying;
+    mBaseVideoView->mouseReleaseEvent(0);
     QVERIFY( mController->mControlsTimer->isActive() == true );
     for ( int i = 0 ; i < mController->mControls.count() ; i++ )
     {
-        QVERIFY( mController->mControls[i]->mVisibilityState == EPbStatePlaying );
+        QVERIFY( mController->mControls[i]->mVisibilityState == mController->mState );
     }
     
     //
     // pause state
     //
     mController->mState = EPbStatePaused;
-    mBaseVideoView->mouseReleaseEvent(0);    
+    mBaseVideoView->mouseReleaseEvent(0);
     QVERIFY( mController->mControlsTimer->isActive() == false );
     for ( int i = 0 ; i < mController->mControls.count() ; i++ )
     {
-        QVERIFY( mController->mControls[i]->mVisibilityState == EPbStatePaused );    
+        QVERIFY( mController->mControls[i]->mVisibilityState == mController->mState );    
     }
     
     cleanup();    
@@ -1049,8 +1049,54 @@
     cleanup();      
 }
 
+// -------------------------------------------------------------------------------------------------
+// TestMPXVideoPlaybackControlsController::testslot_handleOrientationChanged
+// -------------------------------------------------------------------------------------------------
+//
+void TestMPXVideoPlaybackControlsController::testslot_handleOrientationChanged()
+{
+    MPX_DEBUG(_L("TestMPXVideoPlaybackControlsController::testslot_handleOrientationChanged()") );
+        
+    //
+    // initialize controlscontroller
+    //
+    init();    
+        
+    //
+    // connect signal with controller handleOrientationChanged() slot
+    //
+    bool res = connect( this, SIGNAL( commandSignal( Qt::Orientation ) ),
+                        mController, SLOT( handleOrientationChanged( Qt::Orientation ) ) );
+    
+    //
+    // emit signal, this will in turns invoke mController handleOrientationChanged() slot
+    //
+    mController->mOrientation = Qt::Vertical;
+
+    emit commandSignal( Qt::Horizontal );     
+    
+    //
+    // verify command EMPXPbvCmdClose has been issued
+    //
+    QVERIFY( mController->mOrientation == Qt::Horizontal ); 
+
+    mController->mState = EPbStatePlaying;                
+
+    for ( int i = 0 ; i < mController->mControls.count() ; i++ )
+    {
+        QVERIFY( mController->mControls[i]->mVisibilityState == mController->mState );    
+    }
+
+    //
+    // disconnect signal
+    //
+    disconnect( this, SIGNAL( commandSignal( Qt::Orientation ) ), 
+                mController, SLOT( handleOrientationChanged( Qt::Orientation ) ) );
+    
+    //
+    // clean up
+    //
+    cleanup();      
+}
 
 // End of file
-    
-
-
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/inc/mpxvideoplaybackviewfiledetails.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -70,7 +70,6 @@
         bool          mPartialPlayback;
         bool          mRNFormat;
         bool          mTvOutConnected;
-        bool          mTvOutPlayAllowed;
         bool          mDrmProtected;
         bool          mMultiItemPlaylist;
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/src/mpxvideoplaybackfullscreencontrol.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/src/mpxvideoplaybackfullscreencontrol.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  2 %
+// Version : %version:  3 %
 
 
 
@@ -62,7 +62,6 @@
 //
 void QMPXVideoPlaybackFullScreenControl::setVisible( bool visible )
 {
-    //mControl->setVisible( visible );
     mVisible = visible;
 }
 
@@ -72,7 +71,6 @@
 //
 bool QMPXVideoPlaybackFullScreenControl::isVisible()
 {
-    //return mControl->isVisible();
     return mVisible;
 }
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackcontrolscontroller/stub/src/mpxvideoplaybackviewfiledetails.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  1 %
+// Version : %version:  2 %
 
 
 
@@ -67,7 +67,6 @@
 
     mDuration = 0;
     mTvOutConnected   = false;
-    mTvOutPlayAllowed = true;
     mDrmProtected = false;
 
     mVideoHeight = 0;
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/inc/testvideoplaybackview.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/inc/testvideoplaybackview.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version: %
+// Version : %version: 6 %
 
 #ifndef __TESTVIDEOPLAYBACKVIEW_H__
 #define __TESTVIDEOPLAYBACKVIEW_H__
@@ -60,7 +60,7 @@
     void testShowDialog();
     void testGetWindow();
     void testIssuePlayCommand();
-    void testEvent();
+    void testEventFilter();
     void testClosePlaybackView();
     void testMousePressEvent();
     void testMouseReleaseEvent();
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/src/testvideoplaybackview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/src/testvideoplaybackview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */
 
-// Version : %version: %
+// Version : %version: 9 %
 
 #include <e32err.h>
 #include <w32std.h>
@@ -134,13 +134,11 @@
     verifyHandlePluginError( KErrMMDRMNotAuthorized );
     verifyHandlePluginError( KErrCANoRights );
     verifyHandlePluginError( KErrCANoPermission );
-    verifyHandlePluginError( KMPXVideoTvOutPlaybackNotAllowedClose );
     
     //
     // playback view remains open after displaying these error notes
     //
     verifyHandlePluginError( KMPXVideoCallOngoingError, false );
-    verifyHandlePluginError( KMPXVideoTvOutPlaybackNotAllowed, false );
     verifyHandlePluginError( KMPXVideoPlayOver2GDuringVoiceCallError, false );
             
     //
@@ -211,7 +209,7 @@
     cleanup();
 }
 
-void TestVideoPlaybackView::testEvent()
+void TestVideoPlaybackView::testEventFilter()
 {
     setup();
     
@@ -223,14 +221,14 @@
     //
     // declare foreground/background event
     //
-    QEvent* windowActivate   = new QEvent( QEvent::WindowActivate );
-    QEvent* windowDeactivate = new QEvent( QEvent::WindowDeactivate );
+    QEvent* appActivate   = new QEvent( QEvent::ApplicationActivate );
+    QEvent* appDeactivate = new QEvent( QEvent::ApplicationDeactivate );
     
     //
     // verify the returned value (consumed) of HbVideoBasePlaybackView::event() 
-    // for QEvent::WindowActivate is false
+    // for QEvent::ApplicationActivate is false
     //
-    QVERIFY( ! mVideoView->event( windowActivate ) );  
+    QVERIFY( ! mVideoView->eventFilter( NULL, appActivate ) );  
     
     //
     // verify view is in foreground
@@ -239,9 +237,9 @@
 
     //
     // verify the returned value (consumed) of HbVideoBasePlaybackView::event() 
-    // for QEvent::WindowDeactivate is false
+    // for QEvent::ApplicationDeactivate is false
     //
-    QVERIFY( ! mVideoView->event( windowDeactivate ) );   
+    QVERIFY( ! mVideoView->eventFilter( NULL, appDeactivate ) );   
     
     //
     // verify view is in background
@@ -251,10 +249,18 @@
     //
     // clean up
     //
-    delete windowActivate;
-    windowActivate = NULL;
-    delete windowDeactivate;
-    windowDeactivate = NULL;
+    if ( appActivate )
+    {
+        delete appActivate;
+        appActivate = NULL;
+    }
+
+    if ( appDeactivate )
+    {
+        delete appDeactivate;
+        appDeactivate = NULL;
+    }
+
     cleanup();
 }
 
--- a/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/stub/src/mpxvideoviewwrapper.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/tsrc/testvideoplaybackview/stub/src/mpxvideoviewwrapper.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 5 %
+// Version : %version: 6 %
 
 
 
@@ -228,7 +228,6 @@
     iFileDetails->mRNFormat = false;
     iFileDetails->mDuration = 100;
     iFileDetails->mTvOutConnected  = false;
-    iFileDetails->mTvOutPlayAllowed = true;
     iFileDetails->mDrmProtected = false;
     iFileDetails->mMultiItemPlaylist = false;
     iFileDetails->mVideoHeight = 320;
--- a/videoplayback/hbvideoplaybackview/viewsrc/hbvideobaseplaybackview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/viewsrc/hbvideobaseplaybackview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#38 %
+// Version : %version: da1mmcf#40 %
 
 
 
@@ -116,9 +116,11 @@
 void HbVideoBasePlaybackView::handleActivateView()
 {
     MPX_ENTER_EXIT(_L("HbVideoBasePlaybackView::handleActivateView()"));
-    
+
     TRAP_IGNORE( mVideoMpxWrapper = CMPXVideoViewWrapper::NewL( this ) ); 
-    
+
+    QCoreApplication::instance()->installEventFilter( this );
+
     //
     //  Request the needed Media from the Playback Plugin
     //
@@ -128,11 +130,12 @@
 
     //
     // Landscape orientation
-    //
-    hbInstance->allMainWindows()[0]->setOrientation( Qt::Horizontal );  
+    // Workaround: Disable orientation transition effect 
+	// since orbit couldn't emit the orientationChanged signal with transition effect
+	// 
+    hbInstance->allMainWindows()[0]->setOrientation( Qt::Horizontal, false );  
 
     mActivated = true;   
-       
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -143,6 +146,8 @@
 {
     MPX_ENTER_EXIT(_L("HbVideoBasePlaybackView::handleDeactivateView()"));
 
+    QCoreApplication::instance()->removeEventFilter( this );
+
     mActivated = false;
 
     // 
@@ -306,7 +311,11 @@
 void HbVideoBasePlaybackView::issuePlayCommand()
 {
     MPX_ENTER_EXIT(_L("HbVideoBasePlaybackView::issuePlayCommand()"));
-    TRAPD(err, mVideoMpxWrapper->CreateGeneralPlaybackCommandL( EPbCmdPlay ));
+
+    int err = KErrNone;
+
+    TRAP( err, mVideoMpxWrapper->CreateGeneralPlaybackCommandL( EPbCmdPlay ));
+
     MPX_DEBUG(_L("HbVideoBasePlaybackView::issuePlayCommand() error = %d"), err);
 }
 
@@ -326,7 +335,6 @@
 void HbVideoBasePlaybackView::handleBufferingState()
 {
     MPX_DEBUG(_L("HbVideoBasePlaybackView::handleBufferingState()"));
-
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -340,28 +348,37 @@
     mTimerForClosingView->start( 0 );    
 }
 
-// -------------------------------------------------------------------------------------------------
-//   HbVideoBasePlaybackView::event()
-// -------------------------------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+// HbVideoBasePlaybackView::eventFilter
+// ---------------------------------------------------------------------------
 //
-bool HbVideoBasePlaybackView::event( QEvent *event )
+bool HbVideoBasePlaybackView::eventFilter( QObject *object, QEvent *event )
 {
-    bool consumed = false;
+    Q_UNUSED( object );
 
-    if ( event->type() == QEvent::WindowActivate && mActivated )
+    switch ( event->type() )
     {
-        TRAP_IGNORE( mVideoMpxWrapper->IssueVideoAppForegroundCmdL( true ) );
-    }
-    else if ( event->type() == QEvent::WindowDeactivate && mActivated )
-    {
-        TRAP_IGNORE( mVideoMpxWrapper->IssueVideoAppForegroundCmdL( false ) );
-    }
-    else
-    {
-         consumed = QGraphicsWidget::event( event );
+        case QEvent::ApplicationActivate:
+        {
+            if ( mActivated )
+            {
+                MPX_DEBUG(_L("HbVideoBasePlaybackView::eventFilter foreground()") );
+                TRAP_IGNORE( mVideoMpxWrapper->IssueVideoAppForegroundCmdL( true ) );
+            }
+            break;
+        }
+        case QEvent::ApplicationDeactivate:
+        {
+            if ( mActivated )
+            {
+                MPX_DEBUG(_L("HbVideoBasePlaybackView::eventFilter background()") );
+                TRAP_IGNORE( mVideoMpxWrapper->IssueVideoAppForegroundCmdL( false ) );
+            }
+            break;
+        }
     }
 
-    return consumed;
+    return QObject::eventFilter( object, event );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -409,5 +426,4 @@
     handleClosePlaybackView();
 }
 
-
 // EOF
--- a/videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  20 %
+// Version : %version:  21 %
 
 #include <sysutil.h>
 #include <s32file.h>
@@ -132,7 +132,9 @@
     MPX_DEBUG(_L("VideoWindow ordinal position is: %d"), videoWindow->OrdinalPosition());
     MPX_DEBUG(_L("UiWindow ordinal position is: %d"), (&aWin)->OrdinalPosition());
 
-    TRAPD
+    int status = KErrNone;
+
+    TRAP
     ( status,
         {
             CAlfCompositionSource* me = CAlfCompositionSource::NewL( aWin );
--- a/videoplayback/inc/hbvideobaseplaybackview.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/inc/hbvideobaseplaybackview.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  da1mmcf#14 %
+// Version : %version:  da1mmcf#15 %
 
 
 
@@ -92,11 +92,11 @@
         void showDialog( const QString& qString, bool closeView = true );
 
         virtual void handleClosePlaybackView();
-        
-        bool event( QEvent *event );
 
         RWindow *getWindow();
 
+        bool eventFilter( QObject *object, QEvent *event );
+
     protected:
 
         void mousePressEvent( QGraphicsSceneMouseEvent *event );
Binary file videoplayback/videohelix/conf/mpxvideopbplugins.confml has changed
--- a/videoplayback/videohelix/group/mpxvideohelixplayback.mmp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/group/mpxvideohelixplayback.mmp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: ou1cpsw#14 %
+// Version : %version: 15 %
 
 
 
@@ -43,6 +43,7 @@
 SOURCE          mpxvideoaccessoryobserver.cpp
 SOURCE          mpxvideoplayerutility.cpp
 SOURCE          mpxvideodrmhelper.cpp
+SOURCE          mpxvideoposterframesetter.cpp
 
 START RESOURCE  ../data/10282550.rss
 TARGET          mpxvideohelixplayback.rsc
@@ -76,6 +77,8 @@
 LIBRARY  mmcommon.lib 
 LIBRARY  hwrmlightclient.lib   // Lights control
 LIBRARY  centralrepository.lib // For display backlight timeout value
+LIBRARY  fbscli.lib
+LIBRARY  thumbnailmanager.lib
 
 #ifdef __ACCESSORY_FW
 LIBRARY accclient.lib
--- a/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Fri May 14 15:14:51 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 25 %
+// Version : %version: 28 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKCONTROLLER_H_
@@ -126,6 +126,8 @@
         TBool IsVideoCall();
         TBool IsVoiceCall();
 
+        TBool IsViewActivated();
+
         void HandleTvOutEventL( TBool aConnected );
 
         void HandleError(TInt error);
@@ -133,6 +135,8 @@
         void HandleVolumeL( TBool aIncrease );
 
         void SendHideControlsEventL();
+        
+        void HandleFrameReady(TInt aError);
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
@@ -220,7 +224,6 @@
         TBool                                  iAppInForeground;
         CMediaRecognizer::TMediaType           iMediaType;
         TInt                                   iAccessPointId;
-        TBool                                  iForegroundPause;
         TBool                                  iAllowAutoPlay;
         TBool                                  iHelixLoadingStarted;
         TInt                                   iPBPluginError;
@@ -264,6 +267,7 @@
         CHWRMLight*                             iLight;
         TInt                                    iLightStatus;
         TInt                                    iSavedPosition;
+        TBool                                   iViewActivated;
 
     public:     // Friend classes
 
@@ -289,6 +293,7 @@
         friend class CMPXVideoDlMgrIf;
         friend class CMPXVideoAccessoryObserver;
         friend class CMpxVideoPlayerUtility;
+        friend class CMPXVideoPosterFrameSetter;
 };
 
 // INLINE METHODS
--- a/videoplayback/videohelix/inc/mpxvideoplaybackmode.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackmode.h	Fri May 14 15:14:51 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 15 %
+// Version : %version: 16 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKMODE_H_
@@ -37,6 +37,7 @@
 //
 class CMPXVideoPlaybackController;
 class CMPXVideoDlMgrIf;
+class CMPXVideoPosterFrameSetter;
 
 
 //
@@ -71,6 +72,8 @@
         virtual TBool CanPlayNow();
         virtual void OpenFileL( const TDesC& aMediaFile );
         virtual void OpenFileL( const RFile& aMediaFile );
+        virtual void HandleSetPosterFrame();
+        virtual void HandleFrameReady(TInt aError);
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
         virtual void OpenFile64L( const RFile64& aMediaFile );
@@ -95,6 +98,8 @@
         //  Data
         //
         CMPXVideoPlaybackController*        iVideoPlaybackCtlr;   // not owned
+        
+        CMPXVideoPosterFrameSetter*         iPosterFrameSetter;
 
 };
 
@@ -113,6 +118,8 @@
 
         // Methods where video plabkack behavior varies for local media
         inline virtual TInt GetMode();
+        virtual void HandleSetPosterFrame();
+        virtual void HandleFrameReady(TInt aError);
 };
 
 
--- a/videoplayback/videohelix/inc/mpxvideoplaybackstate.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackstate.h	Fri May 14 15:14:51 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 18 %
+// Version : %version: 19 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKSTATE_H_
@@ -72,6 +72,7 @@
         virtual void  HandleStartSeekL( TBool aForward );
         virtual void  HandleStopSeekL();
         virtual void  HandleClose();
+        virtual void  HandleSetPosterFrame();
         virtual void  HandleForeground();
         virtual void  HandleBackground();
 
@@ -246,6 +247,7 @@
         virtual void HandlePause();
         virtual void HandleStop();
         virtual void HandleStartSeekL( TBool aForward );
+        virtual void HandleSetPosterFrame();
         virtual void HandlePlayPause();
         virtual void HandleBackground();
 
@@ -310,7 +312,8 @@
         virtual void HandlePlay();
         virtual void HandleStop();
         virtual void HandleStartSeekL( TBool aForward );
-        virtual void  HandlePlayPause();
+        virtual void HandlePlayPause();
+        virtual void HandleSetPosterFrame();        
         virtual void HandleForeground();
         virtual void HandleCustomPlay();
 
--- a/videoplayback/videohelix/inc/mpxvideoplayerutility.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplayerutility.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 11 %
+// Version : %version: 13 %
 
 
 #ifndef __MPXVIDEOPLAYERUTILITY__
@@ -25,6 +25,7 @@
 //  INCLUDES
 //
 #include <mmf/common/mmfcontroller.h>
+#include <e32base.h>
 
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <mmf/common/mmfstandardcustomcommandsimpl.h>
@@ -42,12 +43,13 @@
 //  FORWARD DECLARATIONS
 //
 class CMPXVideoPlaybackController;
+class CFbsBitmap;
 
 //
 //  CLASS DECLARATION
 //
 
-NONSHARABLE_CLASS( CMpxVideoPlayerUtility ) : public CBase,
+NONSHARABLE_CLASS( CMpxVideoPlayerUtility ) : public CActive,
                                               public MMMFControllerEventMonitorObserver
 {
     public:
@@ -101,11 +103,18 @@
         void SetPlayVelocityL( TInt aVelocity );
 
         void GetVideoLoadingProgressL( TInt& aPercentageProgress );
+        
+        void GetFrameL();
 
         //
         //  MMMFControllerEventMonitorObserver Implementation
         //
         void HandleEvent( const TMMFEvent& aEvent );
+             
+        CFbsBitmap& GetBitmap();
+        
+        void RunL();
+        void DoCancel();
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
         void OpenFile64L( const RFile64& aFile );
@@ -124,6 +133,8 @@
                                   const TRect& aCropRect,
                                   TVideoAspectRatio aAspectRatio );
 
+        void SendSurfaceCreatedCommand();
+
 #endif
 
     private:
@@ -150,11 +161,15 @@
         RMMFVideoPlaySurfaceSupportCustomCommands iVideoPlaySurfaceSupportCustomCommands;
 
         TSurfaceId                                iSurfaceId;
+        TRect                                     iCropRect;
+        TVideoAspectRatio                         iAspectRatio;
 #endif
 
         CMMFControllerEventMonitor*               iControllerEventMonitor;
 
         TBool                                     iDirectScreenAccessAbort;
+        
+        CFbsBitmap*                               iPosterFrameBitmap;
 };
 
 #endif /* __MPXVIDEOPLAYERUTILITY__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/videohelix/inc/mpxvideoposterframesetter.h	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2008 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Poster Frame Setter
+ *
+*/
+
+// Version : %version:  ou1cpsw#2 %
+
+
+
+#ifndef _MPXVIDEOPOSTERFRAMESETTER_H
+#define _MPXVIDEOPOSTERFRAMESETTER_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <thumbnailmanager.h>
+#include <thumbnailobjectsource.h>
+#include <thumbnailmanagerobserver.h>
+
+
+// FORWARD DECLARATIONS
+class CMPXVideoPlaybackController;
+class CThumbnailManager;
+
+// CLASS DECLARATION
+NONSHARABLE_CLASS(CMPXVideoPosterFrameSetter) : public CBase,
+                                                public MThumbnailManagerObserver
+{
+    public:  // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CMPXVideoPosterFrameSetter* NewL( CMPXVideoPlaybackController* aVideoPlaybackCtlr );
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CMPXVideoPosterFrameSetter();
+
+    public: 
+        
+        void RequestPosterFrame();
+        
+        void HandlePosterFrameReady(TInt aError);
+        
+        // from MThumbnailManagerObserver
+        void ThumbnailPreviewReady( MThumbnailData& aThumbnail,
+                                    TThumbnailRequestId aId );
+        
+        // from MThumbnailManagerObserver
+        void ThumbnailReady( TInt aError, 
+                             MThumbnailData& aThumbnail,
+                             TThumbnailRequestId aId );
+
+        
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CMPXVideoPosterFrameSetter( CMPXVideoPlaybackController* aVideoPlaybackCtlr );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();        
+
+    private:    // Data        
+
+        CMPXVideoPlaybackController*    iVideoPlaybackCtlr;
+        TThumbnailRequestId             iRequestId;
+        CThumbnailManager*              iTNManager;
+};
+
+#endif      // _MPXVIDEOPOSTERFRAMESETTER_H
+            
+// End of File
--- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Fri May 14 15:14:51 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 58 %
+// Version : %version: 62 %
 
 
 //
@@ -168,6 +168,7 @@
     iDrmHelper = CMpxVideoDrmHelper::NewL();
 
     iSavedPosition = 0;
+    iViewActivated  = EFalse;
 }
 
 //  ----------------------------------------------------------------------------
@@ -264,7 +265,6 @@
 //
 CMPXVideoPlaybackController::CMPXVideoPlaybackController()
     : iAppInForeground(ETrue)
-    , iForegroundPause(EFalse)
     , iAllowAutoPlay(ETrue)
     , iHelixLoadingStarted(EFalse)
     , iLightStatus(CHWRMLight::ELightStatusUnknown)
@@ -371,6 +371,7 @@
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
+    iViewActivated  = EFalse;
 }
 
 //  ----------------------------------------------------------------------------
@@ -540,6 +541,11 @@
 
                 break;
             }
+            case EPbCmdSetPosterFrame:
+            {
+                iState->HandleSetPosterFrame();
+                break;    
+            }
         }
     }
 }
@@ -879,26 +885,19 @@
             volume = aVolume;
         }
 
+        //
+        // Volume needs to have n number of steps.
+        // For example, if we get 26, we need to save it as 25 in 20 volume steps
+        // For example, if we get 77, we need to save it as 70 in 10 volume steps
+        //
+        volume -= volume % iVolumeNormalizer;
+ 
         MPX_DEBUG(
             _L("CMPXVideoPlaybackController::SetVolumeCenRepL(): Setting volume = %d"), volume );
 
-        if ( volume > 0 )
-        {
-            //
-            // Media player's CenRep volume range : 0 - number of volume steps
-            // MPX framework volume range : 0-100
-            //
-            iVolumeWatcher->SetValueL( volume / iVolumeNormalizer );
-            SetMuteCenRepL( EFalse );
-        }
-        else
-        {
-            //
-            // save both mute and current volume values in CenRep
-            //
-            iVolumeWatcher->SetValueL( 0 );
-            SetMuteCenRepL( ETrue );
-        }
+        iVolumeWatcher->SetValueL( volume );
+
+        SetMuteCenRepL( volume > 0? EFalse: ETrue );
     }
     else
     {
@@ -939,7 +938,8 @@
     TInt volume = iVolumeWatcher->CurrentValueL();
     TBool mute = iMuteWatcher->CurrentValueL();
 
-    MPX_DEBUG(_L("CMPXVideoPlaybackController::SetVolumeMMFL() volume = %d, mute = %d")
+    MPX_DEBUG(
+            _L("CMPXVideoPlaybackController::SetVolumeMMFL() volume = %d, mute = %d")
             , volume, mute );
 
     TInt newVolume = 0;
@@ -947,15 +947,14 @@
     if ( ! mute )
     {
         //
-        // If it was muted and previous volume level was 0, set the volume to 1
+        // If it was muted and previous volume level was KPbPlaybackVolumeLevelMin, set the volume to next level
         //
-        if ( volume == 0 )
+        if ( volume == KPbPlaybackVolumeLevelMin )
         {
-            volume++;
+            volume = KPbPlaybackVolumeLevelMin + iVolumeNormalizer;
         }
 
-        newVolume =
-            volume  * iVolumeNormalizer * iFileDetails->iMaxVolume / KPbPlaybackVolumeLevelMax;
+        newVolume = volume * iFileDetails->iMaxVolume / KPbPlaybackVolumeLevelMax;
     }
 
     MPX_DEBUG(_L("CMPXVideoPlaybackController::SetVolumeMMFL() new volume = %d"), newVolume );
@@ -1101,7 +1100,7 @@
 
             if ( ! iMuteWatcher->CurrentValueL() )
             {
-                volume = iVolumeWatcher->CurrentValueL() * iVolumeNormalizer;
+                volume = iVolumeWatcher->CurrentValueL();
             }
 
             value = volume;
@@ -1154,6 +1153,10 @@
 
     TInt retError = KErrNone;
 
+    iViewActivated = ETrue;
+
+    iPlayer->SendSurfaceCreatedCommand();
+
     RArray<TInt> suppIds;
     CleanupClosePushL( suppIds );
 
@@ -2307,10 +2310,6 @@
 
     //
     // MPX framework volume range : 0-100
-    // Media player volume range : 0-10
-    // MPX video player volume range : 0 - volume steps (defined in PlaybackHelper)
-    // For IAD, need to manipulate volume to save in cenrep
-    // MPX Framework volume / iVolumeNormalizer => CenRep
     //
     CDevSoundIf* devSoundIf = CDevSoundIf::NewL();
     TInt volumeSteps =  devSoundIf->GetNumberOfVolumeSteps();
@@ -2401,6 +2400,8 @@
     iHelixLoadingStarted = EFalse;
 
     iSavedPosition = 0;
+
+    iViewActivated  = EFalse;
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -2412,31 +2413,20 @@
     MPX_ENTER_EXIT( _L("CMPXVideoPlaybackController::HandleVolumeL()"),
                     _L("aIncrease = %d"), aIncrease );
 
-    //
-    // Media player's CenRep volume range : 0 - number of volume steps
-    // MPX framework volume range : 0-100
-    //
     TInt volume = iVolumeWatcher->CurrentValueL();
+    TInt diff = iVolumeNormalizer;
 
-    if ( aIncrease )
+    if ( ! aIncrease )
     {
-        //
-        // increase the current volume
-        //
-        volume++;
+        diff *= -1;
     }
-    else if ( volume > 0 )
-    {
-        //
-        // decrease the current volume
-        //
-        volume--;
-    }
+
+    volume += diff;
 
     //
     // save the current volume level in CenRep
     //
-    SetVolumeCenRepL( volume * iVolumeNormalizer );
+    SetVolumeCenRepL( volume );
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -2532,4 +2522,24 @@
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
+//  ------------------------------------------------------------------------------------------------ 
+//    CMPXVideoPlaybackController::IsViewActivated() 
+//  ------------------------------------------------------------------------------------------------ 
+// 
+TBool CMPXVideoPlaybackController::IsViewActivated() 
+{ 
+    MPX_DEBUG(_L("CMPXVideoPlaybackController::IsViewActivated")); 
+    return iViewActivated; 
+} 
+
+//  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackController::HandleFrameReady()
+//  ------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackController::HandleFrameReady(TInt aError)
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackController::HandleFrameReady"));
+    
+    iPlaybackMode->HandleFrameReady(aError);
+}
 // End of file
--- a/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Fri May 14 15:14:51 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 25 %
+// Version : %version: 29 %
 
 
 //
@@ -35,6 +35,7 @@
 #include "mpxvideofiledetails.h"
 #include <mpxvideoplaybackdefs.h>
 #include "mpxvideodrmhelper.h"
+#include "mpxvideoposterframesetter.h"
 
 // Constants
 const TUid KUidInterfaceMMFHelixController = {0x101F855D};
@@ -69,6 +70,12 @@
 CMPXVideoPlaybackMode::~CMPXVideoPlaybackMode()
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackMode::~CMPXVideoPlaybackMode()"));
+    
+    if ( iPosterFrameSetter )
+    {
+        delete iPosterFrameSetter;
+        iPosterFrameSetter = NULL;
+    }
 }
 
 //  ----------------------------------------------------------------------------
@@ -177,31 +184,26 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackMode::HandleBackground()"));
 
-    //
-    //  Pause in all cases to remove the different behavior based on the decoder
-    //
-    iVideoPlaybackCtlr->iState->HandlePause();
-
     if ( iVideoPlaybackCtlr->iAppInForeground )
     {
         if ( iVideoPlaybackCtlr->IsAlarm() )
         {
-            iVideoPlaybackCtlr->iForegroundPause = ETrue;
+            iVideoPlaybackCtlr->iState->HandlePause();
         }
         else if ( iVideoPlaybackCtlr->IsKeyLocked() &&
                   iVideoPlaybackCtlr->iFileDetails->iVideoEnabled )
         {
-            iVideoPlaybackCtlr->iForegroundPause = ETrue;
-            iVideoPlaybackCtlr->SendHideControlsEventL();
+            iVideoPlaybackCtlr->iState->HandlePause();
+            TRAP_IGNORE( iVideoPlaybackCtlr->SendHideControlsEventL() );
         }
         else if ( iVideoPlaybackCtlr->IsPhoneCall() || iVideoPlaybackCtlr->IsVideoCall() )
         {
-            iVideoPlaybackCtlr->iForegroundPause = EFalse;
+            iVideoPlaybackCtlr->iState->HandlePause();
         }
     }
     else
     {
-        iVideoPlaybackCtlr->iForegroundPause = EFalse;
+         iVideoPlaybackCtlr->iState->HandlePause();
     }
 }
 
@@ -221,11 +223,6 @@
             MPX_TRAPD( err,
                 iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoCallOngoingError ) );
         }
-        else if ( iVideoPlaybackCtlr->IsKeyLocked() &&
-                  iVideoPlaybackCtlr->iFileDetails->iVideoEnabled )
-        {
-            iVideoPlaybackCtlr->iForegroundPause = ETrue;
-        }
         else
         {
             playAllowed = ETrue;
@@ -276,6 +273,22 @@
     return networkMode2g;
 }
 
+
+//  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackMode::HandleSetPosterFrame()
+//  ------------------------------------------------------------------------------------------------
+void CMPXVideoPlaybackMode::HandleSetPosterFrame()
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackMode::HandleSetPosterFrame()"));
+}
+
+//  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackMode::HandleSetPosterFrame()
+//  ------------------------------------------------------------------------------------------------
+void CMPXVideoPlaybackMode::HandleFrameReady(TInt /*aError*/)
+{
+    MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleFrameReady()"));        
+}
 //************************************************************************************************//
 //          CMPXLocalPlaybackMode
 //************************************************************************************************//
@@ -295,6 +308,30 @@
     MPX_DEBUG(_L("CMPXLocalPlaybackMode::~CMPXLocalPlaybackMode()"));
 }
 
+void CMPXLocalPlaybackMode::HandleSetPosterFrame()
+{
+    MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleSetPosterFrame()"));
+         
+    // create poster frame setter if it does not already exist
+    if ( ! iPosterFrameSetter )
+    {
+        TRAP_IGNORE(iPosterFrameSetter = CMPXVideoPosterFrameSetter::NewL( iVideoPlaybackCtlr ));
+    }
+
+    if ( iPosterFrameSetter )
+    {
+        iPosterFrameSetter->RequestPosterFrame();
+    }    
+}
+
+void CMPXLocalPlaybackMode::HandleFrameReady(TInt aError)
+{
+    MPX_DEBUG(_L("CMPXLocalPlaybackMode::HandleFrameReady()"));      
+    
+    iPosterFrameSetter->HandlePosterFrameReady(aError);
+}
+
+
 //************************************************************************************************//
 //          CMPXStreamingPlaybackMode
 //************************************************************************************************//
@@ -386,10 +423,6 @@
             MPX_TRAPD(err,
                       iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoCallOngoingError ));
         }
-        else if ( iVideoPlaybackCtlr->IsKeyLocked() && iVideoPlaybackCtlr->iFileDetails->iVideoEnabled )
-        {
-          //exit for live streaming
-        }
         else
         {
             MPX_TRAPD( err,
@@ -489,10 +522,20 @@
 {
     MPX_DEBUG(_L("CMPXLiveStreamingPlaybackMode::HandleBackground()"));
 
-    //
-    //  Pause in all cases to remove the different behavior based on the decoder
-    //
-    iVideoPlaybackCtlr->iState->HandlePause();
+    if ( iVideoPlaybackCtlr->iAppInForeground )
+    {
+        if ( iVideoPlaybackCtlr->IsPhoneCall() ||
+             iVideoPlaybackCtlr->IsVideoCall() ||
+             ( iVideoPlaybackCtlr->IsKeyLocked() &&
+               iVideoPlaybackCtlr->iFileDetails->iVideoEnabled ) )
+        {
+            iVideoPlaybackCtlr->iState->HandlePause();
+        }
+    }
+    else
+    {
+        iVideoPlaybackCtlr->iState->HandlePause();
+    }
 }
 
 //************************************************************************************************//
--- a/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Fri May 14 15:14:51 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 41 %
+// Version : %version: 43 %
 
 
 //
@@ -173,6 +173,14 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackState::HandleSetPosterFrame()
+//  ------------------------------------------------------------------------------------------------
+void CMPXVideoPlaybackState::HandleSetPosterFrame()
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackState::HandleSetPosterFrame()"));    
+}
+
+//  ------------------------------------------------------------------------------------------------
 //    CMPXVideoPlaybackState::HandleForeground()
 //  ------------------------------------------------------------------------------------------------
 void CMPXVideoPlaybackState::HandleForeground()
@@ -1195,8 +1203,6 @@
 
     if ( iVideoPlaybackCtlr->iPlaybackMode->CanPlayNow() )
     {
-        iVideoPlaybackCtlr->iForegroundPause = EFalse;
-
         IssuePlayCommand( EMPXVideoBuffering, MMPXPlaybackPluginObserver::EPBufferingStarted );
     }
     else
@@ -1365,6 +1371,18 @@
     HandlePause();
 }
 
+
+//  ------------------------------------------------------------------------------------------------
+//    CMPXPlayingState::HandleSetPosterFrame()
+//  ------------------------------------------------------------------------------------------------
+void CMPXPlayingState::HandleSetPosterFrame()
+{
+    MPX_DEBUG(_L("CMPXPlayingState::HandleSetPosterFrame()"));
+    
+    iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();    
+}
+
+
 //  ------------------------------------------------------------------------------------------------
 //  CMPXPlayingState::HandleStartSeekL()
 //  ------------------------------------------------------------------------------------------------
@@ -1507,8 +1525,6 @@
 
     if ( iVideoPlaybackCtlr->iPlaybackMode->CanPlayNow() )
     {
-        iVideoPlaybackCtlr->iForegroundPause = EFalse;
-
         IssuePlayCommand( EMPXVideoPlaying, MMPXPlaybackPluginObserver::EPPlaying );
     }
 }
@@ -1523,6 +1539,16 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
+//    CMPXPausedState::HandleSetPosterFrame()
+//  ------------------------------------------------------------------------------------------------
+void CMPXPausedState::HandleSetPosterFrame()
+{
+    MPX_DEBUG(_L("CMPXPausedState::HandleSetPosterFrame()"));    
+    
+    iVideoPlaybackCtlr->iPlaybackMode->HandleSetPosterFrame();
+}
+
+//  ------------------------------------------------------------------------------------------------
 //  CMPXPausedState::HandleSetPositionL()
 //  ------------------------------------------------------------------------------------------------
 void CMPXPausedState::HandleSetPositionL( TInt aPosition )
@@ -1595,17 +1621,9 @@
 //  ------------------------------------------------------------------------------------------------
 void CMPXPausedState::HandleForeground()
 {
-    MPX_ENTER_EXIT(_L("CMPXPausedState::HandleForeground()"),
-                   _L("foreground pause = %d"), iVideoPlaybackCtlr->iForegroundPause );
+    MPX_ENTER_EXIT(_L("CMPXPausedState::HandleForeground()"));
 
-    if ( iVideoPlaybackCtlr->iForegroundPause )
-    {
-        iVideoPlaybackCtlr->iState->HandlePlay();
-    }
-    else
-    {
-        MPX_TRAPD( err, iVideoPlaybackCtlr->iPlayer->RefreshFrameL() );
-    }
+    MPX_TRAPD( err, iVideoPlaybackCtlr->iPlayer->RefreshFrameL() );
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -1619,8 +1637,6 @@
 
     if ( iVideoPlaybackCtlr->iPlaybackMode->CanPlayNow() )
     {
-        iVideoPlaybackCtlr->iForegroundPause = EFalse;
-
         IssuePlayCommand( EMPXVideoPlaying, MMPXPlaybackPluginObserver::EPPlaying, EFalse );
     }
 }
@@ -1779,7 +1795,7 @@
 
     if ( aError == KErrNone )
     {
-        if ( iVideoPlaybackCtlr->iAppInForeground && !iVideoPlaybackCtlr->iForegroundPause )
+        if ( iVideoPlaybackCtlr->iAppInForeground )
         {
             iVideoPlaybackCtlr->ChangeState( EMPXVideoPlaying );
 
--- a/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Fri May 14 15:14:51 2010 +0300
@@ -16,13 +16,14 @@
 */
 
 
-// Version : %version: 20 %
+// Version : %version: 22 %
 
 
 #include <AudioPreference.h>
 #include <mmf/server/mmffile.h>
 #include <caf/caftypes.h>
 #include <mpxmessagegeneraldefs.h>
+#include <fbs.h>
 
 #include "mpxvideoplayerutility.h"
 #include "mpxvideoplaybackcontroller.h"
@@ -45,7 +46,8 @@
 }
 
 CMpxVideoPlayerUtility::CMpxVideoPlayerUtility( CMPXVideoPlaybackController* aVideoPlaybackCtrl )
-    : iVideoPlaybackController( aVideoPlaybackCtrl )
+    : CActive( EPriorityStandard )
+    , iVideoPlaybackController( aVideoPlaybackCtrl )
     , iVideoControllerCustomCommands( iController )
     , iVideoPlayControllerCustomCommands( iController )
     , iAudioPlayDeviceCustomCommands( iController )
@@ -60,6 +62,8 @@
 void CMpxVideoPlayerUtility::ConstructL()
 {
     OpenControllerL();
+        
+    CActiveScheduler::Add( this );
 }
 
 CMpxVideoPlayerUtility::~CMpxVideoPlayerUtility()
@@ -84,6 +88,17 @@
 
     iController.Close();
     iDirectScreenAccessAbort = EFalse;
+    
+    if ( IsActive() )
+    {
+        Cancel();
+        
+        if ( iPosterFrameBitmap )
+        {
+            delete iPosterFrameBitmap;
+            iPosterFrameBitmap = NULL;         
+        }
+    }    
 }
 
 void CMpxVideoPlayerUtility::Reset()
@@ -308,6 +323,55 @@
     MPX_DEBUG(_L("CMpxVideoPlayerUtility::GetVideoLoadingProgressL(%d)"), aPercentageProgress );
 }
 
+void CMpxVideoPlayerUtility::GetFrameL()
+{    
+    MPX_DEBUG(_L("CMpxVideoPlayerUtility::GetFrameL"));
+       
+    // dont get another frame if a request is already pending
+    //
+    if ( ! IsActive() )
+    {
+        iPosterFrameBitmap = new (ELeave) CFbsBitmap;
+        User::LeaveIfError(iPosterFrameBitmap->Create(TSize(0,0), EColor16MU));  
+                
+        iVideoPlayControllerCustomCommands.GetFrame( *iPosterFrameBitmap, iStatus );   
+        SetActive();    
+    }
+
+}
+
+void CMpxVideoPlayerUtility::RunL()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::RunL()"));
+    
+    if ( iStatus.Int() == KErrNone )
+    {   
+        iVideoPlaybackController->HandleFrameReady( iStatus.Int() );        
+    }   
+    else
+    {
+        // Bitmap ownership will NOT be transferred to thumbnail manager so delete it    
+        delete iPosterFrameBitmap;
+        iPosterFrameBitmap = NULL;        
+    }        
+}
+
+void CMpxVideoPlayerUtility::DoCancel()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::DoCancel()"));
+    
+    // Bitmap ownership will NOT be transferred to thumbnail manager so delete it       
+    delete iPosterFrameBitmap;
+    iPosterFrameBitmap = NULL;         
+}
+
+CFbsBitmap& CMpxVideoPlayerUtility::GetBitmap()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::GetBitmap()"));
+        
+    return *iPosterFrameBitmap;
+}
+
 void CMpxVideoPlayerUtility::PlayL()
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::PlayL()"));
@@ -485,22 +549,23 @@
     if ( iSurfaceId.IsNull() )
     {
         TSurfaceId surfaceId;
-        TRect cropRect;
-        TVideoAspectRatio aspectRatio;
 
         error = iVideoPlaySurfaceSupportCustomCommands.GetSurfaceParameters( surfaceId,
-                                                                             cropRect,
-                                                                             aspectRatio );
+                                                                             iCropRect,
+                                                                             iAspectRatio );
 
         if ( error == KErrNone )
         {
-            //
-            //  Send data to the display handler to remove old surface and add new surface
-            //
-            MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceCreated,
-                                                 surfaceId,
-                                                 cropRect,
-                                                 aspectRatio ) );
+            if ( iVideoPlaybackController->IsViewActivated() )
+            {
+                //
+                //  Send data to the display handler to remove old surface and add new surface
+                //
+                MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceCreated,
+                                                     surfaceId,
+                                                     iCropRect,
+                                                     iAspectRatio ) );
+            }
 
             iSurfaceId = surfaceId;
         }
@@ -634,6 +699,23 @@
     }
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMpxVideoPlayerUtility::SendSurfaceCreatedCommand()
+// -------------------------------------------------------------------------------------------------
+//
+void CMpxVideoPlayerUtility::SendSurfaceCreatedCommand()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SendSurfaceCreatedCommand()"));
+
+    if ( ! iSurfaceId.IsNull() )
+    {
+        MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceCreated,
+                                             iSurfaceId,
+                                             iCropRect,
+                                             iAspectRatio ) );
+    }
+}
+
 #endif
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/videohelix/src/mpxvideoposterframesetter.cpp	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2008 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: poster frame setter
+ *
+*/
+
+// Version : %version: ou1cpsw#2 %
+
+
+// INCLUDE FILES
+#include <fbs.h>
+#include <mpxvideoplaybackdefs.h>
+
+#include "mpxvideoposterframesetter.h"
+#include "mpxvideoplaybackcontroller.h"
+#include "mpxvideo_debug.h"
+
+// ============================ MEMBER FUNCTIONS ===================================================
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::CMPXVideoPosterFrameSetter
+// C++ default constructor can NOT contain any code, that might leave.
+// -------------------------------------------------------------------------------------------------
+//
+CMPXVideoPosterFrameSetter::CMPXVideoPosterFrameSetter( CMPXVideoPlaybackController* aVideoPlaybackCtlr )
+    : iVideoPlaybackCtlr( aVideoPlaybackCtlr )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::CMPXVideoPosterFrameSetter()"));
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPosterFrameSetter::ConstructL()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::ConstructL()"));
+    
+    iTNManager = CThumbnailManager::NewL( *this );
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::NewL
+// Two-phased constructor.
+// -------------------------------------------------------------------------------------------------
+//
+CMPXVideoPosterFrameSetter* CMPXVideoPosterFrameSetter::NewL( CMPXVideoPlaybackController* aVideoPlaybackCtlr )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::NewL()"));
+
+    CMPXVideoPosterFrameSetter* self = new( ELeave ) CMPXVideoPosterFrameSetter( aVideoPlaybackCtlr );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::~CMPXVideoPosterFrameSetter
+// Destructor
+// -------------------------------------------------------------------------------------------------
+//
+CMPXVideoPosterFrameSetter::~CMPXVideoPosterFrameSetter()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::~CMPXVideoPosterFrameSetter()"));
+
+    if ( iTNManager )
+    {
+        delete iTNManager;
+        iTNManager = NULL;
+    }
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::RequestPosterFrameL
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPosterFrameSetter::RequestPosterFrame()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::RequestPosterFrame()"));
+    
+    if ( ! iVideoPlaybackCtlr->iFileDetails->iDrmProtected )
+    {
+        TRAP_IGNORE( iVideoPlaybackCtlr->iPlayer->GetFrameL() );    
+    }
+    else
+    {
+        MPX_TRAPD(err, 
+                  iVideoPlaybackCtlr->iState->SendErrorToViewL(KMPXVideoSetPosterFrameNotSupported));     
+    }   
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::HandlePosterFrameReady
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPosterFrameSetter::HandlePosterFrameReady(TInt aError)
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::HandlePosterFrameReady()"));
+    
+    if ( aError == KErrNone )
+    {     
+        CThumbnailObjectSource* tnSource( 0 );
+        TRAP_IGNORE
+        (
+            tnSource = CThumbnailObjectSource::NewL( &iVideoPlaybackCtlr->iPlayer->GetBitmap(),
+                                                      iVideoPlaybackCtlr->iClipName->Des() );
+            
+            CleanupStack::PushL( tnSource );
+            iRequestId = iTNManager->SetThumbnailL( *tnSource );
+            CleanupStack::PopAndDestroy( tnSource );
+        );    
+    }        
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::ThumbnailPreviewReady
+//
+// callback method from MThumbnailManagerObserver
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPosterFrameSetter::ThumbnailPreviewReady( MThumbnailData& /*aThumbnail*/,
+                                                        TThumbnailRequestId /*aId*/ )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPosterFrameSetter::ThumbnailPreviewReady()"));
+}
+
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPosterFrameSetter::ThumbnailReady
+//
+// callback method from MThumbnailManagerObserver
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPosterFrameSetter::ThumbnailReady( TInt aError, 
+                                                 MThumbnailData& /*aThumbnail*/,
+                                                 TThumbnailRequestId /*aId*/ )
+{
+    MPX_DEBUG(_L("CMPXVideoPosterFrameSetter::ThumbnailReady() aError = %d"), aError );
+    
+    if ( aError == KErrNone )
+    {
+        MPX_TRAPD( err, 
+                   iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoSetPosterFrameSuccess ) );    
+    }
+    else
+    {
+        MPX_TRAPD( err, 
+                   iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoSetPosterFrameFailure ) );    
+    }
+}
+
+//  End of File
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Fri May 14 15:14:51 2010 +0300
@@ -25,6 +25,7 @@
 EPbCmdStretchAspectRatio 11
 EPbCmdHandleIncreaseVolume 17 
 EPbCmdHandleDecreaseVolume 18 
+EPbCmdSetPosterFrame 24
 
 EMMFNatural 2
 EMMFZoom 3
@@ -526,20 +527,7 @@
 [Endtest] 
 
 [Test]
-title 33.  Alarm: Auto resume
-create videohelixtest test
-test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
-waittestclass test
-test IssueGeneralCommand EPbCmdPlay KErrNone ECallbackBuffering
-waittestclass test
-test AlarmAutoResume EPbCmdHandleBackground EPbCmdHandleForeground
-waittestclass test
-delete test
-pause 1000
-[Endtest]
-
-[Test]
-title 34.  Incoming Phone Call: Rejected
+title 33.  Incoming Phone Call: Rejected
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -552,7 +540,7 @@
 [Endtest]
 
 [Test]
-title 35.  Incoming Voice Call: Accepted
+title 34.  Incoming Voice Call: Accepted
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -566,7 +554,7 @@
 [Endtest]
 
 [Test]
-title 36.  Incoming Video Call: Accepted
+title 35.  Incoming Video Call: Accepted
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -580,7 +568,7 @@
 [Endtest]
 
 [Test]
-title 37.  Play During Video Call
+title 36.  Play During Video Call
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -594,7 +582,7 @@
 [Endtest]
 
 [Test]
-title 38.  Play During voice Call
+title 37.  Play During voice Call
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -608,7 +596,7 @@
 [Endtest]
 
 [Test]
-title 39.  Initialise with SDP file via 32-bit file handle
+title 38.  Initialise with SDP file via 32-bit file handle
 create videohelixtest test
 test InitializeHandle ERFile 60000 10 sdp_test.sdp KErrNone KErrNone KErrNone
 waittestclass test
@@ -617,7 +605,7 @@
 [Endtest]
 
 [Test]
-title 40.  Tv-Out before Initialization - Playback Allowed
+title 39.  Tv-Out before Initialization - Playback Allowed
 create videohelixtest test
 test SetTvOutConnected ETvOutPlaybackAllowed
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
@@ -630,7 +618,7 @@
 [Endtest]
 
 [Test]
-title 41.  Tv-Out after Initialization - Playback Allowed
+title 40.  Tv-Out after Initialization - Playback Allowed
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -644,7 +632,7 @@
 [Endtest]
 
 [Test]
-title 42.  Tv-Out before Initialization - DRM Playback Allowed
+title 41.  Tv-Out before Initialization - DRM Playback Allowed
 create videohelixtest test
 test SetTvOutConnected ETvOutPlaybackAllowed
 test Initialize 0 10 dcf.odf KErrNone KErrNone KErrNone
@@ -657,7 +645,7 @@
 [Endtest]
 
 [Test]
-title 43.  Tv-Out after Initialization - DRM Playback Allowed
+title 42.  Tv-Out after Initialization - DRM Playback Allowed
 create videohelixtest test
 test Initialize 0 10 dcf.odf KErrNone KErrNone KErrNone
 waittestclass test
@@ -670,7 +658,7 @@
 [Endtest]
 
 [Test]
-title 44.  DRM Protected file with Rights
+title 43.  DRM Protected file with Rights
 create videohelixtest test
 test SetDrmProtected 0
 test Initialize 0 10 dcf.odf KErrNone KErrNone KErrNone
@@ -682,7 +670,7 @@
 [Endtest]
 
 [Test]
-title 45.  DRM Protected file without rights
+title 44.  DRM Protected file without rights
 create videohelixtest test
 test SetDrmProtected -17452
 test Initialize 0 10 vhpp_test.3gp KErrNone KErrNone -17452
@@ -695,7 +683,7 @@
 [Endtest]
 
 [Test]
-title 46.  EndOfClip Custom Commands
+title 45.  EndOfClip Custom Commands
 create videohelixtest test
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -705,7 +693,7 @@
 [Endtest] 
 
 [Test]
-title 47.  PDL - Not enough Data
+title 46.  PDL - Not enough Data
 create videohelixtest test
 test ConnectToDownload 2 vhpp_test.3gp
 waittestclass test
@@ -719,7 +707,7 @@
 [Endtest]
 
 [Test] 
-title 48.  Handle volume increase (10-steps)
+title 47.  Handle volume increase (10-steps)
 create videohelixtest test 
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone 
 waittestclass test 
@@ -739,7 +727,7 @@
 [Endtest] 
   
 [Test] 
-title 49.  Handle volume decrease (10-steps)
+title 48.  Handle volume decrease (10-steps)
 create videohelixtest test 
 test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone 
 waittestclass test 
@@ -759,7 +747,7 @@
 [Endtest] 
 
 [Test] 
-title 50.  Handle volume increase (20-steps)
+title 49.  Handle volume increase (20-steps)
 create videohelixtest test 
 test Initialize 60000 20 vhpp_test.3gp KErrNone KErrNone KErrNone 
 waittestclass test 
@@ -779,7 +767,7 @@
 [Endtest] 
   
 [Test] 
-title 51.  Handle volume decrease (20-steps)
+title 50.  Handle volume decrease (20-steps)
 create videohelixtest test 
 test Initialize 60000 20 vhpp_test.3gp KErrNone KErrNone KErrNone 
 waittestclass test 
@@ -799,7 +787,7 @@
 [Endtest] 
 
 [Test]
-title 52.  InitialiseL with 64-bit file handle
+title 51.  InitialiseL with 64-bit file handle
 create videohelixtest test
 test InitializeHandle ERFile64 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -808,7 +796,7 @@
 [Endtest] 
 
 [Test]
-title 53.  Initialise with SDP file via 64-bit file handle
+title 52.  Initialise with SDP file via 64-bit file handle
 create videohelixtest test
 test InitializeHandle ERFile64 60000 10 sdp_test.sdp KErrNone KErrNone KErrNone
 waittestclass test
@@ -817,7 +805,7 @@
 [Endtest]
 
 [Test]
-title 54.  InitialiseWithPositionL with file missing
+title 53.  InitialiseWithPositionL with file missing
 create videohelixtest test
 test InitializeWithPositionL 0 10 6575 vhpp_nofile.3gp KErrNotFound KErrNone KErrNone
 waittestclass test
@@ -828,7 +816,7 @@
 [Endtest] 
 
 [Test]
-title 55.  InitialiseL with 32-bit file handle
+title 54.  InitialiseL with 32-bit file handle
 create videohelixtest test
 test InitializeHandleWithPositionL ERFile 60000 10 6575 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -837,7 +825,7 @@
 [Endtest] 
 
 [Test]
-title 56.  Initialise with rtsp link & AP
+title 55.  Initialise with rtsp link & AP
 create videohelixtest test
 test InitializeLinkWithPositionL 0 10 6575 rtsp:\/\/link.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -846,7 +834,7 @@
 [Endtest]
 
 [Test]
-title 57.  Play rtsp link (forces buffering state)
+title 56.  Play rtsp link (forces buffering state)
 create videohelixtest test
 test InitializeLinkWithPositionL 0 10 6575 rtsp:\/\/link.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -857,7 +845,7 @@
 [Endtest]
 
 [Test]
-title 58.  Initialise with SDP file via 32-bit file handle
+title 57.  Initialise with SDP file via 32-bit file handle
 create videohelixtest test
 test InitializeHandleWithPositionL ERFile 60000 10 6575 sdp_test.sdp KErrNone KErrNone KErrNone
 waittestclass test
@@ -866,7 +854,7 @@
 [Endtest]
 
 [Test]
-title 59.  InitialiseL with 64-bit file handle
+title 58.  InitialiseL with 64-bit file handle
 create videohelixtest test
 test InitializeHandleWithPositionL ERFile64 60000 10 6575 vhpp_test.3gp KErrNone KErrNone KErrNone
 waittestclass test
@@ -875,7 +863,7 @@
 [Endtest] 
 
 [Test]
-title 60.  Initialise with SDP file via 64-bit file handle
+title 59.  Initialise with SDP file via 64-bit file handle
 create videohelixtest test
 test InitializeHandleWithPositionL ERFile64 60000 10 6575 sdp_test.sdp KErrNone KErrNone KErrNone
 waittestclass test
@@ -883,3 +871,15 @@
 pause 1000
 [Endtest]
 
+[Test]
+title 60.  Set Poster Frame
+create videohelixtest test
+test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone
+waittestclass test
+pause 100
+test IssueGeneralCommand EPbCmdPlay KErrNone ECallbackBuffering
+waittestclass test
+test IssueVideoCommand EPbCmdSetPosterFrame
+delete test
+pause 1000
+[Endtest]
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#8 %
+// Version : %version: 9 %
 
 
 
@@ -51,6 +51,7 @@
 SOURCE          mediarecognizer_stub.cpp
 SOURCE          mpxvideoaccessoryobserver_stub.cpp
 SOURCE          mpxvideodrmhelper_stub.cpp
+SOURCE          tnmgr_stub.cpp
 
 SOURCEPATH      ../../../src
 SOURCE          mpxvideodlmgrif.cpp
@@ -60,6 +61,7 @@
 SOURCE          mpxvideoplaybackmode.cpp
 SOURCE          mpxvideoplaybackstate.cpp
 SOURCE          mpxvideoseeker.cpp
+SOURCE          mpxvideoposterframesetter.cpp
 
 
 LIBRARY         euser.lib
@@ -89,5 +91,6 @@
 LIBRARY         flogger.lib
 LIBRARY         playbackhelper.lib
 LIBRARY         hwrmlightclient.lib   // Lights control
+LIBRARY         fbscli.lib
 
 // End of File
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 12 %
+// Version : %version: 14 %
 
 
 #ifndef __MPXVIDEOPLAYERUTILITY__
@@ -42,6 +42,7 @@
 //  FORWARD DECLARATIONS
 //
 class CMPXVideoPlaybackController;
+class CFbsBitmap;
 
 //
 //  CLASS DECLARATION
@@ -112,6 +113,9 @@
         void SetVolumeSteps( TInt aVolumeSteps );
 
         void SurfaceRemovedFromView();
+        
+        void GetFrameL();
+        CFbsBitmap& GetBitmap();
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
         void OpenFile64L( const RFile64& aFile );
@@ -122,6 +126,7 @@
         TInt VideoSurfaceCreated();
         TInt SurfaceParametersChanged();
         TInt RemoveSurface();
+        void SendSurfaceCreatedCommand();
 
 #endif
 
@@ -179,6 +184,8 @@
 
         TTimeIntervalMicroSeconds iPosition;
         TTimeIntervalMicroSeconds iDuration;
+        
+        CFbsBitmap* iPosterFrameBitmap;
 };
 
 #endif /* __MPXVIDEOPLAYERUTILITY__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/tnmgr_stub.h	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2008 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Thumbnail Manager Stub
+ *
+*/
+
+// Version : %version: 1 %
+
+#ifndef TNMGR_STUB_H_
+#define TNMGR_STUB_H_
+
+class CFbsBitmap;
+class MThumbnailData;
+//class MThumbnailManagerObserver;
+
+typedef TInt TThumbnailRequestId;
+
+class MThumbnailManagerObserver
+    {
+public:
+
+    virtual void ThumbnailPreviewReady( MThumbnailData& aThumbnail,
+                                        TThumbnailRequestId aId ) = 0;
+
+    virtual void ThumbnailReady( TInt aError, MThumbnailData& aThumbnail,
+                                 TThumbnailRequestId aId ) = 0;
+};
+
+
+class CThumbnailObjectSource : public CBase
+    {
+public:
+
+    CThumbnailObjectSource( CFbsBitmap*  aBitmap, const TDesC& aUri );
+    virtual ~CThumbnailObjectSource();    
+    static CThumbnailObjectSource* NewL( CFbsBitmap*  aBitmap, const TDesC& aUri );
+};
+
+
+
+class CThumbnailManager : public CBase
+{
+    
+public:
+    
+    CThumbnailManager( MThumbnailManagerObserver& aObserver );
+    virtual ~CThumbnailManager();
+    static CThumbnailManager* NewL( MThumbnailManagerObserver& aObserver ); 
+    
+    TThumbnailRequestId SetThumbnailL( CThumbnailObjectSource& source );   
+    
+public:
+    MThumbnailManagerObserver&   iObserver;
+};
+
+
+#endif /* TNMGR_STUB_H_ */
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 13 %
+// Version : %version: 14 %
 
 
 #ifndef __VHPPTESTCASE_H__
@@ -155,7 +155,6 @@
         virtual TInt ChangeAspectRatioL( CStifItemParser& aItem );
 
         virtual TInt AlarmOn( CStifItemParser& aItem );
-        virtual TInt AlarmAutoResume( CStifItemParser& aItem );
 
         virtual TInt PhoneCallRejected( CStifItemParser& aItem );
         virtual TInt VoiceCallAccepted( CStifItemParser& aItem );
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 15 %
+// Version : %version: 17 %
 
 #include <audiopreference.h>
 #include <mmf/server/mmffile.h>
@@ -425,6 +425,29 @@
     TInt openError = ReadOpenError();
 }
 
+void CMpxVideoPlayerUtility::GetFrameL()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::GetFrameL()"));    
+    
+    if ( iStifObserver )
+    {
+        TCallbackEvent* event = new TCallbackEvent;
+        event->iEvent = EPbCmdSetPosterFrame;
+        event->iData  = 0;
+        event->iError = KErrNone;
+        iStifObserver->HandleUtilityEvent( event );
+    }    
+    
+    iVideoPlaybackController->HandleFrameReady( KErrGeneral );    
+}
+ 
+CFbsBitmap& CMpxVideoPlayerUtility::GetBitmap()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::GetBitmap()"));
+    
+    iPosterFrameBitmap = new (ELeave) CFbsBitmap;    
+    return *iPosterFrameBitmap;
+}
 
 TInt CMpxVideoPlayerUtility::ReadOpenError()
 {
@@ -753,6 +776,11 @@
     return KErrNone;
 }
 
+void CMpxVideoPlayerUtility::SendSurfaceCreatedCommand() 
+{ 
+    MPX_DEBUG(_L("CMpxVideoPlayerUtility::SendSurfaceCreatedCommand()")); 
+}
+
 #endif
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/tnmgr_stub.cpp	Fri May 14 15:14:51 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2008 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Thumbnail Manager stub impl
+*
+*/
+
+// Version : %version:  1 %
+
+#include <fbs.h>
+#include "tnmgr_stub.h"
+#include "mpxvideo_debug.h"
+
+
+/****************************************************
+ * CThumbnailManager stub implementation
+ ****************************************************/
+CThumbnailManager::~CThumbnailManager()
+{
+}
+
+CThumbnailManager* CThumbnailManager::NewL( MThumbnailManagerObserver& aObserver )
+{
+    MPX_ENTER_EXIT(_L("CThumbnailManager::NewL() - stub impl"));
+    CThumbnailManager* self = new( ELeave )CThumbnailManager( aObserver );    
+    return self;
+}
+
+CThumbnailManager::CThumbnailManager( MThumbnailManagerObserver&  aObserver )
+: iObserver( aObserver )
+{
+    MPX_ENTER_EXIT(_L("CThumbnailManager::CThumbnailManager() - stub impl"));
+}
+
+TThumbnailRequestId CThumbnailManager::SetThumbnailL( CThumbnailObjectSource& aObjectSource )
+{   
+    MPX_ENTER_EXIT(_L("CThumbnailManager::SetThumbnailL() - stub impl"));
+    return 0;
+}
+
+
+/****************************************************
+ * CThumbnailObjectSource stub implementation
+ ****************************************************/
+CThumbnailObjectSource::~CThumbnailObjectSource()
+{
+}
+
+CThumbnailObjectSource* CThumbnailObjectSource::NewL( CFbsBitmap*  aBitmap, const TDesC& aUri )
+{
+    MPX_ENTER_EXIT(_L("CThumbnailObjectSource::NewL() - stub impl"));
+    CThumbnailObjectSource* self = new( ELeave )CThumbnailObjectSource( aBitmap, aUri );
+    return self;
+}
+
+CThumbnailObjectSource::CThumbnailObjectSource( CFbsBitmap*  aBitmap, const TDesC& aUri )
+{
+}
+
+
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtest.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtest.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 6 %
+// Version : %version: 7 %
 
 
 // INCLUDE FILES
@@ -129,10 +129,10 @@
 
     //
     //  CenRep volume range is 0 - number of steps (either 10 or 20).
-    //  Set default CenRep values as volume(4), mute(0)
+    //  Set default CenRep values as volume(40), mute(0)
     //
     CRepository* volCenRep = CRepository::NewL( KCRUidMPXVideoSettings );
-    volCenRep->Set( KMPXVideoPlaybackVolume, 4 );
+    volCenRep->Set( KMPXVideoPlaybackVolume, 40 );
     volCenRep->Set( KMPXVideoPlaybackMute, 0 );
     delete volCenRep;
 
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 21 %
+// Version : %version: 23 %
 
 
 // [INCLUDE FILES] - do not remove
@@ -99,7 +99,6 @@
         ENTRY( "ChangeAspectRatioL", CVHPPTestClass::ChangeAspectRatioL),
 
         ENTRY( "AlarmOn", CVHPPTestClass::AlarmOn),
-        ENTRY( "AlarmAutoResume", CVHPPTestClass::AlarmAutoResume),
         ENTRY( "PhoneCallRejected", CVHPPTestClass::PhoneCallRejected),
         ENTRY( "VoiceCallAccepted", CVHPPTestClass::VoiceCallAccepted),
         ENTRY( "VideoCallAccepted", CVHPPTestClass::VideoCallAccepted),
@@ -1724,51 +1723,6 @@
 }
 
 // -----------------------------------------------------------------------------
-//  CVHPPTestClass::AlarmOnAndOff
-// -----------------------------------------------------------------------------
-//
-TInt
-CVHPPTestClass::AlarmAutoResume( CStifItemParser& aItem )
-{
-    MPX_ENTER_EXIT(_L("CVHPPTestClass::AlarmOnAndOff()"));
-    iLog->Log(_L("CVHPPTestClass::AlarmOnAndOff()"));
-
-    TInt backgroundCmd = 0;
-    TInt err = 0;//aItem.GetNextInt( backgroundCmd );
-
-    err = AlarmOn(aItem);
-
-    if ( err == KErrNone )
-    {
-        err = aItem.GetNextInt( backgroundCmd );
-
-        //reset alarm
-        RProperty::Set( KPSUidCoreApplicationUIs, KLightsAlarmLightActive, ELightsNotBlinking );
-
-        if ( err == KErrNone )
-        {
-            TCallbackEvent* event = new TCallbackEvent;
-            event->iError = 0;
-            event->iData  = 0;
-            event->iEvent = EPPlaying;
-            AddExpectedEvent( event );
-
-            //auto resume if alarm off
-            CMPXCommand* cmdPlay = CMPXCommand::NewL();
-            CleanupStack::PushL( cmdPlay );
-            cmdPlay->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
-            cmdPlay->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback );
-            cmdPlay->SetTObjectValueL<TInt>( KMPXMediaVideoPlaybackCommand, backgroundCmd );
-            cmdPlay->SetTObjectValueL<TBool>( KMPXMediaVideoAppForeground, ETrue );
-            iPlaybackPlugin->CommandL( *cmdPlay );
-            CleanupStack::PopAndDestroy( cmdPlay );
-        }
-    }
-
-    return err;
-}
-
-// -----------------------------------------------------------------------------
 //  CVHPPTestClass::PhoneCallRejected
 // -----------------------------------------------------------------------------
 //
--- a/videoplayerapp/bwins/videoplayerengineu.def	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/bwins/videoplayerengineu.def	Fri May 14 15:14:51 2010 +0300
@@ -50,4 +50,5 @@
 	?createPlayAndDetailsViews@QVideoPlayerEngine@@AAEXXZ @ 49 NONAME ; void QVideoPlayerEngine::createPlayAndDetailsViews(void)
 	?setCurrentView@QVideoPlayerEngine@@AAEXXZ @ 50 NONAME ; void QVideoPlayerEngine::setCurrentView(void)
 	?sortRole@VideoServices@@QBEHXZ @ 51 NONAME ; int VideoServices::sortRole(void) const
+	?isPlayServiceInvoked@QVideoPlayerEngine@@AAE_NXZ @ 52 NONAME ; bool QVideoPlayerEngine::isPlayServiceInvoked(void)
 
--- a/videoplayerapp/eabi/videoplayerengineu.def	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/eabi/videoplayerengineu.def	Fri May 14 15:14:51 2010 +0300
@@ -50,4 +50,5 @@
 	_ZN18QVideoPlayerEngine25createPlayAndDetailsViewsEv @ 49 NONAME
 	_ZN18QVideoPlayerEngine14setCurrentViewEv @ 50 NONAME
 	_ZNK13VideoServices8sortRoleEv @ 51 NONAME
+	_ZN18QVideoPlayerEngine20isPlayServiceInvokedEv @ 52 NONAME
 
--- a/videoplayerapp/hbvideoplayer/hbvideoplayer.pro	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/hbvideoplayer/hbvideoplayer.pro	Fri May 14 15:14:51 2010 +0300
@@ -14,7 +14,7 @@
 # Description: Project file for building Videoplayer components
 #
 #
-# Version : %version: da1mmcf#16 %
+# Version : %version: da1mmcf#17 %
 
 
 TARGET = videoplayer
@@ -64,7 +64,6 @@
 "        DATATYPE { priority=EDataTypePrioritySystem; type=\"application/x-pn-realmedia\"; },     " \
 "        DATATYPE { priority=EDataTypePrioritySystem; type=\"audio/x-pn-realaudio-plugin\"; },    " \
 "        DATATYPE { priority=EDataTypePrioritySystem; type=\"video/x-matroska\"; },               " \
-"        DATATYPE { priority=EDataTypePrioritySystem; type=\"audio/x-matroska\"; },               " \
 "        DATATYPE { priority=EDataTypePriorityHigh; type=\"video/x-ms-wmv\"; },                   " \
 "        DATATYPE { priority=EDataTypePriorityHigh; type=\"video/x-ms-asf\"; },                   " \
 "        DATATYPE { priority=EDataTypePriorityHigh; type=\"video/3gp\"; },                        " \
--- a/videoplayerapp/hbvideoplayer/resources/service_conf.xml	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/hbvideoplayer/resources/service_conf.xml	Fri May 14 15:14:51 2010 +0300
@@ -1,26 +1,44 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <service>
-  <name>com.nokia.Videos</name>
+  <name>videoplayer</name>
   <filepath>No path</filepath>
   <description>Video services</description>
   <interface>
      <name>IVideoFetch</name>
      <version>1.0</version>
      <description>Interface to fetch video URI</description>
+     <customproperty key="deprecatedsn">Video Fetcher</customproperty>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.IVideoFetch</name>
+     <version>1.0</version>
+     <description>Interface to fetch video URI</description>
+   </interface>
+  <interface>
+     <name>IVideoBrowse</name>
+     <version>1.0</version>
+     <description>Interface to browse categorized video content</description>
+     <customproperty key="deprecatedsn">Video Browse</customproperty>
+   </interface>
+  <interface>
+     <name>com.nokia.symbian.IVideoBrowse</name>
+     <version>1.0</version>
+     <description>Interface to browse categorized video content</description>
    </interface>
   <interface>
      <name>IVideoView</name>
      <version>1.0</version>
      <description>Interface to play a video</description>
+     <customproperty key="deprecatedsn">Video View</customproperty>
   </interface>
   <interface>
+     <name>com.nokia.symbian.IVideoView</name>
+     <version>1.0</version>
+     <description>Interface to play a video</description>
+  </interface>  
+  <interface>
      <name>com.nokia.symbian.IFileView</name>
      <version>1.0</version>
      <description>Interface for playing video given a QFile</description>
   </interface>   
-  <interface>
-     <name>IVideoBrowse</name>
-     <version>1.0</version>
-     <description>Interface to browse categorized video content</description>
-  </interface>
-</service>
+</service>
\ No newline at end of file
--- a/videoplayerapp/hbvideoplayer/src/main.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/hbvideoplayer/src/main.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 9 %
+// Version : %version: 10 %
 
 
 #include <QObject>
@@ -48,6 +48,20 @@
     // Install the translator
     app.installTranslator(&translator);
 
+    QTranslator translatorCommon;
+
+    loaded = false;
+
+    loaded = translatorCommon.load( "common_" + lang, QString("c:/resource/qt/translations") );
+
+    if (!loaded)
+    {
+        translatorCommon.load("common_" + lang, QString("z:/resource/qt/translations") );
+    }
+
+    // Install the common translator
+    app.installTranslator(&translatorCommon);
+
     // has the application been launched via XQ Service Framework
     bool isService = XQServiceUtil::isService();
 
--- a/videoplayerapp/inc/videoplayerengine.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/inc/videoplayerengine.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 12 %
+// Version : %version: 13 %
 
 #ifndef VIDEOPLAYERENGINE_H
 #define VIDEOPLAYERENGINE_H
@@ -80,11 +80,14 @@
         void createPlayAndDetailsViews();
         
         void setCurrentView();
+        
+        bool isPlayServiceInvoked();        
 
     private:
         bool                      mIsService;
         bool                      mEmbedded;
         bool					  mDelayedLoadDone;
+        bool                      mIsPlayService;
 
         MpxViewPlugin*            mCurrentViewPlugin;
         MpxViewPlugin*            mPlaybackViewPlugin; 
--- a/videoplayerapp/videoplayerengine/inc/videoservicebrowse.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/inc/videoservicebrowse.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 3 %
+// Version : %version: 4 %
 
 #ifndef VIDEOSERVICEBROWSE_H
 #define VIDEOSERVICEBROWSE_H
@@ -25,13 +25,14 @@
 
 // FORWARD DECLARATIONS
 class VideoServices; 
+class QLatin1String;
 
 class VideoServiceBrowse : public XQServiceProvider
 {
     Q_OBJECT
     
 public:
-    VideoServiceBrowse( VideoServices *parent = 0 );
+    VideoServiceBrowse( VideoServices *parent, QLatin1String service );
     ~VideoServiceBrowse();
     
 public:
@@ -68,6 +69,14 @@
      */
     int sortRole() const;
     
+    /**
+     * Returns service active status
+     *
+     * @return bool true if active, false if not active
+     *
+     */
+    bool isActive();
+
 public slots:
 
     /**
@@ -80,6 +89,15 @@
      */
     void browseVideos(const QString &title, int category, int sortRole);
 
+    /**
+     *  Browse video
+     *
+     *  @param category, Category which type of videos are browsed
+     *  @param sort, Sort type.
+     *  @return None
+     */
+    void browseVideos(int category, int sortRole);
+
 private:
     /** request index of the service */
     int mRequestIndex;
--- a/videoplayerapp/videoplayerengine/inc/videoserviceplay.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/inc/videoserviceplay.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 1 %
+// Version : %version: da1mmcf#2 %
 
 #ifndef __VIDEOSERVICEPLAY_H__
 #define __VIDEOSERVICEPLAY_H__
@@ -26,6 +26,7 @@
 // FORWARD DECLARATIONS
 class VideoServices;
 class QVideoPlayerEngine;
+class QLatin1String;
 
 class VideoServicePlay : public XQServiceProvider
     {
@@ -33,7 +34,7 @@
     Q_OBJECT
 
     public:
-        VideoServicePlay( VideoServices* parent, QVideoPlayerEngine* engine );
+        VideoServicePlay( VideoServices *parent, QVideoPlayerEngine* engine, QLatin1String service );
         virtual ~VideoServicePlay();
 
         void setEngine( QVideoPlayerEngine* engine );
--- a/videoplayerapp/videoplayerengine/inc/videoserviceurifetch.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/inc/videoserviceurifetch.h	Fri May 14 15:14:51 2010 +0300
@@ -24,6 +24,7 @@
 
 // FORWARD DECLARATIONS
 class VideoServices;
+class QLatin1String;
 
 class VideoServiceUriFetch : public XQServiceProvider
 {
@@ -38,7 +39,7 @@
     /**
      * contructor
      */
-    VideoServiceUriFetch( VideoServices *parent = 0 );
+    VideoServiceUriFetch( VideoServices *parent, QLatin1String service );
 
     /**
      * destructor
@@ -73,6 +74,12 @@
     /*
      *  Client can use this method launch video URI fetching
      *
+     */
+    void fetch();
+
+    /*
+     *  Client can use this method launch video URI fetching
+     *
      * @param title title to be set
      *
      */
--- a/videoplayerapp/videoplayerengine/inc/videoserviceview.h	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/inc/videoserviceview.h	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 * 
 */ 
       
-// Version : %version: 1 % 
+// Version : %version: 2 % 
       
 #ifndef __VIDEOSERVICEVIEW_H__ 
 #define __VIDEOSERVICEVIEW_H__ 
@@ -28,6 +28,7 @@
 class VideoServices; 
 class QVideoPlayerEngine; 
 class QFile; 
+class QLatin1String;
     
 class VideoServiceView : public XQServiceProvider 
     { 
@@ -35,7 +36,7 @@
     Q_OBJECT 
       
     public: 
-        VideoServiceView( VideoServices* parent, QVideoPlayerEngine* engine ); 
+        VideoServiceView( VideoServices *parent, QVideoPlayerEngine* engine, QLatin1String service ); 
         virtual ~VideoServiceView(); 
      
         void setEngine( QVideoPlayerEngine* engine ); 
--- a/videoplayerapp/videoplayerengine/src/videoplayerengine.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoplayerengine.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 27 %
+// Version : %version: da1mmcf#30 %
 
 
 #include <QApplication>
@@ -39,6 +39,7 @@
     : mIsService( isService )
     , mEmbedded( false )
     , mDelayedLoadDone( false )
+    , mIsPlayService( false )
     , mCurrentViewPlugin( 0 )
     , mPlaybackViewPlugin( 0 )
     , mCollectionViewPlugin( 0 )
@@ -120,25 +121,22 @@
 
     QList<XQPluginInfo> impls;
     XQPluginLoader::listImplementations("org.nokia.mmdt.MpxViewPlugin/1.0", impls);
-
-    //
-    // Pre-load collection plugin and create collection view
-    //
-    loadPluginAndCreateView( MpxHbVideoCommon::CollectionView );
-    
-    //
-    // if app is opened via serviceFW create remaining views
-    // otherwise activate default view i.e. the collection view.    
-    //
-    if ( mIsService )
+        
+    if ( isPlayServiceInvoked() )
     {
         createPlayAndDetailsViews(); 
     }
     else
-    {        
-        activateView( MpxHbVideoCommon::CollectionView );
+    {
+        loadPluginAndCreateView( MpxHbVideoCommon::CollectionView );   
+
+        if((mIsService && !(XQServiceUtil::interfaceName().contains("IVideoBrowse"))) || !mIsService)
+        {
+        	//Browse service will activate view once the category to be opened is informed from highway
+        	activateView( MpxHbVideoCommon::CollectionView );
+        }
     }
-        
+            
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -224,7 +222,9 @@
         loadPluginAndCreateView( MpxHbVideoCommon::PlaybackView );
     }
 
-    if ( ! mFileDetailsViewPlugin )
+    // details view need not be created for playback via serviceFW
+    if ( ! mIsPlayService && 
+         ! mFileDetailsViewPlugin )
     {
         loadPluginAndCreateView( MpxHbVideoCommon::VideoDetailsView );
     }
@@ -492,5 +492,29 @@
     }
 }
 
+// -------------------------------------------------------------------------------------------------
+// isPlayServiceInvoked()
+// -------------------------------------------------------------------------------------------------
+//
+bool QVideoPlayerEngine::isPlayServiceInvoked()
+{
+    MPX_ENTER_EXIT(_L("QVideoPlayerEngine::isPlayServiceInvoked()"));       
+    
+    bool result = false;   
+    
+    if ( mIsService )
+    {
+        QString intface = XQServiceUtil::interfaceName();
+                        
+        if ( intface.contains("IVideoView") ||
+             intface.contains("IFileView") )
+        {
+            result = true;
+            mIsPlayService = true;
+        }
+    }
+    
+    return result;
+}
 
 // End of file
--- a/videoplayerapp/videoplayerengine/src/videoservicebrowse.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoservicebrowse.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 3 %
+// Version : %version: 4 %
 
 #include <hbapplication.h>
 
@@ -23,13 +23,14 @@
 #include "videoservicebrowse.h"
 #include "mpxhbvideocommondefs.h"
 #include "mpxvideo_debug.h"
+#include <xqaiwdecl.h>
 
 // -------------------------------------------------------------------------------------------------
 // VideoServiceBrowse()
 // -------------------------------------------------------------------------------------------------
 //
-VideoServiceBrowse::VideoServiceBrowse( VideoServices* parent )
-    : XQServiceProvider( QLatin1String("com.nokia.Videos.IVideoBrowse"), parent )
+VideoServiceBrowse::VideoServiceBrowse(VideoServices* parent, QLatin1String service)
+    : XQServiceProvider( service, parent )
     , mRequestIndex( 0 )
     , mServiceApp( parent )
     , mCategory( 0 )
@@ -128,14 +129,67 @@
     mCategory = category;
     mSortRole = sortRole;
 
+    // store async request id
+    mRequestIndex = setCurrentRequestAsync();
+
     // start service
     mServiceApp->setCurrentService(VideoServices::EBrowse);
     emit mServiceApp->titleReady(appTitle);
     emit mServiceApp->activated(MpxHbVideoCommon::ActivateCollectionView);
 
-    // store async request id
-    mRequestIndex = setCurrentRequestAsync();
     MPX_DEBUG(_L("VideoServiceBrowse::browseVideos() : mRequestIndex = %d"), mRequestIndex );
 }
 
+// ----------------------------------------------------------------------------
+// isActive()
+// ----------------------------------------------------------------------------
+//
+bool VideoServiceBrowse::isActive()
+{
+    MPX_DEBUG(_L("VideoServiceBrowse::isActive() ret %d"), mRequestIndex );
+	
+    return (mRequestIndex > 0);
+}
+
+// -------------------------------------------------------------------------------------------------
+// browseVideos()
+// -------------------------------------------------------------------------------------------------
+//
+void VideoServiceBrowse::browseVideos(int category, int sortRole)
+{    
+    MPX_ENTER_EXIT(_L("VideoServiceBrowse::browseVideos()"));	
+
+    // set application title
+    XQRequestInfo info = requestInfo();
+    
+    QVariant variant = info.info("WindowTitle");
+    
+    QString appTitle;
+    
+    if(variant.isValid())
+    {
+    	appTitle = variant.toString();
+    }
+    
+    if (appTitle.isEmpty())
+    {
+        appTitle = hbTrId("txt_videos_title_videos");
+    }
+    
+    mTitle = appTitle;
+    mCategory = category;
+    mSortRole = sortRole;
+
+    // store async request id
+    mRequestIndex = setCurrentRequestAsync();
+
+    // start service
+    mServiceApp->setCurrentService(VideoServices::EBrowse);
+    emit mServiceApp->titleReady(appTitle);
+    emit mServiceApp->activated(MpxHbVideoCommon::ActivateCollectionView);
+
+    MPX_DEBUG(_L("VideoServiceBrowse::browseVideos() : mRequestIndex = %d"), mRequestIndex );
+}
+
+
 // End of file
--- a/videoplayerapp/videoplayerengine/src/videoserviceplay.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoserviceplay.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: %
+// Version : %version: da1mmcf#5 %
 
 #include "videoservices.h"
 #include "videoserviceplay.h"
@@ -27,8 +27,10 @@
 // VideoServicePlay()
 // -------------------------------------------------------------------------------------------------
 // 
-VideoServicePlay::VideoServicePlay( VideoServices* parent, QVideoPlayerEngine* engine )
-    : XQServiceProvider( QLatin1String("com.nokia.Videos.IVideoView"), parent )
+VideoServicePlay::VideoServicePlay( VideoServices* parent, 
+                                    QVideoPlayerEngine* engine, 
+                                    QLatin1String service )
+    : XQServiceProvider( service, parent )
     , mEngine( engine )
     , mServiceApp( parent )
 {
--- a/videoplayerapp/videoplayerengine/src/videoservices.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoservices.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 6 %
+// Version : %version: da1mmcf#8 %
 
 #include "videoplayerengine.h"
 #include "videoservices.h"
@@ -24,6 +24,8 @@
 #include "videoserviceview.h"
 #include "videoservicebrowse.h"
 #include "mpxvideo_debug.h"
+#include <xqaiwdecl.h>
+#include <xqserviceutil.h>
 
 VideoServices *VideoServices::mInstance = 0;
 
@@ -110,11 +112,23 @@
     , mFetchSelected( false )
 {
     MPX_ENTER_EXIT(_L("VideoServices::VideoServices()"));
+   
+    mServicePlay     = new VideoServicePlay(this, engine, QLatin1String("videoplayer.com.nokia.symbian.IVideoView"));  //New service, new interface
+    mServiceView     = new VideoServiceView(this, engine, QLatin1String("videoplayer.com.nokia.symbian.IFileView"));   //New service, new interface        
+    mServiceUriFetch = new VideoServiceUriFetch(this, QLatin1String("videoplayer.com.nokia.symbian.IVideoFetch")); //New service, new interface
+    mServiceBrowse   = new VideoServiceBrowse(  this, QLatin1String("videoplayer.com.nokia.symbian.IVideoBrowse")); //New service, new interface
+
+    mServicePlayDeprecatedNewService = new VideoServicePlay(this, engine, QLatin1String("videoplayer.IVideoView")); //New service, old interface
+    mServicePlayDeprecatedOldService = new VideoServicePlay(this, engine, QLatin1String("com.nokia.Videos.IVideoView")); //Old service, old interface   
     
-    mServiceUriFetch = new VideoServiceUriFetch(this);
-    mServicePlay     = new VideoServicePlay(this, engine);
-    mServiceView     = new VideoServiceView(this, engine);
-    mServiceBrowse   = new VideoServiceBrowse(this);
+    mServiceViewDeprecatedNewService = new VideoServiceView(this, engine, QLatin1String("videoplayer.IFileView")); //New service, old interface
+    mServiceViewDeprecatedOldService = new VideoServiceView(this, engine, QLatin1String("com.nokia.Videos.IFileView")); //Old service, old interface     
+    
+    mServiceUriFetchDeprecatedNewService = new VideoServiceUriFetch(this, QLatin1String("videoplayer.IVideoFetch")); //New service, old interface
+    mServiceUriFetchDeprecatedOldService = new VideoServiceUriFetch(this, QLatin1String("com.nokia.Videos.IVideoFetch")); //Old service, old interface    
+
+    mServiceBrowseDeprecatedNewService   = new VideoServiceBrowse(this, QLatin1String("videoplayer.IVideoBrowse")); //New service, old interface
+    mServiceBrowseDeprecatedOldService   = new VideoServiceBrowse(this, QLatin1String("com.nokia.Videos.IVideoBrowse")); //Old service, old interface
 }
 
 // ----------------------------------------------------------------------------
@@ -129,6 +143,14 @@
     delete mServicePlay;
     delete mServiceView;
     delete mServiceBrowse;
+    delete mServicePlayDeprecatedNewService;
+    delete mServicePlayDeprecatedOldService;
+    delete mServiceViewDeprecatedNewService;
+    delete mServiceViewDeprecatedOldService;
+    delete mServiceBrowseDeprecatedNewService;
+    delete mServiceUriFetchDeprecatedNewService;
+    delete mServiceBrowseDeprecatedOldService;
+    delete mServiceUriFetchDeprecatedOldService;
 }
 
 // ----------------------------------------------------------------------------
@@ -151,12 +173,23 @@
     MPX_DEBUG(_L("VideoServices::getBrowseCategory()"));
 	
     int category = 0;
-    
-    if ( mServiceBrowse )
+
+    if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
     {
         category = mServiceBrowse->getBrowseCategory();
     }
-    
+    else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
+    {
+    	if (mServiceBrowseDeprecatedNewService->isActive())
+    	{
+    		category = mServiceBrowseDeprecatedNewService->getBrowseCategory();
+    	}
+    	else
+    	{
+    		category = mServiceBrowseDeprecatedOldService->getBrowseCategory();
+    	}
+    }
+
     return category;
 }
 
@@ -180,14 +213,42 @@
     MPX_DEBUG(_L("VideoServices::contextTitle()") );
 	
     QString title;
-    
-    if (mCurrentService == VideoServices::EUriFetcher && mServiceUriFetch)
+
+    if (mCurrentService == VideoServices::EUriFetcher)
     {
-        title = mServiceUriFetch->contextTitle();
+    	if(mServiceUriFetch && (XQServiceUtil::interfaceName().contains("symbian")))
+    	{
+    		title = mServiceUriFetch->contextTitle();
+    	}
+    	else if (mServiceUriFetchDeprecatedNewService && mServiceUriFetchDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
+    	{
+    		if(mServiceUriFetchDeprecatedNewService->isActive())
+    		{
+    			title = mServiceUriFetchDeprecatedNewService->contextTitle();
+    		}
+    		else
+    		{
+    			title = mServiceUriFetchDeprecatedOldService->contextTitle();
+    		}
+    	}
     }
-    else if (mCurrentService == VideoServices::EBrowse && mServiceBrowse)
+    else if (mCurrentService == VideoServices::EBrowse)
     {
-        title = mServiceBrowse->contextTitle();
+    	if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
+		{
+			title = mServiceBrowse->contextTitle();
+		}
+    	else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
+		{
+        	if (mServiceBrowseDeprecatedNewService->isActive())
+        	{
+    			title = mServiceBrowseDeprecatedNewService->contextTitle();
+        	}
+        	else
+        	{
+    			title = mServiceBrowseDeprecatedOldService->contextTitle();
+        	}
+		}
     }
     
     return title;
@@ -202,10 +263,24 @@
     MPX_ENTER_EXIT(_L("VideoServices::sortType()"));
     
     int sortRole = 0;
-    
-    if (mCurrentService == EBrowse && mServiceBrowse)
+
+    if (mCurrentService == EBrowse)
     {
-        sortRole = mServiceBrowse->sortRole();
+    	if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
+		{
+			sortRole = mServiceBrowse->sortRole();
+		}
+    	else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
+		{
+        	if (mServiceBrowseDeprecatedNewService->isActive())
+        	{
+        		sortRole = mServiceBrowseDeprecatedNewService->sortRole();
+        	}
+        	else
+        	{
+        		sortRole = mServiceBrowseDeprecatedOldService->sortRole();
+        	}
+		}
     }
     
     return sortRole;
@@ -222,7 +297,22 @@
     
     QStringList list;
     list.append( item );
-    mServiceUriFetch->complete( list );
+
+    if(mServiceUriFetch && (XQServiceUtil::interfaceName().contains("symbian")))
+    {
+    	mServiceUriFetch->complete( list );
+    }
+    else if (mServiceUriFetchDeprecatedNewService && mServiceUriFetchDeprecatedOldService)
+    {
+    	if (mServiceUriFetchDeprecatedNewService->isActive())
+    	{
+        	mServiceUriFetchDeprecatedNewService->complete( list );
+    	}
+    	else
+    	{
+        	mServiceUriFetchDeprecatedOldService->complete( list );
+    	}
+    }
     mFetchSelected = true;
 }
 
@@ -233,11 +323,22 @@
 void VideoServices::browsingEnded()
 {
     MPX_ENTER_EXIT(_L("VideoServices::browsingEnded()"));
-	
-    if ( mServiceBrowse )
-    {
-        mServiceBrowse->complete();
-    }
+
+	if ( mServiceBrowse && (XQServiceUtil::interfaceName().contains("symbian")))
+	{
+		mServiceBrowse->complete();
+	}
+	else if ( mServiceBrowseDeprecatedNewService && mServiceBrowseDeprecatedOldService && !(XQServiceUtil::interfaceName().contains("symbian")))
+	{
+    	if (mServiceBrowseDeprecatedNewService->isActive())
+    	{
+    		mServiceBrowseDeprecatedNewService->complete();
+    	}
+    	else
+    	{
+    		mServiceBrowseDeprecatedOldService->complete();
+    	}
+	}
 }
 
 // End of file
--- a/videoplayerapp/videoplayerengine/src/videoserviceurifetch.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoserviceurifetch.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: %
+// Version : %version: 5 %
 
 #include <hbapplication.h>
 
@@ -23,14 +23,15 @@
 #include "videoserviceurifetch.h"
 #include "mpxhbvideocommondefs.h"
 #include "mpxvideo_debug.h"
+#include <xqaiwdecl.h>
 
 
 // ----------------------------------------------------------------------------
 // VideoServiceUriFetch()
 // ----------------------------------------------------------------------------
 //
-VideoServiceUriFetch::VideoServiceUriFetch(VideoServices* parent)
-    : XQServiceProvider( QLatin1String("com.nokia.Videos.IVideoFetch"), parent )
+VideoServiceUriFetch::VideoServiceUriFetch(VideoServices* parent, QLatin1String service)
+    : XQServiceProvider( service, parent )
     , mRequestIndex( 0 )
     , mServiceApp( parent )
 {
@@ -125,14 +126,52 @@
 // fetch()
 // ----------------------------------------------------------------------------
 //
+void VideoServiceUriFetch::fetch()
+{
+	MPX_ENTER_EXIT(_L("VideoServiceUriFetch::fetch()"));
+
+	emit mServiceApp->activated(MpxHbVideoCommon::ActivateCollectionView);
+    
+    XQRequestInfo info = requestInfo();
+    
+    QVariant variant = info.info("WindowTitle");
+    
+    if(variant.isValid())
+    {
+    	mTitle = variant.toString();
+    }
+    
+    if (mTitle.isEmpty())
+    {
+    	mTitle = hbTrId("txt_videos_title_videos");
+    }
+
+	emit mServiceApp->titleReady(mTitle);
+    mServiceApp->setCurrentService(VideoServices::EUriFetcher);
+
+    mRequestIndex = setCurrentRequestAsync();
+    MPX_DEBUG(_L("VideoServiceUriFetch::fetch() : mRequestIndex(%d)"), mRequestIndex );
+}
+
+// ----------------------------------------------------------------------------
+// fetch()
+// ----------------------------------------------------------------------------
+//
 void VideoServiceUriFetch::fetch(const QString& title)
 {
-    MPX_ENTER_EXIT(_L("VideoServiceUriFetch::fetch()"),
+	MPX_ENTER_EXIT(_L("VideoServiceUriFetch::fetch()"),
                    _L("title = %s"), title.data() );
     
+    emit mServiceApp->activated(MpxHbVideoCommon::ActivateCollectionView);
+
     mTitle = title;
-    emit mServiceApp->activated(MpxHbVideoCommon::ActivateCollectionView);
-    emit mServiceApp->titleReady(title);
+
+    if (mTitle.isEmpty())
+    {
+    	mTitle = hbTrId("txt_videos_title_videos");
+    }
+
+   	emit mServiceApp->titleReady(mTitle);
 
     mServiceApp->setCurrentService(VideoServices::EUriFetcher);
 
--- a/videoplayerapp/videoplayerengine/src/videoserviceview.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/videoserviceview.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  3 %
+// Version : %version:  4 %
 
 #include "videoservices.h"
 #include "videoserviceview.h"
@@ -26,8 +26,10 @@
 // VideoServiceView()
 // -------------------------------------------------------------------------------------------------
 // 
-VideoServiceView::VideoServiceView( VideoServices* parent, QVideoPlayerEngine* engine )
-    : XQServiceProvider( QLatin1String("com.nokia.Videos.com.nokia.symbian.IFileView"), parent )
+VideoServiceView::VideoServiceView( VideoServices* parent, 
+                                    QVideoPlayerEngine* engine, 
+                                    QLatin1String service )
+    : XQServiceProvider( service, parent )
     , mEngine( engine )
     , mServiceApp( parent )
 {
--- a/videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/src/testvideoplayerengine.cpp	Fri Apr 30 09:52:11 2010 +0300
+++ b/videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/src/testvideoplayerengine.cpp	Fri May 14 15:14:51 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: %
+// Version : %version: da1mmcf#12 %
 
 // INCLUDES
 #include <QtTest/QtTest>
@@ -97,6 +97,13 @@
     mVideoServices         = 0;
 
     mTestObject = new QVideoPlayerEngine(isService);
+    
+    if ( isService )
+    {
+        mTestObject->mIsPlayService = true;
+    }
+    		
+    
 }
 
 void TestVideoPlayerEngine::cleanup()
@@ -214,10 +221,10 @@
 
     mTestObject->initialize();
 
-    QVERIFY(mTestObject->mCurrentViewPlugin == 0);
-    QVERIFY(mTestObject->mPlaybackViewPlugin != 0);
+    QVERIFY(mTestObject->mCurrentViewPlugin != 0);
+    QVERIFY(mTestObject->mPlaybackViewPlugin == 0);
     QVERIFY(mTestObject->mCollectionViewPlugin != 0);
-    QVERIFY(mTestObject->mFileDetailsViewPlugin != 0);
+    QVERIFY(mTestObject->mFileDetailsViewPlugin == 0);
     QVERIFY(mTestObject->mPlaybackWrapper != 0);
     QVERIFY(mTestObject->mVideoServices != 0);
     QVERIFY(mTestObject->mIsService == true);
@@ -291,10 +298,10 @@
 
     mTestObject->initialize();
 
-    QVERIFY(mTestObject->mCurrentViewPlugin == 0);
-    QVERIFY(mTestObject->mPlaybackViewPlugin != 0);
+    QVERIFY(mTestObject->mCurrentViewPlugin != 0);
+    QVERIFY(mTestObject->mPlaybackViewPlugin == 0);
     QVERIFY(mTestObject->mCollectionViewPlugin != 0);
-    QVERIFY(mTestObject->mFileDetailsViewPlugin != 0);
+    QVERIFY(mTestObject->mFileDetailsViewPlugin == 0);
     QVERIFY(mTestObject->mVideoServices != 0);
     QVERIFY(mTestObject->mIsService == true);
     QVERIFY(VideoServices::mReferenceCount == 1);