Revision: 201019 RCL_3 PDK_3.0.0
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:44:54 +0300
branchRCL_3
changeset 15 8f0df5c82986
parent 14 55fa1ec415c6
child 16 67eb01668b0e
Revision: 201019 Kit: 2010121
inc/mpxvideo_debug.h
tsrc/testing/ini/01-misc/TestFramework.ini
tsrc/testing/ini/01-unit/TestFramework.ini
tsrc/testing/ini/02-settings/TestFramework.ini
tsrc/testing/ini/03-mv/TestFramework.ini
tsrc/testing/ini/03-schedule/TestFramework.ini
tsrc/testing/ini/04-connutil/TestFramework.ini
tsrc/testing/ini/04-sm/TestFramework.ini
tsrc/testing/ini/05-mv/TestFramework.ini
tsrc/testing/ini/05-startup/TestFramework.ini
tsrc/testing/ini/06-details/TestFramework.ini
tsrc/testing/ini/06-vod1/TestFramework.ini
tsrc/testing/ini/07-vod2/TestFramework.ini
tsrc/testing/ini/08-connutil/TestFramework.ini
tsrc/testing/ini/99-Stress/TestFramework.ini
tsrc/testing/tools/builder.pl
tsrc/testing/tools/siscreator.pl
tsrc/testing/tools/testdoc.pl
videocollection/hgmyvideos/data/vcxhgmyvideos.rss
videocollection/hgmyvideos/group/vcxhgmyvideos.mmp
videocollection/hgmyvideos/icons/qgn_prop_mtv_prog_clip.svg
videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh
videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelhandler.h
videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelobserver.h
videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h
videocollection/hgmyvideos/inc/vcxhgmyvideosdownloadupdater.h
videocollection/hgmyvideos/inc/vcxhgmyvideosmodel.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideolist.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistitem.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h
videocollection/hgmyvideos/src/vcxhgmyvideoscategorylistimpl.cpp
videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp
videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosdownloadupdater.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosmodel.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideocopier.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideolist.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideolistitem.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp
videocollection/hgmyvideos/tsrc/ut_vcxhgmyvideosmainview/src/vcxhgmyvideosvideolistimpl_stub.cpp
videocollection/hgmyvideos/tsrc/ut_vcxhgmyvideosmainview/src/vcxhgmyvideosvideomodelhandler_stub.cpp
videocollection/mpxmyvideoscollection/conf/videoscollection.confml
videocollection/mpxmyvideoscollection/conf/videoscollection_2001B2A9.crml
videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp
videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/group/VCXMyVideosCollectionPluginTest_udeb.pkg
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/Bmarm/VcxMyVideosCollectionUtilTestU.DEF
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/Bwins/VcxMyVideosCollectionUtilTestU.DEF
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/conf/VcxMyVideosCollectionUtilTest.cfg
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/data/mmc/file.txt
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/eabi/VcxMyVideosCollectionUtilTestu.def
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/VcxMyVideosCollectionUtilTest.mmp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/VcxMyVideosCollectionUtilTest.pkg
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/VcxMyVideosCollectionUtilTest_DoxyFile.txt
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/bld.inf
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/make_vcxmyvideoscollectionutiltest_sisx.bat
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/inc/VcxMyVideosCollectionUtilTest.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/init/testframework.ini
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/src/VcxMyVideosCollectionUtilTest.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/src/VcxMyVideosCollectionUtilTestBlocks.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/Bwins/VcxMyVideosMdsDbTestU.DEF
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/conf/VcxMyVideosMdsDbTest.cfg
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/eabi/VcxMyVideosMdsDbTestu.def
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/group/VcxMyVideosMdsDbTest.mmp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/group/VcxMyVideosMdsDbTest.pkg
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/group/bld.inf
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/VcxMyVideosMdsDbTest.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeinstanceitem.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeitem.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdenamespacedef.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeobject.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeobjectdef.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeobjectquery.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeorderrule.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeproperty.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdepropertydef.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdequery.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdesession.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdesessionimpl.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/vcxmyvideoscollectionutil.h
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/init/testframework.ini
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/VcxMyVideosMdsDbTest.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/VcxMyVideosMdsDbTestBlocks.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeinstanceitem.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeitem.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdenamespacedef.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeobject.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeobjectdef.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeobjectquery.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeorderrule.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeproperty.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdepropertydef.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdequery.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdesession.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdesessionimpl.cpp
videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/vcxmyvideoscollectionutil.cpp
videoplayback/inc/mpxvideoplaybackcontainer.h
videoplayback/inc/mpxvideoplaybackcontrolscontroller.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
videoplayback/videoplaybackcontrols/inc/mpxvideoplaybackaspectratioicon.h
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackaspectratioicon.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbrandinganimation.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbutton.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp
videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp
videoplayerapp/mpxvideoplayer/data/mpxvideoplayer_reg.rss
videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp
videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/inc/mpxvideoplayer_appuienginetester.h
videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayer_appuienginetester.cpp
--- a/inc/mpxvideo_debug.h	Tue May 11 16:15:40 2010 +0300
+++ b/inc/mpxvideo_debug.h	Tue May 25 12:44:54 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/tsrc/testing/ini/01-misc/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-#
-# This is STIFTestFramework initialization file 123
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions 
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Sret of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases' 
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.sd
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if 
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES			# Possible values: YES or NO
-
-TestReportFilePath= c:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementplugin04 
-UITestingSupport= YES 
-SeparateProcesses= YES 
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\TestFramework\VCXProvisioningTest.cfg
-TestCaseFile= c:\TestFramework\VCXIapListTest.cfg
-TestCaseFile= c:\TestFramework\VCXServiceTest.cfg
-[End_Module]
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
-
-#CreateLogDirectories= YES		# Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML			# Possible values: TXT or HTML
-#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
-
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
-
-#FileCreationMode= APPEND		# Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES			# Possible values: YES or NO
-#WithTimeStamp= YES			# Possible values: YES or NO
-#WithLineBreak= YES			# Possible values: YES or NO
-#WithEventRanking= YES			# Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/ini/01-unit/TestFramework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,210 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\Fusion\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= TestScripter
+TestCaseFile= c:\TestFramework\videohelixtest.cfg
+TestCaseFile= c:\TestFramework\ui_videoplaybackcontrolstest.cfg
+TestCaseFile= c:\TestFramework\ui_userinputhandlertest.cfg
+TestCaseFile= c:\TestFramework\mpxvideoplayertest.cfg
+[End_Module]
+
+#TestCaseFile= c:\TestFramework\ui_VcxHgMyVideosMainViewTest.cfg
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= TXT			# Possible values: TXT or HTML
+EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+HardwareBasePath=  C:\
+HardwareFormat= TXT			# Possible values: TXT or HTML
+HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+ThreadIdToLogFile= YES			# Possible values: YES or NO
+WithTimeStamp= YES			# Possible values: YES or NO
+WithLineBreak= YES			# Possible values: YES or NO
+WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- a/tsrc/testing/ini/02-settings/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ b/tsrc/testing/ini/02-settings/TestFramework.ini	Tue May 25 12:44:54 2010 +0300
@@ -1,7 +1,7 @@
 #
-# This is STIFTestFramework initialization file 123
+# This is STIF initialization file
 # Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions 
+# See STIF TestFramework users guide.doc for instructions
 
 # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 # Set following test engine settings:
@@ -9,12 +9,12 @@
 #		+ 'Summary': Summary of the tested test cases.
 #		+ 'Environment': Hardware and software info.
 #		+ 'TestCases': Test case report.
-#		+ 'FullReport': Sret of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases' 
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
 #
 # 	- CreateTestReport setting controls report creation mode
 #		+ YES, Test report will created.
-#		+ NO, No Test report.sd
+#		+ NO, No Test report.
 #
 # 	- File path indicates the base path of the test report.
 # 	- File name indicates the name of the test report.
@@ -22,6 +22,8 @@
 # 	- File format indicates the type of the test report.
 #		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
 #		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
 #
 # 	- File output indicates output source of the test report.
 #		+ FILE, Test report logging to file.
@@ -29,31 +31,41 @@
 #
 # 	- File Creation Mode indicates test report overwriting if file exist.
 #		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if 
+#		+ APPEND, Continue logging after the old Test report information if
 #                 report exist.
 # 	- Sets a device reset module's dll name(Reboot).
 #		+ If Nokia specific reset module is not available or it is not correct one
 #		  StifHWResetStub module may use as a template for user specific reset
 #		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
 
 [Engine_Defaults]
 
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', 'TestCases' or 'FullReport'
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
 
-CreateTestReport= YES			# Possible values: YES or NO
+CreateTestReport= YES         # Possible values: YES or NO
 
-TestReportFilePath= c:\Logs\Fusion\
+TestReportFilePath= C:\LOGS\Fusion\
 TestReportFileName= TestReport
 
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
 
 DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
 
-DisableMeasurement= stifmeasurementplugin04 
-UITestingSupport= YES 
-SeparateProcesses= YES 
+DisableMeasurement= stifmeasurementplugin04  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
 [End_Defaults]
 # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
@@ -92,7 +104,7 @@
 
 
 # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
+# Set STIF logging overwrite parameters for Logger.
 # 	Hardware and emulator environment logging path and styles can
 # 	be configured from here to overwrite the Logger's implemented values.
 #	
@@ -137,34 +149,59 @@
 #		+ NO, No line break(s).
 #
 #	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
 #                 depends on environment's tics, for example(includes time stamp also)
 #                 '012   12.Nov.2003 115958    LOGGING INFO'
 #		+ NO, No event ranking.
 #
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
 
 [Logger_Defaults]
 
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
-
-#CreateLogDirectories= YES		# Possible values: YES or NO
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
 
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML			# Possible values: TXT or HTML
-#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= HTML			# Possible values: TXT or HTML
+EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
 
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+HardwareBasePath=  C:\
+HardwareFormat= TXT			# Possible values: TXT or HTML
+HardwareOutput= FILE			# Possible values: FILE or RDEBUG
 
-#FileCreationMode= APPEND		# Possible values: OVERWRITE or APPEND
+FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
 
-#ThreadIdToLogFile= YES			# Possible values: YES or NO
-#WithTimeStamp= YES			# Possible values: YES or NO
-#WithLineBreak= YES			# Possible values: YES or NO
-#WithEventRanking= YES			# Possible values: YES or NO
+ThreadIdToLogFile= YES			# Possible values: YES or NO
+WithTimeStamp= YES			# Possible values: YES or NO
+WithLineBreak= YES			# Possible values: YES or NO
+WithEventRanking= YES			# Possible values: YES or NO
 
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
 [End_Logger_Defaults]
 # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
 # End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/ini/03-mv/TestFramework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,236 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\Fusion\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= testscripter
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownload.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownload2.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestMoveCopy.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDelete.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestSideload.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestLists.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestSorting.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestAttributes.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestBigFiles.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestMultipleDls.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestFullMemory.cfg
+TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestMultiDrives.cfg
+[End_Module]
+
+;These are either not needed or not ready
+;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadSync.cfg
+;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadWlan.cfg
+;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestEvents.cfg
+;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestSideloadStress.cfg
+;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadConnUtil.cfg
+;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadStress.cfg
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+#Load testmoduletestsdkvolumecontrol, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuletestsdkvolumecontrol used initialization file
+#IniFile= init.txt
+
+#TestModuletestsdkvolumecontrol used configuration file(s)
+#TestCaseFile= testcases1.cfg
+#TestCaseFile= testcases2.cfg
+#TestCaseFile= manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= TXT			# Possible values: TXT or HTML
+EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+HardwareBasePath=  C:\
+HardwareFormat= TXT			# Possible values: TXT or HTML
+HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+ThreadIdToLogFile= YES			# Possible values: YES or NO
+WithTimeStamp= YES			# Possible values: YES or NO
+WithLineBreak= YES			# Possible values: YES or NO
+WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- a/tsrc/testing/ini/03-schedule/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-#
-# This is STIFTestFramework initialization file 123
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions 
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Sret of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases' 
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.sd
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if 
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES			# Possible values: YES or NO
-
-TestReportFilePath= c:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementplugin04 
-UITestingSupport= YES 
-SeparateProcesses= YES 
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\TestFramework\VCXScheduledReminderTest.cfg
-TestCaseFile= c:\TestFramework\videoscheduler_apitest.cfg
-[End_Module]
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
-
-#CreateLogDirectories= YES		# Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML			# Possible values: TXT or HTML
-#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
-
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
-
-#FileCreationMode= APPEND		# Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES			# Possible values: YES or NO
-#WithTimeStamp= YES			# Possible values: YES or NO
-#WithLineBreak= YES			# Possible values: YES or NO
-#WithEventRanking= YES			# Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/ini/04-connutil/TestFramework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,208 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\Fusion\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= testscripter
+TestCaseFile= c:\testframework\VCXConnUtilTestSNAP.cfg
+TestCaseFile= c:\testframework\VCXConnUtilTestMasterAndSlave.cfg
+TestCaseFile= c:\testframework\VCXConnUtilTestStates.cfg
+[End_Module]
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= TXT			# Possible values: TXT or HTML
+EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+HardwareBasePath=  C:\
+HardwareFormat= TXT			# Possible values: TXT or HTML
+HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+ThreadIdToLogFile= YES			# Possible values: YES or NO
+WithTimeStamp= YES			# Possible values: YES or NO
+WithLineBreak= YES			# Possible values: YES or NO
+WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- a/tsrc/testing/ini/04-sm/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-#
-# This is STIFTestFramework initialization file 123
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions 
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Sret of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases' 
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.sd
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if 
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES			# Possible values: YES or NO
-
-TestReportFilePath= c:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementplugin04 
-UITestingSupport= YES 
-SeparateProcesses= YES 
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestSync.cfg
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestAsync.cfg
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestAsyncR3.cfg
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestServiceCustom.cfg
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestSnapSelection.cfg
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestSyncErrorHandling.cfg
-[End_Module]
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
-
-#CreateLogDirectories= YES		# Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML			# Possible values: TXT or HTML
-#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
-
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
-
-#FileCreationMode= APPEND		# Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES			# Possible values: YES or NO
-#WithTimeStamp= YES			# Possible values: YES or NO
-#WithLineBreak= YES			# Possible values: YES or NO
-#WithEventRanking= YES			# Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/tsrc/testing/ini/05-mv/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-#
-# This is STIFTestFramework initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-# - Set Test Reporting mode. TestReportMode's possible values are:
-#     + 'Summary': Summary of the tested test cases.
-#     + 'Environment': Hardware and software info.
-#     + 'TestCases': Test case report.
-#     + 'FullReport': Set of all above ones.
-#     + Example 'TestReportMode= Summary TestCases'
-#
-#     - CreateTestReport setting controls report creation mode
-#     + YES, Test report will created.
-#     + NO, No Test report.
-#
-#     - File path indicates the base path of the test report.
-#     - File name indicates the name of the test report.
-#
-#     - File format indicates the type of the test report.
-#     + TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#     + HTML, Test report will be html type, for example 'TestReport.html'.
-#
-#     - File output indicates output source of the test report.
-#     + FILE, Test report logging to file.
-#     + RDEBUG, Test report logging to using rdebug.
-#
-#     - File Creation Mode indicates test report overwriting if file exist.
-#     + OVERWRITE, Overwrites if the Test report file exist.
-#     + APPEND, Continue logging after the old Test report information if
-#           report exist.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport    # Possible values are:
-                              # 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES         # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT         # Possible values: TXT or HTML
-TestReportOutput= FILE        # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE    # Possible values: OVERWRITE or APPEND
-UITestingSupport= Yes
-SeparateProcesses= YES
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= testsdkvolumecontroltestsdkvolumecontroltestsdkvolumecontrol
-# Modules might have initialisation file, specified as
-# IniFile= YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= NormalCases.txt
-# TestCaseFile= SmokeCases.txt
-# TestCaseFile= ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownload.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownload2.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestMoveCopy.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDelete.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestSideload.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestLists.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestSorting.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestAttributes.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadMultipleDls.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestFullMemory.cfg
-TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestMultipleDrives.cfg
-[End_Module]
-
-;These are either not needed or not ready
-;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadSync.cfg
-;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadWlan.cfg
-;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestEvents.cfg
-;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestSideloadStress.cfg
-;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadConnUtil.cfg
-;TestCaseFile= c:\testframework\VCXMyVideosCollectionPluginTestDownloadStress.cfg
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-#Load testmoduletestsdkvolumecontrol, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuletestsdkvolumecontrol used initialization file
-#IniFile= init.txt
-
-#TestModuletestsdkvolumecontrol used configuration file(s)
-#TestCaseFile= testcases1.cfg
-#TestCaseFile= testcases2.cfg
-#TestCaseFile= manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# Hardware and emulator environment logging path and styles can
-# be configured from here to overwrite the Logger's implemented values.
-#
-# Settings description:
-# - Indicates option for creation log directory/directories. If log directory/directories
-#       is/are not created by user they will make by software.
-#     + YES, Create log directory/directories if not allready exist.
-#     + NO, Log directory/directories not created. Only created one is used.
-#
-# - Overwrite emulator path setting.
-#     + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-#       Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#       will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-# - Overwrite emulator's logging format.
-#     + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#     + HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-# - Overwrited emulator logging output source.
-#     + FILE, Logging to file(s).
-#     + RDEBUG, Logging to using rdebug(s).
-#
-# - Overwrite hardware path setting (Same description as above in emulator path).
-# - Overwrite hardware's logging format(Same description as above in emulator format).
-# - Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-# - File Creation Mode indicates file overwriting if file exist.
-#     + OVERWRITE, Overwrites if file(s) exist.
-#     + APPEND, Continue logging after the old logging information if file(s) exist.
-#
-# - Will thread id include to the log filename.
-#     + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#     + NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-# - Will time stamps include the to log file.
-#     + YES, Time stamp added to each line in log file(s). Time stamp is
-#       for example'12.Nov.2003 115958 LOGGING INFO'
-#     + NO, No time stamp(s).
-#
-# - Will line breaks include to the log file.
-#     + YES, Each logging event includes line break and next log event is in own line.
-#     + NO, No line break(s).
-#
-# - Will event ranking include to the log file.
-#     + YES, Event ranking number added to each line in log file(s). Ranking number
-#       depends on environment's tics, for example(includes time stamp also)
-#       '012   12.Nov.2003 115958    LOGGING INFO'
-#     + NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-
-CreateLogDirectories= YES    # Possible values: YES or NO
-
-EmulatorBasePath= C:\LOGS\TestFramework\
-EmulatorFormat= HTML         # Possible values: TXT or HTML
-EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML        # Possible values: TXT or HTML
-#HardwareOutput= FILE        # Possible values: FILE or RDEBUG
-
-FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES      # Possible values: YES or NO
-#WithTimeStamp= YES          # Possible values: YES or NO
-#WithLineBreak= YES          # Possible values: YES or NO
-#WithEventRanking= YES       # Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/ini/05-startup/TestFramework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,207 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\Fusion\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= testscripter
+TestCaseFile= c:\testframework\ui_VideoPlayerStartupApiTest.cfg
+TestCaseFile= c:\testframework\ui_VideoPlayerStartupApiTest2.cfg
+[End_Module]
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= TXT			# Possible values: TXT or HTML
+EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+HardwareBasePath=  C:\
+HardwareFormat= TXT			# Possible values: TXT or HTML
+HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+ThreadIdToLogFile= YES			# Possible values: YES or NO
+WithTimeStamp= YES			# Possible values: YES or NO
+WithLineBreak= YES			# Possible values: YES or NO
+WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/ini/06-details/TestFramework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,206 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                              #                      'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\Fusion\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES        # Possible values: YES or NO
+#SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= testscripter
+TestCaseFile= c:\testframework\ui_FileDetailsDialogtest.cfg
+[End_Module]
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= TXT			# Possible values: TXT or HTML
+EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+HardwareBasePath=  C:\
+HardwareFormat= TXT			# Possible values: TXT or HTML
+HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+ThreadIdToLogFile= YES			# Possible values: YES or NO
+WithTimeStamp= YES			# Possible values: YES or NO
+WithLineBreak= YES			# Possible values: YES or NO
+WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# 	If you want to use filter with ConsoleUI, simply remove comments
+# 	from section below and provide valid filter entries.
+#   Each filter line has to start with "filter= " keyword.
+#   Filter can contain special wildcard characters:
+#     *  which stands for none or any literal;
+#     ?  which stands for single character.
+#   Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- a/tsrc/testing/ini/06-vod1/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-#
-# This is STIFTestFramework initialization file 123
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Sret of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases'
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.sd
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport		# Possible values are: 'Empty', 'Summary', 'Environment',
-                                                               'TestCases' or 'FullReport'
-
-CreateTestReport= YES			# Possible values: YES or NO
-
-TestReportFilePath= c:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-
-#
-# See vc/engine/internal/ATS for INI files with CFG configurations.
-#
-
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\TestFramework\VCXVodContentApiTest.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestSearchR3.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestSearch2R3.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentModificationCheckTest.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-
-CreateLogDirectories= YES		# Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML			# Possible values: TXT or HTML
-#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
-
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
-
-FileCreationMode= APPEND		# Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES			# Possible values: YES or NO
-#WithTimeStamp= YES			# Possible values: YES or NO
-#WithLineBreak= YES			# Possible values: YES or NO
-#WithEventRanking= YES			# Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
\ No newline at end of file
--- a/tsrc/testing/ini/07-vod2/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-#
-# This is STIFTestFramework initialization file 123
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Sret of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases'
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.sd
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport		# Possible values are: 'Empty', 'Summary', 'Environment',
-                                                               'TestCases' or 'FullReport'
-
-CreateTestReport= YES			# Possible values: YES or NO
-
-TestReportFilePath= c:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND	# Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-
-#
-# See vc/engine/internal/ATS for INI files with CFG configurations.
-#
-
-
-[New_Module]
-ModuleName= TestScripter
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestCategoriesR3.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestErrors.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestDb.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestMimeTypes.cfg
-TestCaseFile= c:\TestFramework\VCXVodContentApiTestParental.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-
-CreateLogDirectories= YES		# Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML			# Possible values: TXT or HTML
-#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
-
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
-
-FileCreationMode= APPEND		# Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES			# Possible values: YES or NO
-#WithTimeStamp= YES			# Possible values: YES or NO
-#WithLineBreak= YES			# Possible values: YES or NO
-#WithEventRanking= YES			# Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
\ No newline at end of file
--- a/tsrc/testing/ini/08-connutil/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-#
-# This is STIFTestFramework initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-# - Set Test Reporting mode. TestReportMode's possible values are:
-#     + 'Summary': Summary of the tested test cases.
-#     + 'Environment': Hardware and software info.
-#     + 'TestCases': Test case report.
-#     + 'FullReport': Set of all above ones.
-#     + Example 'TestReportMode= Summary TestCases'
-#
-#     - CreateTestReport setting controls report creation mode
-#     + YES, Test report will created.
-#     + NO, No Test report.
-#
-#     - File path indicates the base path of the test report.
-#     - File name indicates the name of the test report.
-#
-#     - File format indicates the type of the test report.
-#     + TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#     + HTML, Test report will be html type, for example 'TestReport.html'.
-#
-#     - File output indicates output source of the test report.
-#     + FILE, Test report logging to file.
-#     + RDEBUG, Test report logging to using rdebug.
-#
-#     - File Creation Mode indicates test report overwriting if file exist.
-#     + OVERWRITE, Overwrites if the Test report file exist.
-#     + APPEND, Continue logging after the old Test report information if 
-#           report exist.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport    # Possible values are: 
-                              # 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES         # Possible values: YES or NO
-
-TestReportFilePath= C:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT         # Possible values: TXT or HTML
-TestReportOutput= FILE        # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= APPEND # Possible values: OVERWRITE or APPEND
-UITestingSupport= Yes
-SeparateProcesses= YES
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\VCXConnUtilTestSNAP.cfg
-TestCaseFile= c:\testframework\VCXConnUtilTestMasterAndSlave.cfg
-TestCaseFile= c:\testframework\VCXConnUtilTestStates.cfg
-[End_Module]
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#     + YES, Event ranking number added to each line in log file(s). Ranking number 
-#       depends on environment's tics, for example(includes time stamp also)
-#       '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-#	- Will write log file in unicode format.
-#		+ YES, Log file will be written in unicode format
-#		+ NO, Log will be written as normal, not unicode, file.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
-
-CreateLogDirectories= YES    # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML         # Possible values: TXT or HTML
-#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
-
-#HardwareBasePath=  C:\
-#HardwareFormat= TXT			# Possible values: TXT or HTML
-#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
-
-FileCreationMode= APPEND  # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES      # Possible values: YES or NO
-#WithTimeStamp= YES          # Possible values: YES or NO
-#WithLineBreak= YES          # Possible values: YES or NO
-#WithEventRanking= YES       # Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/tsrc/testing/ini/99-Stress/TestFramework.ini	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-#
-# This is STIFTestFramework initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-# - Set Test Reporting mode. TestReportMode's possible values are:
-#     + 'Summary': Summary of the tested test cases.
-#     + 'Environment': Hardware and software info.
-#     + 'TestCases': Test case report.
-#     + 'FullReport': Set of all above ones.
-#     + Example 'TestReportMode= Summary TestCases'
-#
-#     - CreateTestReport setting controls report creation mode
-#     + YES, Test report will created.
-#     + NO, No Test report.
-#
-#     - File path indicates the base path of the test report.
-#     - File name indicates the name of the test report.
-#
-#     - File format indicates the type of the test report.
-#     + TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#     + HTML, Test report will be html type, for example 'TestReport.html'.
-#
-#     - File output indicates output source of the test report.
-#     + FILE, Test report logging to file.
-#     + RDEBUG, Test report logging to using rdebug.
-#
-#     - File Creation Mode indicates test report overwriting if file exist.
-#     + OVERWRITE, Overwrites if the Test report file exist.
-#     + APPEND, Continue logging after the old Test report information if
-#           report exist.
-
-[Engine_Defaults]
-
-TestReportMode= FullReport    # Possible values are:
-                              # 'Summary', 'Environment', 'TestCases' or 'FullReport'
-
-CreateTestReport= YES         # Possible values: YES or NO
-
-TestReportFilePath= c:\Logs\Fusion\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT         # Possible values: TXT or HTML
-TestReportOutput= FILE        # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE    # Possible values: OVERWRITE or APPEND
-UITestingSupport= Yes
-SeparateProcesses= YES
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= testsdkvolumecontroltestsdkvolumecontroltestsdkvolumecontrol
-# Modules might have initialisation file, specified as
-# IniFile= YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= NormalCases.txt
-# TestCaseFile= SmokeCases.txt
-# TestCaseFile= ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestStressAsync.cfg
-TestCaseFile= c:\TestFramework\VCXServiceManagementApiTestStressSync.cfg
-[End_Module]
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-#Load testmoduletestsdkvolumecontrol, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuletestsdkvolumecontrol used initialization file
-#IniFile= init.txt
-
-#TestModuletestsdkvolumecontrol used configuration file(s)
-#TestCaseFile= testcases1.cfg
-#TestCaseFile= testcases2.cfg
-#TestCaseFile= manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIFTestFramework logging overwrite parameters for Logger.
-# Hardware and emulator environment logging path and styles can
-# be configured from here to overwrite the Logger's implemented values.
-#
-# Settings description:
-# - Indicates option for creation log directory/directories. If log directory/directories
-#       is/are not created by user they will make by software.
-#     + YES, Create log directory/directories if not allready exist.
-#     + NO, Log directory/directories not created. Only created one is used.
-#
-# - Overwrite emulator path setting.
-#     + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-#       Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#       will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-# - Overwrite emulator's logging format.
-#     + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#     + HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-# - Overwrited emulator logging output source.
-#     + FILE, Logging to file(s).
-#     + RDEBUG, Logging to using rdebug(s).
-#
-# - Overwrite hardware path setting (Same description as above in emulator path).
-# - Overwrite hardware's logging format(Same description as above in emulator format).
-# - Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-# - File Creation Mode indicates file overwriting if file exist.
-#     + OVERWRITE, Overwrites if file(s) exist.
-#     + APPEND, Continue logging after the old logging information if file(s) exist.
-#
-# - Will thread id include to the log filename.
-#     + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#     + NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-# - Will time stamps include the to log file.
-#     + YES, Time stamp added to each line in log file(s). Time stamp is
-#       for example'12.Nov.2003 115958 LOGGING INFO'
-#     + NO, No time stamp(s).
-#
-# - Will line breaks include to the log file.
-#     + YES, Each logging event includes line break and next log event is in own line.
-#     + NO, No line break(s).
-#
-# - Will event ranking include to the log file.
-#     + YES, Event ranking number added to each line in log file(s). Ranking number
-#       depends on environment's tics, for example(includes time stamp also)
-#       '012   12.Nov.2003 115958    LOGGING INFO'
-#     + NO, No event ranking.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-
-CreateLogDirectories= YES    # Possible values: YES or NO
-
-EmulatorBasePath= C:\LOGS\TestFramework\
-EmulatorFormat= HTML         # Possible values: TXT or HTML
-EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML        # Possible values: TXT or HTML
-#HardwareOutput= FILE        # Possible values: FILE or RDEBUG
-
-FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES      # Possible values: YES or NO
-#WithTimeStamp= YES          # Possible values: YES or NO
-#WithLineBreak= YES          # Possible values: YES or NO
-#WithEventRanking= YES       # Possible values: YES or NO
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/tools/builder.pl	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,303 @@
+use Cwd; # for cwd
+
+my $debug = 0;
+my $allowRun = 1;
+my $optionClean = 1;
+my $optionBuild = 1;
+my $optionFusion = 1;
+my $optionEngineTests = 1;
+my $optionUnitTests = 1;
+my $optionPlatform = "";
+
+########################################
+# BUILD LISTS
+#
+
+my @fusionComponents = ( 
+		"videoutils\\group",
+		"videoplayer\\group"
+	);
+
+my @engineTests = (
+		"videoutils\\tsrc\\group",
+		"videoplayer\\tsrc\\group"
+	);
+
+my @unitTests = (
+		"videoplayer\\videoplayback\\videohelix\\tsrc\\ut_videohelixtest\\group",
+		"videoplayer\\videoplayback\\videoplaybackcontrols\\tsrc\\videoplaybackcontrols_test\\group",
+		"videoplayer\\videoplayback\\videoplaybackviews\\tsrc\\ut_userinputhandlertest\\group",
+		"videoplayer\\videoplayerapp\\mpxvideoplayer\\tsrc\\ut_mpxvideoplayertest\\group",
+		"videoplayer\\videocollection\\hgmyvideos\\tsrc\\ut_vcxhgmyvideosmainview\\group"
+	);
+
+########################################
+# PARSE ARGUMENTS
+#
+
+while(scalar(@ARGV) >= 1)
+{
+	my $argument = shift(@ARGV);
+
+	if($argument eq "-nobuild")
+	{
+		$optionBuild = 0;
+	}
+
+	elsif($argument eq "-noclean")
+	{
+		$optionClean = 0;
+	}
+
+	elsif($argument eq "-nounit")
+	{
+		$optionUnitTests = 0;
+	}
+	
+	elsif($argument eq "-noengine")
+	{
+		$optionEngineTests = 0;
+	}
+
+	elsif($argument eq "-nofusion")
+	{
+		$optionFusion = 0;
+	}
+	
+	elsif($argument eq "-platform")
+	{
+		$optionPlatform = shift(@ARGV);
+	}
+
+	elsif($argument eq "-debug")
+	{
+		$debug = 1;
+	}
+
+	elsif($argument eq "-norun")
+	{
+		$allowRun = 0;
+	}
+	
+	elsif($argument eq "-help")
+	{
+		ShowHelp();
+	}
+	
+	else
+	{
+		ShowHelp();
+	}
+}
+
+########################################
+# MAIN FUNCTION
+#
+
+my $basepath = FindBasePath();
+exit("NO VIDEOAPP_DOMAIN FOLDER FOUND") if $basepath eq "";
+
+if ( $optionClean )
+{
+	if ( $optionFusion )
+	{
+		foreach my $component ( @fusionComponents )
+		{
+		    Clean( $basepath, $component, $optionPlatform, 0 );
+		}
+	}
+		
+	if ( $optionEngineTests )
+	{
+		foreach my $component ( @engineTests )
+		{
+		    Clean( $basepath, $component, $optionPlatform, 1 );
+		}
+	}
+		
+	if ( $optionUnitTests )
+	{
+		# Clean all unit tests
+		foreach my $component ( @unitTests )
+		{
+		    Clean( $basepath, $component, $optionPlatform, 1 );
+		}
+	}
+}
+
+if ( $optionBuild )
+{
+	if ( $optionFusion )
+	{
+		foreach my $component ( @fusionComponents )
+		{
+		    Build( $basepath, $component, $optionPlatform, 0 );
+		}
+	}
+		
+	if ( $optionEngineTests )
+	{
+		# Clean all engine tests
+		foreach my $component ( @engineTests )
+		{
+		    Build( $basepath, $component, $optionPlatform, 1 );
+		}
+	}
+		
+	if ( $optionUnitTests )
+	{
+		# Clean all unit tests
+		foreach my $component ( @unitTests )
+		{
+		    Build( $basepath, $component, $optionPlatform, 1 );
+		}
+	}
+}
+
+########################################
+# FindBasePath
+#
+
+sub FindBasePath
+{
+	print ">> FindBasePath\n" if $debug;
+	$currpath = cwd;
+	$basepath = "";
+	my $domain = "VideoApp_Domain";
+	
+	my $pos = rindex( $currpath, $domain );
+	
+	if( $pos != -1 )
+	{
+		$basepath = "\\" . substr( $currpath, 3, $pos + length( $domain ) - 3 );
+		$basepath =~ s/\//\\/g;
+	  print "BASEPATH FOUND: $basepath\n" if $debug;
+	}
+	
+	print "<< FindBasePath (" . $basepath . ")\n" if $debug;
+	return $basepath;
+}
+
+########################################
+# Clean
+#
+
+sub Clean
+{
+	my ( $baseDir, $destDir, $optionPlatform, $isTestComponent ) = @_;
+	print ">>> CLEAN ${baseDir}\\${destDir}\\bld.inf FOR $optionPlatform\n" if $debug;
+	print "##\n#\n# CLEANING ${baseDir}\\${destDir}\n#\n##\n";
+	
+	my $cmd = "";
+	
+	if( $isTestComponent )
+	{
+		if( $optionPlatform eq "" ) # platform not given, clean armv5.test and winscw.test
+		{
+			$cmd = "sbs reallyclean -b ${baseDir}\\${destDir}\\bld.inf -c winscw.test";
+			print $cmd . "\n" if $debug;
+			system($cmd) if $allowRun;
+			$cmd = "sbs reallyclean -b ${baseDir}\\${destDir}\\bld.inf -c armv5.test";
+			print $cmd . "\n" if $debug;
+			system($cmd) if $allowRun;
+		}
+		else # platform is given, run clean only for that
+		{
+			$cmd .= "sbs reallyclean -b ${baseDir}\\${destDir}\\bld.inf -c ${optionPlatform}\.test";
+			print $cmd . "\n" if $debug;
+			system($cmd) if $allowRun;
+		}
+	}
+	else # is not testcomponent
+	{
+		$cmd .= "sbs reallyclean -b ${baseDir}\\${destDir}\\bld.inf";
+		$cmd .= " -c $optionPlatform" if $optionPlatform ne "";
+		print $cmd . "\n" if $debug;
+		system($cmd) if $allowRun;
+	}
+	print "<<< CLEAN\n" if $debug;
+}
+
+########################################
+# Build
+#
+
+sub Build
+{
+	my ( $baseDir, $destDir, $optionPlatform, $isTestComponent ) = @_;
+	print ">>> BUILD ${baseDir}\\${destDir}\\bld.inf FOR $optionPlatform\n" if $debug;
+	print "##\n#\n# BUILDING ${baseDir}\\${destDir}\n#\n##\n";
+	#my $cmd = "sbs -b ${baseDir}\\${destDir}\\bld.inf";
+	#$cmd .= " -c $optionPlatform" if $optionPlatform ne "";
+	#$cmd .= ".test" if $isTestComponent;
+	#print $cmd . "\n" if $debug;
+	#system($cmd) if $allowRun;
+	
+	my $cmd = "";
+	
+	if( $isTestComponent )
+	{
+		if( $optionPlatform eq "" ) # platform not given, clean armv5.test and winscw.test
+		{
+			$cmd = "sbs -b ${baseDir}\\${destDir}\\bld.inf -c winscw.test";
+			print $cmd . "\n" if $debug;
+			system($cmd) if $allowRun;
+			$cmd = "sbs -b ${baseDir}\\${destDir}\\bld.inf -c armv5.test";
+			print $cmd . "\n" if $debug;
+			system($cmd) if $allowRun;
+		}
+		else # platform is given, run clean only for that
+		{
+			$cmd .= "sbs -b ${baseDir}\\${destDir}\\bld.inf -c ${optionPlatform}\.test";
+			print $cmd . "\n" if $debug;
+			system($cmd) if $allowRun;
+		}
+	}
+	else # is not testcomponent
+	{
+		$cmd .= "sbs -b ${baseDir}\\${destDir}\\bld.inf";
+		$cmd .= " -c $optionPlatform" if $optionPlatform ne "";
+		print $cmd . "\n" if $debug;
+		system($cmd) if $allowRun;
+	}
+	
+	print "<<< BUILD\n" if $debug;
+}
+
+#------------------------------------------------------------------------------------
+# ShowHelp
+#------------------------------------------------------------------------------------
+sub ShowHelp {
+
+print <<USAGE_EOF;
+builder.pl
+
+This script will search the VideoApp_Domain root folder from current path.
+if the root folder is not found, the script will exit. In any other case,
+it builds all components.
+
+Options:
+
+-platform   wanted platform
+-noclean    no clean.
+-nobuild    no build.
+-nofusion   exclude fusion components.
+-noengine   exclude engine tests.
+-nounit     exclude unit tests.
+-debug      show debug message
+-norun      do not run, for debugging purposes
+-help       You're reading it.
+
+Examples:
+
+builder.pl -nobuild -platform armv5_udeb
+	This will clean all the armv5_udeb components without building them.
+
+builder.pl -noclean -nofusion -noengine -platform armv5_udeb
+	This will build only unit tests without cleaning them first.
+
+USAGE_EOF
+
+	exit();
+
+};
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/testing/tools/siscreator.pl	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,354 @@
+use warnings;
+use Cwd; # for cwd
+use File::Copy;
+use File::Path;
+
+my $debug = 0;
+my $allowRun = 1;
+my $relType = "";
+my $sisPath = "videoplayer\\tsrc\\testing\\sis";
+my $certFile = "Nokia_RnDCert_02\.der";
+my $keyFile = "Nokia_RnDCert_02\.key";
+my $comment = ";TEMPCOMMENT ";
+
+
+########################################
+# PKG LISTS
+#
+
+my @engineTests = (
+		"videoplayer\\tsrc\\testing\\sis\\fusion_engine_tests.pkg",
+		"videoplayer\\mediasettings\\mediasettingsengine\\tsrc\\mediasettingsenginetest\\group\\mpxmediasettingsenginetest.pkg",
+		"videoplayer\\mediasettings\\videoplayersettingsengine\\tsrc\\vpsettingsenginetest\\group\\vcxnssettingsenginetest.pkg",
+		"videoplayer\\videocollection\\mpxmyvideoscollection\\tsrc\\mpxmvcolltest\\group\\VCXMyVideosCollectionPluginTest.pkg",
+		"videoplayer\\videoplayer_plat\\videoplayer_startup_api\\tsrc\\group\\VideoPlayerStartupApiTest.pkg",
+		"videoplayer\\videoplayer_plat\\video_player_file_details_dialog_api\\tsrc\\group\\ui_FileDetailsDialogtest.pkg",
+		"videoutils\\videoutils_plat\\videoscheduler_api\\tsrc\\group\\videoscheduler_apitest.pkg",
+		"videoutils\\videoutils_plat\\videoconnutility_api\\tsrc\\group\\videoconnutility_apitest.pkg"
+	);
+
+my @unitTests = (
+		"videoplayer\\videoplayback\\videohelix\\tsrc\\ut_videohelixtest\\group\\videohelixtest.pkg",
+		"videoplayer\\videoplayback\\videoplaybackcontrols\\tsrc\\videoplaybackcontrols_test\\group\\videoplaybackcontrolstest.pkg",
+		"videoplayer\\videoplayback\\videoplaybackviews\\tsrc\\ut_userinputhandlertest\\group\\userinputhandlertest.pkg",
+		"videoplayer\\videoplayerapp\\mpxvideoplayer\\tsrc\\ut_mpxvideoplayertest\\group\\mpxvideoplayertest.pkg",
+		"videoplayer\\videocollection\\hgmyvideos\\tsrc\\ut_vcxhgmyvideosmainview\\group\\VcxHgMyVideosMainViewTest.pkg"
+	);
+
+########################################
+# PARSE ARGUMENTS
+#
+
+while(scalar(@ARGV) >= 1)
+{
+	my $argument = shift(@ARGV);
+
+	if($argument eq "-sispath")
+	{
+		$sisPath = shift();
+	}
+
+	elsif($argument eq "-type")
+	{
+		$relType = shift();
+	}
+	
+	elsif($argument eq "-norun")
+	{
+		$allowRun = 0;
+	}
+	
+	elsif($argument eq "-debug")
+	{
+		$debug = 1;
+	}
+	
+	elsif($argument eq "-help")
+	{
+		ShowHelp();
+	}
+	
+	else
+	{
+		ShowHelp();
+	}
+}
+
+########################################
+# MAIN FUNCTION
+#
+
+my $basepath = FindBasePath();
+die("NO VIDEOAPP_DOMAIN FOLDER FOUND") if $basepath eq "";
+
+print "CREATING ${basepath}\\${sisPath}\n" if $debug;
+mkpath("${basepath}\\${sisPath}");
+
+# if sispath doesn't contain files for signing, then search them under basepath
+if ( !-e "${basepath}\\${sisPath}\\${certFile}" and !-e "${basepath}\\${sisPath}\\${keyFile}" )
+{
+	my @certfiles;
+	FindFiles($basepath, $certFile, 1, \@certfiles);
+	die("No $certFile found under ${basepath} !\n") if ( !$certfiles[0] );
+	my @keyfiles;
+	FindFiles($basepath, $keyFile, 1, \@keyfiles);
+	die("No $keyFile found under ${basepath} !\n") if ( !$keyfiles[0] );
+
+	print "COPYING $keyfiles[0] TO ${basepath}\\${sisPath}\\${keyFile}\n" if $debug;
+	copy( $keyfiles[0], "${basepath}\\${sisPath}\\${keyFile}" ) if $allowRun;
+
+	print "COPYING $keyfiles[0] TO ${basepath}\\${sisPath}\\${certFile}\n" if $debug;
+	copy( $certfiles[0], "${basepath}\\${sisPath}\\${certFile}" ) if $allowRun;
+}
+
+die("No $certFile found in ${basepath}\\${sisPath}\n") if ( !-e "${basepath}\\${sisPath}\\${certFile}" );
+die("No $keyFile found in ${basepath}\\${sisPath}\n") if ( !-e "${basepath}\\${sisPath}\\${keyFile}" );
+
+foreach my $pkg ( @engineTests )
+{
+    CreateSis( $basepath, $pkg, $sisPath, $relType );
+}
+
+foreach my $pkg ( @unitTests )
+{
+    CreateSis( $basepath, $pkg, $sisPath, $relType );
+}
+
+########################################
+# FindBasePath
+#
+
+sub FindBasePath
+{
+	print ">> FindBasePath\n" if $debug;
+	$currpath = cwd;
+	$basepath = "";
+	my $domain = "VideoApp_Domain";
+	
+	my $pos = rindex( $currpath, $domain );
+	
+	if( $pos != -1 )
+	{
+		$basepath = "\\" . substr( $currpath, 3, $pos + length( $domain ) - 3 );
+		$basepath =~ s/\//\\/g;
+	  print "BASEPATH FOUND: $basepath\n" if $debug;
+	}
+	
+	print "<< FindBasePath (" . $basepath . ")\n" if $debug;
+	return $basepath;
+}
+
+########################################
+# CreateSis
+#
+
+sub CreateSis
+{
+	my ( $baseDir, $pkgPath, $targetDir, $relType ) = @_;
+	print ">>> CREATESIS\n" if $debug;
+	my $cmd = "";
+	print "baseDir: $baseDir\n" if $debug;
+	print "pkgPath: $pkgPath\n" if $debug;
+	print "targetDir: $targetDir\n" if $debug;
+	
+	my $pos = rindex( $pkgPath, '\\' );
+	print "rindex: $pos\n" if $debug;
+	
+	my $temppath = substr( $pkgPath, 0, $pos );
+	my $filename = substr( $pkgPath, $pos + 1, -4 );
+	
+	# add type to the end of the filename
+	my $relfilename = $filename;
+	if( $relType ne "" )
+	{
+		$relfilename .= "_" . $relType;
+	}
+	
+	print "path: $temppath\n" if $debug;
+	print "file: $filename\n" if $debug;
+	print "relfile: $relfilename\n" if $debug;
+	
+
+	chdir("${basepath}\\${temppath}");
+	
+	AddComment( "${filename}.pkg" ) if $allowRun;
+	if( $relType ne "" )
+	{
+		print "\nCREATE TEMPORARY PKG\n\n" if $debug;
+		CreatePkg( $filename, $relType );
+	}
+	$cmd = "call makesis ${relfilename}\.pkg ${relfilename}\.sis";	
+	print $cmd . "\n" if $debug;
+	system($cmd) if $allowRun;
+	RemComment( "${filename}.pkg" ) if $allowRun;
+	copy( "${relfilename}\.sis", "${baseDir}\\${targetDir}\\${relfilename}\.sis" ) if $allowRun;
+	chdir("${baseDir}\\${targetDir}");
+	$cmd = "signsis ${relfilename}\.sis ${relfilename}\.sisx Nokia_RnDCert_02.der Nokia_RnDCert_02.key";
+	system($cmd) if $allowRun;
+	unlink ( "${relfilename}\.sis" ) if $allowRun;
+	print "<<< CREATESIS\n" if $debug;
+}
+
+	
+########################################
+# AddComment
+#
+
+sub AddComment
+{
+	my ($file) = @_;
+	
+	open(FILE_HANDLE, $file) or die ("Could not read file '$file'\n");
+	my @lines = <FILE_HANDLE>;
+	close(FILE_HANDLE);
+	    
+  open(FILE_HANDLE, ">$file") or die ("Could not write file '$file'\n");
+  foreach my $line ( @lines )
+  {
+	  if( $line =~ /\.\.\/init\/testframework\.ini/i or $line =~ /\/cccccc00\.cre/i or
+	      $line =~ /\.\.\\init\\testframework\.ini/i or $line =~ /\\cccccc00\.cre/i )
+	  {
+	    if( $line !~ /$comment/ )
+	    {
+	    	print $line . "\n" if $debug;
+				$line = $comment . $line;
+				print $line . "\n" if $debug;
+			}
+	  }
+	  print FILE_HANDLE $line;
+  }	    
+  close(FILE_HANDLE);
+}
+
+########################################
+# RemComment
+#
+
+sub RemComment
+{
+	my ($file) = @_;
+	
+	open(FILE_HANDLE, $file) or die ("Could not read file '$file'\n");
+	my @lines = <FILE_HANDLE>;
+	close(FILE_HANDLE);
+	    
+  open(FILE_HANDLE, ">$file") or die ("Could not write file '$file'\n");
+  foreach my $line ( @lines )
+  {
+	  if( $line =~ /\.\.\/init\/testframework\.ini/i or $line =~ /\/cccccc00\.cre/i or
+	      $line =~ /\.\.\\init\\testframework\.ini/i or $line =~ /\\cccccc00\.cre/i )
+	  {
+	    if( $line =~ /$comment/ )
+	    {
+	    	print $line . "\n" if $debug;
+	    	$line = substr( $line, length( $comment ) );
+	    	print $line . "\n" if $debug;
+	    }
+	  }
+	  print FILE_HANDLE $line;
+  }	    
+  close(FILE_HANDLE);
+}
+
+########################################
+# CreatePkg
+#
+
+sub CreatePkg
+{
+	my ($file, $type) = @_;
+	
+	open(FILE_HANDLE, "${file}\.pkg") or die ("Could not read file '${file}\.pkg'\n");
+	my @lines = <FILE_HANDLE>;
+	close(FILE_HANDLE);
+
+	my $currenttype = "";
+  open(FILE_HANDLE, ">${file}_${type}\.pkg") or die ("Could not write file '${file}_${type}\.pkg'\n");
+  foreach my $line ( @lines )
+  {
+	  if( $line =~ /\/armv5\/(\w+)\//i )
+	  {
+	  	$currenttype = $1;
+	  	if( $currenttype ne $type )
+	  	{
+	  		print $line if $debug;
+	  		$line =~ s/\/$currenttype\//\/$type\//;
+	  		print $line if $debug;
+	  	}
+	  }
+	  print FILE_HANDLE $line;
+  }	    
+  close(FILE_HANDLE);
+}
+
+#------------------------------------------------------------------------------------
+# FindFiles
+# Parameters:
+#	$goDir, where to start finding
+#	$fileSearch, filename search
+#	$searchType, 0 = fullname search, 1 = filetype search
+#	$refIncfiles, reference to array which will hold found files
+#------------------------------------------------------------------------------------
+sub FindFiles
+{
+	my ($godir, $fileSearch, $searchType, $refIncfiles) = @_;
+
+	my $startDir = cwd;
+
+	chdir($godir) or die("Could not change dir to $godir");
+
+	#print("Now in: " . cwd . "\n");
+
+	opendir(DIR, ".");
+	my @filelist = sort(readdir(DIR));
+	closedir(DIR);
+
+	foreach my $file(@filelist)
+	{
+		if($file eq "." or $file eq "..") {next};
+
+		if (-d $file)
+		{
+		 	FindFiles( $file, $fileSearch, $searchType, $refIncfiles);
+		} else
+		{
+			if( ($file =~ m/$fileSearch/i and $searchType == 0 ) or ($file =~ m/$fileSearch$/i and $searchType == 1 ) )
+			{
+				$file = cwd . "/" . $file;
+				push @$refIncfiles, $file;
+				#print("$file\n");
+				;
+			}
+		}
+	}
+
+	chdir ($startDir) or die("Could not change dir to $startDir");
+}
+
+#------------------------------------------------------------------------------------
+# ShowHelp
+#------------------------------------------------------------------------------------
+sub ShowHelp {
+
+print <<USAGE_EOF;
+siscreator.pl
+
+This script will search the VideoApp_Domain root folder from current path.
+if the root folder is not found, the script will exit. In any other case,
+it creates sis packages for components. 
+
+Default path for sis-files is /videoplayer/tsrc/testing/sis.
+
+Options:
+
+-sispath    path under videoapp_domain to copy sis files
+-type       wanted sisx type, urel or udeb
+-debug      show debug message
+-norun      do not run, for debugging purposes
+-help       You're reading it.
+
+USAGE_EOF
+
+	exit();
+
+};
\ No newline at end of file
--- a/tsrc/testing/tools/testdoc.pl	Tue May 11 16:15:40 2010 +0300
+++ b/tsrc/testing/tools/testdoc.pl	Tue May 25 12:44:54 2010 +0300
@@ -110,7 +110,7 @@
 my @caseDescs; # case description and the case itself in text
 my @notDocumentedCases; #array to hold information about the cases without documentation
 
-$regexpCaseName = '[\x3C\x3E\(\)\w.,\/:_\-&\' ]+';
+$regexpCaseName = '[\x3C\x3E\(\)\[\]\w.,\/:_\-&\' ]+';
 
 my $caseDefaultStatus = 			"NOT RUN";
 
--- a/videocollection/hgmyvideos/data/vcxhgmyvideos.rss	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/data/vcxhgmyvideos.rss	Tue May 25 12:44:54 2010 +0300
@@ -106,18 +106,6 @@
             command = EVcxHgMyVideosCmdDeleteMarked;
             txt = qtn_iptv_delete_video_clip;
             },
-        MENU_ITEM
-            {
-            command = EVcxHgMyVideosCmdResumeDownload; 
-            txt = qtn_iptv_resume_download;
-            flags = EEikMenuItemSpecific;
-            },    
-        MENU_ITEM 
-            { 
-            command = EVcxHgMyVideosCmdCancelDownload;
-            txt = qtn_iptv_cancel_download;
-            flags = EEikMenuItemSpecific;
-            },
         MENU_ITEM 
             { 
             command = EVcxHgMyVideosCmdVideoDetails;
@@ -792,24 +780,6 @@
 RESOURCE TBUF r_vcxhgmyvideos_video_list_length_h_min { buf = qtn_iptv_video_list_length_full; }
 
 // -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-RESOURCE TBUF r_vcxhgmyvideos_video_downloading { buf = qtn_iptv_video_downloading; }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-RESOURCE TBUF r_vcxhgmyvideos_download_failed { buf = qtn_iptv_download_failed; }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//  
-RESOURCE TBUF r_vcxhgmyvideos_download_paused { buf = qtn_iptv_download_paused; }
-
-// -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
--- a/videocollection/hgmyvideos/group/vcxhgmyvideos.mmp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/group/vcxhgmyvideos.mmp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version: e92_30 %
+// Version : %version: 31 %
 
 #include <platform_paths.hrh>
 #include <bldvariant.hrh>
@@ -45,7 +45,6 @@
 SOURCE                  vcxhgmyvideosvideodataupdater.cpp
 SOURCE                  vcxhgmyvideosvideodata.cpp
 SOURCE                  vcxhgmyvideosvideolistitem.cpp
-SOURCE                  vcxhgmyvideosdownloadupdater.cpp
 SOURCE                  vcxhgmyvideosfulldrminfo.cpp
 SOURCE                  vcxhgmyvideosmemorystatus.cpp
 SOURCE                  vcxhgmyvideosindicatorhelper.cpp
--- a/videocollection/hgmyvideos/icons/qgn_prop_mtv_prog_clip.svg	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 57 49">
-<g>
-<rect fill="none" width="57" height="49"/>
-<g>
-<g>
-<polygon points="46.238,43.598 4.997,43.598 4.997,10.992 46.228,10.994    "/>
-<g>
-<polygon fill="#B2B2B2" points="44.428,17.543 44.428,41.768 6.791,41.768 6.791,36.24     "/>
-<polygon fill="#D9D9D9" points="44.369,17.854 44.369,12.662 6.846,12.662 6.846,36.552     "/>
-<polygon fill="#8A8A8A" points="44.369,12.055 44.369,41.688 6.813,41.688 6.813,42.395 45.077,42.395 45.077,12.055     "/>
-<polygon fill="#F5F5F5" points="44.369,12.055 6.138,12.055 6.138,42.395 6.846,42.395 6.846,12.76 44.369,12.76     "/>
-<rect x="18.815" y="37.402" fill="#595959" width="2.897" height="2.875"/>
-<polygon points="21.758,36.75 18.172,36.75 18.172,40.322 18.881,40.322 18.881,37.456 21.758,37.456     "/>
-<polygon fill="#F5F5F5" points="21.713,36.75 21.713,40.277 18.172,40.277 18.172,40.982 22.42,40.982 22.42,36.75     "/>
-<rect x="29.445" y="37.402" fill="#595959" width="2.889" height="2.875"/>
-<polygon points="32.367,36.75 28.793,36.75 28.793,40.313 29.5,40.313 29.5,37.456 32.367,37.456     "/>
-<polygon fill="#F5F5F5" points="32.334,36.75 32.334,40.277 28.793,40.277 28.793,40.982 33.042,40.982 33.042,36.75     "/>
-<rect x="40.055" y="37.391" fill="#595959" width="2.898" height="2.887"/>
-<polygon points="42.996,36.75 39.412,36.75 39.412,40.322 40.12,40.322 40.12,37.456 42.996,37.456     "/>
-<polygon fill="#F5F5F5" points="42.953,36.75 42.953,40.277 39.412,40.277 39.412,40.982 43.66,40.982 43.66,36.75     "/>
-<rect x="8.195" y="37.402" fill="#595959" width="2.899" height="2.875"/>
-<polygon points="11.126,36.75 7.554,36.75 7.554,40.313 8.262,40.313 8.262,37.456 11.126,37.456     "/>
-<polygon fill="#F5F5F5" points="11.095,36.75 11.095,40.277 7.554,40.277 7.554,40.982 11.803,40.982 11.803,36.75     "/>
-<rect x="18.826" y="14.13" fill="#595959" width="2.887" height="2.864"/>
-<polygon points="21.747,13.467 18.172,13.467 18.172,17.027 18.881,17.027 18.881,14.172 21.747,14.172     "/>
-<polygon fill="#F5F5F5" points="21.713,13.467 21.713,16.994 18.172,16.994 18.172,17.699 22.42,17.699 22.42,13.467     "/>
-<rect x="29.435" y="14.106" fill="#595959" width="2.899" height="2.888"/>
-<polygon points="32.367,13.467 28.793,13.467 28.793,17.039 29.5,17.039 29.5,14.172 32.367,14.172     "/>
-<polygon fill="#F5F5F5" points="32.334,13.467 32.334,16.994 28.793,16.994 28.793,17.699 33.042,17.699 33.042,13.467     "/>
-<rect x="40.076" y="14.106" fill="#595959" width="2.877" height="2.888"/>
-<polygon points="42.986,13.467 39.412,13.467 39.412,17.039 40.12,17.039 40.12,14.172 42.986,14.172     "/>
-<polygon fill="#F5F5F5" points="42.953,13.467 42.953,16.994 39.412,16.994 39.412,17.699 43.66,17.699 43.66,13.467     "/>
-<rect x="8.195" y="14.118" fill="#595959" width="2.899" height="2.876"/>
-<polygon points="11.126,13.467 7.554,13.467 7.554,17.039 8.262,17.039 8.262,14.172 11.126,14.172     "/>
-<polygon fill="#F5F5F5" points="11.095,13.467 11.095,16.994 7.554,16.994 7.554,17.699 11.803,17.699 11.803,13.467     "/>
-</g>
-</g>
-<g>
-<polygon fill="#00395D" points="30.344,34.621 25.454,32.046 20.558,34.617 21.494,29.17 17.537,25.309 23.008,24.515      25.456,19.559 27.901,24.516 33.371,25.314 29.412,29.17    "/>
-<polygon fill="#2882C8" points="22.55,31.879 22.972,29.424 23.105,28.645 22.542,28.096 20.76,26.357 23.223,25.999      24.004,25.886 24.353,25.178 25.455,22.947 26.557,25.18 26.905,25.888 27.684,26.001 30.146,26.359 28.365,28.096 27.8,28.645      27.933,29.422 28.354,31.877 26.154,30.719 25.455,30.351 24.757,30.719 22.55,31.879    "/>
-</g>
-</g>
-</g>
-</svg>
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh	Tue May 25 12:44:54 2010 +0300
@@ -24,10 +24,8 @@
     {
     EVcxHgMyVideosCmdPlay = 700,             // Play video
     EVcxHgMyVideosCmdOpen,                   // Open video view
-    EVcxHgMyVideosCmdDelete,                 // Delete video (only for complete files)
-    EVcxHgMyVideosCmdDeleteMarked,           // Delete video (only for complete files)
-    EVcxHgMyVideosCmdResumeDownload,         // Resume download (only for downloads)
-    EVcxHgMyVideosCmdCancelDownload,         // Cancel download (only for downloads)
+    EVcxHgMyVideosCmdDelete,                 // Delete video
+    EVcxHgMyVideosCmdDeleteMarked,           // Delete video
     EVcxHgMyVideosCmdVideoDetails,           // Video details
     EVcxHgMyVideosCmdShowViaHomenet,         // Show video via Homenet (UPnP renderer)
     EVcxHgMyVideosCmdStopShowViaHomenet,     // Stop show via Homenet
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelhandler.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelhandler.h	Tue May 25 12:44:54 2010 +0300
@@ -44,6 +44,10 @@
     TVcxHgMyVideosCategoryItemTypeUrl
     };
 
+// CONSTANTS
+const TInt KMyVideosTitleStringMaxLength = 256;
+const TInt KMyVideosTitleUrlMaxLength    = 256;
+
 // CLASS DECLARATION
 
 /**
@@ -164,14 +168,6 @@
         void CategoryModifiedL( TMPXChangeEventType aEventType,
                                 TMPXItemId& aMpxItemId );
         
-        /*
-         * Called when a single video item has been fetched.
-         * Ownership of video is transferred.
-         * 
-         * @param aVideo Video item.
-         */
-        void VideoFetchingCompletedL( CMPXMedia* aVideo );
-
         /**
          * Called when category list items have been fetched.
 		 */
@@ -272,10 +268,8 @@
         /**
          * Goes through given number of categories and
          * fills iCategoryIdArray from the accepted ones
-         *
-         * @param aCategoriesAvailable Number of categories
          */
-        void MakeCategoryIdArray( TInt aCategoriesAvailable );
+        void MakeCategoryIdArray();
         
         /**
          * Checks if the given category is accepted or not.
@@ -301,16 +295,15 @@
         CMPXMedia* GetCategoryDataL( TInt aCategoryId );
 		
         /**
-         * Gets the last watched videos data from collection.
-		 * Result is returned asynchronously to VideoFetchingCompletedL callback.
-         */
-		void FetchLastWatchedL();
-		
-        /**
          * Gets the last watched videos icon from tbn server.
 		 * Result is returned asynchronously to ThumbnailReady callback.
          */
         void LoadLastWatchedIconL();
+        
+        /**
+         * Clears the last watched videos icon and indicator.
+         */
+        void ClearLastWatchedIconL();
 
         /**
          * Set indicator for last watched item
@@ -378,12 +371,6 @@
         CMPXMediaArray* iCategoryList;
         
         /**
-         * Last watched media.
-         * Own.
-         */
-        CMPXMedia* iLastWatched;
-        
-        /**
          * TArray containing category ID's. Each index 
          * corresponds to the scroller list (eg. correct
          * category ID for the 1st item in scroller list can
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelobserver.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelobserver.h	Tue May 25 12:44:54 2010 +0300
@@ -65,14 +65,6 @@
         virtual void CategoryModifiedL( TMPXChangeEventType aEventType, 
                                         TMPXItemId& aMpxItemId ) = 0;
         
-        /*
-         * Called when a single video item has been fetched.
-         * Ownership of video is transferred.
-         * 
-         * @param aVideo Video item.
-         */
-        virtual void VideoFetchingCompletedL( CMPXMedia* aVideo ) = 0;
-        
         /**
          * Called when category list items have been fetched.
          */
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h	Tue May 25 12:44:54 2010 +0300
@@ -187,6 +187,14 @@
          * @param aMpxId MPX ID.
          */
         void GetVideoDetailsL( TMPXItemId& aMpxId );
+                
+        /**
+         * Sets new general flags to given MPX Media object.
+         * 
+         * @param aMpxItemId MpxId of media object for which flags are set.
+         * @param aFlags New flags to be set.         
+         */
+        void SetFlagsL( TMPXItemId aMpxItemId, TUint32 aFlags );
 
     public: // From MMPXCollectionObserver
 
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosdownloadupdater.h	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-/*
-* 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 the License "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:      Class for following and updating download progress.*
-*/
-
-
-
-
-#ifndef VCXHGMYVIDEOSDOWNLOADUPDATER_H
-#define VCXHGMYVIDEOSDOWNLOADUPDATER_H
-
-// INCLUDE FILES
-#include <e32std.h>
-#include <e32base.h>
-
-#include <mpxcollectionmessagedefs.h>
-
-class CVcxHgMyVideosVideoModelHandler;
-class CPeriodic;
-class CMPXMedia;
-class CMPXMediaArray;
-class CVcxHgMyVideosVideoList;
-
-/**
- * Follows and updates download progress.
- * 
- * @lib vcxhgmyvideos.lib 
- */
-NONSHARABLE_CLASS( CVcxHgMyVideosDownloadUpdater ) : public CBase
-    {
-    protected:
-
-        /**
-         * TDownloadItem
-         * Private inner class for storing polled downloads and their
-         * previous statuses and progresses.
-         */
-        class TDownloadItem
-            {
-            public:
-
-                /**
-                 * Mpx media object. 
-                 * Not own.
-                 */
-                CMPXMedia* iMedia;
-
-                /**
-                 * Old state, used for determine refresh need.
-                 */
-                TVcxMyVideosDownloadState iState;
-
-                /**
-                 * Old progress, used for determine refresh need.
-                 */
-                TUint32 iProgress;
-
-                /**
-                 * Flag for marking that progressive play possibility has been queried.
-                 * Status is followed only for items where query has been made before. 
-                 */
-                TBool iProgressivePlayQueried;
-                
-                /**
-                 * Previous response to CViaPlayerFileDetails::IsPlayPossible(). 
-                 */
-                TBool iIsPlayPossible;
-            };
-
-    public:
-    
-        /**
-         * Two-phased constructor.
-         * 
-         * @param aParent Parent class.
-         * @param aVideoArray Reference to video array.
-         */
-        static CVcxHgMyVideosDownloadUpdater* NewL(
-            CVcxHgMyVideosVideoModelHandler& aParent,
-            CVcxHgMyVideosVideoList& aVideoArray );
-
-        /**
-         * Destructor.
-         */
-        virtual ~CVcxHgMyVideosDownloadUpdater();
-    
-        /**
-         * Sets video download updater to pause or normal mode.
-         * 
-         * @param aPaused If ETrue, updater is paused.
-         */
-        void SetPausedL( TBool aPaused );
-
-        /**
-         * Removes the download from download array.
-         *
-         * @param aMpxItemId MPX item ID of media object.
-         */
-        void RemoveDownload( TMPXItemId aMpxItemId );
-        
-        /**
-         * Finds the download from download array.
-         * 
-         * @param aMedia MPX media object.
-         * @return Index of array or KErrNotFound.
-         */
-        TInt FindDownload( CMPXMedia* aMedia );
-        
-        /**
-         * Called to inform that array of videos has changed. Causes download
-         * data being re-setted to make sure correct downloads are followed.  
-         */
-        void VideoArrayChangedL();         
-        
-        /**
-         * Checks video data modifications and updates download array.
-         * 
-         * @param aEventType Event type, only expects EMPXItemModified.
-         * @param aMpxItemId MPX item ID of modified video.
-         * @param aExtraInfo Extra information for modification event.
-         */
-        void VideoModifiedL( TMPXChangeEventType aEventType,
-                             TMPXItemId aMpxItemId,
-                             TInt32 aExtraInfo );
-        
-        /**
-         * Checks if progressive play (playback during download) is possible
-         * for given video clip.
-         * 
-         * @param aIndex Video index on video array.
-         * @return ETrue if progressive play is possible.
-         */
-        TBool IsPlayPossible( TInt aIndex );
-
-        /**
-        * Periodic's callback.
-        */
-        static TInt Callback( TAny *aPtr );
-
-    protected:
-
-        CVcxHgMyVideosDownloadUpdater( 
-            CVcxHgMyVideosVideoModelHandler& aParent,
-            CVcxHgMyVideosVideoList& aVideoArray );                
-
-        void ConstructL();
-
-        /**
-         * Makes sure that timer that is following download is running, and runs
-         * only when it is needed.
-         */
-        void ContinueToFollowDownloads();        
-        
-        /**
-         * Resets the list of downloads to follow based on new video array.
-         */
-        void ResetDownloadsToFollowL();
-
-        /**
-         * Update the downloads.
-         */
-        void UpdateDownloadsL();
-
-        /**
-         * Update given download if it's status has changed.
-         * 
-         * @param aItem Download item.
-         */
-        void UpdateDownloadL( TDownloadItem& aItem );        
-
-    protected: // data
-
-        /**
-         * Parent class.
-         */
-        CVcxHgMyVideosVideoModelHandler& iParent;
-        
-        /**
-         * CPeriodic. 
-         * Own.
-         */
-        CPeriodic* iTimer;
-
-        /**
-         * Reference to array of videos.
-         * Not own.
-         */
-        CVcxHgMyVideosVideoList& iVideoArray;
-
-        /**
-         * Flag for pause state of download progress follower.
-         */
-        TBool iPaused;
-
-        /**
-         * Array of polled downloads.
-         * Own.
-         */
-        RArray<TDownloadItem> iDownloadArray;
-    };
-
-#endif // VCXHGMYVIDEOSDOWNLOADUPDATER_H
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosmodel.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosmodel.h	Tue May 25 12:44:54 2010 +0300
@@ -30,7 +30,6 @@
 // FORWARD DECLARATIONS
 
 class CVcxHgMyVideosCollectionClient;
-class CVcxHgMyVideosDownloadClient;
 class CRepository;
 class CVcxHgMyVideosThumbnailManager;
 
@@ -119,14 +118,7 @@
          * @return Reference to Collection client.
          */
         CVcxHgMyVideosCollectionClient& CollectionClient();
-        
-        /**
-         * Returns Download client.
-         *
-         * @return Reference to Download client.
-         */
-        CVcxHgMyVideosDownloadClient& DownloadClient();
-        
+
         /**
          * Returns reference to component's File Server session.
          * 
@@ -178,6 +170,30 @@
         TInt GetLastWatchedIdL( TInt& aId );
 
         /**
+         * Gets the last watched video name from CenRep.
+         * 
+         * @param aPath On return Video's path.
+         * @return System wide error code
+         */
+        TInt GetLastWatchedNameL( TDes& aName );
+        
+        /**
+         * Gets the last watched video path from CenRep.
+         * 
+         * @param aPath On return Video's path.
+         * @return System wide error code
+         */
+        TInt GetLastWatchedPathL( TDes& aPath );
+        
+        /**
+         * Gets the last watched video indicator from CenRep.
+         * 
+         * @param aValue On return Video's indicator value.
+         * @return System wide error code
+         */
+        TInt GetLastWatchedIndicatorL( TInt& aValue );
+        
+        /**
          * Gets video list sort order (from CenRep).
          * 
          * @return Video list sort order.
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolist.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolist.h	Tue May 25 12:44:54 2010 +0300
@@ -79,27 +79,19 @@
     public: // Data fetching and status information.
                
         /**
+         * Checks whether the new list has the same items as the old one.
+         * 
+		 * @param aVideoList The new video list.
+         * @return ETrue/EFalse.
+         */        
+        TBool HasSameItemsL( const CMPXMediaArray& aVideoList );
+
+        /**
          * Returns count of video items.
          * 
          * @return Count of items.
          */        
         TInt VideoCount();
-
-        /**
-         * Gets video's download state based on list index.
-         * 
-         * @param aIndex Index to video list.
-         * @return Video's download state as TVcxMyVideosDownloadState structure.
-         */
-        TVcxMyVideosDownloadState VideoDownloadState( TInt aIndex );
-        
-		/**
-		 * Returns a list of item indexes which downloading
-		 * state is different than EVcxMyVideosDlStateNone.
-		 * 
-		 * @return List of item indexes.
-		 */
-		void GetOngoingDownloads( RArray<TInt>& aDownloads );
 		
         /**
          * Removes MPX Media object from video array.
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h	Tue May 25 12:44:54 2010 +0300
@@ -150,16 +150,6 @@
         void PlayVideoL();
         
         /**
-         * Resumes currently selected download.
-         */
-        void ResumeDownloadL();
-        
-        /**
-         * Cancels currently selected download.
-         */
-        void CancelDownloadL();        
-        
-        /**
          * Handles sort command to list.
          * 
          * @param aSortCommand Sort command.
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistitem.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistitem.h	Tue May 25 12:44:54 2010 +0300
@@ -90,13 +90,6 @@
 		 * @return MPX Media object.
          */
 		CMPXMedia* Media();
-		        
-        /**
-         * Gets item's download state.
-         * 
-         * @return Item's download state as TVcxMyVideosDownloadState structure.
-         */
-        TVcxMyVideosDownloadState DownloadState();
                 
         /**
          * Destructor.
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h	Tue May 25 12:44:54 2010 +0300
@@ -33,11 +33,11 @@
 class CVcxHgMyVideosMainView;
 class CMPXMedia;
 class CVcxHgMyVideosVideoDataUpdater;
-class CVcxHgMyVideosDownloadUpdater;
 class CVcxHgMyVideosVideoDetailsDialog;
 class CVcxHgMyVideosVideoList;
 class CHgScroller;
 class CMyVideosIndicator;
+class CRepository;
 
 // CLASS DECLARATION
 
@@ -117,22 +117,6 @@
         TInt Highlight();        
         
         /**
-         * Gets video's download state base on video index.
-         * 
-         * @param aIndex Video's index on UI list.
-         * @return Video's download state as TVcxMyVideosDownloadState structure.
-         */
-        TVcxMyVideosDownloadState VideoDownloadState( TInt aIndex );
-        
-        /**
-         * Checks if progressive play (playback during download) is possible.
-         * 
-         * @param aIndex Video's index on UI list.
-         * @return ETrue if progressive play is possible.
-         */
-        TBool IsProgressivePlayPossible( TInt aIndex );
-
-        /**
          * Returns the count of videos in UI list model.
          *
          * @return Count of videos in UI list model.
@@ -153,15 +137,7 @@
          * @return List of currently marked video indexes.
          */
         void MarkedVideosL( RArray<TInt>& aMarkedVideos );
-        
-        /**
-         * Returns a list of item indexes which download 
-		 * state is different than EVcxMyVideosDlStateNone. 
-		 * 
-		 * @return List of item indexes.
-         */
-        void OngoingDownloads( RArray<TInt>& aDownloads );
-        
+
         /**
          * Handles mark command to video list.
          * 
@@ -227,20 +203,6 @@
         void PlayVideoL( TInt aIndex );
         
         /**
-         * Resumes paused or failed download from requested index.
-         * 
-         * @param aIndex Video's index on UI list.
-         */        
-        void ResumeDownloadL( TInt aIndex );
-
-        /**
-         * Cancels a video download from requested index.
-         * 
-         * @param aIndex Video's index on UI list.
-         */
-        void CancelDownloadL( TInt aIndex );
-
-        /**
          * Returns age profile of a video.
          * 
          * @param aIndex Video's index on UI list.
@@ -323,12 +285,6 @@
         void VideoFetchingCompletedL( CMPXMedia* aVideo );
         
         /**
-         * Called when resume has started from beginning.
-         * @param aMpxId MPX ID of the video object.
-         */
-        void ResumeStartedFromBeginningL( TUint32 aMpxId );
-
-        /**
          * Called when multiple video deletion command is completed.
          * 
          * @param aFailedCount Count of failed deletions, if any.
@@ -403,41 +359,10 @@
         /**
          * Formats the second row string for video item.
          * 
-         * @param aIndex List index of video
-         * @param aMedia MPX Media object (video).
-         * @param aIsDownloading On return, ETrue if video is downloading.
-         * @return Second row string.
-         */
-        HBufC* FormatVideoSecondRowLC(
-                TInt aIndex,
-                CMPXMedia& aMedia,
-                TBool& aIsDownloading );        
-        
-        /**
-         * Formats the second row string for completed video.
-         * 
          * @param aMedia MPX Media object (video).
          * @return Second row string.
          */
-        HBufC* FormatVideoSecondRowCompletedLC( CMPXMedia& aMedia );
-
-        /**
-         * Formats the second row string for downloading video.
-         * 
-         * @param aIndex List index of video
-         * @param aMedia MPX Media object (video).
-         * @return Second row string.
-         */
-        HBufC* FormatVideoSecondRowDownloadingLC( TInt aIndex, CMPXMedia& aMedia );
-
-        /**
-         * Reads and returns download progress, makes sure that progress value
-         * returned gets a value between 0% and 99%.
-         * 
-         * @param aMpxMedia Reference to MPX Media object.
-         * @return Download progress. 
-         */
-        TInt DownloadProgressL( const CMPXMedia& aMpxMedia );
+        HBufC* FormatVideoSecondRowLC( CMPXMedia& aMedia );
         
         /**
          * Updates video list item at given list index.
@@ -504,6 +429,20 @@
          * @param aNewItemCount New item count
          */
         void ResizeScrollerL( TInt aNewItemCount );
+		
+        /**
+         * Sets video as last watched.
+         *    
+         * @param aMedia Media that will be last watched.    
+         */
+        void SetVideoLastWatchedL( CMPXMedia& aMedia );
+        
+        /**
+         * Clears new video tag from the file.
+         * 
+         * @param aMedia Media from which new video tag will be cleared.         
+         */
+        void ClearNewVideoFlagL( CMPXMedia& aMedia );
 
         /**
          * Saves the marked MPXMedia items to iMarkedMediaList. This is called before
@@ -557,13 +496,7 @@
          * Own.
          */
         CVcxHgMyVideosVideoDataUpdater* iDataUpdater;
-        
-        /**
-         * Class for polling & updating video download progress asynchrounously.
-         * Own.
-         */
-        CVcxHgMyVideosDownloadUpdater* iDownloadUpdater; 
-        
+
         /**
          * Hg list component.
          * Not own.
@@ -587,12 +520,6 @@
         TMPXItemId iFirstListItemId;
 
         /**
-         * Downloading has been resumed for these MPX IDs. Needed for showing
-		 * note "Resuming download not possible, download starts from beginning".
-         */
-        RArray<TUint32> iResumeArray;
-
-        /**
          * Video indicator gives an overlay icon for video thumbnails.
          */
         CMyVideosIndicator* iVideoIndicator;
@@ -603,6 +530,11 @@
          * the video list and is cleared after sorting.
          */
         RPointerArray<CMPXMedia> iMarkedMediaList;
+		
+        /**
+         * Cenrep session.
+         */
+        CRepository* iRepository;
 
     };
 
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscategorylistimpl.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscategorylistimpl.cpp	Tue May 25 12:44:54 2010 +0300
@@ -190,7 +190,8 @@
             
             TVcxHgMyVideosCategoryItemType itemType;
             TUid appUid;
-            TBuf<64> urlString;
+            TBuf<KMyVideosTitleUrlMaxLength> urlString( KNullDesC );
+                        
             iCategoryModel->HandleExtraItemSelectionL( categoryId, itemType, appUid, urlString );
             
             if ( itemType == TVcxHgMyVideosCategoryItemTypeUid )
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp	Tue May 25 12:44:54 2010 +0300
@@ -53,9 +53,6 @@
 #include "vcxhgmyvideosthumbnailmanager.h"
 #include "vcxhgmyvideoscenrepkeys.h"
 
-const TInt KMyVideosTitleStringMaxLength = 64;
-const TInt KMyVideosTitleUrlMaxLength    = 128;
-
 _LIT( KVcxHgMyVideosMifFile, "\\resource\\apps\\vcxhgmyvideosicons.mif" );
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -96,7 +93,6 @@
 CVcxHgMyVideosCategoryModelHandler::~CVcxHgMyVideosCategoryModelHandler()
     {
     delete iCategoryList;
-    delete iLastWatched;
     delete iVideoIndicator;
     
     iCategoryIdArray.Reset();
@@ -111,6 +107,8 @@
     IPTVLOGSTRING_LOW_LEVEL( 
         "MPX My Videos UI # CVcxHgMyVideosCategoryModelHandler::DoModelActivateL() - Enter" );
 
+	UpdateCategoryListL();
+	
     iModel.CollectionClient().SetCategoryModelObserver( this );
 
     iTnManager.AddObserverL( *this );
@@ -131,9 +129,8 @@
     iModel.CollectionClient().SetCategoryModelObserver( NULL );
 
     iTnManager.RemoveObserver( *this );
-    
-    delete iLastWatched;
-    iLastWatched = NULL;
+	
+    TRAP_IGNORE( ClearLastWatchedIconL() )
     
     IPTVLOGSTRING_LOW_LEVEL( 
         "MPX My Videos UI # CVcxHgMyVideosCategoryModelHandler::DoModelDeactivate() - Exit" );
@@ -279,10 +276,15 @@
             maskId = EMbmVcxhgmyvideosiconsQgn_prop_captured_thumbnail_video_mask;
             break;
         case KCategoryIdLastWatched:
-			 if ( !LastWatchedSetL() )
-			    {
-				LoadLastWatchedIconL();
-				}
+			 LoadLastWatchedIconL();
+			 if ( iTnRequestId == KErrNotFound )
+			     {
+                 // Last watched or preloaded not found => show default icon
+                 skinId.Set( KAknsIIDQgnPropRecentThumbnailVideo );
+                 iconFile = KVcxHgMyVideosMifFile;
+                 bitmapId = EMbmVcxhgmyvideosiconsQgn_prop_recent_thumbnail_video;
+                 maskId = EMbmVcxhgmyvideosiconsQgn_prop_recent_thumbnail_video_mask;
+			     }
             break;
         case KCategoryIdExtraItem1:
             // ExtraItem1 is always interpreted as Ovi Store
@@ -359,19 +361,6 @@
 // 
 HBufC* CVcxHgMyVideosCategoryModelHandler::FormatCategorySecondRowLC( CMPXMedia& aMedia )
     {    
-    if ( !aMedia.IsSupported( KMPXMediaGeneralType ) ||
-          aMedia.ValueTObjectL<TMPXGeneralType>( KMPXMediaGeneralType ) != EMPXGroup )
-        {
-        if ( aMedia.IsSupported( KMPXMediaGeneralTitle ) )
-            {
-            return aMedia.ValueText( KMPXMediaGeneralTitle ).AllocLC(); 
-            }
-	    else
-		    {
-			return KNullDesC().AllocLC();
-			}
-        }
-    
     HBufC* details = NULL;
     TInt newVideos = 0;
     TInt videos = 0;
@@ -448,14 +437,17 @@
             {
             if ( LastWatchedSetL() )
                 {
-                CMPXMedia* media = GetCategoryDataL( aCategoryId );
-                if ( media )
+                TBuf<KMaxPath> path;
+                TInt error = iModel.GetLastWatchedPathL( path );
+                if ( BaflUtils::FileExists( iModel.FileServerSessionL(), path ) )
                     {
-                    secondRow = FormatCategorySecondRowLC( *media );
+                    TBuf<KMyVideosTitleStringMaxLength> string;
+                    TInt error = iModel.GetLastWatchedNameL( string );
+                    secondRow = error ? KNullDesC().AllocLC() : string.AllocLC();
                     }
                 else
                     {
-                    secondRow = KNullDesC().AllocLC();
+                    secondRow = StringLoader::LoadLC( R_VCXHGMYVIDEOS_NO_VIDEOS_IN_CATEGORY );
                     }
                 }
             else    
@@ -469,7 +461,7 @@
                     }
                 else
                     {
-                    secondRow = KNullDesC().AllocLC();
+                    secondRow = StringLoader::LoadLC( R_VCXHGMYVIDEOS_NO_VIDEOS_IN_CATEGORY );
                     }
                 }
             }
@@ -607,9 +599,6 @@
     
     UpdateCategoryListL();
     
-    FetchLastWatchedL();
-    SetLastWatchedIndicatorL();
-    
     IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CategoryListModifiedL() - Exit" );
     }
 
@@ -636,31 +625,28 @@
             
         case EMPXItemInserted:
             {
-            if ( !iLastWatched )
+            TInt id1( 0 );
+            TInt ret = iModel.GetLastWatchedIdL( id1 );
+
+            if (  ret == KErrNone &&
+                  id1 == aMpxItemId.iId1 )
                 {
-                TInt id1( 0 );
-                TInt ret = iModel.GetLastWatchedIdL( id1 );
-                TMPXItemId id ( id1 );
-                
-                if (  ret == KErrNone &&
-                      id1 == aMpxItemId.iId1 )
-                    {
-                    FetchLastWatchedL();
-                    }
-                }
+                UpdateCategoryListItemL( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
+				iScroller.RefreshScreen( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
+				}
             }
             break;
         case EMPXItemDeleted:
             {
-            if ( iLastWatched && 
-                 iLastWatched->IsSupported( KMPXMediaGeneralId ) &&
-                 iLastWatched->Value<TMPXItemId>( KMPXMediaGeneralId )->iId1 == aMpxItemId.iId1 )
+            TInt id1( 0 );
+            TInt ret = iModel.GetLastWatchedIdL( id1 );
+
+            if (  ret == KErrNone &&
+                  id1 == aMpxItemId.iId1 )
                 {
-                delete iLastWatched;
-                iLastWatched = NULL;
-                
+                ClearLastWatchedIconL();
                 UpdateCategoryListItemL( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
-                SetLastWatchedIndicatorL();
+				iScroller.RefreshScreen( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
                 }
             }
             break;
@@ -681,36 +667,29 @@
     {
     IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # UpdateCategoryListL() - Enter" );
     
-    if ( iCategoryList )
-        {        
-        TInt categoryCount = iCategoryList->Count();
-        
-        MakeCategoryIdArray( categoryCount );
+    MakeCategoryIdArray();
+    
+    if ( iCategoryIdArray.Count() != iScroller.ItemCount() )
+        {
+        iScroller.ResizeL( iCategoryIdArray.Count() );
+        }
         
-        IPTVLOGSTRING2_LOW_LEVEL( 
-                "MPX My Videos UI # UpdateCategoryListL() - count = %d", categoryCount );
-        
-        if ( iCategoryIdArray.Count() != iScroller.ItemCount() )
+    if ( iCategoryIdArray.Count() > 0 )
+        {                    
+        for ( TInt i = 0; i < iCategoryIdArray.Count(); i++ )
             {
-            iScroller.ResizeL( iCategoryIdArray.Count() );
+            UpdateCategoryListItemL( i );
             }
-            
-        if ( iCategoryIdArray.Count() > 0 )
-            {                    
-            for ( TInt i = 0; i < iCategoryIdArray.Count(); i++ )
-                {
-                UpdateCategoryListItemL( i );
-                }
-            if ( iScroller.SelectedIndex() < 0 || 
-                    iScroller.SelectedIndex() >= iScroller.ItemCount() )
-                {
-                iScroller.SetSelectedIndex( 0 );    
-                }           
-            }        
-        
-        // Refresh the whole list.
-        iScroller.DrawDeferred();
-        }
+        if ( iScroller.SelectedIndex() < 0 || 
+                iScroller.SelectedIndex() >= iScroller.ItemCount() )
+            {
+            iScroller.SetSelectedIndex( 0 );    
+            }           
+        }        
+    
+    // Refresh the whole list.
+    iScroller.DrawDeferred();
+
     IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # UpdateCategoryListL() - Exit" );
     }
 
@@ -740,7 +719,10 @@
         CleanupStack::PopAndDestroy( secondRow );
 
         // Set icon for category
-        listItem.SetIcon( GetCategoryIconL( iCategoryIdArray[ aListIndex ] ) );
+        if ( !listItem.Icon() )
+            {
+            listItem.SetIcon( GetCategoryIconL( iCategoryIdArray[ aListIndex ] ) );
+            }
         }
         
     IPTVLOGSTRING_LOW_LEVEL( 
@@ -778,10 +760,9 @@
 // CVcxHgMyVideosCategoryModelHandler::MakeCategoryIdArray()
 // -----------------------------------------------------------------------------
 //
-void CVcxHgMyVideosCategoryModelHandler::MakeCategoryIdArray( TInt aCategoriesAvailable )
+void CVcxHgMyVideosCategoryModelHandler::MakeCategoryIdArray()
     {
-    IPTVLOGSTRING2_LOW_LEVEL( 
-            "MPX My Videos UI # MakeCategoryArray (number of categories=%d)", aCategoriesAvailable );
+    IPTVLOGSTRING_LOW_LEVEL("CVcxHgMyVideosCategoryModelHandler::MakeCategoryIdArray");
     
     iCategoryIdArray.Reset();    
     
@@ -838,19 +819,10 @@
         }
     else
         {
-        IPTVLOGSTRING_LOW_LEVEL( 
-            "MPX My Videos UI # MakeCategoryIdArray() Could not access CenRep!" ); 
-    
-        // If cenrep access fails then use these values as backup
-	    iCategoryIdArray.Append( KCategoryIdLastWatched );
-		
-    	for(TInt i = 0; i < aCategoriesAvailable; i++)
-        	{
-	        if( AcceptCategory( i ) )
-    	        {
-        	    iCategoryIdArray.Append( i );        
-            	}        
-        	}
+		iCategoryIdArray.Append( KCategoryIdLastWatched );
+		iCategoryIdArray.Append( KVcxMvcCategoryIdCaptured );	    
+        iCategoryIdArray.Append( KVcxMvcCategoryIdOther );  
+        iCategoryIdArray.Append( KCategoryIdExtraItem1 );
         }
     }
 
@@ -884,47 +856,12 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::VideoFetchingCompletedL()
-// MPX Collection calls this callback when a single video has fetched.
-// -----------------------------------------------------------------------------
-// 
-void CVcxHgMyVideosCategoryModelHandler::VideoFetchingCompletedL( CMPXMedia* aVideo )
-    {
-    TInt id( 0 );
-    
-    TInt ret = iModel.GetLastWatchedIdL( id );
-                    
-    if ( ret == KErrNone && 
-         id && 
-		 aVideo &&
-         aVideo->IsSupported( KMPXMediaGeneralId ) &&
-         aVideo->Value<TMPXItemId>( KMPXMediaGeneralId )->iId1 == id )
-        {
-        delete iLastWatched;
-        iLastWatched = aVideo;
-		
-		LoadLastWatchedIconL();
-		SetLastWatchedIndicatorL();
-        }
-    else 
-		{
-		delete aVideo;
-		aVideo = NULL;
-		}
-    
-    UpdateCategoryListItemL( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
-    iScroller.RefreshScreen( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
-    }
-
-// -----------------------------------------------------------------------------
 // MPX Collection calls this callback when category list items have been fetched.
 // -----------------------------------------------------------------------------
 // 
 void CVcxHgMyVideosCategoryModelHandler::CategoryListFetchingCompletedL()
     {
     IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CategoryListFetchingCompletedL()" ); 
-    FetchLastWatchedL();
-    SetLastWatchedIndicatorL();
 
     // Send custom command to appui that signals that the 
     // my videos main view is constructed.
@@ -943,12 +880,7 @@
 // 
 CMPXMedia* CVcxHgMyVideosCategoryModelHandler::GetCategoryDataL( TInt aCategoryId )
     {
-    if ( aCategoryId == KCategoryIdLastWatched )
-        {
-        return iLastWatched;
-        }
-    
-    if ( aCategoryId >= 0 && iCategoryList->Count() > aCategoryId )
+    if ( iCategoryList && aCategoryId >= 0 && iCategoryList->Count() > aCategoryId )
         {
         return (*iCategoryList)[ aCategoryId ];
         }
@@ -957,60 +889,32 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::FetchLastWatchedL()
-// 
-// -----------------------------------------------------------------------------
-// 
-void CVcxHgMyVideosCategoryModelHandler::FetchLastWatchedL()
-    {
-    TInt id1( 0 );
-    TInt ret = iModel.GetLastWatchedIdL( id1 );
-    TMPXItemId id ( id1 );
-    
-    if (  id1 != 0 && 
-          KErrNone == ret )
-        {
-        if ( !iLastWatched ||
-		    ( iLastWatched &&
-              iLastWatched->IsSupported( KMPXMediaGeneralId ) &&
-              iLastWatched->Value<TMPXItemId>( KMPXMediaGeneralId )->iId1 != id1 ))
-            {
-            iModel.CollectionClient().FetchMpxMediaByMpxIdL( id );
-            } 
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::PlayLastWatchedVidedoL()
 // 
 // -----------------------------------------------------------------------------
 // 
 void CVcxHgMyVideosCategoryModelHandler::PlayLastWatchedVidedoL()
     {
-    if ( LastWatchedSetL() )
+    TBuf<KMaxPath> path;
+    TInt error( KErrNotFound );
+	if ( LastWatchedSetL() )
         {
-        if (  iLastWatched && iLastWatched->IsSupported( KMPXMediaGeneralId ) )
-            {
-            iModel.CollectionClient().PlayVideoL(
-                        *iLastWatched->Value<TMPXItemId>( KMPXMediaGeneralId ) );
-    
-            iModel.SetAppState( CVcxHgMyVideosModel::EVcxMyVideosAppStatePlayer );
-            }
+        error = iModel.GetLastWatchedPathL( path );
         }
-    else
+    else if ( PreloadedExistsL() )
         {
-        if ( PreloadedExistsL() )
+        error = iModel.GetMyVideosCustomizationString( 
+                     KCRVideoPlayerPreloadedVideoPath, path );
+        }
+
+    if ( !error && path.Length() && BaflUtils::FileExists( iModel.FileServerSessionL(), path ) )
+        {
+        CAknAppUi* appui = static_cast<CAknAppUi*>( CCoeEnv::Static()->AppUi() );
+    
+        if ( appui )
             {
-            CAknAppUi* appui = static_cast<CAknAppUi*>( CCoeEnv::Static()->AppUi() );
-            
-            if ( appui )
-                {
-                TBuf<KMaxPath> path;
-                TInt error = iModel.GetMyVideosCustomizationString( 
-				                         KCRVideoPlayerPreloadedVideoPath, path );
-                appui->OpenFileL( path );
-                iModel.SetAppState( CVcxHgMyVideosModel::EVcxMyVideosAppStatePlayer );
-                }
+            appui->OpenFileL( path );
+            iModel.SetAppState( CVcxHgMyVideosModel::EVcxMyVideosAppStatePlayer );
             }
         }
     }
@@ -1023,13 +927,15 @@
 void CVcxHgMyVideosCategoryModelHandler::LoadLastWatchedIconL()
     {
     if ( LastWatchedSetL() )
-        {
-        if ( iLastWatched )
+        {    
+        TBuf<KMaxPath> path;
+        TInt error = iModel.GetLastWatchedPathL( path );
+        
+        if ( BaflUtils::FileExists( iModel.FileServerSessionL(), path ) )
             {
             CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( 
-                            iLastWatched->ValueText( KMPXMediaGeneralUri ),
-                            KNullDesC );
-            
+                        path, 
+                        KNullDesC );
             iTnRequestId = iTnManager.GetL( *source );
             CleanupStack::PopAndDestroy( source );
             }
@@ -1052,6 +958,18 @@
 	}
 
 // -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::ClearLastWatchedIconL()
+// 
+// -----------------------------------------------------------------------------
+// 
+void CVcxHgMyVideosCategoryModelHandler::ClearLastWatchedIconL()
+    {        
+    CHgItem& item = iScroller.ItemL( ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
+    item.ClearFlags( CHgItem::EHgItemFlagsIconOverlayIndicator );
+    item.SetIcon( NULL );
+    }
+
+// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::SetLastWatchedIndicatorL()
 // 
 // -----------------------------------------------------------------------------
@@ -1062,7 +980,13 @@
         {
         CHgItem& lastWatchedItem = iScroller.ItemL(
                 ResolveCategoryArrayIndexById( KCategoryIdLastWatched ) );
-        if ( iLastWatched && VideoIndicatorL().IsIndicatorShown( *iLastWatched ) )
+        TInt isIndicator( 0 );
+        iModel.GetLastWatchedIndicatorL( isIndicator );
+		
+        TBuf<KMaxPath> path;
+        TInt error = iModel.GetLastWatchedPathL( path );
+		TBool exist = BaflUtils::FileExists( iModel.FileServerSessionL(), path );
+        if ( isIndicator && path.Length() && exist )
             {
             lastWatchedItem.SetFlags( CHgItem::EHgItemFlagsIconOverlayIndicator );
             }
@@ -1152,7 +1076,7 @@
         
         listItem.SetIcon( thumbnail ); // Takes ownership
         CleanupStack::Pop( thumbnail );
-        
+        SetLastWatchedIndicatorL();
         iScroller.RefreshScreen( lastWatchedIndex );
         }
     }
@@ -1295,8 +1219,11 @@
 //
 TBool CVcxHgMyVideosCategoryModelHandler::LastWatchedSetL()
     {
-    TInt id;
-    if ( !iModel.GetLastWatchedIdL( id ) && id )
+    TBuf<KMaxPath> path;
+    TInt error = iModel.GetLastWatchedPathL( path );
+    TInt length = path.Length();
+    
+    if ( error == KErrNone && length > 0 )
         {
         return ETrue;
         }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp	Tue May 25 12:44:54 2010 +0300
@@ -52,6 +52,8 @@
 
 const TUint32 KVcxHgMyVideosTransactionId = 5;
 
+const TInt KMpxMediaId2 = 0;
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -216,8 +218,9 @@
         }
     else if ( iCollectionLevel == KVcxMpxLevelVideos )
         {
-        iCollectionUtility->Collection().BackL();
-        iCollectionUtility->Collection().OpenL( aIndex );
+        // OpenL() will return a list if there has been any changes.
+        // No reply if list is same as with previous OpenL().
+        iCollectionUtility->Collection().OpenL();
         }
     else
         {
@@ -1063,13 +1066,6 @@
                     // Ownership is transferred.
             	    iVideoModelObserver->VideoFetchingCompletedL( media );  
             	    }
-                
-                else if ( iCategoryModelObserver )
-                    {
-                    CMPXMedia* media = CMPXMedia::NewL( *( ( *array )[0] ) );
-                    // Ownership is transferred.
-                    iCategoryModelObserver->VideoFetchingCompletedL( media );  
-                    }
                 }
 			}
         CleanupStack::PopAndDestroy( entries );
@@ -1094,6 +1090,32 @@
     }
 
 // -----------------------------------------------------------------------------
+// CVcxHgMyVideosCollectionClient::SetFlagsL()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosCollectionClient::SetFlagsL( TMPXItemId aMpxItemId, TUint32 aFlags )
+{    
+    CMPXMedia* msg = CMPXMedia::NewL();
+    CleanupStack::PushL( msg );
+    
+    msg->SetTObjectValueL<TMPXItemId>( KMPXMediaGeneralId, TMPXItemId( aMpxItemId, KMpxMediaId2 ));
+    msg->SetTObjectValueL<TInt32>( KMPXMediaGeneralFlags, aFlags );
+    
+    CMPXCommand* cmd = CMPXCommand::NewL();
+    CleanupStack::PushL( cmd );
+    
+    cmd->SetTObjectValueL( KMPXCommandGeneralId, KMPXCommandIdCollectionSet );
+    cmd->SetTObjectValueL( KMPXCommandGeneralDoSync, ETrue );
+    cmd->SetCObjectValueL( KMPXCommandColSetMedia, msg );
+    cmd->SetTObjectValueL( KMPXCommandGeneralCollectionId, KVcxUidMyVideosMpxCollection );
+    
+    iCollectionUtility->Collection().CommandL( *cmd );
+    
+    CleanupStack::PopAndDestroy( cmd );    
+    CleanupStack::PopAndDestroy( msg );
+}
+
+// -----------------------------------------------------------------------------
 // CVcxHgMyVideosCollectionClient::HandleGetVideoDetailsRespL()
 // -----------------------------------------------------------------------------
 //
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosdownloadupdater.cpp	Tue May 11 16:15:40 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,460 +0,0 @@
-/*
-* 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 the License "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:      Class for following and updating download progress.*
-*/
-
-
-
-
-// INCLUDE FILES
-#include <mpxmedia.h>
-#include <mpxmediaarray.h>
-#include <mpxmediageneraldefs.h>
-
-#include "IptvDebug.h"
-#include <vcxmyvideosdefs.h>
-
-#include "vcxhgmyvideosdownloadupdater.h"
-#include "vcxhgmyvideosvideolist.h"
-#include "vcxhgmyvideosvideomodelhandler.h"
-#include "vcxhgmyvideospanics.h"
-
-// CONSTANTS
-const TInt KVcxHgUpdateDelay = 2500000; // 2,5 seconds
-
-// ========================== MEMBER FUNCTIONS ===============================
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::CVcxHgMyVideosDownloadUpdater()
-// ---------------------------------------------------------------------------
-//
-CVcxHgMyVideosDownloadUpdater::CVcxHgMyVideosDownloadUpdater(
-        CVcxHgMyVideosVideoModelHandler& aParent,
-        CVcxHgMyVideosVideoList& aVideoArray )
- :  iParent( aParent ),
-    iVideoArray( aVideoArray )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::ConstructL()
-    {
-    iTimer = CPeriodic::NewL( EPriorityNormal );
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::NewL()
-// ---------------------------------------------------------------------------
-//
-CVcxHgMyVideosDownloadUpdater* CVcxHgMyVideosDownloadUpdater::NewL(
-        CVcxHgMyVideosVideoModelHandler& aParent,
-        CVcxHgMyVideosVideoList& aVideoArray )
-    {
-    CVcxHgMyVideosDownloadUpdater* self = 
-        new( ELeave ) CVcxHgMyVideosDownloadUpdater( aParent, aVideoArray );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::~CVcxHgMyVideosDownloadUpdater()
-// ---------------------------------------------------------------------------
-//
-CVcxHgMyVideosDownloadUpdater::~CVcxHgMyVideosDownloadUpdater()
-    {
-    if( iTimer )
-        {
-        iTimer->Cancel();
-        }
-    delete iTimer;
-    iDownloadArray.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::VideoArrayChangedL()
-// -----------------------------------------------------------------------------
-// 
-void CVcxHgMyVideosDownloadUpdater::VideoArrayChangedL()
-    {
-    IPTVLOGSTRING_LOW_LEVEL( 
-        "MPX My Videos UI # CVcxHgMyVideosDownloadUpdater::VideoArrayChangedL()" );
-
-    ResetDownloadsToFollowL();
-    ContinueToFollowDownloads();
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::VideoModifiedL()
-// 
-// Note: Currently expects and handles only aEventType == EMPXItemModified.
-// -----------------------------------------------------------------------------
-// 
-void CVcxHgMyVideosDownloadUpdater::VideoModifiedL( TMPXChangeEventType /*aEventType*/,
-                                                    TMPXItemId aMpxItemId,
-                                                    TInt32 /*aExtraInfo*/ )
-    {
-    CMPXMedia* media = NULL;
-
-    // If object is on download array, check if download has completed.
-    for ( TInt i = 0; i < iDownloadArray.Count(); i++ )
-        {
-        media = iDownloadArray[i].iMedia;
-
-        if ( media->IsSupported( KMPXMediaGeneralId ) )
-            {
-            if ( aMpxItemId == media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) )
-                {
-                TBool remove( EFalse );
-
-                if ( ! media->IsSupported( KVcxMediaMyVideosDownloadId ) ||
-                     ! media->IsSupported( KVcxMediaMyVideosDownloadState ) )
-                    {
-                    remove = ETrue;
-                    }
-                else if ( *( media->Value<TUint32>( KVcxMediaMyVideosDownloadId ) ) == 0 )
-                    {
-                    remove = ETrue;
-                    }
-                else
-                    {
-                    TVcxMyVideosDownloadState state = static_cast<TVcxMyVideosDownloadState>(
-                        *( media->Value<TUint8>( KVcxMediaMyVideosDownloadState ) ) );
-
-                    if ( state == EVcxMyVideosDlStateNone ||
-                         state == EVcxMyVideosDlStateDownloaded )
-                        {
-                        remove = ETrue;
-                        }
-                    }
-
-                if ( remove )
-                    {
-                    iDownloadArray.Remove( i );
-                    }
-
-                return;
-                }
-            }
-        }
-
-    // If object was not on download array, check if it should be added.
-    media = iVideoArray.MPXMediaByMPXItemId( aMpxItemId );
-
-    if ( media && FindDownload( media ) == KErrNotFound )
-        {
-        if ( media->IsSupported( KVcxMediaMyVideosDownloadId ) &&
-             media->IsSupported( KVcxMediaMyVideosDownloadState ) )
-            {
-            // Download ID is non-zero if download status exists.
-            if ( *( media->Value<TUint32>( KVcxMediaMyVideosDownloadId ) ) != 0 )
-                {
-                TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone );
-
-                state = static_cast<TVcxMyVideosDownloadState>(
-                    *( media->Value<TUint8>( KVcxMediaMyVideosDownloadState ) ) );
-    
-                if ( state == EVcxMyVideosDlStateDownloading ||
-                     state == EVcxMyVideosDlStateFailed ||
-                     state == EVcxMyVideosDlStatePaused )
-                    {
-                    TDownloadItem item;
-                    item.iMedia = media;
-                    item.iProgress = 0;
-                    item.iState = state;
-                    item.iProgressivePlayQueried = EFalse;
-                    item.iIsPlayPossible = EFalse;
-                    iDownloadArray.AppendL( item );
-                    }
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::IsPlayPossible()
-// ---------------------------------------------------------------------------
-//
-TBool CVcxHgMyVideosDownloadUpdater::IsPlayPossible( TInt aIndex )
-    {
-    IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CVcxHgMyVideosDownloadUpdater::IsPlayPossible" );
-
-    TInt dlIndex( KErrNotFound );
-    CMPXMedia* media = iVideoArray.MPXMedia( aIndex );
-    
-    if ( ! media )
-        {
-        return EFalse;
-        }
-
-    TInt count( iDownloadArray.Count() );
-    for ( TInt i = 0; i < count; i++ )
-        {
-        // Compare pointers as they are the same in this case, and fast to use.
-        if ( media == iDownloadArray[i].iMedia )
-            {
-            dlIndex = i;
-            break;
-            }
-        }
-
-    if ( dlIndex != KErrNotFound )
-        {
-        // These two lines make sure that class starts to follow availability
-        // of progressive play, if it is not being followed yet.
-        iDownloadArray[dlIndex].iProgressivePlayQueried = ETrue;
-        ContinueToFollowDownloads();       
-
-        iDownloadArray[dlIndex].iIsPlayPossible =
-                ( iDownloadArray[dlIndex].iMedia->ValueTObjectL<TInt8>( KVcxMediaMyVideosDownloadProgress ) > 0 &&
-                iDownloadArray[dlIndex].iMedia->ValueText( KMPXMediaGeneralUri ).Length() > 0 );
-
-        // Return the response immediately, as it is needed from use cases like
-        // DynInitMenuPaneL(). Real status will be updated
-        // to UI asynchronously when background timer has checked the playability.
-        return iDownloadArray[dlIndex].iIsPlayPossible;
-        }
-
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::SetPausedL()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::SetPausedL( TBool aPaused )
-    {
-    IPTVLOGSTRING2_LOW_LEVEL( 
-        "MPX My Videos UI # CVcxHgMyVideosDownloadUpdater::SetPausedL(%d)", aPaused );
-    
-    iPaused = aPaused;
-
-    ContinueToFollowDownloads();
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::RemoveDownload()
-// ---------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::RemoveDownload( TMPXItemId aMPXItemId )
-    {    
-    CMPXMedia* media( NULL );
-    media = iVideoArray.MPXMediaByMPXItemId( aMPXItemId );
-    
-    if ( media )
-    	{
-    	TInt index( KErrNotFound );
-		index = FindDownload( media );
-    	
-		if ( index != KErrNotFound )
-    	    {
-    	    iDownloadArray.Remove( index );
-    	    }
-    	    
-        if ( iDownloadArray.Count() < 1 )
-    	    {
-    	    iTimer->Cancel();        
-    	    }
-    	}
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::FindDownload()
-// ---------------------------------------------------------------------------
-//
-TInt CVcxHgMyVideosDownloadUpdater::FindDownload( CMPXMedia* aMedia )
-    {
-    TInt index( KErrNotFound );
-    
-    if ( aMedia )
-    	{  
-        for ( TInt i = iDownloadArray.Count() - 1; i >= 0; i-- )
-            {
-            if ( iDownloadArray[i].iMedia->Match( *aMedia, KMPXMediaGeneralId ) )
-                {
-                index = i;
-                break;
-                }
-            }
-    	}
-    return index;
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::ContinueToFollowDownloads()
-// ---------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::ContinueToFollowDownloads()
-    {
-    if ( iPaused || iDownloadArray.Count() == 0 )
-        {
-        if ( iTimer->IsActive() )
-            {
-            iTimer->Cancel();
-            }
-        }
-    else
-        {
-        if ( ! iTimer->IsActive() )
-            {
-            TCallBack callback = TCallBack( Callback, this );
-            const TTimeIntervalMicroSeconds32 KUpdateInterval( KVcxHgUpdateDelay );
-            iTimer->Start( KUpdateInterval, KUpdateInterval, callback );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::ResetDownloadsToFollowL()
-// ---------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::ResetDownloadsToFollowL()
-    {
-    iDownloadArray.Reset();
-
-    TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone );
-    TDownloadItem item;
-    CMPXMedia* media = NULL;
-    TInt count( iVideoArray.VideoCount() );
-
-    for ( TInt i = 0; i < count; i++ )
-        {
-        media = iVideoArray.MPXMedia( i );
-
-        if ( media &&
-             media->IsSupported( KVcxMediaMyVideosDownloadId ) &&
-             media->IsSupported( KVcxMediaMyVideosDownloadState ) )
-            {
-            // Download ID is non-zero if download status exists.
-            if ( *( media->Value<TUint32>( KVcxMediaMyVideosDownloadId ) ) != 0 )
-                {
-                state = static_cast<TVcxMyVideosDownloadState>(
-                    *( media->Value<TUint8>( KVcxMediaMyVideosDownloadState ) ) );
-
-                if ( state == EVcxMyVideosDlStateDownloading ||
-                     state == EVcxMyVideosDlStateFailed ||
-                     state == EVcxMyVideosDlStatePaused )
-                    {
-                    item.iMedia = media;
-                    item.iProgress = 0;
-                    item.iState = state;
-                    item.iProgressivePlayQueried = EFalse;
-                    item.iIsPlayPossible = EFalse;
-                    iDownloadArray.AppendL( item );
-
-                    IPTVLOGSTRING3_LOW_LEVEL( 
-                        "MPX My Videos UI # Download to follow: Id:%d, State:%d", 
-                        static_cast<TInt>( 
-                            media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) ),
-                        static_cast<TInt>(
-                            media->ValueTObjectL<TUint8>( KVcxMediaMyVideosDownloadState ) ) );
-                    }
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::Callback()
-// ---------------------------------------------------------------------------
-//
-TInt CVcxHgMyVideosDownloadUpdater::Callback( TAny *aPtr )
-    {
-    CVcxHgMyVideosDownloadUpdater* ptr = static_cast<CVcxHgMyVideosDownloadUpdater*>( aPtr );
-    TRAP_IGNORE( ptr->UpdateDownloadsL() ); 
-    return 0;
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::UpdateDownloadsL()
-// ---------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::UpdateDownloadsL()
-    {
-    for ( TInt i = 0; i < iDownloadArray.Count(); i++ )
-        {
-        UpdateDownloadL( iDownloadArray[i] );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CVcxHgMyVideosDownloadUpdater::UpdateDownloadL()
-// ---------------------------------------------------------------------------
-//
-void CVcxHgMyVideosDownloadUpdater::UpdateDownloadL( TDownloadItem& aItem )
-    {
-    TBool itemChanged( EFalse );
-
-    // Check download progress.
-    TVcxMyVideosDownloadState state = static_cast<TVcxMyVideosDownloadState>(
-        aItem.iMedia->ValueTObjectL<TUint8>( KVcxMediaMyVideosDownloadState ) );
-    TInt8 progress = aItem.iMedia->ValueTObjectL<TInt8>( KVcxMediaMyVideosDownloadProgress );
-
-    if ( progress == 0 && aItem.iProgress > 0 )
-        {
-        IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # UpdateDownloadL() Resume started from beginning." );
-        TUint32 mpxId = aItem.iMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ).iId1;
-        iParent.ResumeStartedFromBeginningL( mpxId );
-        }
-    if ( state != aItem.iState || progress != aItem.iProgress )
-        {
-        aItem.iState = state;
-        aItem.iProgress = progress;
-        itemChanged = ETrue;
-        }
-
-    // Progressive playback check is needed in two cases:
-    // 1) It has been queried by user and old status is EFalse, in this case the status
-    //    has not been check ever yet.
-    // 2) Progress has changed, and old status is EFalse. In this case we might have
-    //    received enough data to support progressive play.
-    if ( ( aItem.iProgressivePlayQueried && ! aItem.iIsPlayPossible ) ||
-         ( itemChanged && ! aItem.iIsPlayPossible ) )
-        {
-        aItem.iProgressivePlayQueried = EFalse;
-
-	    if ( aItem.iMedia->ValueTObjectL<TInt8>( KVcxMediaMyVideosDownloadProgress ) > 0 &&
-	         aItem.iMedia->ValueText( KMPXMediaGeneralUri ).Length() > 0 ) 
-	        {
-	        aItem.iIsPlayPossible = ETrue;
-	        }
-
-        if ( aItem.iIsPlayPossible )
-            {
-            itemChanged = ETrue;
-            }
-        }
-
-    IPTVLOGSTRING4_LOW_LEVEL( 
-            "MPX My Videos UI # UpdateDownloadL() Id:%d State:%d Progress:%d",
-            static_cast<TInt>( aItem.iMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) ),
-            static_cast<TInt>( state ), static_cast<TInt>( progress ) );     
-    IPTVLOGSTRING3_LOW_LEVEL( 
-            "MPX My Videos UI # UpdateDownloadL() Path:%S Progressive Play:%d",
-            &( aItem.iMedia->ValueText( KMPXMediaGeneralUri ) ),
-            static_cast<TInt>( aItem.iIsPlayPossible ) ); 
-
-    if ( itemChanged )
-        {
-        iParent.VideoModifiedL( 
-            EMPXItemModified, 
-            aItem.iMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ),
-            EVcxMyVideosListNoInfo,
-            ETrue ); // Mark event as simulated, not originated from MPX Collection.
-        }
-    }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version: 42 %
+// Version : %version: 45 %
 
 // INCLUDE FILES
 #include <bldvariant.hrh>
@@ -236,7 +236,10 @@
 //
 void CVcxHgMyVideosMainView::HandleStatusPaneSizeChange()
     {
-    UpdateLayout(); 
+    if ( iContainer ) // If view is active
+        {
+        UpdateLayout(); 
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -382,22 +385,6 @@
                 }
             }
             break;
-        case EVcxHgMyVideosCmdResumeDownload:
-            {
-            if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateVideoIdle )
-                {
-                VideoListL()->ResumeDownloadL();
-                }
-            }
-            break;
-        case EVcxHgMyVideosCmdCancelDownload:
-            {
-            if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateVideoIdle )
-                {
-                VideoListL()->CancelDownloadL();
-                }
-            }
-            break;
         case EVcxHgMyVideosCmdVideoDetails:
             {
             VideoListL()->VideoModel().ShowVideoDetailsDialogL();
@@ -544,9 +531,7 @@
     {
     TKeyResponse response( EKeyWasNotConsumed );
     
-    // Clear key performs either 'Delete' or 'Cancel Download'. As Cancel Download
-    // cannot be performed if there are selections, selections always cause Delete.
-    // When there is no selections, video's status dictates the operation.
+    // Clear key performs 'Delete'.
     if ( aKeyEvent.iScanCode == EStdKeyBackspace && aType == EEventKey )
         {
         if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateVideoIdle )
@@ -558,16 +543,10 @@
             TInt count = markedVideos.Count();
 			CleanupStack::PopAndDestroy( &markedVideos );
 			
-            if ( ( count > 0 ) ||
-                 ( VideoListL()->VideoModel().VideoDownloadState( VideoListL()->Highlight() )
-                   == EVcxMyVideosDlStateNone ) )
+            if ( count > 0 )
                 {
                 HandleCommandL( EVcxHgMyVideosCmdDelete );
                 }
-            else
-                {
-                HandleCommandL( EVcxHgMyVideosCmdCancelDownload );
-                }
             
 			response = EKeyWasConsumed;
             }
@@ -617,8 +596,6 @@
         {
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDelete, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDeleteMarked, ETrue );
-        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdResumeDownload, ETrue );
-        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCancelDownload, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdSortSubMenu, ETrue );        
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdVideoDetails, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdStopShowViaHomenet, ETrue );
@@ -886,4 +863,3 @@
     
     CleanupStack::PopAndDestroy( param );
     }
-
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosmodel.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosmodel.cpp	Tue May 25 12:44:54 2010 +0300
@@ -24,7 +24,6 @@
 #include "IptvDebug.h"
 #include "vcxhgmyvideosmodel.h"
 #include "vcxhgmyvideoscollectionclient.h"
-#include "vcxhgmyvideosdownloadclient.h"
 #include "thumbnaildata.h"
 #include "vcxhgmyvideoscenrepkeys.h"
 #include "vcxhgmyvideosthumbnailmanager.h"
@@ -115,15 +114,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosModel::DownloadClient()
-// -----------------------------------------------------------------------------
-//
-CVcxHgMyVideosDownloadClient& CVcxHgMyVideosModel::DownloadClient()
-    {
-    return iCollection->DownloadClient();
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosModel::FileServerSessionL()
 // -----------------------------------------------------------------------------
 //
@@ -223,6 +213,48 @@
     }
 
 // -----------------------------------------------------------------------------
+// CVcxHgMyVideosModel::GetLastWatchedNameL
+// -----------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosModel::GetLastWatchedNameL( TDes& aName )
+    {
+    if ( ! iCollectionCenRep )
+        {
+        iCollectionCenRep = CRepository::NewL( TUid::Uid( KVcxMyVideosCollectionCenrepUid ) );
+        }
+
+    return iCollectionCenRep->Get( KVcxMyVideosCollectionCenrepKeyLastWatchedName, aName );
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosModel::GetLastWatchedPath
+// -----------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosModel::GetLastWatchedPathL( TDes& aPath )
+    {
+    if ( ! iCollectionCenRep )
+        {
+        iCollectionCenRep = CRepository::NewL( TUid::Uid( KVcxMyVideosCollectionCenrepUid ) );
+        }
+
+    return iCollectionCenRep->Get( KVcxMyVideosCollectionCenrepKeyLastWatchedPath, aPath );
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosModel::GetLastWatchedPath
+// -----------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosModel::GetLastWatchedIndicatorL( TInt& aValue )
+    {
+    if ( ! iCollectionCenRep )
+        {
+        iCollectionCenRep = CRepository::NewL( TUid::Uid( KVcxMyVideosCollectionCenrepUid ) );
+        }
+
+    return iCollectionCenRep->Get( KVcxMyVideosCollectionCenrepKeyLastWatchedIndicator, aValue );
+    }
+
+// -----------------------------------------------------------------------------
 // CVcxHgMyVideosModel::VideolistSortOrderL()
 // -----------------------------------------------------------------------------
 //
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideocopier.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideocopier.cpp	Tue May 25 12:44:54 2010 +0300
@@ -92,7 +92,6 @@
         TBool& aShowCopy,
         TBool& aShowMove )
     {
-    TVcxMyVideosDownloadState dlState( EVcxMyVideosDlStateNone );
     CIptvDriveMonitor& driveMonitor = iModel.DriveMonitorL();
     HBufC* videoUri = NULL;
     TInt drive( 0 );
@@ -101,37 +100,31 @@
 
     for ( TInt i = 0; i < aOperationTargets.Count(); i++ )
         {
-        dlState = iVideoModel.VideoDownloadState( aOperationTargets[i] );
-
-        // If video is not under download, there is source file that can be moved/copied.
-        if ( dlState == EVcxMyVideosDlStateNone )
+        // When we found source file that can be moved/copied, we need
+        // to also check that there is target drive that we can use.
+        videoUri = iVideoModel.GetVideoUri( aOperationTargets[i] ).AllocLC();
+        if ( videoUri->Length() > 0 )
             {
-            // When we found source file that can be moved/copied, we need
-            // to also check that there is target drive that we can use.
-            videoUri = iVideoModel.GetVideoUri( aOperationTargets[i] ).AllocLC();
-            if ( videoUri->Length() > 0 )
+            if ( iModel.FileServerSessionL().CharToDrive( videoUri->Des()[0], drive )
+                  == KErrNone )
                 {
-                if ( iModel.FileServerSessionL().CharToDrive( videoUri->Des()[0], drive )
-                      == KErrNone )
+                for ( TInt j = 0; j < driveMonitor.iAvailableDrives.Count(); j++ )
                     {
-                    for ( TInt j = 0; j < driveMonitor.iAvailableDrives.Count(); j++ )
+                    flags = driveMonitor.iAvailableDrives[j].iFlags;
+
+                    if ( driveMonitor.iAvailableDrives[j].iDrive != drive &&
+                            !(flags & TIptvDriveInfo::ELocked) && !(flags & TIptvDriveInfo::EMediaNotPresent) )
                         {
-                        flags = driveMonitor.iAvailableDrives[j].iFlags;
-    
-                        if ( driveMonitor.iAvailableDrives[j].iDrive != drive &&
-                                !(flags & TIptvDriveInfo::ELocked) && !(flags & TIptvDriveInfo::EMediaNotPresent) )
-                            {
-                            aShowMoveAndCopySubmenu = aShowCopy = aShowMove = ETrue;
+                        aShowMoveAndCopySubmenu = aShowCopy = aShowMove = ETrue;
 
-                            // No need to continue, we know that menu can be shown.
-                            CleanupStack::PopAndDestroy( videoUri );
-                            return;
-                            }
+                        // No need to continue, we know that menu can be shown.
+                        CleanupStack::PopAndDestroy( videoUri );
+                        return;
                         }
                     }
                 }
-            CleanupStack::PopAndDestroy( videoUri );
             }
+        CleanupStack::PopAndDestroy( videoUri );
         }
     }
 
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp	Tue May 25 12:44:54 2010 +0300
@@ -259,7 +259,7 @@
 // -----------------------------------------------------------------------------
 //
 void CVcxHgMyVideosVideoDataUpdater::AddItemToFetchArrayL( TMPXItemId aMPXItemId )
-    {      
+    {
     CVcxHgMyVideosVideoData* newItem = CVcxHgMyVideosVideoData::NewLC();
     newItem->SetMPXItemId( aMPXItemId );
     iFetchArray.AppendL( newItem );   
@@ -849,16 +849,10 @@
             }
         else
             {
-            // Use shared file handle to minimize thumbnailserver overhead 
-            RFs& fs = iModel.FileServerSessionL();
-            RFile64 file;
-            User::LeaveIfError( file.Open( fs, uri, EFileShareReadersOrWriters ));
-            CleanupClosePushL( file );
             CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC(
-                    file, mime );
+                    uri, mime );
             id = iModel.ThumbnailManager().GetL( *source );
             CleanupStack::PopAndDestroy( source ); 
-            CleanupStack::PopAndDestroy( &file );
             }
         aItem.SetThumbnailConversionId( id );
 
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolist.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolist.cpp	Tue May 25 12:44:54 2010 +0300
@@ -106,6 +106,39 @@
     }
 
 // -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosVideoList::HasSameItemsL( const CMPXMediaArray& aVideoList )
+    {
+    TInt count( iVideoList.Count() );
+    if ( aVideoList.Count() != count || count == 0 )
+        {
+        return EFalse;
+        }
+
+    TBool isSame( ETrue );
+    CMPXMedia* oldMedia = NULL;
+    CMPXMedia* newMedia = NULL;
+    for ( TInt i = 0; i < count; i++ )
+        {
+        oldMedia = iVideoList[i]->Media();
+        newMedia = aVideoList[i];
+        if ( oldMedia && oldMedia->IsSupported( KMPXMediaGeneralId )
+                && newMedia && newMedia->IsSupported( KMPXMediaGeneralId ) )
+            {
+            if ( oldMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) != 
+                    newMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) )
+                {
+                isSame = EFalse;
+                break;
+                }
+            }
+        }
+    return isSame;
+    }
+
+// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoList::VideoCount()
 // -----------------------------------------------------------------------------
 //
@@ -115,37 +148,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoList::VideoDownloadState()
-// -----------------------------------------------------------------------------
-//
-TVcxMyVideosDownloadState CVcxHgMyVideosVideoList::VideoDownloadState( TInt aIndex )
-    {
-    TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone );
-
-    if ( aIndex >= 0 && aIndex < iVideoList.Count() )
-        {
-        state = iVideoList[aIndex]->DownloadState();
-        }
-    return state;
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoList::GetOngoingDownloads()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoList::GetOngoingDownloads( RArray<TInt>& aDownloads )
-    {
-    TInt count( iVideoList.Count() );
-    for ( TInt i = 0; i < count; i++ )
-        {
-        if ( iVideoList[i]->DownloadState() != EVcxMyVideosDlStateNone )
-            {
-            aDownloads.Append( i );
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoList::RemoveVideo()
 // -----------------------------------------------------------------------------
 //
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp	Tue May 25 12:44:54 2010 +0300
@@ -195,13 +195,19 @@
 void CVcxHgMyVideosVideoListImpl::DoListActivateL( TInt aIndex )
     {
     TInt index = aIndex;
-    index = ( ( index != KErrNotFound ) ? index : iVideoModel->CurrentCategoryIndex() );
+    TInt currentIndex = iVideoModel->CurrentCategoryIndex();
+    index = ( ( index != KErrNotFound ) ? index : currentIndex );
     index = ( ( index != KErrNotFound ) ? index : 0 );
 
     iVideoModel->UpdateVideoListL( index );
     
     iVideoModel->DoModelActivateL();
     CVcxHgMyVideosListBase::DoListActivateL( index );
+    if ( index != currentIndex )
+        {
+        // Prevents old list from flickering
+        iScroller->DrawNow();
+        }
     iScroller->SetFocus( ETrue );
     }
 
@@ -503,24 +509,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoListImpl::ResumeDownloadL()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoListImpl::ResumeDownloadL()
-    {
-    iVideoModel->ResumeDownloadL( Highlight() );
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoListImpl::CancelDownloadL()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoListImpl::CancelDownloadL()
-    {
-    iVideoModel->CancelDownloadL( Highlight() );   
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoListImpl::HandleSortCommandL()
 // -----------------------------------------------------------------------------
 //
@@ -852,15 +840,8 @@
     iVideoModel->MarkedVideosL( markedVideos );
     TInt highlight = Highlight();
     TInt count = iVideoModel->VideoCount();
-    TVcxMyVideosDownloadState dlState( EVcxMyVideosDlStateNone );
-    TBool progressivePlay( EFalse );
-    if ( count > 0 && highlight >= 0 )
-        {
-        dlState = iVideoModel->VideoDownloadState( highlight );
-        progressivePlay = iVideoModel->IsProgressivePlayPossible( highlight );
-        }
-    TBool showPlay = ( ( markedVideos.Count() == 0 ) && ( highlight >= 0 ) && ( count > 0 )
-                       && ( ( dlState == EVcxMyVideosDlStateNone ) || ( progressivePlay ) ) );
+
+    TBool showPlay = ( ( markedVideos.Count() == 0 ) && ( highlight >= 0 ) && ( count > 0 ) );
     
     CleanupStack::PopAndDestroy( &markedVideos );
     
@@ -938,14 +919,11 @@
         {
         HBufC* videoUri = iVideoModel->GetVideoUri( operationTargets[i] ).AllocLC();
         TInt64 videoSize = iVideoModel->GetVideoSize( operationTargets[i] );
-        TVcxMyVideosDownloadState dlState = iVideoModel->VideoDownloadState( operationTargets[i] );
 
         IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoListImpl::HandleSendL() file: %S (%ld bytes)", videoUri, videoSize );
 
         // Attach file to message
-        if ( videoUri->Length() > 0 &&
-                videoSize > 0 &&
-                EVcxMyVideosDlStateNone == dlState )
+        if ( videoUri->Length() > 0 && videoSize > 0 )
             {
             message->AppendAttachmentL( *videoUri );
             attachmentsTotalSize += videoSize;
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistitem.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistitem.cpp	Tue May 25 12:44:54 2010 +0300
@@ -151,31 +151,3 @@
     {
     return iMedia;
     }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoListItem::DownloadState()
-// -----------------------------------------------------------------------------
-//
-TVcxMyVideosDownloadState CVcxHgMyVideosVideoListItem::DownloadState()
-    {
-    TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone );
-
-    if ( iMedia && iMedia->IsSupported( KVcxMediaMyVideosDownloadId ) )
-        {
-        // Download ID is non-zero if download status exists.
-        if ( *( iMedia->Value<TUint32>( KVcxMediaMyVideosDownloadId ) ) != 0 )
-            {
-            if ( iMedia->IsSupported( KVcxMediaMyVideosDownloadState ) )
-                {
-                state = static_cast<TVcxMyVideosDownloadState>(
-                            *( iMedia->Value<TUint8>( KVcxMediaMyVideosDownloadState ) ) );
-
-                if ( state == EVcxMyVideosDlStateDownloaded )
-                    {
-                    state = EVcxMyVideosDlStateNone;
-                    }
-                }
-            }
-        }
-    return state;
-    }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp	Tue May 25 12:44:54 2010 +0300
@@ -31,16 +31,16 @@
 #include <vcxmyvideosdefs.h>
 #include <MPFileDetailsDialog.h>
 #include <myvideosindicator.h>
+#include <centralrepository.h>
+
 #include "IptvDebug.h"
 
 #include "vcxhgmyvideosmodel.h"
 #include "vcxhgmyvideosmainview.h"
 #include "vcxhgmyvideoscollectionclient.h"
-#include "vcxhgmyvideosdownloadclient.h"
 #include "vcxhgmyvideosvideomodelhandler.h"
 #include "vcxhgmyvideosvideolistimpl.h"
 #include "vcxhgmyvideosvideodataupdater.h"
-#include "vcxhgmyvideosdownloadupdater.h"
 
 #include "vcxhgmyvideos.hrh"
 #include "vcxhgmyvideoslistbase.h"
@@ -129,8 +129,6 @@
                                                          iScroller,                                                        
                                                          *iVideoArray );
 
-    iDownloadUpdater = CVcxHgMyVideosDownloadUpdater::NewL( *this, *iVideoArray );
-    
     iVideoIndicator = CMyVideosIndicator::NewL();
     }
 
@@ -140,14 +138,13 @@
 //
 CVcxHgMyVideosVideoModelHandler::~CVcxHgMyVideosVideoModelHandler()
     {
-    iResumeArray.Close();
     iMarkedMediaList.Close();
     
     delete iVideoDetails;
     delete iVideoIndicator;
     delete iDataUpdater;
-    delete iDownloadUpdater;
     delete iVideoArray;
+	delete iRepository;
     }
 
 // -----------------------------------------------------------------------------
@@ -160,7 +157,6 @@
         "MPX My Videos UI # CVcxHgMyVideosVideoModelHandler::DoModelActivateL() - Enter" );
     
     iDataUpdater->SetPausedL( EFalse );
-    iDownloadUpdater->SetPausedL( EFalse );
     iModel.CollectionClient().SetVideoModelObserver( this );
 
     // Set scroller strip type
@@ -184,7 +180,6 @@
         "MPX My Videos UI # CVcxHgMyVideosVideoModelHandler::DoModelDeactivate() - Enter" );
     
     TRAP_IGNORE( iDataUpdater->SetPausedL( ETrue ) );
-    TRAP_IGNORE( iDownloadUpdater->SetPausedL( ETrue ) );
     iModel.CollectionClient().SetVideoModelObserver( NULL );
     iScroller.DisableScrollBuffer();
 
@@ -215,17 +210,24 @@
 
     CVcxHgMyVideosCollectionClient& collectionClient = iModel.CollectionClient();
 
-    // If we are re-opening the same video list again, then try 
-    // restore the highlight to previous position.
-    aCategoryIndex == iCurrentCategoryIndex ? iRestoreListPosition = ETrue :
-                                              iRestoreListPosition = EFalse;
-    // Removes videos from video list.
-    iVideoArray->RemoveVideoList();
-         
-    // Removes videos from scroller. After this command, list highlight 
-    // disappears, so don't forget to set highlight in NewVideoListL() 
-    // function.
-    iScroller.Reset();
+    if ( aCategoryIndex == iCurrentCategoryIndex )
+        {
+        // If we are re-opening the same video list again, then try 
+        // restore the highlight to previous position.
+        iRestoreListPosition = ETrue;
+        }
+    else
+        {
+        iRestoreListPosition = EFalse;
+        
+        // Removes videos from video list.
+        iVideoArray->RemoveVideoList();
+        
+        // Removes videos from scroller. After this command, list highlight 
+        // disappears, so don't forget to set highlight in NewVideoListL() 
+        // function.
+        iScroller.Reset();
+        }
         
     // Ask for video list from MPX collection.
     collectionClient.GetVideoListL( aCategoryIndex );
@@ -247,8 +249,6 @@
         	
     if ( iScroller.ItemCount() > 0 )
         {
-        iDownloadUpdater->SetPausedL( ETrue );
-    	
         TVcxMyVideosSortingOrder sortOrder = iModel.VideolistSortOrderL();
 
         if ( iVideoListImpl.IsMarking() )
@@ -271,9 +271,6 @@
             RestoreMarkingsL();
             }
 
-        iDownloadUpdater->VideoArrayChangedL();
-        iDownloadUpdater->SetPausedL( EFalse );
-
         // Switch to appropriate scroller strip
         UpdateScrollbarTypeL( sortOrder );
         }
@@ -319,35 +316,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::OngoingDownloads()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoModelHandler::OngoingDownloads(
-        RArray<TInt>& aDownloads )
-    {
-    iVideoArray->GetOngoingDownloads( aDownloads );
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::VideoDownloadState()
-// -----------------------------------------------------------------------------
-//
-TVcxMyVideosDownloadState CVcxHgMyVideosVideoModelHandler::VideoDownloadState( 
-        TInt aIndex )
-    {
-    return iVideoArray->VideoDownloadState( aIndex );
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::IsProgressivePlayPossible()
-// -----------------------------------------------------------------------------
-//
-TBool CVcxHgMyVideosVideoModelHandler::IsProgressivePlayPossible( TInt aIndex )
-    {
-    return iDownloadUpdater->IsPlayPossible( aIndex );
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::HandleMarkCommandL()
 // -----------------------------------------------------------------------------
 //
@@ -631,51 +599,14 @@
         {
         // Playback should be tried always when single clicking a video in My Videos
         TMPXItemId mpxItemId = media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
-        IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::PlayVideoL() aIndex=%d mpxItemId=%d", aIndex, (TInt) mpxItemId );
+        SetVideoLastWatchedL( *media );
+        ClearNewVideoFlagL( *media );
+		IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::PlayVideoL() aIndex=%d mpxItemId=%d", aIndex, (TInt) mpxItemId );
         iModel.CollectionClient().PlayVideoL( mpxItemId );        
         }
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::ResumeDownloadL()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoModelHandler::ResumeDownloadL( TInt aIndex )
-    {
-    CMPXMedia* media = iVideoArray->MPXMedia( aIndex );
-
-    if ( media && media->IsSupported( KMPXMediaGeneralId ) )
-        {
-        TVcxMyVideosDownloadState dlState = VideoDownloadState( aIndex );
-        
-        if ( dlState == EVcxMyVideosDlStatePaused || dlState == EVcxMyVideosDlStateFailed )
-            {
-            iModel.DownloadClient().ResumeDownloadL( *media );
-            
-            TUint32 mpxId = media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ).iId1;
-            if ( iResumeArray.Find( mpxId ) == KErrNotFound )
-                {
-                iResumeArray.AppendL( mpxId );
-                }
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::CancelDownloadL()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoModelHandler::CancelDownloadL( TInt aIndex )
-    {
-    CMPXMedia* media = iVideoArray->MPXMedia( aIndex );
-
-    if ( media )
-        {            
-        iModel.DownloadClient().CancelDownloadL( *media );
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::Release()
 // -----------------------------------------------------------------------------
 //
@@ -739,31 +670,9 @@
 // CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowLC()
 // -----------------------------------------------------------------------------
 // 
-HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowLC(
-            TInt aIndex,
-            CMPXMedia& aMedia,
-            TBool& aIsDownloading )
+HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowLC( CMPXMedia& aMedia )
 
     {
-    if ( VideoDownloadState( aIndex ) == EVcxMyVideosDlStateNone )
-        {
-        aIsDownloading = EFalse;
-        return FormatVideoSecondRowCompletedLC( aMedia );
-        }
-    else
-        {
-        aIsDownloading = ETrue;
-        return FormatVideoSecondRowDownloadingLC( aIndex, aMedia );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowCompletedLC()
-// -----------------------------------------------------------------------------
-// 
-HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowCompletedLC( 
-        CMPXMedia& aMedia )
-    {
     _LIT( KVcxSecondLineSeparator, "," );
 
     HBufC* details = NULL;
@@ -867,52 +776,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowDownloadingLC()
-// -----------------------------------------------------------------------------
-// 
-HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowDownloadingLC(
-            TInt aIndex,
-            CMPXMedia& aMedia )
-    {
-    HBufC* details = NULL;
-    TInt progress = DownloadProgressL( aMedia );
-
-    switch ( VideoDownloadState( aIndex ) )
-        {
-        case EVcxMyVideosDlStateDownloading:
-            {
-            details = StringLoader::LoadLC( R_VCXHGMYVIDEOS_VIDEO_DOWNLOADING, progress );
-            break;
-            }
-        case EVcxMyVideosDlStateFailed:
-            {
-            details = StringLoader::LoadLC( R_VCXHGMYVIDEOS_DOWNLOAD_FAILED, progress );
-            break;
-            }
-        case EVcxMyVideosDlStatePaused:
-            {
-            details = StringLoader::LoadLC( R_VCXHGMYVIDEOS_DOWNLOAD_PAUSED, progress );
-            break;
-            }
-        case EVcxMyVideosDlStateNone:            
-        case EVcxMyVideosDlStateDownloaded:
-        default:
-            {
-            IPTVLOGSTRING2_LOW_LEVEL( 
-                "MPX My Videos UI # FormatVideoSecondRowDownloadingL() Unexpected state (%d)!",
-                VideoDownloadState( aIndex ) );
-            #ifdef _DEBUG
-            User::Panic( KVcxHgMyVideosPanic, EVcxHgMyVideosPanicLogicalVideo );
-            #else
-            User::Leave( KErrArgument );
-            #endif // _DEBUG
-            }
-        }
-
-    return details;
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::ReplaceVideoArrayL()
 // -----------------------------------------------------------------------------
 // 
@@ -920,32 +783,6 @@
     {
     iVideoArray->ReplaceVideoListL( aVideoList );
     iDataUpdater->InfoArrayChanged();
-    iDownloadUpdater->VideoArrayChangedL();
-    }
-
-// -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::DownloadProgressL()
-// -----------------------------------------------------------------------------
-// 
-TInt CVcxHgMyVideosVideoModelHandler::DownloadProgressL( const CMPXMedia& aMpxMedia )
-    {
-    TInt progress = 0;
-
-    if ( aMpxMedia.IsSupported( KVcxMediaMyVideosDownloadProgress ) )
-        {
-        progress = static_cast<TInt>( 
-                       aMpxMedia.ValueTObjectL<TInt8>( KVcxMediaMyVideosDownloadProgress ) );
-        }
-
-    IPTVLOGSTRING3_LOW_LEVEL(
-        "MPX My Videos UI # DownloadProgressL() Id:%d Progress:%d",
-        static_cast<TInt>( aMpxMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) ),
-        progress );
-
-    progress = ( progress >= 0 ? progress : 0 );
-    progress = ( progress < 100 ? progress : 99 );
-
-    return progress;
     }
 
 // -----------------------------------------------------------------------------
@@ -977,10 +814,10 @@
                     }
                 CleanupStack::PopAndDestroy( name );
                 }
-            TBool isDownloading( EFalse );
+
             HBufC* details( NULL );
             
-            details = FormatVideoSecondRowLC( aListIndex, *media, isDownloading );
+            details = FormatVideoSecondRowLC( *media );
             if ( details->Length() > 0 )
                 {
                 item.SetTextL( *details );
@@ -1038,9 +875,8 @@
 // 
 void CVcxHgMyVideosVideoModelHandler::DeleteItemL( TMPXItemId aMpxItemId )
     {
-    // Remove video from data and download updaters.
+    // Remove video from data updater.
     iDataUpdater->ReleaseData( aMpxItemId );
-    iDownloadUpdater->RemoveDownload( aMpxItemId );
 
     // Remove video from video array.
     TInt removedIndex = iVideoArray->RemoveVideo( aMpxItemId );
@@ -1083,14 +919,6 @@
         iScroller.DrawDeferred();
         iView.DynInitMskL();
         }
-    
-    TInt index( KErrNotFound );
-    index = iResumeArray.Find( aMpxItemId.iId1 );
-    
-    if ( index >= 0 && index < iResumeArray.Count() )
-        {
-        iResumeArray.Remove( index );
-        }
     }
 
 // -----------------------------------------------------------------------------
@@ -1133,8 +961,6 @@
                 iView.DynInitMskL();
                                                     
                 iDataUpdater->RequestDataL( itemId );    
-                iDownloadUpdater->VideoModifiedL( 
-                    EMPXItemInserted, itemId, EVcxMyVideosListNoInfo );
                 }
             }
          else
@@ -1208,12 +1034,19 @@
     IPTVLOGSTRING2_LOW_LEVEL( 
         "MPX My Videos UI # NewVideoListL(count=%d) - Enter", aVideoList.Count() );
         
-    ReplaceVideoArrayL( aVideoList );
+    TBool sameItems = iVideoArray->HasSameItemsL( aVideoList );
+    if ( !sameItems )
+        {
+        ReplaceVideoArrayL( aVideoList );
+        }
     
     TInt videoCount = iVideoArray->VideoCount();         
     if (  videoCount > 0 )
         {
-        ResizeScrollerL( videoCount );
+        if ( !sameItems )
+            {
+            ResizeScrollerL( videoCount );
+            }
 
         TInt firstItemIndex( KErrNotFound );
 
@@ -1312,7 +1145,6 @@
                 
                     if ( ! aSimulated )
                         {
-                        iDownloadUpdater->VideoModifiedL( aEventType, aMpxItemId, aExtraInfo );
                         iDataUpdater->RequestDataL( aMpxItemId );    
 					    }                      
                     iView.DynInitMskL();
@@ -1361,21 +1193,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::ResumeStartedFromBeginningL()
-// Download updater calls this when resume has started from beginning.
-// -----------------------------------------------------------------------------
-// 
-void CVcxHgMyVideosVideoModelHandler::ResumeStartedFromBeginningL( TUint32 aMpxId )
-    {
-    TInt index = iResumeArray.Find( aMpxId );
-    if ( index >= 0 )
-        {
-        iResumeArray.Remove( index );
-        iVideoListImpl.ShowResumeStartsFromBeginningNoteL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::VideoDeletionCompletedL()
 // MPX Collection calls this callback when deletion of multiple videos completes.
 // -----------------------------------------------------------------------------
@@ -1555,3 +1372,40 @@
 
     iMarkedMediaList.Reset();
     }
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::SetVideoLastWatchedL()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoModelHandler::SetVideoLastWatchedL( CMPXMedia& aMedia )
+    {    
+    if ( !iRepository )
+        {
+        iRepository = CRepository::NewL( TUid::Uid( KVcxMyVideosCollectionCenrepUid ) );
+        }
+    iRepository->Set( KVcxMyVideosCollectionCenrepKeyLastWatchedMpxId, 
+                      TInt( aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ).iId1 ));
+
+    iRepository->Set( KVcxMyVideosCollectionCenrepKeyLastWatchedName,
+                       aMedia.ValueText( KMPXMediaGeneralTitle ));
+
+    iRepository->Set( KVcxMyVideosCollectionCenrepKeyLastWatchedPath,
+                       aMedia.ValueText( KMPXMediaGeneralUri ));
+
+    iRepository->Set( KVcxMyVideosCollectionCenrepKeyLastWatchedIndicator,
+                       TInt( VideoIndicator().IsIndicatorShown( aMedia )) );
+	}
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::ClearNewVideoFlagL()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoModelHandler::ClearNewVideoFlagL( CMPXMedia& aMedia )
+    {    
+    TUint32 flags = aMedia.ValueTObjectL<TUint32>( KMPXMediaGeneralFlags );
+    if( flags & EVcxMyVideosVideoNew )
+        {
+        flags &= ~EVcxMyVideosVideoNew;
+        iModel.CollectionClient().SetFlagsL( 
+		    aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ), flags );   
+        }    
+    }
--- a/videocollection/hgmyvideos/tsrc/ut_vcxhgmyvideosmainview/src/vcxhgmyvideosvideolistimpl_stub.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/tsrc/ut_vcxhgmyvideosmainview/src/vcxhgmyvideosvideolistimpl_stub.cpp	Tue May 25 12:44:54 2010 +0300
@@ -269,22 +269,6 @@
 //  
 // -----------------------------------------------------------------------------
 //
-void CVcxHgMyVideosVideoListImpl::ResumeDownloadL()
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//  
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoListImpl::CancelDownloadL()
-    { 
-    }
-
-// -----------------------------------------------------------------------------
-//  
-// -----------------------------------------------------------------------------
-//
 void CVcxHgMyVideosVideoListImpl::HandleSortCommandL( TInt aSortCommand )
     {
     }
--- a/videocollection/hgmyvideos/tsrc/ut_vcxhgmyvideosmainview/src/vcxhgmyvideosvideomodelhandler_stub.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/hgmyvideos/tsrc/ut_vcxhgmyvideosmainview/src/vcxhgmyvideosvideomodelhandler_stub.cpp	Tue May 25 12:44:54 2010 +0300
@@ -171,35 +171,6 @@
     }
 
 // -----------------------------------------------------------------------------
-//  
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoModelHandler::OngoingDownloads(
-        RArray<TInt>& aDownloads )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-TVcxMyVideosDownloadState CVcxHgMyVideosVideoModelHandler::VideoDownloadState( 
-        TInt aIndex )
-    {
-    return (TVcxMyVideosDownloadState) 1;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TVcxMyVideosDownloadState CVcxHgMyVideosVideoModelHandler::VideoDownloadState( 
-        CMPXMedia& aMedia )
-    {
-    return (TVcxMyVideosDownloadState) 1;
-    }
-
-// -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
@@ -392,23 +363,6 @@
     {
     }
 
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoModelHandler::ResumeDownloadL( TInt aIndex )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoModelHandler::CancelDownloadL( TInt aIndex )
-    {
-    }
-
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -443,33 +397,13 @@
 // -----------------------------------------------------------------------------
 // 
 HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowLC( 
-           CMPXMedia& aMedia, TBool& aIsDownloading )
+           CMPXMedia& aMedia )
         
     {
     return ( HBufC* ) NULL ;
     }
 
 // -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-// 
-HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowCompletedLC( 
-        CMPXMedia& aMedia )
-    {
-    return ( HBufC* )NULL ;
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-// 
-HBufC* CVcxHgMyVideosVideoModelHandler::FormatVideoSecondRowDownloadingLC( 
-           CMPXMedia& aMedia )
-    {
-    return ( HBufC* )NULL ;
-    }
-
-// -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 // 
@@ -482,15 +416,6 @@
 //
 // -----------------------------------------------------------------------------
 // 
-TInt CVcxHgMyVideosVideoModelHandler::DownloadProgressL( const CMPXMedia& aMpxMedia )
-    {
-    return 0;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-// 
 void CVcxHgMyVideosVideoModelHandler::UpdateVideoListItemL( TInt aListIndex )
     {
     }
@@ -555,14 +480,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// Download updater calls this when resume has started from beginning.
-// -----------------------------------------------------------------------------
-// 
-void CVcxHgMyVideosVideoModelHandler::ResumeStartedFromBeginningL( TUint32 aMpxId )
-    {
-    }
-
-// -----------------------------------------------------------------------------
 // MPX Collection calls this callback when deletion of multiple videos completes.
 // -----------------------------------------------------------------------------
 // 
Binary file videocollection/mpxmyvideoscollection/conf/videoscollection.confml has changed
Binary file videocollection/mpxmyvideoscollection/conf/videoscollection_2001B2A9.crml has changed
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp	Tue May 25 12:44:54 2010 +0300
@@ -574,17 +574,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 );
-                    }
                 }
             }
         }
@@ -593,15 +587,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/vcxmyvideosmdsdb.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp	Tue May 25 12:44:54 2010 +0300
@@ -1336,18 +1336,6 @@
             
             static_cast<CMdEUint32Property*>(property)->SetValueL( flags );
             }
-        
-        // Play pos has really changed -> put the video as last watched
-        if ( aObject.Property( *iLastPlayPositionPropertyDef, property, 0 ) == KErrNotFound ||
-             static_cast<CMdEReal32Property*>(property)->Value() != lastPlaybackPos  )
-            {
-            if ( !iRepository )
-                {
-                iRepository = CRepository::NewL( TUid::Uid( KVcxMyVideosCollectionCenrepUid ) );
-                }
-            iRepository->Set( KVcxMyVideosCollectionCenrepKeyLastWatchedMpxId,
-                                            TInt ( aVideo.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ).iId1 ) );
-            }
         if ( aObject.Property( *iLastPlayPositionPropertyDef, property, 0 ) != KErrNotFound )
             {
             static_cast<CMdEReal32Property*>(property)->SetValueL( lastPlaybackPos );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/group/VCXMyVideosCollectionPluginTest_udeb.pkg	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,99 @@
+;
+; 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 the License "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:  Package file for My videos mpx collection plugin STIF tests;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"VCXMyVideosCollectionPluginTest"},(0x00000000),1,1,0,TYPE=SA
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+"/epoc32/release/armv5/udeb/VCXMyVideosCollectionPluginTest.dll"   - "!:/Sys/Bin/VCXMyVideosCollectionPluginTest.dll"
+"/epoc32/release/armv5/udeb/MediatorEventVerifier.dll"             - "!:/Sys/Bin/MediatorEventVerifier.dll"
+"/epoc32/release/armv5/udeb/VCXTestUtilModule.dll"                 - "!:/Sys/Bin/VCXTestUtilModule.dll"
+"/epoc32/release/armv5/udeb/VCXTestCommon.dll"                     - "!:/Sys/Bin/VCXTestCommon.dll"
+"/epoc32/release/armv5/udeb/VCXTestMyVideosCollectionClient.dll"   - "!:/Sys/Bin/VCXTestMyVideosCollectionClient.dll"
+"../conf/VCXMyVideosCollectionPluginTestAttributes.cfg"            - "C:/TestFramework/VCXMyVideosCollectionPluginTestAttributes.cfg"
+"../conf/VCXMyVideosCollectionPluginTestDelete.cfg"                - "C:/TestFramework/VCXMyVideosCollectionPluginTestDelete.cfg"
+"../conf/VCXMyVideosCollectionPluginTestDownload.cfg"              - "C:/TestFramework/VCXMyVideosCollectionPluginTestDownload.cfg"
+"../conf/VCXMyVideosCollectionPluginTestDownload2.cfg"             - "C:/TestFramework/VCXMyVideosCollectionPluginTestDownload2.cfg"
+"../conf/VCXMyVideosCollectionPluginTestMultipleDls.cfg"           - "C:/TestFramework/VCXMyVideosCollectionPluginTestMultipleDls.cfg"
+"../conf/VCXMyVideosCollectionPluginTestFullMemory.cfg"            - "C:/TestFramework/VCXMyVideosCollectionPluginTestFullMemory.cfg"
+"../conf/VCXMyVideosCollectionPluginTestLists.cfg"                 - "C:/TestFramework/VCXMyVideosCollectionPluginTestLists.cfg"
+"../conf/VCXMyVideosCollectionPluginTestMoveCopy.cfg"              - "C:/TestFramework/VCXMyVideosCollectionPluginTestMoveCopy.cfg"
+"../conf/VCXMyVideosCollectionPluginTestMultiDrives.cfg"           - "C:/TestFramework/VCXMyVideosCollectionPluginTestMultiDrives.cfg"
+"../conf/VCXMyVideosCollectionPluginTestSideload.cfg"              - "C:/TestFramework/VCXMyVideosCollectionPluginTestSideload.cfg"
+"../conf/VCXMyVideosCollectionPluginTestSorting.cfg"               - "C:/TestFramework/VCXMyVideosCollectionPluginTestSorting.cfg"
+"../conf/VCXMyVideosCollectionPluginTestRobustness.cfg"            - "C:/TestFramework/VCXMyVideosCollectionPluginTestRobustness.cfg"
+"../conf/VCXMyVideosCollectionPluginTestHelium.cfg"                - "C:/TestFramework/VCXMyVideosCollectionPluginTestHelium.cfg"
+"../conf/VCXMyVideosCollectionPluginTestMediator.cfg"              - "C:/TestFramework/VCXMyVideosCollectionPluginTestMediator.cfg"
+"../conf/vcxmvcollectionplugintest.inc"                            - "C:/TestFramework/vcxmvcollectionplugintest.inc"
+"../conf/VCXConsts.inc"                                            - "C:/TestFramework/VCXConsts.inc"
+"../conf/VCXDrives.inc"                                            - "C:/TestFramework/VCXDrives.inc"
+"../conf/VCXErrors.inc"                                            - "C:/TestFramework/VCXErrors.inc"
+
+; The cenrep and testframework.ini files won't install with sis, only for ATS test runs.
+;TEMPCOMMENT "../init/TestFramework.ini"                                    -  "C:/TestFramework/TestFramework.ini"
+;TEMPCOMMENT "../data/cccccc00.cre"                                         -   "c:\private\10202be9\persists\cccccc00.cre"
+
+"../Data/MMC/video_3gp.3gp"                                     -  "e:/testing/data/video_3gp.xxx"
+"../Data/MMC/video_3gp2.3g2"                                    -  "e:/testing/data/video_3gp2.xxx"
+"../Data/MMC/video_wmv.dat"                                     -  "e:/testing/data/video_wmv.xxx"
+"../Data/MMC/video_mp2.mp2"                                     -  "e:/testing/data/video_mp2.xxx"
+"../Data/MMC/video_mpeg1.mpg"                                   -  "e:/testing/data/video_mpeg1.xxx"
+"../Data/MMC/video_mpeg2.mpg"                                   -  "e:/testing/data/video_mpeg2.xxx"
+"../Data/MMC/video_supervideocd.mpg"                            -  "e:/testing/data/video_supervideocd.xxx"
+"../Data/MMC/video_mp3.mp3"                                     -  "e:/testing/data/video_mp3.xxx"
+"../Data/MMC/video_applempeg.mp4"                               -  "e:/testing/data/video_applempeg.xxx"
+"../Data/MMC/video_mpeg4.mp4"                                   -  "e:/testing/data/video_mpeg4.xxx"
+"../Data/MMC/video_mpegavc.mp4"                                 -  "e:/testing/data/video_mpegavc.xxx"
+"../Data/MMC/video_quicktime.mov"                               -  "e:/testing/data/video_quicktime.xxx"
+"../Data/MMC/video_realvideo.rm"                                -  "e:/testing/data/video_realvideo.xxx"
+"../Data/MMC/video_avi.avi"                                     -  "e:/testing/data/video_avi.xxx"
+"../Data/MMC/video_aviac3.avi"                                  -  "e:/testing/data/video_aviac3.xxx"
+
+; Embedded SIS
+; None
+
+; End of Package body
+
+; PKG dependencies
+; None
+
+; PKG capabilities
+; None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/Bmarm/VcxMyVideosCollectionUtilTestU.DEF	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/Bwins/VcxMyVideosCollectionUtilTestU.DEF	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/conf/VcxMyVideosCollectionUtilTest.cfg	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,132 @@
+[Test]
+title CreateEmptyMediaList
+create VcxMyVideosCollectionUtilTest foobar
+foobar CreateEmptyMediaList
+delete foobar
+[Endtest]
+
+[Test]
+title CreateEmptyMessageList
+create VcxMyVideosCollectionUtilTest foobar
+foobar CreateEmptyMessageList
+delete foobar
+[Endtest]
+
+[Test]
+title CopyFromListToList
+create VcxMyVideosCollectionUtilTest foobar
+foobar CopyFromListToList 5 3
+delete foobar
+[Endtest]
+
+[Test]
+title DriveLetter2DriveNumber
+create VcxMyVideosCollectionUtilTest foobar
+foobar DriveLetter2DriveNumber
+delete foobar
+[Endtest]
+
+[Test]
+title MakeUniqueFileName
+create VcxMyVideosCollectionUtilTest foobar
+foobar MakeUniqueFileName
+delete foobar
+[Endtest]
+
+[Test]
+title Origin
+create VcxMyVideosCollectionUtilTest foobar
+foobar Origin
+delete foobar
+[Endtest]
+
+[Test]
+title Origin2
+create VcxMyVideosCollectionUtilTest foobar
+foobar Origin2
+delete foobar
+[Endtest]
+
+[Test]
+title Flags
+create VcxMyVideosCollectionUtilTest foobar
+foobar Flags
+delete foobar
+[Endtest]
+
+[Test]
+title DownloadId
+create VcxMyVideosCollectionUtilTest foobar
+foobar DownloadId
+delete foobar
+[Endtest]
+
+[Test]
+title DownloadState
+create VcxMyVideosCollectionUtilTest foobar
+foobar DownloadState
+delete foobar
+[Endtest]
+
+[Test]
+title Id
+create VcxMyVideosCollectionUtilTest foobar
+foobar Id
+delete foobar
+[Endtest]
+
+[Test]
+title Duration
+create VcxMyVideosCollectionUtilTest foobar
+foobar Duration
+delete foobar
+[Endtest]
+
+[Test]
+title Title
+create VcxMyVideosCollectionUtilTest foobar
+foobar Title
+delete foobar
+[Endtest]
+
+[Test]
+title Rating
+create VcxMyVideosCollectionUtilTest foobar
+foobar Rating
+delete foobar
+[Endtest]
+
+[Test]
+title AudioFourCc
+create VcxMyVideosCollectionUtilTest foobar
+foobar AudioFourCc
+delete foobar
+[Endtest]
+
+[Test]
+title AreSupported
+create VcxMyVideosCollectionUtilTest foobar
+foobar AreSupported
+delete foobar
+[Endtest]
+
+[Test]
+title AttrBelongsToFullSet
+create VcxMyVideosCollectionUtilTest foobar
+foobar AttrBelongsToFullSet
+delete foobar
+[Endtest]
+
+[Test]
+title PrintOpenFileHandles
+create VcxMyVideosCollectionUtilTest foobar
+foobar PrintOpenFileHandles
+delete foobar
+[Endtest]
+
+[Test]
+title GetProcessName
+create VcxMyVideosCollectionUtilTest foobar
+foobar GetProcessName testscripter_vcxmyvideoscollectionutiltest
+delete foobar
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/data/mmc/file.txt	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,1 @@
+Some file to open.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/eabi/VcxMyVideosCollectionUtilTestu.def	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/VcxMyVideosCollectionUtilTest.mmp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,86 @@
+/*TYPE TESTCLASS*/
+/*
+* 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: MMP file for STIF Test Framework's TestScripter 
+* testclass test module.
+*
+*/
+
+#include <platform_paths.hrh>
+
+SMPSAFE
+
+TARGET          VcxMyVideosCollectionUtilTest.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E3
+
+CAPABILITY      ALL -TCB
+/* Remove comments and replace 0x00000000 with correct vendor id */
+// VENDORID     0x00000000
+/* Remove comments and replace 0x00000000 with correct secure id */
+// SECUREID     0x00000000
+
+//TARGETPATH      ?target_path
+DEFFILE         VcxMyVideosCollectionUtilTest.def
+
+USERINCLUDE     ../inc 
+USERINCLUDE     ../../../inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          VcxMyVideosCollectionUtilTest.cpp
+SOURCE          VcxMyVideosCollectionUtilTestBlocks.cpp
+
+
+SOURCEPATH      ../../../src
+SOURCE          vcxmyvideoscollectionutil.cpp
+
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+
+// From original project, should these be stubbed?
+LIBRARY         estor.lib
+LIBRARY         mpxcommon.lib
+LIBRARY         bafl.lib
+LIBRARY         efsrv.lib
+
+LANG            SC
+
+/*
+START WINS      
+?wins_specific_information
+END
+
+START MARM
+?marm_specific_information
+END
+*/
+// Other possible keywords:
+ 
+// DOCUMENT     ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
+/*
+START BITMAP ?target
+TARGETPATH   ?emulated_path_on_target_machine
+HEADER
+SOURCE       ?color_depth ?source_bitmap
+END
+*/
+// DEFFILE ?filename
+// AIF ?filename
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/VcxMyVideosCollectionUtilTest.pkg	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,66 @@
+;
+; 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:
+;
+; 	Installation file for STIF
+;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"STIF"},(0x00000000),1,1,0,TYPE=SA
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+"/epoc32/release/armv5/udeb/VcxMyVideosCollectionUtilTest.dll"   -   "!:/Sys/Bin/VcxMyVideosCollectionUtilTest.dll"
+
+"../data/mmc/file.txt"                                           - "c:/data/vcxmyvideoscollectionutiltest_file.txt"
+"../conf/VcxMyVideosCollectionUtilTest.cfg"                      - "c:/testframework/VcxMyVideosCollectionUtilTest.cfg"
+
+; testframework.ini won't install with sis, only for ATS test runs.
+"../init/testframework.ini"                                      - "c:/testframework/testframework.ini"
+  
+; Embedded SIS 
+; None
+
+; End of Package body
+
+; PKG dependencies
+; None
+
+; PKG capabilities
+; None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/VcxMyVideosCollectionUtilTest_DoxyFile.txt	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,240 @@
+#
+# 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:
+#
+#
+
+# Doxyfile 1.4.1
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = VcxMyVideosCollectionUtilTest
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = \VcxMyVideosCollectionUtilTest\
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = YES
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = 
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = NO
+STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = NO
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = YES
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = NO
+GENERATE_TESTLIST      = NO
+GENERATE_BUGLIST       = NO
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = YES
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = \VcxMyVideosCollectionUtilTest\
+FILE_PATTERNS          = *.h \
+                         *.rh \
+                         *.hrh
+RECURSIVE              = YES
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = NO
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = YES
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = YES
+TOC_EXPAND             = YES
+DISABLE_INDEX          = YES
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = YES
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = YES
+RTF_OUTPUT             = Doc
+COMPACT_RTF            = YES
+RTF_HYPERLINKS         = YES
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = NONSHARABLE_CLASS
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = YES
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 0
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/bld.inf	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* 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:
+*
+*/
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS MARM so you can ignore this if you just build these
+	
+	DEFAULT
+
+PRJ_TESTEXPORTS
+// NOTE: If using ARS requirements all export operations should be done under this.
+// 'abld test export'
+
+PRJ_EXPORTS
+../conf/vcxmyvideoscollectionutiltest.cfg       /epoc32/winscw/c/testframework/vcxmyvideoscollectionutiltest.cfg
+../init/testframework.ini                       /epoc32/winscw/c/testframework/testframework.ini
+
+../data/mmc/file.txt                            /epoc32/winscw/c/data/vcxmyvideoscollectionutiltest_file.txt
+
+PRJ_TESTMMPFILES
+
+
+
+PRJ_MMPFILES
+
+	VcxMyVideosCollectionUtilTest.mmp
+	
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+\agnmodel\group\agnmodel.mmp
+#if defined(MARM)
+\agnmodel\group\agsvexe.mmp
+#endif
+*/
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/group/make_vcxmyvideoscollectionutiltest_sisx.bat	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,22 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@rem
+
+
+call makesis.exe VcxMyVideosCollectionUtilTest.pkg VcxMyVideosCollectionUtilTest.sis
+call signsis.exe VcxMyVideosCollectionUtilTest.sis VcxMyVideosCollectionUtilTest.sisx Nokia_RnDCert_02.der Nokia_RnDCert_02.key
+call del VcxMyVideosCollectionUtilTest.sis
+
+pause
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/inc/VcxMyVideosCollectionUtilTest.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,213 @@
+/*
+* 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: STIF testclass declaration
+*
+*/
+
+#ifndef VCXMYVIDEOSCOLLECTIONUTILTEST_H
+#define VCXMYVIDEOSCOLLECTIONUTILTEST_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+#include <TestclassAssert.h>
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 0
+#define TEST_CLASS_VERSION_MINOR 0
+#define TEST_CLASS_VERSION_BUILD 0
+
+// Logging path
+_LIT( KVcxMyVideosCollectionUtilTestLogPath, "\\logs\\testframework\\VcxMyVideosCollectionUtilTest\\" ); 
+// Log file
+_LIT( KVcxMyVideosCollectionUtilTestLogFile, "VcxMyVideosCollectionUtilTest.txt" ); 
+_LIT( KVcxMyVideosCollectionUtilTestLogFileWithTitle, "VcxMyVideosCollectionUtilTest_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CVcxMyVideosCollectionUtilTest;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+*  CVcxMyVideosCollectionUtilTest test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CVcxMyVideosCollectionUtilTest) : public CScriptBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CVcxMyVideosCollectionUtilTest* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CVcxMyVideosCollectionUtilTest();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CVcxMyVideosCollectionUtilTest( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        // Prohibit copy constructor if not deriving from CBase.
+        // ?classname( const ?classname& );
+        // Prohibit assigment operator if not deriving from CBase.
+        // ?classname& operator=( const ?classname& );
+
+        /**
+        * Frees all resources allocated from test methods.
+        * @since ?Series60_version
+        */
+        void Delete();
+
+        /**
+        * Test methods are listed below. 
+        */
+        virtual TInt CreateEmptyMediaListL( CStifItemParser& aItem );
+
+        virtual TInt CreateEmptyMessageListL( CStifItemParser& aItem );        
+
+        virtual TInt CopyFromListToListL( CStifItemParser& aItem );
+
+        virtual TInt DriveLetter2DriveNumberL( CStifItemParser& aItem );
+
+        virtual TInt MakeUniqueFileNameL( CStifItemParser& aItem );
+
+        virtual TInt OriginL( CStifItemParser& aItem );
+
+        virtual TInt FlagsL( CStifItemParser& aItem );
+      
+        virtual TInt DownloadIdL( CStifItemParser& aItem );
+     
+        virtual TInt DownloadStateL( CStifItemParser& aItem );
+      
+        virtual TInt IdL( CStifItemParser& aItem );
+      
+        virtual TInt DurationL( CStifItemParser& aItem );
+     
+        virtual TInt TitleL( CStifItemParser& aItem );
+      
+        virtual TInt RatingL( CStifItemParser& aItem );
+       
+        virtual TInt AudioFourCcL( CStifItemParser& aItem );
+       
+        virtual TInt AreSupportedL( CStifItemParser& aItem );
+     
+        virtual TInt AttrBelongsToFullSetL( CStifItemParser& aItem );
+        
+        virtual TInt Origin( CStifItemParser& aItem );
+
+        virtual TInt PrintOpenFileHandlesL( CStifItemParser& aItem );
+     
+        virtual TInt GetProcessNameL( CStifItemParser& aItem );
+
+        /**
+         * Method used to log version of test class
+         */
+        void SendTestClassVersion();
+
+        //ADD NEW METHOD DEC HERE
+        //[TestMethods] - Do not remove
+
+    public:     // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    protected:  // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    private:    // Data
+        
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // VCXMYVIDEOSCOLLECTIONUTILTEST_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/init/testframework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,169 @@
+#
+# This is STIFTestFramework initialization file 123
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions 
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Sret of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases' 
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.sd
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if 
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+
+[Engine_Defaults]
+
+TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', 'TestCases' or 'FullReport'
+
+CreateTestReport= YES			# Possible values: YES or NO
+
+TestReportFilePath= c:\Logs\testframework\
+TestReportFileName= testreport_mpxvideoplayertest
+
+TestReportFormat= TXT			# Possible values: TXT or HTML
+TestReportOutput= FILE			# Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04 
+UITestingSupport= YES 
+SeparateProcesses= YES 
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= TestScripter
+TestCaseFile= c:\testframework\vcxmyvideoscollectionutiltest.cfg
+[End_Module]
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIFTestFramework logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
+
+#CreateLogDirectories= YES		# Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML			# Possible values: TXT or HTML
+#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+#HardwareBasePath=  C:\
+#HardwareFormat= TXT			# Possible values: TXT or HTML
+#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES			# Possible values: YES or NO
+#WithTimeStamp= YES			# Possible values: YES or NO
+#WithLineBreak= YES			# Possible values: YES or NO
+#WithEventRanking= YES			# Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/src/VcxMyVideosCollectionUtilTest.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,199 @@
+/*
+* 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: This file contains testclass implementation.
+*
+*/
+
+// INCLUDE FILES
+#include <StifTestInterface.h>
+#include "VcxMyVideosCollectionUtilTest.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::CVcxMyVideosCollectionUtilTest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CVcxMyVideosCollectionUtilTest::CVcxMyVideosCollectionUtilTest( 
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CVcxMyVideosCollectionUtilTest::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings; 
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        } 
+    // Close Setting server session
+    settingServer.Close();
+
+    TFileName logFileName;
+    
+    if(loggerSettings.iAddTestCaseTitle)
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        logFileName.Format(KVcxMyVideosCollectionUtilTestLogFileWithTitle, &title);
+        }
+    else
+        {
+        logFileName.Copy(KVcxMyVideosCollectionUtilTestLogFile);
+        }
+
+    iLog = CStifLogger::NewL( KVcxMyVideosCollectionUtilTestLogPath, 
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+    
+    SendTestClassVersion();
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CVcxMyVideosCollectionUtilTest* CVcxMyVideosCollectionUtilTest::NewL( 
+    CTestModuleIf& aTestModuleIf )
+    {
+    CVcxMyVideosCollectionUtilTest* self = new (ELeave) CVcxMyVideosCollectionUtilTest( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CVcxMyVideosCollectionUtilTest::~CVcxMyVideosCollectionUtilTest()
+    { 
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog; 
+
+    }
+
+//-----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CVcxMyVideosCollectionUtilTest::SendTestClassVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+	
+	TFileName moduleName;
+	moduleName = _L("VcxMyVideosCollectionUtilTest.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	}
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL( 
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CVcxMyVideosCollectionUtilTest::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideoscollectionutiltest/src/VcxMyVideosCollectionUtilTestBlocks.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,535 @@
+/*
+* 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: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include <vcxmyvideosdefs.h>
+#include <mpxmedia.h>
+#include <mpxattribute.h>
+#include <mpxmediageneraldefs.h>
+#include <mpxmediavideodefs.h>
+#include "VcxMyVideosCollectionUtilTest.h"
+#include "vcxmyvideoscollectionutil.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::Delete
+// Delete here all resources allocated and opened from test methods. 
+// Called from destructor. 
+// -----------------------------------------------------------------------------
+//
+void CVcxMyVideosCollectionUtilTest::Delete() 
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::RunMethodL( 
+    CStifItemParser& aItem ) 
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {  
+        // Copy this line for every implemented function.
+        // First string is the function name used in TestScripter script file.
+        // Second is the actual implementation member function.        
+        ENTRY( "CreateEmptyMediaList", CVcxMyVideosCollectionUtilTest::CreateEmptyMediaListL ),
+        ENTRY( "CreateEmptyMessageList", CVcxMyVideosCollectionUtilTest::CreateEmptyMessageListL ),
+        ENTRY( "CopyFromListToList", CVcxMyVideosCollectionUtilTest::CopyFromListToListL ),
+        ENTRY( "DriveLetter2DriveNumber", CVcxMyVideosCollectionUtilTest::DriveLetter2DriveNumberL ),
+        ENTRY( "MakeUniqueFileName", CVcxMyVideosCollectionUtilTest::MakeUniqueFileNameL ),
+        ENTRY( "Origin", CVcxMyVideosCollectionUtilTest::OriginL ),
+        ENTRY( "Flags", CVcxMyVideosCollectionUtilTest::FlagsL ),
+        ENTRY( "DownloadId", CVcxMyVideosCollectionUtilTest::DownloadIdL ),
+        ENTRY( "DownloadState", CVcxMyVideosCollectionUtilTest::DownloadStateL ),
+        ENTRY( "Id", CVcxMyVideosCollectionUtilTest::IdL ),
+        ENTRY( "Duration", CVcxMyVideosCollectionUtilTest::DurationL ),
+        ENTRY( "Title", CVcxMyVideosCollectionUtilTest::TitleL ),
+        ENTRY( "Rating", CVcxMyVideosCollectionUtilTest::RatingL ),
+        ENTRY( "AudioFourCc", CVcxMyVideosCollectionUtilTest::AudioFourCcL ),
+        ENTRY( "AreSupported", CVcxMyVideosCollectionUtilTest::AreSupportedL ), 
+        ENTRY( "AttrBelongsToFullSet", CVcxMyVideosCollectionUtilTest::AttrBelongsToFullSetL ),
+        ENTRY( "Origin2", CVcxMyVideosCollectionUtilTest::Origin ),
+        ENTRY( "PrintOpenFileHandles", CVcxMyVideosCollectionUtilTest::PrintOpenFileHandlesL ),
+        ENTRY( "GetProcessName", CVcxMyVideosCollectionUtilTest::GetProcessNameL ),
+        //ADD NEW ENTRY HERE
+        // [test cases entries] - Do not remove
+
+        };
+
+    const TInt count = sizeof( KFunctions ) / 
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtil::CreateEmptyMediaListL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::CreateEmptyMediaListL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = TVcxMyVideosCollectionUtil::CreateEmptyMediaListL();
+    delete media;
+    return KErrNone;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::CreateEmptyMessageListL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::CreateEmptyMessageListL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = TVcxMyVideosCollectionUtil::CreateEmptyMessageListL();
+    delete media;
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::CopyFromListToListL
+// ---------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::CopyFromListToListL( CStifItemParser& aItem )
+    {
+    CMPXMedia* from = TVcxMyVideosCollectionUtil::CreateEmptyMediaListL();
+    CMPXMedia* to = TVcxMyVideosCollectionUtil::CreateEmptyMediaListL();
+    RArray<TUint32> ids;
+    
+    TInt numberOfMedia;
+    TInt wantedId;
+    
+    aItem.GetNextInt( numberOfMedia );
+    aItem.GetNextInt( wantedId );
+    
+    ids.Append( wantedId );
+    
+    // add stuff to be copied to "from" -list
+    
+    
+    TVcxMyVideosCollectionUtil::CopyFromListToListL( *from, *to, ids );
+    
+    // check that the "to" -list have the items it should have
+    
+    delete from;
+    delete to;
+    
+    return KErrNone;
+    }
+    
+// ---------------------------------------------------------------------------
+// This helper function converts drive letter to drive number
+// ---------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::DriveLetter2DriveNumberL( CStifItemParser& /*aItem*/ )
+    {
+    TVcxMyVideosCollectionUtil::DriveLetter2DriveNumber( _L("E:") );
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::MakeUniqueFileNameL
+// ---------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::MakeUniqueFileNameL( CStifItemParser& /*aItem*/ )
+    {
+    RFs fs;
+    fs.Connect();
+    TBuf<KMaxPath> path;
+    TVcxMyVideosCollectionUtil::MakeUniqueFileNameL( fs, _L("c://testframework//testframework.ini"), path );
+    fs.Close();
+    return KErrNone;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::OriginL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::OriginL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TUint8 valueSet = EVcxMyVideosOriginCapturedWithCamera;
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin, valueSet );
+    TUint8 valueGet = TVcxMyVideosCollectionUtil::OriginL( *media );
+    if( valueSet != valueGet )
+        {
+        retVal = KErrGeneral;
+        delete media;
+        return retVal;
+        }    
+    valueSet = EVcxMyVideosOriginTvRecording;
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin, valueSet );
+    valueGet = TVcxMyVideosCollectionUtil::OriginL( *media );
+    if( EVcxMyVideosOriginOther != valueGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::FlagsL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::FlagsL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TUint32 flagsSet( 0xBEEF );
+    media->SetTObjectValueL<TUint32>( KMPXMediaGeneralFlags, flagsSet );
+    TUint32 flagsGet( TVcxMyVideosCollectionUtil::FlagsL( *media ) );
+    if( flagsSet != flagsGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::DownloadIdL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::DownloadIdL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TUint32 idSet( 0xBEEF );
+    media->SetTObjectValueL<TUint32>( KVcxMediaMyVideosDownloadId, idSet );
+    TUint32 idGet( TVcxMyVideosCollectionUtil::DownloadIdL( *media ) );
+    if( idSet != idGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::DownloadStateL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::DownloadStateL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();    
+    TInt retVal( KErrNone );
+    TVcxMyVideosDownloadState stateSet = EVcxMyVideosDlStateFailed;
+    media->SetTObjectValueL<TUint32>( KVcxMediaMyVideosDownloadState, stateSet );
+    TVcxMyVideosDownloadState stateGet = TVcxMyVideosCollectionUtil::DownloadStateL( *media );    
+    if( stateSet != stateGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::IdL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::IdL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TMPXItemId idSet( 2, 7 );
+    media->SetTObjectValueL<TMPXItemId>( KMPXMediaGeneralId, idSet );
+    TMPXItemId idGet = TVcxMyVideosCollectionUtil::IdL( *media );;
+    if( idSet != idGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::DurationL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::DurationL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TReal32 durationSet( 150 );
+    media->SetTObjectValueL<TReal32>( KVcxMediaMyVideosDuration, durationSet );
+    TReal32 durationGet = TVcxMyVideosCollectionUtil::DurationL( *media );;
+    if( durationSet != durationGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::Title
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::TitleL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    _LIT( valueSet, "TeamNinja" );
+    media->SetTextValueL( KMPXMediaGeneralTitle, valueSet );
+    HBufC* valueGet = TVcxMyVideosCollectionUtil::Title( *media ).AllocL();
+    if( valueGet->CompareF( valueSet ) )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    delete valueGet;
+    return retVal;       
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::RatingL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::RatingL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TUint8 valueSet( 21 );
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosRating, valueSet );
+    TUint8 valueGet = TVcxMyVideosCollectionUtil::RatingL( *media );;
+    if( valueSet != valueGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::AudioFourCcL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::AudioFourCcL( CStifItemParser& /*aItem*/ )
+    {
+    CMPXMedia* media = CMPXMedia::NewL();
+    TInt retVal( KErrNone );
+    TUint32 valueSet( 21 );
+    media->SetTObjectValueL<TUint32>( KVcxMediaMyVideosAudioFourCc, valueSet );
+    TUint32 valueGet = TVcxMyVideosCollectionUtil::AudioFourCcL( *media );;
+    if( valueSet != valueGet )
+        {
+        retVal = KErrGeneral;
+        }
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::AreSupported
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::AreSupportedL( CStifItemParser& /*aItem*/ )
+    {
+    TInt retVal( KErrNone );
+    CMPXMedia* media = CMPXMedia::NewL();
+    RArray<TMPXAttribute> attrs;
+    attrs.Append( KMPXMediaGeneralMimeType );
+    TBool inMds( EFalse );
+    TVcxMyVideosCollectionUtil::AreSupported( *media, attrs.Array(), inMds );
+    delete media;
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::AttrBelongsToFullSet
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::AttrBelongsToFullSetL( CStifItemParser& /*aItem*/ )
+    {
+    TInt retVal( KErrNone );
+    // TMPXAttribute attr;
+    // attr = KMPXMediaGeneralMimeType;
+    if ( !( TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaGeneralComment ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaGeneralCopyright ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaGeneralMimeType ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaGeneralLastPlaybackPosition ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KVcxMediaMyVideosModifiedDate ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KVcxMediaMyVideosAudioLanguage ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KVcxMediaMyVideosAuthor ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaVideoBitRate ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaVideoHeight ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaVideoWidth ) &&
+         TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( KMPXMediaVideoArtist ) ) )
+        {
+        retVal = KErrGeneral;
+        }
+        
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::Origin
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::Origin( CStifItemParser& /*aItem*/ )
+    {
+    TInt retVal( KErrNone );
+    
+    if ( ( TVcxMyVideosCollectionUtil::Origin( KVcxMvcCategoryIdDownloads ) 
+            != EVcxMyVideosOriginDownloaded ) ||
+         ( TVcxMyVideosCollectionUtil::Origin( KVcxMvcCategoryIdTvRecordings ) 
+            != EVcxMyVideosOriginTvRecording ) ||
+         ( TVcxMyVideosCollectionUtil::Origin( KVcxMvcCategoryIdCaptured ) 
+            != EVcxMyVideosOriginCapturedWithCamera ) ||
+         ( TVcxMyVideosCollectionUtil::Origin( KVcxMvcCategoryIdOther ) 
+            != EVcxMyVideosOriginOther ) ||
+         ( TVcxMyVideosCollectionUtil::Origin( KVcxMvcCategoryIdAll ) 
+            != KErrNotFound ) )
+        {
+        retVal = KErrGeneral;
+        }
+    
+    return retVal;
+    }   
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::PrintOpenFileHandlesL
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::PrintOpenFileHandlesL( CStifItemParser& /*aItem*/ )
+    {
+    TInt retVal( KErrNone );
+    
+#ifdef _DEBUG
+    RFs fs;
+    RFile file;
+    _LIT( KFileName,        "c:\\data\\vcxmyvideoscollectionutiltest_file.txt" );
+    _LIT( KInvalidFileName, "c:\\data\\vcxmyvideoscollectionutiltest_fail.txt" );    
+    User::LeaveIfError( fs.Connect() );
+    User::LeaveIfError( file.Open( fs, KFileName, EFileShareAny | EFileRead ) );
+    
+    TVcxMyVideosCollectionUtil::PrintOpenFileHandlesL( KFileName, fs );
+    TVcxMyVideosCollectionUtil::PrintOpenFileHandlesL( KInvalidFileName, fs );
+    
+    file.Close();
+    fs.Close();    
+#endif // _DEBUG
+    
+    return retVal;
+    }   
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::GetProcessName
+// ----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosCollectionUtilTest::GetProcessNameL( CStifItemParser& aItem )
+    {
+    TInt retVal( KErrNone );
+    TPtrC testProcessName;
+    TUint64 threadId = RThread().Id().Id();
+    TFullName processName;
+    //_LIT( KTestProcessName, "testscripter_vcxmyvideoscollectionutiltest" );
+
+    retVal = aItem.GetNextString( testProcessName );
+    
+#ifdef _DEBUG    
+    if ( retVal == KErrNone )
+        {
+        TVcxMyVideosCollectionUtil::GetProcessName( threadId, processName );
+        if ( processName.Find( testProcessName ) == KErrNotFound )
+            {
+            retVal = KErrNotFound;
+            }
+        }
+#endif // _DEBUG    
+    return retVal;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtilTest::?member_function
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+/*
+TInt CVcxMyVideosCollectionUtilTest::?member_function(
+   CItemParser& aItem )
+   {
+
+   ?code
+
+   }
+*/
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// None
+
+//  [End of File] - Do not remove
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/Bwins/VcxMyVideosMdsDbTestU.DEF	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/conf/VcxMyVideosMdsDbTest.cfg	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,124 @@
+#BLOCKS#
+CreateL
+DeleteL
+CancelL
+AddVideoL
+RemoveVideoL
+UpdateVideoL
+CreateVideoListL
+CreateVideoL
+
+
+
+[Test]
+title Create & delete
+create VcxMyVideosMdsDbTest test
+test CreateL
+test DeleteL
+delete test
+[Endtest]
+
+
+
+[Test]
+title Create mds fail
+create VcxMyVideosMdsDbTest test
+allownextresult -2
+test CreateL 1
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title Create mds fail async
+create VcxMyVideosMdsDbTest test
+test CreateL 0 1
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title Cancel
+create VcxMyVideosMdsDbTest test
+test CreateL
+test CancelL
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title AddVideoL
+create VcxMyVideosMdsDbTest test
+test CreateL
+test AddVideoL 0 0
+allownextresult -2
+test AddVideoL 0 -2
+allownextresult -2
+test AddVideoL 1 0
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title RemoveVideoL
+create VcxMyVideosMdsDbTest test
+test CreateL
+test RemoveVideoL 0 0
+allownextresult -1
+test RemoveVideoL 1 0
+allownextresult -2
+test RemoveVideoL 0 -2
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title UpdateVideoL
+create VcxMyVideosMdsDbTest test
+test CreateL
+test UpdateVideoL 0 0
+allownextresult -1
+test UpdateVideoL 1 0
+allownextresult -2
+test UpdateVideoL 0 -2
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title CreateVideoL
+create VcxMyVideosMdsDbTest test
+test CreateL
+test CreateVideoL 0 0
+allownextresult -1
+test CreateVideoL 1 0
+allownextresult -2
+test CreateVideoL 0 -2
+test DeleteL
+delete test
+[Endtest]
+
+[Test]
+title CreateVideoListL
+create VcxMyVideosMdsDbTest test
+test CreateL
+test CreateVideoListL  0 0 0 0
+test CreateVideoListL  0 0 0 1
+test CreateVideoListL  0 0 1 0
+test CreateVideoListL  0 0 1 0
+test CreateVideoListL  0 1 0 0
+test CreateVideoListL  0 1 0 1
+test CreateVideoListL  0 1 1 0
+test CreateVideoListL  0 1 1 1
+test CreateVideoListL  1 0 0 0
+test CreateVideoListL  1 0 0 1
+test CreateVideoListL  1 0 1 0
+test CreateVideoListL  1 0 1 1
+test CreateVideoListL  1 1 0 0
+test CreateVideoListL  1 1 0 1
+test CreateVideoListL  1 1 1 0
+test CreateVideoListL  1 1 1 1
+test DeleteL
+delete test
+[Endtest]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/eabi/VcxMyVideosMdsDbTestu.def	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/group/VcxMyVideosMdsDbTest.mmp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,88 @@
+/*TYPE TESTCLASS*/
+/*
+* 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: MMP file for STIF Test Framework's TestScripter 
+* testclass test module.
+*
+*/
+
+// %version: 1 %
+
+#include <platform_paths.hrh>
+
+SMPSAFE
+EPOCALLOWDLLDATA
+
+TARGET          VcxMyVideosMdsDbTest.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E3
+
+CAPABILITY      ALL -TCB
+/* Remove comments and replace 0x00000000 with correct vendor id */
+// VENDORID     0x00000000
+/* Remove comments and replace 0x00000000 with correct secure id */
+// SECUREID     0x00000000
+
+//TARGETPATH      ?target_path
+DEFFILE         VcxMyVideosMdsDbTest.def
+
+USERINCLUDE     ../inc 
+USERINCLUDE     ../../../inc
+USERINCLUDE     ../../../../../inc
+
+OS_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          VcxMyVideosMdsDbTest.cpp
+SOURCE          VcxMyVideosMdsDbTestBlocks.cpp
+SOURCE          vcxmyvideoscollectionutil.cpp
+SOURCE          mdesession.cpp
+SOURCE          mdesessionimpl.cpp
+SOURCE          mdeobjectdef.cpp
+SOURCE          mdeproperty.cpp
+SOURCE          mdepropertydef.cpp
+SOURCE          mdeobject.cpp
+SOURCE          mdenamespacedef.cpp
+SOURCE          mdequery.cpp
+SOURCE          mdeobjectquery.cpp
+SOURCE          mdeitem.cpp
+SOURCE          mdeinstanceitem.cpp
+SOURCE          mdeorderrule.cpp
+
+SOURCEPATH      ../../../src
+SOURCE          vcxmyvideosmdsdb.cpp
+
+APP_LAYER_SYSTEMINCLUDE
+
+OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_STDCPP_SYSTEMINCLUDE
+OS_LAYER_BOOST_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   /epoc32/include/ecom
+LIBRARY         euser.lib
+LIBRARY         ecom.lib
+LIBRARY         estor.lib
+LIBRARY         mpxcommon.lib
+LIBRARY         bafl.lib
+LIBRARY         flogger.lib
+LIBRARY         efsrv.lib
+LIBRARY         charconv.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+
+LANG            SC
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/group/VcxMyVideosMdsDbTest.pkg	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,38 @@
+;
+; 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: Package file for mpxvideoplayer STIF test
+;
+; 	Installation file for STIF
+;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"MPX Video db STIF"}, (0x101FB3E3), 1, 0, 1, TYPE=SA, RU
+
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Install files
+"\epoc32\release\armv5\udeb\VcxMyVideosMdsDbTest.dll"   -   "!:\Sys\Bin\VcxMyVideosMdsDbTest.dll"
+"..\conf\VcxMyVideosMdsDbTest.cfg" - "c:\testframework\VcxMyVideosMdsDbTest.cfg"
+"..\init\testframework.ini" - "c:\testframework\testframework.ini"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/group/bld.inf	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* 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:
+*
+*/
+
+// Version : %version: 1 %
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../conf/VcxMyVideosMdsDbTest.cfg                  /epoc32/winscw/c/testframework/VcxMyVideosMdsDbTest.cfg
+../init/testframework.ini                       /epoc32/winscw/c/testframework/testframework.ini
+
+PRJ_EXPORTS
+
+
+PRJ_MMPFILES
+VcxMyVideosMdsDbTest.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/VcxMyVideosMdsDbTest.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,216 @@
+/*
+* 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: STIF testclass declaration
+*
+*/
+
+#ifndef VCXMYVIDEOSMDSDBTEST_H
+#define VCXMYVIDEOSMDSDBTEST_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+#include <TestclassAssert.h>
+#include <f32file.h>
+
+
+#include <mpxcollectionplugin.h>
+#include <mpxcollectionpath.h>
+#include <mpxcollectionmessagedefs.h>
+#include <vcxmyvideosdefs.h>
+
+//#include <mpxmedia.h>
+#include "vcxmyvideosmdsdb.h"
+#include "vcxmyvideosactivetask.h"
+
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 0
+#define TEST_CLASS_VERSION_MINOR 0
+#define TEST_CLASS_VERSION_BUILD 0
+
+// Logging path
+_LIT( KVcxMyVideosMdsDbTestLogPath, "\\logs\\testframework\\VcxMyVideosMdsDbTest\\" ); 
+// Log file
+_LIT( KVcxMyVideosMdsDbTestLogFile, "VcxMyVideosMdsDbTest.txt" ); 
+_LIT( KVcxMyVideosMdsDbTestLogFileWithTitle, "VcxMyVideosMdsDbTest_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CVcxMyVideosMdsDbTest;
+//class CVcxMyVideosMdsDb;
+//class CMPXMedia;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+extern CVcxMyVideosMdsDbTest* test;
+
+// CLASS DECLARATION
+
+/**
+*  CVcxMyVideosMdsDbTest test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CVcxMyVideosMdsDbTest) : public CScriptBase, public MVcxMyVideosMdsDbObserver
+    {
+    public:  // Constructors and destructor
+
+
+        /**
+        * Two-phased constructor.
+        */
+        static CVcxMyVideosMdsDbTest* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CVcxMyVideosMdsDbTest();
+        
+    // FROM MVcxMyVideosMdsDbObserver
+        
+        /**
+        * Handler function for database events.
+        *
+        * @param aEvent Event type.
+        * @param aId    Array of IDs in database.
+        */
+        void HandleMyVideosDbEvent( TMPXChangeEventType aEvent, RArray<TUint32>& aId ){};
+
+        /**
+        * Handler function for list fetching events. This callback is called as a response
+        * to CreateVideoList( aSync = EFalse ).
+        *
+        * @param aVideoList          List of videos fetched from MDS.
+        * @param aNewItemsStartIndex Start position for the new items added. If -1, then no new
+        *                            items were added.
+        * @param aComplete           ETrue if list is complete and no more items are expected,
+        *                            EFalse if there are more to come.
+        */
+        void HandleCreateVideoListResp( CMPXMedia* aVideoList,
+                TInt aNewItemsStartIndex, TBool aComplete ){};
+
+        /**
+        * Handler function for media remove/insert events. This is called every time
+        * media is removed or inserted (objects become present or non present).
+        */
+        void HandleObjectPresentNotification(){};
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CVcxMyVideosMdsDbTest( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Frees all resources allocated from test methods.
+        * @since ?Series60_version
+        */
+        void Delete();
+
+        /**
+        * Test methods are listed below. 
+        */
+
+        virtual TInt CreateL( CStifItemParser& aItem );
+
+        virtual TInt DeleteL( CStifItemParser& aItem );
+
+        virtual TInt CancelL( CStifItemParser& aItem );
+
+        virtual TInt AddVideoL( CStifItemParser& aItem );
+
+        virtual TInt RemoveVideoL( CStifItemParser& aItem );
+
+        virtual TInt UpdateVideoL( CStifItemParser& aItem );
+
+        virtual TInt CreateVideoListL( CStifItemParser& aItem );
+
+        virtual TInt CreateVideoL( CStifItemParser& aItem );
+        
+        /**
+         * Method used to log version of test class
+         */
+        void SendTestClassVersion();
+        
+        void PrepareMdsL(  CStifItemParser& aItem  ) ;
+
+    private:    // Data
+        
+        CVcxMyVideosMdsDb* iMdsDb;
+
+        RFs iFs;
+        
+    public:
+    
+        TInt mdssessionerror,  mdssessionasyncerror,
+        mdsoperationleaves, mdsoperationreturns ;
+        
+    };
+
+
+
+#endif      // VCXMYVIDEOSMDSDBTEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeinstanceitem.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEINSTANCEITEM_H__
+#define __MDEINSTANCEITEM_H__
+
+
+#include <mdeitem.h>
+
+enum TMdEInstanceType
+	{
+	EMdETypeObject = 1,
+	EMdETypeRelation,
+	EMdETypeEvent,
+	EMdETypeProperty
+	};
+
+/**
+ * Abstract base class for all instance items stored in the metadata engine database.
+ */
+NONSHARABLE_CLASS(CMdEInstanceItem) : public CMdEItem
+	{
+public:
+	
+	/* Destructor. */
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEInstanceItem();
+
+
+	/* Methods. */
+
+	virtual TMdEInstanceType InstanceType() const = 0;
+	
+protected:
+
+	/* Constructors. */
+
+	/**
+	 * Constructor.
+	 */
+	CMdEInstanceItem(CMdESession* aSession, TItemId aId);
+
+	/**
+	 * Second-phase constructor.
+	 */
+	void InstanceItemBaseConstruct();
+	};
+
+#endif  // __MDEINSTANCEITEM_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeitem.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEITEM_H__
+#define __MDEITEM_H__
+
+
+#include <e32base.h>
+
+#include <mdccommon.h>
+
+/** 
+ * Internal identifier for metadata engine database items. Must always be
+ * different from 0.
+ */
+class CMdESession;
+
+/**
+ * Abstract base class for all items stored in the metadata engine database.
+ */
+NONSHARABLE_CLASS(CMdEItem) : public CBase
+	{
+public:
+	
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEItem();
+
+
+	/* Methods. */
+
+	/**
+	 * Returns whether the item belongs to a session.
+	 *
+	 * @return  <code>ETrue</code>, if the item belongs to a session;
+	 *          <code>EFalse</code>, otherwise
+	 */
+	IMPORT_C TBool BelongsToSession() const;
+
+	/**
+	 * Returns the session the item belongs to. Panics if
+	 * the item does not belong to any session.
+	 *
+	 * @return  session that the item belongs to
+	 */
+	IMPORT_C CMdESession& Session() const;
+
+	/**
+	 * Returns whether the item is stored in the database.
+	 *
+	 * @return  <code>ETrue</code>, if the item is in the database;
+	 *          <code>EFalse</code>, otherwise
+	 */
+	IMPORT_C TBool InDatabase() const;
+
+	/**
+	 * Returns the internal database identifier of the item. 
+	 *
+	 * @return  internal database identifier or <code>KNoId</code> if item is not stored in database.
+	 */
+	IMPORT_C TItemId Id() const;
+
+	/**
+	 * Sets that the internal database identifier of the object.
+	 *
+	 * @param aId  internal database identifier
+	 */
+	void SetId(TItemId aId);
+
+	/**
+	 * Sets the session the item belongs to. 
+	 *
+	 * @param aSession  session
+	 */
+	void SetSession(CMdESession& aSession);
+
+protected:
+
+	/* Constructors and destructor. */
+	
+	/**
+	 * Constructor. Note that if the new item is in the database
+	 * (i.e., it has an internal database identifier), it must also belong 
+	 * to a session.
+	 *
+	 * @param aSession  session that the new item belongs to;
+	 *                  or 0, if the new item does not belong to any session
+	 * @param aId		internal database identifier of the new item,
+	 *                  if the item is in the database (note that then also 
+	 *                  <code>aSession</code> must be different from 0);
+	 *					or 0, if the item is not in the database
+	 */
+	CMdEItem(CMdESession* aSession, TItemId aId);
+	
+	/**
+	 * Second-phase constructor.
+	 */
+	void ItemBaseConstruct();
+	
+	/* Utility methods. */
+
+	/**
+	 * Panics if the item does not belong to any session.
+	 */
+	void CheckSession() const;
+
+
+private:
+
+	/** Session. */
+	CMdESession* iSession;
+
+	/** Internal database identifier. */
+	TItemId iId;
+	
+	friend class CMdESession;
+	};
+
+#endif  // __MDEITEM_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdenamespacedef.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,222 @@
+/*
+* 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:  ?Description
+*
+*/
+
+#ifndef __MDENAMESPACEDEF_H__
+#define __MDENAMESPACEDEF_H__
+
+
+#include <mdccommon.h>
+
+class CMdESession;
+class CMdCSerializationBuffer;
+class CMdERelationDef;
+class CMdEEventDef;
+class CMdEObjectDef;
+
+class TMdCNamespaceDef;
+
+
+/**
+ * Namespace definition.
+ */
+NONSHARABLE_CLASS(CMdENamespaceDef) : public CBase
+	{
+public:
+	/**
+	 * Returns whether the namespace is read only.
+	 *
+	 * @return  <code>ETrue</code>, if the namespace is read only;
+	 *          <code>EFalse</code>, otherwise
+	 */
+	IMPORT_C TBool ReadOnly() const;
+
+	/**
+	 * Returns the name of the item.
+	 *
+	 * @return  name
+	 */
+	IMPORT_C const TDesC& Name() const;
+
+	/**
+	 * Compare this namespace definition with other namespace definition.
+	 *
+	 * @param aNamespaceDef other namespace definition
+	 *
+	 * @return  0 if namespaces are same, 1 or more if this is greater than other 
+	 *          and -1 or less if this is less than other.
+	 */
+	IMPORT_C TInt Compare(const CMdENamespaceDef& aNamespaceDef) const;
+	
+	/**
+	 * Returns the number of object definitions.
+	 *
+	 * @return  number of object definitions
+	 */
+	IMPORT_C TInt ObjectDefCount() const;
+
+	/**
+	 * Returns the object definition at the specified index.
+	 *
+	 * @param aIndex  index
+	 *
+	 * @return  object definition or leave, if there is no object definition
+	 *          with the specified name.	
+	 *
+	 * @panics if aIndex is out of bounds	 
+	 */
+	IMPORT_C CMdEObjectDef& ObjectDefL(TInt aIndex);
+
+	/**
+	 * Returns the object definition with the specified name.
+	 *
+	 * @param aName       name
+	 *
+	 * @return  object definition or leave, if there is no object definition
+	 *          with the specified name.	 
+	 */
+	IMPORT_C CMdEObjectDef& GetObjectDefL(const TDesC& aName);
+		
+	/**
+	 * Returns the number of relation definitions.
+	 *
+	 * @return  number of relation definitions
+	 */
+	IMPORT_C TInt RelationDefCount() const;
+
+	/**
+	 * Returns the relation definition at the specified index.
+	 *
+	 * @param aIndex  index
+	 *
+	 * @return  relation definition or leave, if there is no object definition
+	 *          with the specified name.	
+	 */
+	IMPORT_C CMdERelationDef& RelationDefL(TInt aIndex);
+
+	/**
+	 * Returns the relation definition with the specified name.
+	 *
+	 * @param aName       name
+	 *
+	 * @return  relation definition or leave, if there is no object definition
+	 *          with the specified name.	
+	 *
+	 * @panics if aIndex is out of bounds	 
+	 */
+	IMPORT_C CMdERelationDef& GetRelationDefL(const TDesC& aName);
+
+	/**
+	 * Returns the number of event definitions. 
+	 *
+	 * @return  number of event definitions
+	 */
+	IMPORT_C TInt EventDefCount() const;
+
+	/**
+	 * Returns the event definition at the specified index.
+	 *
+	 * @param aIndex  index
+	 *
+	 * @return  event definition or leave, if there is no object definition
+	 *          with the specified name.	
+	 * 
+	 * @panics if aIndex is out of bounds
+	 */
+	IMPORT_C CMdEEventDef& EventDefL(TInt aIndex);
+
+	/**
+	 * Returns the event definition with the specified name.
+	 *
+	 * @param aName       name
+	 *
+	 * @return  event definition or leave, if there is no object definition
+	 *          with the specified name.	
+	 */
+	IMPORT_C CMdEEventDef& GetEventDefL(const TDesC& aName);
+
+public:
+	static CMdENamespaceDef* NewL(const CMdESession& aMdeSession, 
+			const TMdCNamespaceDef& aNamespaceDef, 
+			CMdCSerializationBuffer& aSchemaBuffer);
+
+	static CMdENamespaceDef* NewLC(const CMdESession& aMdeSession, 
+			const TMdCNamespaceDef& aNamespaceDef, 
+			CMdCSerializationBuffer& aSchemaBuffer);
+		
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdENamespaceDef();
+	
+	TDefId Id() const;		
+	
+	/**
+	 * Returns the object definition with the specified id.
+	 *
+	 * @param aId       id
+	 *
+	 * @return  object definition; or 0, if there is no object definition
+	 *          with the specified id
+	 */
+	CMdEObjectDef* GetObjectDefL(TDefId aId);	
+
+	/**
+	 * Returns the relation definition with the specified id.
+	 *
+	 * @param aId       id
+	 *
+	 * @return  relation definition; or 0, if there is no relation definition
+	 *          with the specified id
+	 */
+	CMdERelationDef* GetRelationDefL(TDefId aId);
+
+	/**
+	 * Returns the event definition with the specified id.
+	 *
+	 * @param aId       id
+	 *
+	 * @return  event definition; or 0, if there is no event definition
+	 *          with the specified id
+	 */
+	CMdEEventDef* GetEventDefL(TDefId aId);
+	
+	/**
+	 * Returns the MdE session where namespace definition belongs.
+	 *
+	 * @return MdE session
+	 */
+	const CMdESession& Session() const;
+
+private:
+	CMdENamespaceDef(const CMdESession& aMdeSession, 
+			const TMdCNamespaceDef& aNamespaceDef);
+
+	void ConstructL(CMdCSerializationBuffer& aSchemaBuffer);
+
+private:
+	const CMdESession& iMdeSession;
+
+	const TMdCNamespaceDef& iNamespaceDef;
+
+	TPtrC16 iName;
+
+	RPointerArray<CMdEObjectDef> iObjectDefs;
+	RPointerArray<CMdERelationDef> iRelationDefs;
+	RPointerArray<CMdEEventDef> iEventDefs;
+	};
+
+#endif  // __MDENAMESPACEDEF_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeobject.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,735 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEOBJECT_H__
+#define __MDEOBJECT_H__
+
+//#include <uri16.h>
+
+#include <mdeinstanceitem.h>
+
+// CMdEProperty compatibility wrappers
+#include <mdetextproperty.h>
+#include <mdenumberproperty.h>
+
+/* Forward declarations. */
+class CMdEObjectDef;
+class CMdEPropertyDef;
+class CMdEProperty;
+class CMdCSerializationBuffer;
+class CMdENamespaceDef;
+
+NONSHARABLE_CLASS( TMdEObject )
+	{
+public:
+	/* Constructors and destructor. */
+
+	/**
+	 * Constructs a new object.
+	 */
+	IMPORT_C TMdEObject();
+
+	/**
+	 * Returns the ID of the object.
+	 *
+	 * @return  Object ID.
+	 */
+	IMPORT_C TItemId Id() const;
+
+	/**
+	 * Returns the definition of the object. Leaves with error code 
+	 * KErrNotFound if object definition is missing.
+	 *
+	 * @return Object definition.
+	 */
+	IMPORT_C const CMdEObjectDef& DefL() const;
+	
+	/**
+	 * Returns whether object is confidential or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object has been set to confidential.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool Confidential() const;
+	
+	/**
+	 * Returns whether object is placeholder or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object has been set to placeholder.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool Placeholder() const;
+
+	/**
+	 * Returns whether object is removed or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object has been set to removed.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool Removed() const;
+	
+	/**
+	 * Returns whether object is present or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object has been set to not present.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool NotPresent() const;
+	
+public:
+	/**
+	 * Calculates required size for buffer to serialize object
+	 *
+	 * @return necessary buffer size
+	 */
+	static TUint32 RequiredBufferSize();
+
+	/**
+	 * Retrieve object from serialized buffer
+	 *
+	 * @param aBuffer buffer where serialized object is
+	 * @param aNamespaceDef namespace definition of namespace where object is 
+	 *                      located
+	 */
+	void DeSerializeL(CMdCSerializationBuffer& aBuffer, 
+			CMdENamespaceDef& aNamespaceDef);
+
+protected:
+	/** object ID */
+	TItemId iId;
+
+	/** Pointer to object definition, this doesn't own it. */
+	CMdEObjectDef* iDef;
+
+	/** various flags */
+	TUint32 iFlags;
+	};
+
+/**
+ * Object.
+ */
+NONSHARABLE_CLASS(CMdEObject) : public CMdEInstanceItem
+	{
+public:
+
+	/* Constructors and destructor. */
+
+	/**
+	 * Constructs a new object from serialized buffer
+	 *
+	 * @param aBuffer  buffer which contains serialized object
+	 * @param aNamespaceDef  reference to namespace where to object is created
+	 */
+	static CMdEObject* NewL( CMdESession* aSession, CMdCSerializationBuffer& aBuffer, CMdENamespaceDef& aNamespaceDef );
+
+	/**
+	 * Constructs a new object from serialized buffer and leave it on stack
+	 *
+	 * @param aBuffer  buffer which contains serialized object
+	 * @param aNamespaceDef  reference to namespace where to object is created
+	 */
+	static CMdEObject* NewLC( CMdESession* aSession, CMdCSerializationBuffer& aBuffer, CMdENamespaceDef& aNamespaceDef );
+
+	/**
+	 * Constructs a new object.
+	 *
+	 * @param aDef  Definition of the new object.
+	 * @param aUri URI of the new object.
+	 * @param aMediaId mediaid of object. Defaults to 0.
+	 */
+
+	static CMdEObject* NewL( CMdEObjectDef& aDef, const TDesC& aUri, TUint32 aMediaId = 0 );
+
+	/**
+	 * Constructs a new object.
+	 *
+	 * @param aDef  Definition of the new object.
+	 * @param aUri URI of the new object.
+	 * @param aMediaId mediaid of object. Defaults to 0.
+	 */
+	static CMdEObject* NewLC( CMdEObjectDef& aDef, const TDesC& aUri, TUint32 aMediaId = 0 );
+
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEObject();
+
+	/* Methods. */
+
+	/**
+	 * Returns the definition of the object.
+	 *
+	 * @return  Object definition.
+	 */
+	IMPORT_C CMdEObjectDef& Def() const;
+
+	/**
+	 * Sets the definition of the object. Object's old object definition must 
+	 * be "Object" and object must not belong to any session, otherwise method 
+	 * leaves with error code KErrNotSupported.
+	 * 
+	 * @param aDef  New object definition.
+	 */
+	IMPORT_C void SetDefL(CMdEObjectDef& aDef);
+
+	/**
+	 * Returns the URI of the object.
+	 *
+	 * @return  URI.
+	 */
+	IMPORT_C const TDesC& Uri() const;
+
+	/**
+	 * Sets the URI of the object.
+	 *
+	 * @param aUri  New URI.
+	 */
+	IMPORT_C void SetUriL(const TDesC& aUri);
+
+	/**
+	 * Returns whether object is confidential or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object has been set to confidential.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool Confidential() const;
+
+	/**
+	 * Returns whether object is confidential or not.
+	 *
+	 * @param aValue  <code>ETrue</code>, if the object is confidential.
+	 *                <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C void SetConfidential(TBool aValue);
+
+	/**
+	 * Returns whether object is placeholder or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object has been set to placeholder.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool Placeholder() const;
+
+	/**
+	 * Returns whether object is placeholder or not.
+	 *
+	 * @param aValue  <code>ETrue</code>, if the object is placeholder.
+	 *                <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C void SetPlaceholder(TBool aValue);
+
+	
+	/**
+	 * Returns the Media ID of the object.
+	 *
+	 * @return  Media ID.
+	 */
+	IMPORT_C TUint32 MediaId() const;
+	
+	/**
+	 * Sets the Media ID of the object.
+	 *
+	 * @param aMediaId  New Media ID.
+	 */
+	IMPORT_C void SetMediaId(TUint32 aMediaId);
+
+	/**
+	 * Returns the usage count of the object.
+	 *
+	 * @return usage count
+	 */
+	IMPORT_C TUint32 UsageCount() const;
+	
+	/**
+	 * Returns the Guid of the object.
+	 *
+	 * @param aGuidHigh reference where GuidHigh will be stored
+	 * @param aGuidLow reference where GuidLow will be stored
+	 */
+	IMPORT_C void Guid( TInt64& aGuidHigh, TInt64& aGuidLow ) const;
+
+	/**
+	 * Sets the Guid of the object.
+	 *
+	 * @param aGuidHigh new GuidHigh value
+	 * @param aGuidLow new GuidLow value
+	 */
+	IMPORT_C void SetGuid( const TInt64& aGuidHigh, const TInt64& aGuidLow );
+
+	/**
+	 * Returns whether the object is open for modifications or not.
+	 *
+	 * @return  <code>ETrue</code>, if the object is open for modifications.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	IMPORT_C TBool OpenForModifications() const;
+
+	/* Methods for accessing properties. */
+
+	/**
+	 * Returns the number of properties.
+	 *
+	 * @return  number of properties
+	 */
+	IMPORT_C TInt PropertyCount() const;
+
+	/**
+	 * Returns the property at the specified index.
+	 *
+	 * @param aIndex  index
+	 *
+	 * @return  property
+	 */
+	IMPORT_C CMdEProperty& PropertyL(TInt aIndex) const;
+
+	/**
+	 * Returns the property by given property def
+	 *
+	 * Example:
+	 *  CMdENamespaceDef& defaultNamespace = iMdeSession->GetDefaultNamespaceDefL();
+     *	CMdEObjectDef& imageDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
+	 *  CMdEObject* image = iMdESession->OpenObjectL( 17, imageDef );
+	 * 
+	 *  CMdEPropertyDef& lastModDatePropDef = imageDef.GetPropertyDefL(
+     *   		Object::KLastModifiedDateProperty );
+     * 
+     *  CMdEProperty* lastModDateProp = NULL;
+     *  image->Property( lastModDatePropDef, lastModDateProp );
+	 * 
+	 * @param aDef      property definition
+	 * @param aProperty ref to pointer that will receive property address, if such is found.
+	 * @param aStartAt  index where to begin search(by default starts from beginning)
+	 *
+	 * @return  Index, or <code>KErrNotFound</code>.
+	 */
+    IMPORT_C TInt Property(const CMdEPropertyDef& aDef, CMdEProperty*& aProperty, TInt aStartAt=0) const;
+
+	/**
+	 * Returns the number of properties of the specified definition.
+	 *
+	 * @param aDef  property definition
+	 *
+	 * @return  number of properties
+	 */
+	IMPORT_C TInt PropertyCount(const CMdEPropertyDef& aDef) const;
+
+	/**
+	 * Adds a new bool property to the object. If property definition doesn't 
+	 * match with value, method leaves with error code KErrArgument.
+	 * 
+	 * Example:
+	 *   CMdEPropertyDef& receivedDef = objectDef.GetPropertyDefL( MdeConstants::Message::KReceivedProperty );
+	 *   metadataObject.AddBoolPropertyL( receivedDef, ETrue );
+	 *
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddBoolPropertyL(CMdEPropertyDef& aDef, TBool aValue);
+
+	/**
+	 * Adds a new signed 8-bit integer property to the object. If property 
+	 * definition doesn't match with value, method leaves with error code 
+	 * KErrArgument.
+	 * 
+	 * Example:
+	 *   CMdEPropertyDef& eightBitDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddInt8PropertyL( eightBitDef, value );
+	 *
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddInt8PropertyL(CMdEPropertyDef& aDef, TInt8 aValue);
+
+	/**
+	 * Adds a new unsigned 8-bit integer property to the object. If property 
+	 * definition doesn't match with value, method leaves with error code 
+	 * KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& eightBitDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddUint8PropertyL( eightBitDef, value );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddUint8PropertyL(CMdEPropertyDef& aDef, TUint8 aValue);
+
+	/**
+	 * Adds a new signed 16-bit integer property to the object. If property 
+	 * definition doesn't match with value, method leaves with error code 
+	 * KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddInt16PropertyL( propertyDef, value ); 
+	 *
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddInt16PropertyL(CMdEPropertyDef& aDef, TInt16 aValue);
+
+	/**
+	 * Adds a new unsigned 16-bit integer property to the object. If property 
+	 * definition doesn't match with value, method leaves with error code 
+	 * KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddUint16PropertyL( propertyDef, value );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */	 
+	IMPORT_C CMdEProperty& AddUint16PropertyL(CMdEPropertyDef& aDef, TUint16 aValue);
+
+	/**
+	 * Adds a new signed 32-bit integer property to the object. If property 
+	 * definition doesn't match with value, method leaves with error code 
+	 * KErrArgument.
+	 * 
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddInt32PropertyL( propertyDef, value );
+	 *
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddInt32PropertyL(CMdEPropertyDef& aDef, TInt32 aValue);
+
+	/**
+	 * Adds a new unsigned 32-bit integer property to the object. If property 
+	 * definition doesn't match with value, method leaves with error code 
+	 * KErrArgument.
+	 * 
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddUint32PropertyL( propertyDef, value );
+	 *
+	 * @param aDef         Definition of the new property. If property definition doesn't 
+	 * match with value, method leaves with error code KErrArgument.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddUint32PropertyL(CMdEPropertyDef& aDef, TUint32 aValue);
+
+	/**
+	 * Adds a new 64-bit integer property to the object. If property definition 
+	 * doesn't match with value, method leaves with error code KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddInt64PropertyL( propertyDef, value );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddInt64PropertyL(CMdEPropertyDef& aDef, TInt64 aValue);
+
+	/**
+	 * Adds a new 32-bit real property to the object. If property definition 
+	 * doesn't match with value, method leaves with error code KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddReal32PropertyL( propertyDef, realValue );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddReal32PropertyL(CMdEPropertyDef& aDef, TReal32 aValue);
+
+	/**
+	 * Adds a new 64-bit real property to the object. If property definition 
+	 * doesn't match with value, method leaves with error code KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddReal64PropertyL( propertyDef, realValue );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddReal64PropertyL(CMdEPropertyDef& aDef, TReal64 aValue);
+
+	/**
+	 * Adds a new text property to the object. If property definition doesn't 
+	 * match with value, method leaves with error code KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddTextPropertyL( propertyDef, text );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddTextPropertyL(CMdEPropertyDef& aDef, const TDesC& aValue);
+
+	/**
+	 * Adds a new time property to the object. If property definition doesn't 
+	 * match with value, method leaves with error code KErrArgument.
+	 *
+	 * Example:
+	 *   CMdEPropertyDef& propertyDef = objectDef.GetPropertyDefL( MdeConstants::Object::KProperty );
+	 *   metadataObject.AddTimePropertyL( propertyDef, time );
+	 * 
+	 * @param aDef         Definition of the new property.
+	 * @param aValue       Value of the new property.
+	 *
+	 * @return  New property.
+	 */
+	IMPORT_C CMdEProperty& AddTimePropertyL(CMdEPropertyDef& aDef, TTime aValue);
+
+	/**
+	 * Removes the property at the specified index.
+	 *
+	 * @param aIndex  index
+	 */
+	IMPORT_C void RemoveProperty(TInt aIndex);
+
+
+	/* Methods for accessing free text keywords. */
+
+	/**
+	 * Returns the number of free text keywords.
+	 *
+	 * @return  number of free text keywords
+	 */
+	IMPORT_C TInt FreeTextCount() const;
+
+	/**
+	 * Returns the free text keyword at the specified index
+	 *
+	 * @param aIndex  index
+	 *
+	 * @return  free text keyword
+	 */
+	IMPORT_C TPtrC FreeText(TInt aIndex) const;
+    
+    /**
+     * Returns the index of the specified free text.
+     *
+     * @param aFreeText  Free text.
+     *
+     * @return  Index, or <code>KErrNotFound</code>.
+     */
+    IMPORT_C TInt FreeTextIndex(const TDesC& aFreeText) const;
+
+	/**
+	 * Adds a new free text keyword.
+	 *
+	 * @param aFreeText  free text keyword
+	 */
+	IMPORT_C void AddFreeTextL(const TDesC& aFreeText);
+
+	/**
+	 * Removes the free text keyword at the specified index.
+	 *
+	 * @param aIndex  index
+	 */
+	IMPORT_C void RemoveFreeText(TInt aIndex);
+
+	/**
+	 * Move all properties from object which is given as a paremeter to this object
+	 *
+	 * @param aObject object from where move properties
+	 */
+	IMPORT_C void MovePropertiesL(CMdEObject& aObject);
+
+	/**
+	 * Returns whether the object has been modified or not.
+	 *
+	 * @return  <code>ETrue</code>, if the URI, MediaId or Guids  has been modified.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	TBool ObjectModified() const;
+
+	/**
+	 * Returns whether the free text array has been modified or not.
+	 *
+	 * @return  <code>ETrue</code>, if FreeTexts has been modified.
+	 *          <code>EFalse</code>, otherwise.
+	 */
+	TBool FreeTextModified() const;
+
+	/**
+	 * Returns whether one of the properties has been modified or not.
+	 *
+	 * @return  Are properties modified.
+	 */
+	TBool PropertyModified() const;
+
+	/*
+	 * clear all modification flags and removes removed properties
+	 */
+	void ClearObject( TBool aClearFlags = ETrue );
+
+	/**
+	 * Sets that the object is not open for modifications.
+	 */
+	void SetNotOpenForModifications();
+
+	/**
+	 * Left locked automatically after it's added to DB.
+	 */
+	void AutoLockL() const;
+	
+	/**
+	 * Calculates required size for buffer to serialize object
+	 *
+	 * @return necessary buffer size
+	 */
+	TUint32 RequiredBufferSize() const;
+
+	/**
+	 * Serialize object
+	 * RequiredBufferSize() MUST be always called before this function!
+	 *
+	 * @param aBuffer buffer where serialized object should go
+	 */
+	TMdCOffset SerializeL(CMdCSerializationBuffer& aBuffer, TMdCOffset aFreespaceOffset) const;
+
+protected:
+
+	virtual TMdEInstanceType InstanceType() const;
+
+private:
+
+	/**
+	 * Constructs a new object.
+	 *
+	 * @param aSession session owner
+	 * @param aId object id
+	 * @param aDef  Definition of the new object.
+	 */
+	CMdEObject( CMdESession* aSession, TItemId aId, CMdEObjectDef& aDef );
+	
+	/**
+	 * Second-phase constructor.
+	 * @param aUri URI of the new object.
+	 * @param aMediaId mediaid of object. Defaults to 0.
+	 */
+	void ConstructL( const TDesC& aUri, TUint32 aMediaId = 0 );
+	
+	/**
+	 * Sets the URI of the object.
+	 *
+	 * @param aUri  New URI.
+	 */
+	void DoSetUriL(const TDesC& aUri);
+
+	/**
+	 * Adds a new property to the object.
+	 *
+	 * @param aProperty  New property.
+	 * @param aState     Modification state of the new property.
+	 */
+	void DoAddPropertyL(CMdEProperty& aProperty);
+	
+	/**
+	 * Compares two properties.
+	 *
+	 * @param aFirst   First property.
+	 * @param aSecond  Second property.
+	 *
+	 * @return  0, if the properties are equal;
+	 *		    a negative value, if the first property is less than the second;
+	 *			a positive value, if the first property is greater than the second.
+	 */
+	static TInt CompareProperties(const CMdEProperty& aFirst, 
+						          const CMdEProperty& aSecond);
+
+	/**
+	 * Adds a new free text to the object.
+	 *
+	 * @param aFreeText  New free text.
+	 */
+	TInt DoAddFreeTextL(const HBufC& aFreeText);
+
+	/**
+	 * Compares two free texts.
+	 *
+	 * @param aFirst   First free text.
+	 * @param aSecond  Second free text.
+	 *
+	 * @return  0, if the texts are equal;
+	 *		    a negative value, if the first text is less than the second;
+	 *			a positive value, if the first text is greater than the second.
+	 */
+	static TInt CompareFreeTexts(const HBufC& aFirst, const HBufC& aSecond);
+
+	/**
+	 * Returns how many properties is modified and should be send to server
+	 */
+	TUint32 ModifiedPropertiesCount() const;
+
+private:
+
+	/** Object definition.
+	 * This pointer must be initialized in constructor and 
+	 * not must be NULL in any point. */
+	CMdEObjectDef* iDef;
+
+	/** Array for properties. */
+	RPointerArray<CMdEProperty> iPropertyArray;	
+
+	/** Array for free text. */
+	RPointerArray<HBufC> iFreeTextArray;	
+
+	/** various flags */
+	mutable TUint32 iFlags;
+	
+	/** memory card Id */
+	TUint32 iMediaId;
+
+	/** usage count (read-only) */
+	TUint32 iUsageCount;
+	
+	/** Guid Low and High */
+	TInt64 iGuidHigh;
+	TInt64 iGuidLow;
+
+	/** URI descriptor. */
+	HBufC* iUri;
+
+	mutable CMdEProperty* iProperty;
+	};
+
+
+#endif  // __MDEOBJECT_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeobjectdef.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEOBJECTDEF_H__
+#define __MDEOBJECTDEF_H__
+
+
+#include <e32base.h>
+//#include <uri16.h>
+
+#include <mdccommon.h>
+
+// Forward declaration
+class CMdEPropertyDef;
+class CMdCSerializationBuffer;
+class CMdENamespaceDef;
+class TMdCObjectDef;
+
+/**
+ * Object definition.
+ */
+NONSHARABLE_CLASS(CMdEObjectDef) : public CBase
+	{
+public:	
+	IMPORT_C CMdEObjectDef* ParentL();
+	
+	/**
+	 * Returns the name of the item.
+	 *
+	 * @return  name
+	 */
+	IMPORT_C const TDesC& Name() const;
+
+	/**
+	 * Returns the number of property definitions.
+	 *
+	 * @return  number of property definitions
+	 */
+	IMPORT_C TInt PropertyDefCount() const;
+
+	/**
+	 * Returns the property definition at the specified index.
+	 *
+	 * @return  property definition
+	 */
+	IMPORT_C CMdEPropertyDef& PropertyDefL(TInt aIndex);
+
+	/**
+	 * Returns the property definition with the specified name.
+	 *
+	 * @param aName         name
+	 *
+	 * @return  property definition; 
+	 *          or 0 if there is no property definition with the specified name
+	 */
+	IMPORT_C CMdEPropertyDef& GetPropertyDefL(const TDesC& aName);
+
+	/**
+	 * Compare this object definition with other object definition.
+	 *
+	 * @param aObjectDef other object definition
+	 *
+	 * @return  0 if objects are same, 1 or more if this is greater than other 
+	 *          and -1 or less if this is less than other.
+	 */
+	IMPORT_C TInt Compare(const CMdEObjectDef& aObjectDef) const;
+	
+	/**
+	* Returns namespacedef where this objectdef belongs to.
+	* @Return namespacedef where this objectdef belongs to.
+	*/
+	IMPORT_C CMdENamespaceDef& NamespaceDef() const;
+	
+public:
+	static CMdEObjectDef* NewL(const TMdCObjectDef& aObjectDef, CMdCSerializationBuffer& aSchemaBuffer, CMdENamespaceDef& aNamespaceDef );
+
+	static CMdEObjectDef* NewLC(const TMdCObjectDef& aObjectDef, CMdCSerializationBuffer& aSchemaBuffer, CMdENamespaceDef& aNamespaceDef );
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEObjectDef();
+
+	IMPORT_C TDefId Id() const;	
+	
+	/**
+	 * Returns the property definition with the specified id
+	 *
+	 * @param aId         id
+	 *
+	 * @return  property definition; 
+	 *          or <code>NULL</code> if there is no property definition with the specified id
+	 */
+	CMdEPropertyDef* GetPropertyDefL(TDefId aId, CMdEObjectDef* aChild = NULL);
+
+private:
+	CMdEObjectDef(const TMdCObjectDef& aObjectDef, CMdENamespaceDef& aNamespaceDef);
+
+	CMdEPropertyDef* PropertyDefL(TInt aIndex, CMdEObjectDef* aChild);
+
+	CMdEPropertyDef* GetPropertyDefL(const TDesC& aName, CMdEObjectDef* aChild);
+
+	void ConstructL(CMdCSerializationBuffer& aSchemaBuffer);
+
+    static TInt CompareProperties(const CMdEPropertyDef& aFirst, const CMdEPropertyDef& aSecond);
+	
+private:
+	const TMdCObjectDef& iObjectDef;
+	CMdENamespaceDef& iNamespaceDef;
+
+	TPtrC16 iName;
+		
+	RPointerArray<CMdEPropertyDef> iPropertyDefs;
+	};
+
+#endif  // __MDEOBJECTDEF_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeobjectquery.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* 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:  Interface for object query
+*
+*/
+
+
+#ifndef __MDEOBJECTQUERY_H__
+#define __MDEOBJECTQUERY_H__
+
+
+#include <mdequery.h>
+
+/* Forward declarations. */
+class CMdEObject;
+class CMdEObjectDef;
+class CMdEPropertyDef;
+class CMdEObjectDef;
+class CMdESession;
+
+/**
+ * A query that fetches a set of objects from the metadata engine database.
+ */
+NONSHARABLE_CLASS(CMdEObjectQuery) : public CMdEQuery
+	{
+public:
+	
+	/* Constructors and destructor. */
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEObjectQuery();
+
+
+	/* Methods. */
+
+    
+    /**
+    * Adds new propertyfilter. Propertyfilters determines which properties
+    * are included in result.
+    
+    * @param aPropertyDef property definition of property which is wanted to
+      be part of result.
+    */
+    IMPORT_C void AddPropertyFilterL( const CMdEPropertyDef* aPropertyDef );
+    
+    /**
+    Clears propertyfilters. After call to this function all properties are 
+    returned unless call to <code>AddPropertyFilterL</code> is done.
+    */
+    
+    IMPORT_C void ResetPropertyFilter();
+
+    /**
+	 * Returns one of the result objects.
+	 *
+	 * @return  The result object that was requested. The query retains 
+     *          ownership of the returned object.
+	 */
+	IMPORT_C CMdEObject& Result(TInt aIndex) const;
+
+    /**
+	 * Returns query's object definition.
+	 *
+	 * @return  object definition.
+	 */
+	IMPORT_C CMdEObjectDef& ObjectDef() const;
+	
+	CMdEObjectQuery();
+
+public:
+	RPointerArray<CMdEPropertyDef>& PropertyFilter();	
+
+	RPointerArray<CMdEObjectDef>* ObjectDefs() const;
+	
+    CMdEObjectQuery(CMdESession& aSession, CMdENamespaceDef& aNamespaceDef, 
+    		CMdEObjectDef& aObjectDef, RPointerArray<CMdEObjectDef>* aObjectDefs);
+
+protected:
+
+	/* Constructors. */
+
+    /**
+     * Constuctor.
+     *
+     * @param aSession  Session.
+     */
+
+	/**
+	 * Second-phase constructor.
+	 */
+	void ObjectQueryConstructL();
+
+    virtual void DoCancel();
+
+private:
+
+    /* Private methods. */
+
+
+private:
+
+    /** 
+     * Properties to include when fetching results. Empty, if
+     * all available properties should be fetched. 
+     */
+    RPointerArray<CMdEPropertyDef> iPropertyFilters;
+
+	/**
+	 * Query's object definition.
+	 */
+	CMdEObjectDef& iObjectDef;
+
+	/**
+	 * Query's object definition.
+	 */
+	RPointerArray<CMdEObjectDef>* iObjectDefs;
+	
+	/**
+	 * Speed optimization to drop freetexts from results.
+	 */
+	TBool iFreetextsInResult;
+    };
+
+#endif  // __MDEOBJECTQUERY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeorderrule.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEORDERRULE_H__
+#define __MDEORDERRULE_H__
+
+
+#include <e32base.h>
+
+#include <mdccommon.h>
+
+/* Forward declarations. */
+class CMdEPropertyDef;
+class CMdCSerializationBuffer;
+
+/**
+ * TMdEOrderRule defines a rule that is used for sorting the results of a
+ * query. A query may use multiple order rules.
+ */
+class TMdEOrderRule
+    {
+public:
+
+    /* Constructors. */
+
+    /**
+     * Constructor.
+     *
+     * @param aType       Type of the order rule.
+     * @param aAscending  <code>ETrue</code>, if the rule order is 
+     *                    ascending.
+     */        
+    IMPORT_C TMdEOrderRule(TOrderRuleType aType, TBool aAscending = ETrue);   
+
+    /**
+     * Constructor.
+     *
+     * @param aPropertyDef  Property definition.
+     * @param aAscending    <code>ETrue</code>, if the rule order is 
+     *                      ascending.
+     */        
+    IMPORT_C TMdEOrderRule(const CMdEPropertyDef& aPropertyDef, 
+                           TBool aAscending = ETrue);
+
+
+    /* Methods. */
+
+    /**
+     * Returns the type of the order rule.
+     *
+     * @return  Order rule type constant.
+     */
+    IMPORT_C TOrderRuleType Type() const;
+
+    /**
+     * Sets the type of the order rule.
+     *
+     * @param aType  Order rule type constant.
+     */
+    IMPORT_C void SetType(TOrderRuleType aType);
+
+    /**
+     * Determines whether the ordering is ascending.
+     *
+     * @return  <code>ETrue</code> ascending order,
+     *          <code>EFalse</code> descending order.
+     */
+    IMPORT_C TBool Ascending() const;
+
+    /**
+     * Sets the order rule to ascending or descending order.
+     *
+     * @param aAscending  <code>ETrue</code> ascending order,
+     *                    <code>EFalse</code> descending order.
+     */
+    IMPORT_C void SetAscending(TBool aAscending = ETrue);
+
+    /**
+     * Returns the property definition associated with the order rule.
+     *
+     * @return  Property definition.  <code>NULL</code>, if no property
+     *          definition has been associated with the rule.
+     */
+    IMPORT_C const CMdEPropertyDef* PropertyDef() const;
+
+    /**
+     * Associates a property definition with the order rule.
+     *
+     * @param aPropertyDef  Property definition.
+     */
+    IMPORT_C void SetPropertyDef(const CMdEPropertyDef& aPropertyDef);
+
+    /**
+     * Sets text sorting case sensitive or case insensitive.
+     *
+     * @param aCaseSensitive <code>ETrue</code> case sensitive sort.
+                             <code>EFalse</code> case insensitive sort.
+     */
+    IMPORT_C void SetCaseSensitive(TBool aCaseSensitive);
+
+    /**
+     * Returns type of text comparison, whether case sensitive
+     * or case insensitive.
+     *
+     * @return <code>ETrue</code> case sensitive sort.
+     *         <code>EFalse</code> case insensitive sort.
+     */
+    IMPORT_C TBool CaseSensitive();
+
+	/**
+     * Get required size of serialized buffer when this is serialized.
+     *
+     * @return required size of serialized buffer
+     */
+	TUint32 RequiredBufferSize() const;
+
+    /**
+     * Serialize own data to serialized buffer (correct position must be set 
+     * before calling) and return new position of serialized buffer.
+	 *
+     * @param aBuffer  serialized buffer.
+     */
+    void SerializeL(CMdCSerializationBuffer& aBuffer, 
+    		TMdCOffset& aFreespaceOffset) const;
+
+private:
+
+    /** Type of the order rule. */
+    TOrderRuleType iType;
+    
+    /** Optional. */
+    const CMdEPropertyDef* iPropertyDef;
+    
+    /** Flag for ascending order. */
+    TBool iAscending;
+
+    /** Flag for text sorting. Default value is EFalse */
+    TBool iCaseSensitive;
+   };        
+
+#endif  // __MDEORDERRULE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdeproperty.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,332 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEPROPERTY_H__
+#define __MDEPROPERTY_H__
+
+#include <e32base.h>
+
+#include <mdeinstanceitem.h>
+
+
+/* Forward declarations. */
+class CMdEObject;
+class CMdEPropertyDef;
+class CMdCSerializationBuffer;
+
+/**
+ * Abstract base class for properties.
+ */
+NONSHARABLE_CLASS(CMdEProperty) : public CMdEInstanceItem
+	{
+	friend class CMdEObject;
+public:
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEProperty();
+
+
+	/* Methods. */
+
+	/**
+	 * Constructs a new property.
+	 *
+	 * @param aObject owner object of property
+	 * @param aBuffer buffer where property was serialized
+	 * @return new numeric property
+	 */
+	static CMdEProperty* NewL( const CMdEObject& aObject, CMdCSerializationBuffer& aBuffer );
+
+	/**
+	 * Constructs a new property and leave it on the cleanup stack.
+	 *
+	 * @param aObject owner object of property
+	 * @param aBuffer buffer where property was serialized
+	 * @return new numeric property
+	 */
+	static CMdEProperty* NewLC( const CMdEObject& aObject, CMdCSerializationBuffer& aBuffer );
+
+	/**
+	 * Constructs a new property.
+	 *
+	 * @param aDef property definition
+	 * @param aObject owner object of property
+	 * @return new numeric property
+	 */
+    static CMdEProperty* NewL(const CMdEPropertyDef& aDef, const CMdEObject& aObject);
+    
+    CMdEProperty();
+
+	/**
+	 * Constructs a new property.
+	 *
+	 * @param aDef property definition
+	 * @param aObject owner object of property
+	 * @return new numeric property
+	 */
+	static CMdEProperty* NewLC(const CMdEPropertyDef& aDef, const CMdEObject& aObject);
+
+
+	/**
+	 * Returns the definition of the integer property.
+	 *
+	 * @return  property definition
+	 */
+	IMPORT_C const CMdEPropertyDef& Def() const;
+
+	/**
+	 * Returns the object which the property belongs to.
+	 *
+	 * @return  Object.
+	 */
+	IMPORT_C const CMdEObject& Object() const;
+
+	/**
+	 * @return ETrue if property was modified,
+	 *         EFalse otherwise
+	 */
+	IMPORT_C TBool Modified() const;
+
+	
+	/** value getters */
+
+	/**
+	 * Returns the TBool value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TBool BoolValueL() const;
+
+	/**
+	 * Returns the TInt8 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TInt8 Int8ValueL() const;
+
+	/**
+	 * Returns the TUint8 value of the property.
+	 * @return  value
+	 */
+
+	IMPORT_C TUint8 Uint8ValueL() const;
+	
+	/**
+	 * Returns the TInt16 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TInt16 Int16ValueL() const;
+	
+	/**
+	 * Returns the TUint16 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TUint16 Uint16ValueL() const;
+	
+	/**
+	 * Returns the TInt32 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TInt32 Int32ValueL() const;
+	
+	/**
+	 * Returns the TUint32 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TUint32 Uint32ValueL() const;
+	
+	/**
+	 * Returns the TInt64 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TInt64 Int64ValueL() const;
+	
+	/**
+	 * Returns the TReal32 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TReal32 Real32ValueL() const;
+	
+	/**
+	 * Returns the TReal64 value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TReal64 Real64ValueL() const;
+	
+	/**
+	 * Returns the TTime value of the property.
+	 * @return  value
+	 */
+	IMPORT_C TTime TimeValueL() const;
+
+	/**
+	 * Returns the text value of the property.
+	 *
+	 * @return  value
+	 */
+	IMPORT_C const TDesC& TextValueL() const;
+	
+
+	/** setter methods */
+	/**
+	 * Sets the TBool value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetBoolValueL(TBool aValue);
+
+	/**
+	 * Sets the TInt8 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetInt8ValueL(TInt8 aValue);
+
+	/**
+	 * Sets the TUint8 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetUint8ValueL(TUint8 aValue);
+
+	/**
+	 * Sets the TInt16 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetInt16ValueL(TInt16 aValue);
+
+	/**
+	 * Sets the TUint16 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetUint16ValueL(TUint16 aValue);
+
+	/**
+	 * Sets the TInt32 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetInt32ValueL(TInt32 aValue);
+
+	/**
+	 * Sets the TUint32 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetUint32ValueL(TUint32 aValue);
+
+	/**
+	 * Sets the TInt64 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetInt64ValueL(TInt64 aValue);
+
+	/**
+	 * Sets the TReal32 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetReal32ValueL(TReal32 aValue);
+
+	/**
+	 * Sets the TReal64 value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetReal64ValueL(TReal64 aValue);
+
+	/**
+	 * Sets the TTime value of the property.
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetTimeValueL(const TTime& aValue);
+
+	/**
+	 * Sets the text value of the property.
+	 *
+	 * @param aValue       New value.
+	 */
+	IMPORT_C void SetTextValueL(const TDesC& aValue);
+
+	
+	/**
+	 * Return required size for property serialization
+	 *
+	 * @return size of serialized property
+	 */
+	TUint32 RequiredBufferSize() const;
+
+	/**
+	 * Serialize object
+	 *
+	 * @param aBuffer buffer where serialized object should go
+	 */
+	TMdCOffset SerializeL(CMdCSerializationBuffer& aBuffer, TMdCOffset aFreespaceOffset) const;
+	
+private:
+
+	TUint8 ModFlags() const;
+
+	void SetRemoved();
+	TBool Removed();
+
+	void ClearFlags();
+
+	void SetModified();
+
+
+	/* Constructors. */
+
+	/**
+	 * Constructor.
+	 *
+	 * @param aDef         Definition of the new property.	 
+	 * @param aObject object where this property belongs to.
+	 */
+	CMdEProperty(const CMdEPropertyDef& aDef, const CMdEObject& aObject);
+
+	/**
+	 * Second-phase constructor.
+	 *
+	 * @param aSource  Source of the new property.
+	 */
+	void BaseConstructL();
+
+
+	/* Methods. */
+
+	/**
+	 * Check if property has value is between min and max
+	 * and leave if not!
+	 */
+#ifdef _DEBUG
+	void CheckValueMinMaxL( const TMdCValueUnion& aValue ) const;
+#endif
+	
+	void DoSetTextValueL(const TDesC& aValue);
+
+	TMdEInstanceType InstanceType() const;
+
+protected:
+	/** property modifications flags */
+	TUint8 iModFlags;
+
+private:
+	/** Property definition. */
+	const CMdEPropertyDef& iDef;
+
+	/** Object this property belongs to. */
+	const CMdEObject& iObject;
+
+	/** Value. */
+	TMdCValueUnion iValue;
+	};
+
+#endif  // __MDEPROPERTY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdepropertydef.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#ifndef __MDEPROPERTYDEF_H__
+#define __MDEPROPERTYDEF_H__
+
+#include <mdccommon.h>
+
+// Forward declaration
+class CMdCSerializationBuffer;
+class CMdEObjectDef;
+class CMdENamespaceDef;
+class TMdCPropertyDef;
+
+/**
+ * Class for property definitions.
+ */
+NONSHARABLE_CLASS(CMdEPropertyDef) : public CBase
+	{
+public:	
+	/**
+	 * Returns the name of the item.
+	 *
+	 * @return  name
+	 */
+	IMPORT_C const TDesC& Name() const;
+	
+	/**
+	 * Returns the type of the property.
+	 *
+	 * @return  property type
+	 */
+	IMPORT_C TPropertyType PropertyType() const;
+
+	/**
+	 * Returns whether the property is read only.
+	 *
+	 * @return  <code>ETrue</code>, if the property is read only;
+	 *          <code>EFalse</code>, otherwise
+	 */
+	IMPORT_C TBool ReadOnly() const;
+
+	/**
+	 * Returns whether the property is mandatory.
+	 *
+	 * @return  <code>ETrue</code>, if the property is mandatory;
+	 *          <code>EFalse</code>, otherwise
+	 */
+	IMPORT_C TBool Mandatory() const;
+
+	/**
+	 * Compare this property definition with other property definition.
+	 *
+	 * @param aPropertyDef other property definition
+	 *
+	 * @return  0 if properties are same, 1 or more if this is greater than other 
+	 *          and -1 or less if this is less than other.
+	 */
+	IMPORT_C TInt Compare(const CMdEPropertyDef& aPropertyDef) const;
+	
+
+	IMPORT_C CMdEObjectDef& ObjectDef() const;
+
+	IMPORT_C TInt32 MinInt32ValueL() const;
+
+	IMPORT_C TInt32 MaxInt32ValueL() const;
+
+	IMPORT_C TUint32 MinUint32ValueL() const;
+
+	IMPORT_C TUint32 MaxUint32ValueL() const;
+
+	IMPORT_C TInt64 MinInt64ValueL() const;
+
+	IMPORT_C TInt64 MaxInt64ValueL() const;
+
+	IMPORT_C TReal MinRealValueL() const;
+
+	IMPORT_C TReal MaxRealValueL() const;
+
+	IMPORT_C TTime MinTimeValueL() const;
+
+	IMPORT_C TTime MaxTimeValueL() const;	
+
+	IMPORT_C TInt MinTextLengthL() const;
+
+	IMPORT_C TInt MaxTextLengthL() const;
+	
+	IMPORT_C CMdENamespaceDef& NamespaceDef() const;
+
+public:
+	static CMdEPropertyDef* NewL(const TMdCPropertyDef& aPropertyDef, CMdCSerializationBuffer& aSchemaBuffer, CMdEObjectDef& aObjectDef);
+
+	static CMdEPropertyDef* NewLC(const TMdCPropertyDef& aPropertyDef, CMdCSerializationBuffer& aSchemaBuffer, CMdEObjectDef& aObjectDef);
+	
+	void SerializeL(CMdCSerializationBuffer& aBuffer) const;
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEPropertyDef();
+
+	TDefId Id() const;
+	void SetId(TDefId aId);
+		
+	TDefId ObjectDefId() const;
+	
+private:
+	CMdEPropertyDef(const TMdCPropertyDef& aPropertyDef, CMdEObjectDef& aObjectDef);
+
+	void ConstructL(CMdCSerializationBuffer& aSchemaBuffer );
+
+private:	
+
+	const TMdCPropertyDef& iPropertyDef;
+	CMdEObjectDef& iObjectDef;
+
+	TPtrC16 iName;
+    };
+
+#endif  // __MDEPROPERTYDEF_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdequery.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,676 @@
+/*
+* 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:  Query base class
+*
+*/
+
+
+#ifndef __MDEQUERY_H__
+#define __MDEQUERY_H__
+
+
+#include <e32base.h>
+#include <badesca.h>
+
+#include <mdccommon.h>
+
+
+/* Forward declarations. */
+class CMdESession;
+class CMdEQuery;
+class CMdELogicCondition;
+class TMdEOrderRule;
+class CMdENamespaceDef;
+class CMdEItem;
+class CMdEInstanceItem;
+
+
+/**
+ * Observer interface for MdE database queries.
+ * 
+ * Example of doing a query to metadata database:
+ * 
+ * A class needs to implement MMdEQueryObserver interface if it is going to do a query to MdE database.
+ * 
+ * class CMdEQueryExample : public MMdEQueryObserver
+ * {
+ *		void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex, TInt aNewItemCount);
+ *		void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);
+ * 		...
+ * 		CMdESession* iMdeSession; // session to MdE, created before trying to do the query
+ * 		CMdEQuery* iQuery;
+ * };
+ * 
+ * void CMdEQueryExample::DoQuery()
+ * {
+ * 		CMdENamespaceDef& defNS = iMdeSession->GetDefaultNamespaceDefL();
+ *	    
+ *	    // In this function we create a query with following conditions:
+ *	    // 		Right object in relation must be a location object.
+ *	    // 		Left object in relation must have id 6.
+ * 
+ * 		// First create an object query. We want to find location objects so let's give that
+ * 		// as a condition to the query. 
+ *	    CMdEObjectDef& rightObjDef = defNS.GetObjectDefL(
+ *	        MdeConstants::Location::KLocationObject );
+ *	    iQuery = iMdeSession->NewObjectQueryL( defNS, rightObjDef, this );
+ *			    
+ * 		// Result mode EQueryResultModeItem means we want the query to return items.
+ * 		// Other options are: EQueryResultModeId, EQueryResultModeCount, 
+ * 		// EQueryResultModeDistinctValues and EQueryResultModeObjectWithFreetexts.
+ *	    iQuery->SetResultMode( EQueryResultModeItem );
+ * 
+ * 		// ELogicConditionOperatorAnd means we want all conditions to be true.
+ *	    iQuery->Conditions().SetOperator( ELogicConditionOperatorAnd );
+ *	
+ * 		// Add a relation condition to the query. The location object is the right side object of
+ * 		// the relation.
+ *	    CMdERelationCondition& filterCond = iQuery->Conditions().
+ *	        AddRelationConditionL( ERelationConditionSideRight );
+ *			        
+ *		// The object on the left side of the relation must have ID 6.
+ *	    filterCond.LeftL().AddObjectConditionL( 6 );
+ *			    
+ *	    iQuery->FindL( 10, 1 ); // Start the query! The first parameter is maximum number of result items. 
+ * 								// The second parameter is number of results per observer
+ *								// notification. This query returns maximum of 10 location items
+ * 								// and gives a notification (HandleQueryNewResults) for each.
+ * }
+ * 
+ * void CMdEQueryExample::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError )
+ * {
+ * 		// query is completed
+ * 		if( aQuery.Count() > 0 && aError == KErrNone )
+ *		{
+ *		// some items were found!
+ *		}
+ * }
+ * 
+ * void CMdEQueryExample::HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex,
+ *                                       TInt aNewItemCount)
+ * {
+ * 		// query is not yet completed but new results were found
+ * }
+ * 
+ * @see CMdEQuery::FindL
+ */
+class MMdEQueryObserver 
+    {
+public:
+
+    /**
+     * Called to notify the observer that new results have been received 
+     * in the query.
+     *
+     * @param aQuery              Query instance that received new results.
+     * @param aFirstNewItemIndex  Index of the first new item that was added
+     *                            to the result item array.
+     * @param aNewItemCount       Number of items added to the result item 
+     *                            array.
+     */
+    virtual void HandleQueryNewResults(CMdEQuery& aQuery,
+                                       TInt aFirstNewItemIndex,
+                                       TInt aNewItemCount) = 0;
+
+
+            
+    /**
+     * Called to notify the observer that the query has been completed,
+     * or that an error has occured.
+     *
+     * @param aQuery  Query instance.
+     * @param aError  <code>KErrNone</code>, if the query was completed
+     *                successfully. Otherwise one of the system-wide error 
+     *                codes.
+     */
+    virtual void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError) = 0;
+    
+    };
+
+
+/** Default count for finding items. */
+static const TUint KMdEQueryDefaultMaxCount = KMaxTUint;
+
+
+/**
+ * MdE database query. This is the abstract base class for all metadata engine
+ * database queries. Instances of a query class own all the result items 
+ * fetched from the database; when the query instance is destroyed, the 
+ * results will be destroyed as well.
+ *
+ * If a query is restarted by calling FindL() after a previous query operation 
+ * has been completed, any new results are appended to the end of the result 
+ * item list. The previous results are not affected by subsequent calls to 
+ * FindL().
+ *
+ * The query parameters (order rules, search conditions, property filters) 
+ * must be configured before FindL() is called. FindL() may be called several
+ * times, but the query parameters that were in effect for the first Find()
+ * are used for all FindL()s.
+ */
+
+NONSHARABLE_CLASS(CMdEQuery) : public CBase
+	{
+public: 
+
+    /** 
+     * Query states.
+     */
+    enum TState
+        {
+        EStateFirst = 0x0000,
+        
+        /** The query has been created. The query parameters are specified
+            during this state. */
+        EStateNew,
+        
+        /** The query has been started with Find(). All the results received
+            so far are available to the user. */
+        EStateSearching,
+        
+        /** All the results have been found and they are available to 
+            the user. */
+        EStateCompleted,
+        
+        /** An error has occured. */
+        EStateError,
+        
+        EStateLast
+        };
+
+    /* Constants. */
+	
+	/* Constructors and destructor. */
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdEQuery();
+
+
+    /* Methods. */
+
+    /**
+	 * Returns the type of the query.
+	 *
+	 * @return  Query type.
+	 */
+	IMPORT_C TQueryType Type() const;
+
+    /**
+	 * Returns the namespace definition of the query.
+	 *
+	 * @return  Namespace definition.
+	 */
+	IMPORT_C CMdENamespaceDef& NamespaceDef() const;
+
+    /**
+	 * Returns the session of the query.
+	 *
+	 * @return  Session.
+	 */
+    IMPORT_C CMdESession& Session() const;
+
+    /**
+     * Returns the root of the condition tree.
+     *
+     * @return  Logic condition that acts as the root of the search conditions
+     *          tree.
+     */
+    IMPORT_C CMdELogicCondition& Conditions() const;
+    
+    /**
+     * Appends a new result ordering rule into the end of list of order rules.
+     *
+     * Example:
+     *   CMdEObjectDef& objdef = iDefaultNamespaceDef->GetObjectDefL( MdeConstants::Object::KBaseObject );
+     *   CMdEPropertyDef& propDef = objdef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty );
+     *   TMdEOrderRule rule( *propDef, ETrue );
+	 *   iQuery->AppendOrderRuleL( rule ); // iQuery is CMdEQuery*
+     * 
+     * @param aRule  Order rule.
+     */
+    IMPORT_C void AppendOrderRuleL(const TMdEOrderRule& aRule);
+
+    /**
+     * Insert a new result ordering rule into the list of order rules. 
+     * The first rule is at position zero.
+     * 
+     * Example:
+     *   CMdEObjectDef& objdef = iDefaultNamespaceDef->GetObjectDefL( MdeConstants::Object::KBaseObject );
+     *   CMdEPropertyDef& propDef = objdef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty );
+     *   TMdEOrderRule rule( *propDef, ETrue );
+	 *   iQuery->InsertOrderRuleL( rule, 0 ); // iQuery is CMdEQuery*
+     *
+     * @param aRule  Order rule.
+     * @param aPos   Position in the list of rules to insert into.
+     */
+    IMPORT_C void InsertOrderRuleL(const TMdEOrderRule& aRule, TInt aPos);
+    
+    /**
+     * Returns the number of order rules currently defined.
+     *
+     * @return  Number of order rules.
+     */
+    IMPORT_C TInt OrderRuleCount() const;
+    
+    /**
+     * Removes an order rule.
+     *
+     * @param aIndex  Index of the rule to remove.
+     */
+    IMPORT_C void RemoveOrderRule(TInt aIndex);
+
+    /**
+     * Gets an order rule.
+     *
+     * @param aIndex  Index of the rule to return.
+     * @param aRule   Reference to the TMdEOrderRule where the rule is stored.
+     */
+    IMPORT_C TMdEOrderRule OrderRule(TInt aIndex) const;
+
+    /**
+	 * Starts a query operation and returns immediately. The observers of 
+     * the query instance will be notified when the query is completed, or 
+     * if it fails. The query parameters (order rules, search conditions, 
+     * property filters) must be configured before FindL() is called. 
+     *
+     * The caller can perform a find operation in several steps by using a
+     * sufficiently small maximum number of result items. Notifications 
+     * about progress of query is returned is steps, continuing the previously 
+     * started find operation.
+     *
+     * @param aMaxCount     Maximum number of result items. Defaults to 
+     *                      unlimited. 
+     * @param aNotifyCount  Maximum number of results per observer
+     *                      notification. Defaults to unlimited.
+     *
+     * @leave  KErrNotReady  The query is in the Searching state.
+     *
+     * @panic  TMdEPanic::EQueryStateIllegalOperation  
+     *         Query is in a state that prohibits calling this method.
+	 */
+    IMPORT_C void FindL(TUint aMaxCount = KMdEQueryDefaultMaxCount,
+                        TUint aNotifyCount = KMdEQueryDefaultMaxCount);
+
+    /**
+	 * Cancels the currently running query operation. Does nothing if the 
+     * query is not currently running. 
+	 */
+    IMPORT_C void Cancel();
+
+    /**
+     * Returns whether the query has been completed.
+     *
+     * @return  <code>ETrue</code>, if the query is not currently running.
+     *          Otherwise <code>EFalse</code>.
+     */
+    IMPORT_C TBool IsComplete() const;
+
+    /**
+     * Returns the error code of the latest completed query. The same error
+     * code has been passed to the query observer.
+     *
+     * @return  Error code.
+     */
+    IMPORT_C TInt Error() const;
+
+	/**
+	 * Returns the current state of the query.
+	 *
+	 * @return  Query state.
+	 */
+	IMPORT_C TState State() const;
+
+    /**
+	 * Returns the number of received result items. This can be called at any
+     * time during the query instance's lifetime.
+	 *
+	 * @return  The number of results.
+	 */
+	IMPORT_C TInt Count() const;
+	
+    
+    /**
+	 * Returns one of the result items. 
+	 * 
+	 * Example:
+	 *   void CExampleClass::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError )
+	 *   {
+	 *     CMdEItem& mdeItem = aQuery.ResultItem( 0 );
+	 *     ...
+	 *   }
+	 * 
+	 * @param aIndex index of the returned item. 
+	 * @panics if aIndex is out of bounds
+	 * @return  Result item. 
+	 */
+    IMPORT_C CMdEItem& ResultItem(TInt aIndex) const;
+
+    /**
+	 * Returns one of the result ids. 
+	 * 
+	 * Example:
+	 *   void CExampleClass::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError )
+	 *   {
+	 *     TItemId mdeItemId = aQuery.ResultId( 0 );
+	 *     ...
+	 *   }
+	 * 
+	 * @param aIndex index of the returned id.
+	 * @panics if aIndex is out of bounds
+	 * @return  Result id.
+	 */
+    IMPORT_C TItemId ResultId(TInt aIndex) const;
+
+    /**
+	 * Returns all of the result ids.
+	 *
+	 * @return  Result ids.
+	 */
+    IMPORT_C const RArray<TItemId>& ResultIds() const;
+
+    /**
+     * Returns one of the result items. Ownership of the item is transferred 
+     * to the caller. The results array element at the specified index will 
+     * still point to the result item.
+     *
+     * @param aIndex  Result index.
+     *
+     * @return  Pointer to result item.
+     */
+    IMPORT_C CMdEItem* TakeOwnershipOfResult(TInt aIndex);
+
+    /**
+     * Determines whether the query owns a result item.
+     * @param aIndex index of the result item which ownership is checked.
+     * @panics if aIndex is out of bounds
+     * @return  <code>ETrue</code>, if the query owns the item. Otherwise
+     *          <code>EFalse</code>.
+     */        
+    IMPORT_C TBool OwnsResult(TInt aIndex);
+	
+	
+    /**
+     * Adds a new observer.
+     *
+     * @param  aObserver to add.
+     */
+    IMPORT_C void AddObserverL(MMdEQueryObserver& aObserver);
+
+    /**
+     * Removes an observer.
+     *
+     * @param  aObserver to remove.
+     */
+    IMPORT_C void RemoveObserver(MMdEQueryObserver& aObserver);
+
+    /**
+     * Sets type of query results. Whether whole items or only IDs.
+     * Default value is EModeItem.
+     *
+     * @param  aMode Determines type of query results. Can be set of
+     *         instance items or set of item IDs
+     */
+    IMPORT_C void SetResultMode( TQueryResultMode aMode );
+    
+    /**
+     * Returns type of query results, whether whole items or only IDs.
+     *
+     * @return Type of query results.
+     */
+    IMPORT_C TQueryResultMode ResultMode() const;
+    
+    /**
+	 * Returns result object item
+	 *
+	 * @return  Result object item.
+	 */
+    IMPORT_C CMdEItem& ResultObjectItem() const;
+
+    /**
+	 * Returns one of the result distinct values
+	 *
+	 * @return  Result distinct value
+	 */
+    IMPORT_C TPtrC16 ResultDistinctValue(TInt aIndex) const;
+
+	/**
+	 * Returns order rules
+	 *
+	 * @return  Order rules
+	 */
+	RArray<TMdEOrderRule>& OrderRules();
+
+	void SetQueryId( TUint32 aQueryId ) const
+		{
+		iQueryId = aQueryId;
+		}
+
+	TUint32 GetQueryId() const
+		{
+		return iQueryId;
+		}
+
+protected:
+
+	/* Constructors. */
+
+	/**
+	 * Constructor. Note that new queries should be created using the factory
+	 * methods in CMdESession.
+	 *
+	 * @param aType     Type of the query.
+     * @param aSession
+	 */
+	CMdEQuery(TQueryType aType, CMdESession& aSession, CMdENamespaceDef& aNamespaceDef);
+	
+	CMdEQuery();
+
+	/**
+	 * Second-phase constructor. Creates the root node of the conditions tree.
+	 */
+	void QueryConstructL();
+
+
+    /* Implementation methods. */
+
+    /**
+     * As Find().
+     */
+    virtual void DoFindL(TUint aMaxCount, TUint aNotifyCount){};
+
+    /**
+     * As Cancel().
+     */
+    virtual void DoCancel();
+
+
+    /* Notification methods. */
+
+    /**
+     * Appends new item results to the results array. This query instance takes 
+     * ownership of the items. 
+	 *
+	 * If a leave occurs, the query won't take ownership of any of the new 
+     * result items. The caller is responsible for destroying the result
+     * items in this case.
+     *
+     * This operation is atomic: either all of the new results are added to
+     * the results array and the query takes ownership of them, or none of
+     * results are added to the results array.
+     *
+     * @param aNewResults contains result items
+     */
+    virtual void NotifyNewResultsL(const RPointerArray<CMdEInstanceItem>& aNewResults);
+
+    /**
+     * Appends new ID results to the results array.
+     * 
+     * @param aNewResults contains results from ID query
+     */
+    virtual void NotifyNewResultsL(const RArray<TItemId>& aNewResults);
+
+    /**
+     * Appends distinct value results to the results array.
+     * 
+     * @param aResults contains results from distinct value query
+     */
+    virtual void NotifyNewResultsL( const CDesCArray& aNewResults );
+
+
+    /**
+     * Gets result from count query.
+     * 
+     * @param aResults contains result from count query
+     */
+    virtual void NotifyNewResults(TUint32 aResult);
+        
+    /**
+     * Notifies observers that the query was completed.
+     */
+    virtual void NotifyCompleted(TInt aError);
+
+
+	/* Utility methods. */
+	
+	/**
+	 * Sets the state of the query.
+	 *
+	 * @param aState  Query state.
+	 */
+    void SetState(TState aState);
+    
+    /** 
+     * Panics if the state of the query is the specified state.
+     *
+     * @param aState  Query state.
+     *
+     * @panic TMdEPanic::EQueryStateIllegalOperation  The query was not 
+     *        in the given state.
+     */
+    void AssertInState(TState aState);
+    
+    /** 
+     * Panics if the state of the query is not the specified state.
+     *
+     * @param aState  Query state.
+     *
+     * @panic TMdEPanic::EQueryStateIllegalOperation  The query was in the 
+     *        given state.
+     */
+    void AssertNotInState(TState aState);
+
+    
+private:
+
+    /* Private data structures. */
+
+    //  Result item for instances
+    struct TResult
+        {
+        /** Result item. */
+        CMdEItem* iItem;
+
+        /** Query has the ownership of the result item. */
+        TBool iOwned;
+
+        /** Constructor for initializing the struct. */
+        TResult(CMdEItem* aItem) : iItem(aItem), iOwned(EFalse) {}
+        };
+
+
+private:
+
+    /* Private methods. */
+
+    /**
+     * Appends new result items into the results array. Does not transfer
+     * ownership of the new results to the query.
+     *
+     * @param aNewResults  Array of result items.
+     */
+    void AppendResultsL(const RPointerArray<CMdEInstanceItem>& aNewResults);
+
+    void AppendResultsL(const RArray<TItemId>& aNewResults);
+
+	/*void AppendResultsL(CMdEInstanceItem* aObjectResult,
+    	const RPointerArray<CMdEInstanceItem>& aRelationResults, 
+    	const RPointerArray<CMdEInstanceItem>& aEventResults);*/
+    	
+    void AppendResultsL(const CDesCArray& aNewResults);
+    	
+private:
+
+	mutable TUint32 iQueryId;
+
+    /** The session of the query. */
+    CMdESession& iSession;
+
+	/** The namespace definition of the query */
+	CMdENamespaceDef& iNamespaceDef;
+    
+    /** Type of the query. */
+    TQueryType iType;
+
+    /** Type of results. */
+    TQueryResultMode iResultMode;
+
+    /** State of the query. */    
+    TState iState;
+
+    /** Latest error code. */
+    TInt iError;
+
+    /** Root node of the conditions tree.  Always present. */
+    CMdELogicCondition* iConditions;
+    
+    /** Array of result ordering rules. */
+    RArray<TMdEOrderRule> iOrderRules;
+
+    /** Instance result items. */
+    RArray<TResult> iResults;
+    
+    /** ID result items. */
+    RArray<TItemId> iIdResults;
+
+    /** Instance result object item */
+    TResult iObjectResult;
+	
+    /** Results of count query */
+    TInt iCountResult;
+
+    /** Observers. */
+    RPointerArray<MMdEQueryObserver> iObservers;
+    
+    CDesCArray* iDistinctResults;
+    
+    TBool iDestroyed;
+    };
+
+    
+// includes only for client more convinient usage
+	#include <mdeobjectquery.h>
+	#include <mderelationquery.h>
+	#include <mdeeventquery.h>
+	#include <mdelogiccondition.h>
+	#include <mdeobjectcondition.h>
+	#include <mderelationcondition.h>
+	#include <mdeeventcondition.h>
+	#include <mdepropertycondition.h>
+	#include <mderange.h>
+	#include <mdeorderrule.h>
+// end
+
+#endif  // __MDEQUERY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdesession.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,1797 @@
+/*
+* Copyright (c) 2005-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:  Metadata engine client session
+*
+*/
+
+
+#ifndef __MDESESSION_H__
+#define __MDESESSION_H__
+
+
+#include <e32base.h>
+#include <badesca.h>
+
+#include <mdccommon.h>
+
+
+/* Forward declarations. */
+class CMdESession;
+class CMdEObjectDef;
+class CMdERelationDef;
+class CMdEEventDef;
+class CMdEObject;
+class TMdEObject;
+class CMdERelation;
+class TMdERelation;
+class CMdEEvent;
+class CMdEObjectQuery;
+class CMdERelationQuery;
+class CMdEEventQuery;
+class CMdELogicCondition;
+class CMdEInstanceItem;
+class MMdEQueryObserver;
+class CMdENamespaceDef;
+class RMdEDataBuffer;
+class CMdECondition;
+
+
+
+/**
+ * Observer interface for a metadata engine session.
+ * 
+ * 
+ * 
+ * Examples of MdE session usage:
+ * 
+ * The class that needs a MdE session needs to implement MMdESessionObserver interface to get
+ * a notification of completed session opening or an error that has occurred.
+ * 
+ * class CMdESessionExample : public MMdESessionObserver
+ * {
+ * 		void HandleSessionOpened(CMdESession& aSession, TInt aError);
+ *   	void HandleSessionError(CMdESession& aSession, TInt aError);
+ * 		...
+ * 
+ * 		CMdESession* iMdeSession;
+ * };
+ * 
+ * The session is opened simply by creating an instance of CMdESession.
+ * 
+ * void CMdESessionExample::OpenSession()
+ * {
+ * 		iMdeSession = CMdESession::NewL( *this );
+ * }
+ * 
+ * void CMdESessionExample::HandleSessionOpened(CMdESession& aSession, TInt aError)
+ *	{
+ *		if ( KErrNone != aError ) {
+ * 			// Error occurred when opening session. iMdeSession must be deleted and new
+ * 			// session opened if we wish to use MdE.
+ * 
+ * 			delete iMdeSession; iMdeSession = NULL;
+ * 			return;
+ * 		}
+ * 		
+ * 		// The session was opened successfully.
+ * 		...
+ *	}
+ * 
+ * void CMdESessionError::HandleSessionError(CMdESession& aSession, TInt aError)
+ * {
+ * 		// This function is called when an error has occurred in the session by some
+ * 		// external source (e.g. other clients). It’s important to notice, that 
+ * 		// this method is called when the session has already been opened, not when 
+ * 		// error happens during opening. Session can't be used anymore and it must be deleted.
+ * 
+ * 		delete iMdeSession; iMdeSession = NULL;
+ * }
+ */
+class MMdESessionObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that opening the session has been 
+	 * completed and, if the opening succeeded, the session is ready for use.
+	 *
+	 * @param aSession session
+	 * @param aError   <code>KErrNone</code>, if opening the session succeeded;
+	 *                 or one of the system-wide error codes, if opening the 
+	 *                 session failed
+	 */
+	virtual void HandleSessionOpened(CMdESession& aSession, TInt aError) = 0;
+
+	/**
+	 * Called to notify the observer about errors, which are not a direct 
+	 * consequence of the operations initiated by the client but caused by 
+	 * some external source (e.g., other clients). The error cannot be 
+	 * recovered and all on-going operations initiated by the client have been 
+	 * aborted. Any attempts to continue using the session will cause a panic. 
+	 * The client should close the session immediately and try to open a new 
+	 * session, if it needs to continue using the metadata engine.
+	 *
+	 * @param aSession session
+	 * @param aError one of the system-wide error codes
+	 */
+	virtual void HandleSessionError(CMdESession& aSession, TInt aError) = 0;
+    };
+
+
+/**
+ * Observer interface for modifications of the metadata engine schema.
+ */
+class MMdESchemaObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that the schema has been modified.
+	 *
+	 * @param none
+	 */
+	virtual void HandleSchemaModified() = 0;
+    };
+    
+/**
+ * Observer interface for modifications of the objects in the metadata engine 
+ * database.
+ * 
+ * Examples of observers.
+ * A class that is interested in observing events in the DB must implement observer interfaces
+ * and register as observer. Following examples show how this is done for objects but observing
+ * relations and events works the same way.
+ * 
+ * class CMdeObserverExample : public MMdEObjectObserver, public MMdEObjectPresentObserver
+ * {
+ *		void HandleObjectNotification(CMdESession& aSession, TObserverNotificationType aType,
+ *						const RArray<TItemId>& aObjectIdArray);
+ *		void HandleObjectPresentNotification(CMdESession& aSession, TBool aPresent,
+ *		 				const RArray<TItemId>& aObjectIdArray);
+ * 		...
+ * 		CMdESession* iMdeSession;
+ * };
+ * 
+ * void CMdeObserverExample::ConstructL()
+ * {
+ * 		// Register this class as observer and start listening to object remove events.
+ * 		// The logic condition can be as complicated as is necessary. In this example
+ * 		// the condition as simple as possible.
+ *		CMdELogicCondition* condition = CMdELogicCondition::NewL( ELogicConditionOperatorAnd );
+ *		iMdeSession->AddObjectObserverL( *this, condition, ENotifyRemove, 
+ *   		&iMdeSession->GetDefaultNamespaceDefL() );
+ * 
+ * 		// Start listening to changes in object present status.
+ * 		iMdeSession->AddObjectPresentObserverL( *this );
+ * }
+ * 
+ * @see MMdEObjectObserver::HandleObjectNotification
+ * void CMdeObserverExample::HandleObjectNotification(CMdESession& aSession, TObserverNotificationType aType,
+ *						const RArray<TItemId>& aObjectIdArray)
+ * {
+ *	 	if ( aType == ENotifyAdd )
+ * 		{	
+ * 		// object was added to DB
+ * 		} else if ( aType == ENotifyModify )
+ * 		{
+ * 		// object was modified
+ * 		} else if ( aType == ENotifyRemove )
+ * 		{
+ * 		// object was removed from DB
+ * 		}
+ * 
+ * 		// aObjectIdArray contains ids for all objects that were added/modified/removed
+ * }
+ * 
+ * void CMdeObserverExample::HandleObjectPresentNotification(CMdESession& aSession, 
+ *			TBool aPresent, const RArray<TItemId>& aObjectIdArray)
+ *	{
+ * 		if ( aPresent )
+ * 		{
+ * 			// objects in aObjectIdArray were set as present
+ * 		}
+ *  }
+ */
+class MMdEObjectObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that new objects has been
+	 * added/modified/removed in the metadata engine database.
+	 * 
+	 * @param aSession session
+	 * @param aType defines if object was added/modified/remove
+	 * @param aObjectIdArray IDs of added object
+	 * @see CMdESession::AddObjectObserverL
+	 * @see CMdELogicCondition
+	 */
+	virtual void HandleObjectNotification(CMdESession& aSession, 
+						TObserverNotificationType aType,
+						const RArray<TItemId>& aObjectIdArray) = 0;
+    };
+
+class MMdEObjectObserverWithUri
+    {
+public:
+
+    /**
+     * Called to notify the observer that new objects has been
+     * added/modified/removed in the metadata engine database.
+     * 
+     * @param aSession session
+     * @param aType defines if object was added/modified/remove
+     * @param aObjectIdArray IDs of added object
+     * @param aUriArray Uris of added object
+     * @see CMdESession::AddObjectObserverL
+     * @see CMdELogicCondition
+     */
+    virtual void HandleUriObjectNotification(CMdESession& aSession, 
+                        TObserverNotificationType aType,
+                        const RArray<TItemId>& aObjectIdArray,
+                        const RPointerArray<HBufC>& aObjectUriArray) = 0;
+    };
+    
+/**
+ * Observer interface for modifications of the objects in the metadata engine 
+ * database.
+ */
+class MMdEObjectPresentObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that objects has been set
+	 * to present or not present state in the metadata engine database.
+	 *
+	 * @param aSession session
+	 * @param aPresent state: ETrue - present or  EFales - not present
+	 * @param aObjectIdArray object IDs which are set to present state
+	 */
+	virtual void HandleObjectPresentNotification(CMdESession& aSession, 
+			TBool aPresent, const RArray<TItemId>& aObjectIdArray) = 0;
+    };
+
+/**
+ * Observer interface for modifications of the relations in the metadata 
+ * engine database.
+ */
+class MMdERelationPresentObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that objects has been set
+	 * to present or not present state in the metadata engine database.
+	 *
+	 * @param aSession session
+	 * @param aPresent state: ETrue - present or  EFales - not present
+	 * @param aObjectIdArray object IDs which are set to present state
+	 */
+	virtual void HandleRelationPresentNotification(CMdESession& aSession,
+			TBool aPresent, const RArray<TItemId>& aRelationIdArray) = 0;
+    };
+
+
+/**
+ * Observer interface for modifications of relations in the metadata engine 
+ * database. This observer returns only relations IDs.
+ */
+class MMdERelationObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that new relations has been
+	 * added/modified/removed in the metadata engine database.
+	 *
+	 * @param aSession session
+	 * @param aType defines if relation was added/modified/remove
+	 * @param aRelationIdArray IDs of relations
+	 */
+	virtual void HandleRelationNotification(CMdESession& aSession, 
+			TObserverNotificationType aType,
+			const RArray<TItemId>& aRelationIdArray) = 0;
+    };
+
+/**
+ * Observer interface for modifications of relations in the metadata engine 
+ * database. This observer returns relations (not only IDs).
+ */
+class MMdERelationItemObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that new relations has been
+	 * added/modified/removed in the metadata engine database.
+	 *
+	 * @param aSession session
+	 * @param aType if relation was added/modified/remove
+	 * @param aRelationArray relations
+	 */
+	virtual void HandleRelationItemNotification(CMdESession& aSession, 
+			TObserverNotificationType aType,
+			const RArray<TMdERelation>& aRelationArray) = 0;
+    };
+
+/**
+ * Observer interface for additions or removes of new events to the metadata 
+ * engine database.
+ */
+class MMdEEventObserver
+	{
+public:
+
+	/**
+	 * Called to notify the observer that new events has been
+	 * added or removed in the metadata engine database.
+	 *
+	 * @param aSession session
+	 * @param aType if event was added or removed
+	 * @param aEventIdArray IDs of added events
+	 */
+	virtual void HandleEventNotification(CMdESession& aSession, 
+			TObserverNotificationType aType,
+			const RArray<TItemId>& aEventIdArray) = 0;
+
+    };
+
+/**
+ * Metadata engine session.
+ */
+NONSHARABLE_CLASS(CMdESession) : public CBase
+	{
+public:
+
+	/* Constructors and destructor. */
+
+	/**
+	 * Opens a new metadata engine session.
+	 *
+	 * @param aObserver observer to notify when opening the session has been 
+	 *                  completed
+	 *
+	 * @return metadata engine session
+	 */
+	IMPORT_C static CMdESession* NewL(MMdESessionObserver& aObserver);
+
+	/**
+	 * Opens a new metadata engine session and leaves the session in the 
+	 * cleanup stack.
+	 *
+	 * @param aObserver observer to notify when opening the session has been 
+	 *                  completed
+     *
+	 * @return  metadata engine session
+	 */
+	IMPORT_C static CMdESession* NewLC(MMdESessionObserver& aObserver);
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CMdESession();
+
+	/* Methods for managing namespace definitions. */
+
+	/**
+	 * Returns the number of namespace definitions.
+	 *
+	 * @return number of namespace definitions
+	 */
+	virtual TInt NamespaceDefCount() const = 0;
+
+	/**
+	 * Returns the namespace definition at the specified index.
+	 *
+	 * @param aIndex index
+	 *
+	 * @return namespace definition
+	 */
+	virtual CMdENamespaceDef& NamespaceDefL(TInt aIndex) = 0;
+
+	/**
+	 * Returns the namespace definition with the specified name.
+	 *
+	 * @param aName name
+	 *
+	 * @return namespace definition; or 0, if there is no object definition
+	 *         with the specified name
+	 */
+	virtual CMdENamespaceDef& GetNamespaceDefL(const TDesC& aName) = 0;
+
+	 /* Returns the default namespace definition.
+	 *
+	 * @return  the default namespace definition.
+	 */
+	virtual CMdENamespaceDef& GetDefaultNamespaceDefL() = 0;
+
+	/**
+	 * Adds a new relation definition to namespace,
+	 *
+	 * Example:
+	 *  void AddRelationL()
+	 *  {
+	 *    _LIT( TestRelation, "TestRelation" );
+	 *    TBuf <15> relname( TestRelation );
+	 * 	  iMdeSession->AddRelationDefL( *iDefaultNamespaceDef, relname );
+	 *  }
+	 * 
+	 * @param aNamespaceDef namespace definition to which relation belongs
+	 * @param aName         relation definitions name
+	 */
+	virtual void AddRelationDefL(const CMdENamespaceDef &aNamespaceDef, 
+			const TDesC &aName) = 0;
+
+	/**
+	 * Adds a new event definition to namespace.
+	 * 
+	 * Example:
+	 *  void AddEventDefL()
+	 *  {
+	 *    _LIT( TestEvent, "TestEvent" );
+	 *    TBuf <10> eventName( TestEvent );
+	 * 	  iMdeSession->AddRelationDefL( *iDefaultNamespaceDef, eventName );
+	 *  }
+	 *
+	 * @param aNamespaceDef namespace definition to which event belongs
+	 * @param aName         event definitions name
+	 */
+	virtual void AddEventDefL(const CMdENamespaceDef &aNamespaceDef, 
+			const TDesC &aName) = 0;
+
+	/* Methods for managing objects. */
+
+    /**
+     * Adds multiple instance items to metadata database.
+     * The array contains the items, any other type than object, relation or 
+     * event causes a leave.
+	 *
+     * @param aItems list of items to add
+     * @return first item error
+     */
+	virtual TInt AddItemsL( RPointerArray<CMdEInstanceItem>& aItems ) = 0;
+
+    /**
+     * Commits multiple instance items to metadata database.
+     * The array contains the items, any other type than object, relation or 
+     * event causes a leave.
+     * 
+     * @param aItems list of items to add
+     * @return first item error
+     */
+	virtual TInt UpdateItemsL( RPointerArray<CMdEInstanceItem>& aItems ) = 0;
+
+   /**
+     * Adds multiple instance items asynchronously to metadata database.
+     * The array contains the items, any other type than object, relation or 
+     * event causes a leave. Returned serialized list of item IDs must be 
+     * deserialized with DeserializeItemsL method.
+     * 
+     * Example:
+     *  class CExampleActiveObject : public CActive
+     *  {
+     *    void CActiveObject::AddItemsL();
+     *    ...
+     *    RPointerArray<CMdEInstanceItem> iItems;
+     *    RMdEDataBuffer iResultBuffer;
+     *  };
+     * 
+     *  void CExampleActiveObject::AddItemsL()
+     *  {
+     *    iMdeSession->AddItemsAsyncL( iItems, iStatus, iResultBuffer );
+     *    SetActive();
+     *  }
+     * 
+     * When adding items is finished, RunL() will be called.
+     * 
+     * @param aItems List of item to add.
+     * @param aStatus Returns the result code after the asynchronous call 
+     *                completes.
+     * @param aSerializedItemIds Returned serialized list of item IDs.
+     */
+	virtual void AddItemsAsyncL( 
+			RPointerArray<CMdEInstanceItem>& aItems, 
+			TRequestStatus& aStatus,
+			RMdEDataBuffer& aSerializedItemIds) = 0;
+
+   /**
+     * Commits multiple instance items asynchronously to metadata database.
+     * The array contains the items, any other type than object, relation or 
+     * event causes a leave. Returned serialized list of item IDs must be 
+     * deserialized with DeserializeItemsL method.
+     * 
+     * Example:
+     *  class CExampleActiveObject : public CActive
+     *   {
+     *     void CActiveObject::UpdateItemsL();
+     *     ...
+     *     RPointerArray<CMdEInstanceItem> iItems;
+     *     RMdEDataBuffer iResultBuffer;
+     *   };
+     * 
+     *   void CExampleActiveObject::UpdateItemsL()
+     *   {
+     *     iMdeSession->UpdateItemsAsyncL( iItems, iStatus, iResultBuffer );
+     *     SetActive();
+     *   }
+     * 
+     * @param aItems List of item to add.
+     * @param aStatus Returns the result code after the asynchronous call 
+     *                completes.
+     * @param aSerializedItemIds Returned serialized list of item IDs.
+     */
+	virtual void UpdateItemsAsyncL( 
+			RPointerArray<CMdEInstanceItem>& aItems, 
+			TRequestStatus& aStatus,
+			RMdEDataBuffer& aSerializedItemIds ) = 0;
+
+	/**
+	 * Constructs a new empty object. Note that the object is not inserted in 
+	 * the database. The ownership of the new object is passed to the caller 
+	 * (that is, the caller is responsible for deleting the object).
+	 *
+	 * Example:
+	 *  _LIT( KObjectDef, "ObjectDefName" );
+	 *  TBuf<13> objDefStr( KObjectDef );
+	 *  CMdENamespaceDef& defNS = iMdESession->GetDefaultNamespaceDefL();
+	 *	CMdEObjectDef& mdeObjectDef = defNS.GetObjectDefL( objDefStr );
+	 *  CMdEObject* mdeObject = iMdESession->NewObjectL( mdeObjectDef, aUri );
+	 * 
+	 * @param aDef definition of the new object
+	 * @param aUri URI of the new object
+	 * @param aMediaId media ID of the new object (default 0)
+	 *
+	 * @return new object
+	 */
+	virtual CMdEObject* NewObjectL( CMdEObjectDef& aDef, const TDesC& aUri, 
+                                    TUint32 aMediaId = 0 ) = 0;
+
+	/**
+	 * Constructs a new empty object and leaves it in the cleanup stack. 
+	 * Note that the object is not inserted in the database. The ownership of 
+	 * the new object is passed to the caller (that is, the caller is 
+	 * responsible for deleting the object).
+	 * 
+ 	 * Example:
+	 *  _LIT( KObjectDef, "ObjectDefName" );
+	 *  TBuf<13> objDefStr( KObjectDef );
+	 *  CMdENamespaceDef& defNS = iMdESession->GetDefaultNamespaceDefL();
+	 *	CMdEObjectDef& mdeObjectDef = defNS.GetObjectDefL( objDefStr );
+	 *  CMdEObject* mdeObject = iMdESession->NewObjectLC( mdeObjectDef, aUri );
+	 *
+	 * @param aDef definition of the new object
+	 * @param aUri URI of the new object
+	 * @param aMediaId media ID of the new object (default 0)
+	 *
+	 * @return new object
+	 */
+	virtual CMdEObject* NewObjectLC( CMdEObjectDef& aDef, const TDesC& aUri, 
+                                     TUint32 aMediaId = 0 ) = 0;
+
+    /**
+     * Adds the specified new object to metadata database.
+     * aObject is modified so that it has the new item ID.
+     * If object adding fails object's ID is KNoId, 
+     * otherwise object adding is successful.
+     *
+     * @param aObject object to be added
+     *
+     * @return item ID of the added object
+     */
+    virtual TItemId AddObjectL(CMdEObject& aObject) = 0;
+
+    /**
+     * Adds multiple object items to the metadata engine database.
+     * The array contains the object items. aObjects are modified 
+     * so that those has the new item IDs. If object adding fails
+     * object's ID is KNoId, otherwise object adding is successful.
+     *
+     * @param aObjects  list of objects to be added
+     * @return first object error
+     */
+    virtual TInt AddObjectsL(RPointerArray<CMdEObject>& aObjects) = 0;
+
+	/**
+	 * Deserialize serialized list of item IDs
+	 *
+	 * @param aSerializedItemIds serialized list of item IDs
+	 * @param aResultObjects     if not NULL object IDs are deserialized from 
+	 *                           buffer to this ID array
+	 * @param aResultEvents      if not NULL event IDs are deserialized from 
+	 *                           buffer to this ID array
+	 * @param aResultRelations   if not NULL relation IDs are deserialized 
+	 *                           from buffer to this ID array
+	 *
+	 * @return error code of first failed item, if no errors KErrNone
+	 */
+	virtual TInt DeserializeIdsL( RMdEDataBuffer& aSerializedItemIds, 
+			RArray<TItemId>* aResultObjects = NULL, 
+			RArray<TItemId>* aResultEvents = NULL, 
+			RArray<TItemId>* aResultRelations = NULL ) = 0;
+						   
+	/**
+	 * Deserialize serialized list of items
+	 *
+	 * @param aSerializedItems serialized list of items
+	 * @param aItems items are deserialized from buffer to this item array
+	 *
+	 * @return first item error
+	 */
+	virtual TInt DeserializeItemsL( RMdEDataBuffer& aSerializedItems, 
+			RPointerArray<CMdEInstanceItem>& aItems ) = 0;
+
+	/**
+	 * Removes the object with the specified identifier from metadata database.
+	 *
+	 * @param aId identifier
+	 * @param aNamespaceDef namespace where object is removed, if NULL default 
+	 *                      namespace is used
+	 * @return KNoId if removing has failed, otherwise removed object's ID
+	 */
+	virtual TItemId RemoveObjectL( TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Removes the object with the specified URI from metadata database.
+	 *
+	 * @param aUri URI
+	 * @param aNamespaceDef namespace from remove object, if NULL default 
+	 *                      namespace is used
+	 * @return KNoId if removing has failed, otherwise removed object's ID
+	 */
+	virtual TItemId RemoveObjectL( const TDesC& aUri, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Removes the array of objects with the specified identifier from 
+	 * metadata database.
+	 *
+	 * @param aId object IDs to be removed
+	 * @param aResult result array where succefully removed object IDs are 
+	 *                added (KNoId is added from those objects which removing 
+	 *                has failed)
+	 * @param aNamespaceDef namespace where object is removed, if NULL default 
+	 *                      namespace is used
+	 * @return first item error
+	 */
+	virtual TInt RemoveObjectsL( 
+			const RArray<TItemId>& aId, RArray<TItemId>& aResult, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Removes the array of objects with the specified URI from metadata 
+	 * database.
+	 *
+	 * @param aUri object URIs to be removed
+	 * @param aResult result array where succefully removed object IDs are 
+	 *                added (KNoId is added from those objects which removing 
+	 *                has failed)
+	 * @param aNamespaceDef namespace where object is removed, if NULL default 
+	 *                      namespace is used
+	 * @return first item error
+	 */
+	virtual TInt RemoveObjectsL( 
+			const RPointerArray<TDesC>& aUri, RArray<TItemId>& aResult, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Asynchronously removes the array of objects with the specified 
+	 * object IDs from metadata database. Returned serialized list of item IDs 
+	 * must be deserialized with DeserializeIdsL method.
+	 *
+	 * @param aId object IDs to be removed
+     * @param aStatus returns the result code after the asynchronous call 
+     *                completes.
+     * @param aSerializedObjectIds returned serialized list of object IDs
+	 * @param aNamespaceDef namespace where object is removed, if NULL default 
+	 *                      namespace is used
+	 */
+	virtual void RemoveObjectsAsyncL( 
+			const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+			RMdEDataBuffer& aSerializedObjectIds, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Asynchronously removes the array of objects with the specified URI from 
+	 * metadata database. Returned serialized list of item IDs must be 
+	 * deserialized with DeserializeIdsL method.
+	 *
+	 * @param aUri object URIs to be removed
+     * @param aStatus returns the result code after the asynchronous call 
+     *                completes.
+     * @param aSerializedObjectIds returned serialized list of object IDs
+	 * @param aNamespaceDef namespace where object is removed, if NULL default 
+	 *                      namespace is used
+	 */
+	virtual void RemoveObjectsAsyncL( 
+			const RPointerArray<TDesC>& aUri, TRequestStatus& aStatus, 
+			RMdEDataBuffer& aSerializedObjectIds, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+	
+	/**
+	 * Returns the object with the specified ID and specified object 
+	 * definition.
+	 *
+	 * Example:
+	 *   CMdENamespaceDef& defaultNamespace = iSession->GetDefaultNamespaceDefL();
+     * 	 CMdEObjectDef& imageObjDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
+	 * 	 CMdEObject* object = iSession->GetObjectL( aObjectId, imageObjDef );
+	 * 
+	 * @param aId object ID
+	 * @param aObjectDef object definition
+	 *
+	 * @return object or NULL, if there is no object with the specified 
+	 *         identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetObjectL( const TItemId aId, 
+			CMdEObjectDef& aObjectDef ) = 0;
+
+	/**
+	 * Returns the object (object may contain only properties defined in 
+	 * "Object") with the specified ID and specified namespace (if namespace 
+	 * is NULL, the default namespace is used).
+	 *
+	 * @param aId object ID
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetObjectL( const TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Returns the object (object will contain all it's properties) 
+	 * with the specified ID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used).
+	 *
+	 * @param aId object ID
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetFullObjectL( const TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Returns the object with the specified GUID and specified object 
+	 * definition.
+	 * 
+	 * Example:
+	 *   CMdENamespaceDef& defaultNamespace = iSession->GetDefaultNamespaceDefL();
+     * 	 CMdEObjectDef& imageObjDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
+     *   CMdEObject* object = iMdeSession->GetObjectL( 12345, 67890, imageObjDef );
+	 *
+	 * @param aGuidHigh GUID high
+	 * @param aGuidLow GUID low
+	 * @param aObjectDef object definition
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetObjectL( 
+			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+			CMdEObjectDef& aObjectDef ) = 0;
+
+	/**
+	 * Returns the object (object may contain only properties definied in 
+	 * "Object") with the specified GUID and specified namespace (if namespace 
+	 * is NULL, the default namespace is used).
+	 *
+	 * Example:
+     *   CMdEObject* object = iMdeSession->GetObjectL( 12345, 67890 );
+	 * 
+	 * @param aGuidHigh  GUID high
+	 * @param aGuidLow  GUID low
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetObjectL( 
+			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Returns the object (object will contain all it's properties) 
+	 * with the specified GUID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used).
+	 * 
+	 * Example:
+     *   CMdEObject* object = iMdeSession->GetFullObjectL( 12345, 67890 );
+	 *
+	 * @param aGuidHigh GUID high
+	 * @param aGuidLow GUID low
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetFullObjectL( 
+			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Returns the object with the specified URI and specified object 
+	 * definition.
+	 *
+	 * Example:
+	 *   CMdENamespaceDef& defaultNamespace = iSession->GetDefaultNamespaceDefL();
+     * 	 CMdEObjectDef& imageObjDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
+     *   CMdEObject* object = iMdeSession->GetObjectL( aUri, imageObjDef );
+	 *
+	 * @param aUri object URI
+	 * @param aObjectDef object definition
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetObjectL( const TDesC& aUri, 
+			CMdEObjectDef& aObjectDef ) = 0;
+
+	/**
+	 * Returns the object (object may contain only properties definied in 
+	 * "Object") with the specified URI specified namespace (if namespace is 
+	 * NULL, the default namespace is used).
+	 *
+	 * @param aUri object URI
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetObjectL( const TDesC& aUri, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Returns the object (object will contain all it's properties) with the 
+	 * specified URI specified namespace (if namespace is NULL, the default 
+	 * namespace is used).
+	 *
+	 * @param aUri object URI
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  object or NULL, if there is no object with the specified 
+	 *          identifier in the metadata engine database
+	 */
+	virtual CMdEObject* GetFullObjectL( const TDesC& aUri, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Opens the object with the specified ID and specified object 
+	 * definition for modifications. The object is locked so that nobody else 
+	 * can open it for modifications. The modifications are committed by 
+	 * calling the <code>CommitObject()</code> method, which releases the lock.
+	 * The modifications can be canceled by calling the 
+	 * <code>CancelObject()</code> method, which also releases the lock.
+	 *
+	 * Example:
+	 *  CMdENamespaceDef& defaultNamespace = iMdeSession->GetDefaultNamespaceDefL();
+     *	CMdEObjectDef& imageDef = defaultNamespace.GetObjectDefL( MdeConstants::Image::KImageObject );
+	 *  CMdEObject* image = iMdESession->OpenObjectL( 17, imageDef );
+	 * 
+	 *  CMdEPropertyDef& lastModDatePropDef = imageDef.GetPropertyDefL(
+     *   		Object::KLastModifiedDateProperty );
+     * 
+     *  CMdEProperty* lastModDateProp = NULL;
+     *  image->Property( lastModDatePropDef, lastModDateProp, 0 );
+     * 
+     *  TTime currenttime( 0 );
+     *	currenttime.UniversalTime();
+     * 
+     *  if ( lastModDateProp )
+     *      {
+     *      lastModDateProp->SetTimeValueL( currenttime );
+     *      }
+     *  else
+     *      {
+     *      image->AddTimePropertyL( lastModDatePropDef, currenttime );
+     *      }
+     *  }
+     *  iMdeSession->CommitObjectL( *image );
+	 *  
+	 * 
+	 * @param aId  object ID
+	 * @param aObjectDef object definition
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenObjectL( const TItemId aId, 
+			CMdEObjectDef& aObjectDef ) = 0;
+
+	/**
+	 * Opens the object (object may contain only properties definied in "Object") 
+	 * with the specified ID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) for modifications.
+	 * The object is locked so that nobody else can open it for modifications.
+	 * The modifications are committed by calling the <code>CommitObject()</code>
+	 * method, which releases the lock. The modifications can be canceled by
+	 * calling the <code>CancelObject()</code> method, which also releases the
+	 * lock.
+	 *
+	 * @param aId  object ID.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenObjectL( const TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Opens the object (object will contain all it's properties) 
+	 * with the specified ID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) for modifications.
+	 * The object is locked so that nobody else can open it for modifications.
+	 * The modifications are committed by calling the <code>CommitObject()</code>
+	 * method, which releases the lock. The modifications can be canceled by
+	 * calling the <code>CancelObject()</code> method, which also releases the
+	 * lock.
+	 *
+	 * @param aId  object ID.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenFullObjectL( const TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+
+	/**
+	 * Opens the object with the specified GUID and specified object 
+	 * definition for modifications. The object is locked so that nobody else 
+	 * can open it for modifications. The modifications are committed by 
+	 * calling the <code>CommitObject()</code> method, which releases the lock.
+	 * The modifications can be canceled by calling the 
+	 * <code>CancelObject()</code> method, which also releases the lock.
+	 *
+	 * @param aGuidHigh  GUID high
+	 * @param aGuidLow  GUID low
+	 * @param aObjectDef object definition
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenObjectL( 
+			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+			CMdEObjectDef& aObjectDef ) = 0;
+
+	/**
+	 * Opens the object (object may contain only properties definied in "Object") 
+	 * with the specified GUID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) for modifications.
+	 * The object is locked so that nobody else can open it for modifications.
+	 * The modifications are committed by calling the <code>CommitObject()</code>
+	 * method, which releases the lock. The modifications can be canceled by
+	 * calling the <code>CancelObject()</code> method, which also releases the
+	 * lock.
+	 *
+	 * @param aGuidHigh  GUID high
+	 * @param aGuidLow  GUID low
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenObjectL( 
+			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Opens the object (object will contain all it's properties) 
+	 * with the specified GUID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) for modifications.
+	 * The object is locked so that nobody else can open it for modifications.
+	 * The modifications are committed by calling the <code>CommitObject()</code>
+	 * method, which releases the lock. The modifications can be canceled by
+	 * calling the <code>CancelObject()</code> method, which also releases the
+	 * lock.
+	 *
+	 * @param aGuidHigh  GUID high
+	 * @param aGuidLow  GUID low
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenFullObjectL( 
+			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+
+	/**
+	 * Opens the object with the specified URI for modifications and specified 
+	 * object definition. The object is locked so that nobody else can open it 
+	 * for modifications. The modifications are committed by calling the 
+	 * <code>CommitObject()</code> method, which releases the lock. The 
+	 * modifications can be canceled by calling the <code>CancelObject()</code> 
+	 * method, which also releases the lock.
+	 *
+	 * @param aUri  object URI
+	 * @param aObjectDef object definition
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenObjectL( const TDesC& aUri, 
+			CMdEObjectDef& aObjectDef ) = 0;
+
+	/**
+	 * Opens the object (object may contain only properties definied in "Object") 
+	 * with the specified ID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) for modifications.
+	 * The object is locked so that nobody else can open it for modifications.
+	 * The modifications are committed by calling the <code>CommitObject()</code>
+	 * method, which releases the lock. The modifications can be canceled by
+	 * calling the <code>CancelObject()</code> method, which also releases the
+	 * lock.
+	 *
+	 * @param aUri  Object URI.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenObjectL( const TDesC& aUri, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Opens the object (object will contain all it's properties) 
+	 * with the specified ID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) for modifications.
+	 * The object is locked so that nobody else can open it for modifications.
+	 * The modifications are committed by calling the <code>CommitObject()</code>
+	 * method, which releases the lock. The modifications can be canceled by
+	 * calling the <code>CancelObject()</code> method, which also releases the
+	 * lock.
+	 *
+	 * @param aUri  Object URI.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Object or NULL, if there is no object with the specified 
+     *          identifier in the metadata engine database.
+	 */
+	virtual CMdEObject* OpenFullObjectL( const TDesC& aUri, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Gets metadata object id, definition and some flags by URI. Does not return the whole object.
+	 * 
+	 * @param aObject on return contains information about the metadata object
+	 * @param aUri metadata object URI
+	 * @param aNamespaceDef namespace definition. If namespace is NULL then the default namespace is used.
+	 */
+	virtual void CheckObjectL( TMdEObject& aObject, const TDesC& aUri, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Gets metadata object id, definition and some flags by id. Does not return the whole object.
+	 * 
+	 * @param aObject on return contains information about the metadata object
+	 * @param aId metadata object id
+	 * @param aNamespaceDef namespace definition. If namespace is NULL then the default namespace is used.
+	 */
+	virtual void CheckObjectL( TMdEObject& aObject, TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Gets an array of TMdEObject objects that contain metadata object ids, definitions and 
+	 * some flags by object ids. Does not return whole objects.
+	 * 
+	 * @param aObjects on return contains an array of objects containing information about metadata objects
+	 * @param aIds array of metadata object ids
+	 * @param aNamespaceDef namespace definition. If namespace is NULL then the default namespace is used.
+	 */
+	virtual void CheckObjectL( RArray<TMdEObject>& aObjects, 
+			const RArray<TItemId>& aIds, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+	
+	/**
+     * Commits the modifications made to the object to the database
+	 * and releases the modification lock.
+     * 
+	 * @param aObject  Object.
+     */
+    virtual void CommitObjectL(CMdEObject& aObject) = 0;
+
+	/**
+     * Commits the modifications made to objects to the database
+	 * and releases the modification locks.
+     * 
+	 * @param aObject  Object.
+     */
+    virtual void CommitObjectsL(RPointerArray<CMdEObject>& aObjects) = 0;
+
+    /**
+     * Cancels the modifications made to the object and releases the
+	 * modification lock.
+     * 
+	 * @param aObject  Object.
+     */
+    virtual TItemId CancelObjectL(CMdEObject& aObject) = 0;
+
+
+	/* Methods for managing relations. */
+
+	/**
+	 * Returns the relation with the specified ID and specified namespace 
+	 * (if namespace is NULL, the default namespace is used).
+	 * 
+	 * Note that the ownership of the returned relation is passed to the 
+	 * caller of the method (that is, the caller is responsible for deleting 
+	 * the relation).
+	 *
+	 * @param aId  relation ID
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  relation or NULL, if there is no relation with the specified ID
+	 *          in the metadata engine database
+	 */
+	virtual CMdERelation* GetRelationL(TItemId aId, 
+			CMdENamespaceDef* aNamespacedef = NULL) = 0;
+
+	/**
+	 * Constructs a new empty relation. Note that the relation is not inserted 
+	 * in the database. The ownership of the new relation is passed to the 
+	 * caller (that is, the caller is responsible for deleting the relation).
+	 * 
+	 * Example:
+     *	 CMdERelationDef& relationDef = namespaceDef.GetRelationDefL( MdeConstants::Relations::KContains );
+     *
+     *	 CMdERelation* relation = iMdeSession->NewRelationLC( relationDef, albumObject->Id(), audioObject->Id() );
+     *	 iMdeSession->AddRelationL( *relation );
+	 *
+	 * @param aDef  definition of the new relation
+	 * @param aLeftObjectId id of the left side of the relation
+	 * @param aRightObjectId id of the right side of the relation
+	 * @param aParameter the relation parameter
+	 *
+	 * @return  new relation
+	 */
+	virtual CMdERelation* NewRelationLC(CMdERelationDef& aDef, 
+			TItemId aLeftObjectId, TItemId aRightObjectId, 
+			TInt32 aParameter = 0) = 0;
+
+	/**
+	 * Constructs a new empty relation. Note that the relation is not inserted 
+	 * in the database. The ownership of the new relation is passed to the 
+	 * caller (that is, the caller is responsible for deleting the relation).
+	 *
+	 * Example:
+     *	 CMdERelationDef& relationDef = namespaceDef.GetRelationDefL( MdeConstants::Relations::KContains );
+     *
+     *	 CMdERelation* relation = iMdeSession->NewRelationL( relationDef, albumObject->Id(), audioObject->Id() );
+     *	 iMdeSession->AddRelationL( *relation );
+	 * 
+	 * @param aDef  definition of the new relation
+	 * @param aLeftObjectId id of the left side of the relation
+	 * @param aRightObjectId id of the right side of the relation
+	 * @param aParameter the relation parameter
+	 *
+	 * @return  new relation
+	 */
+	virtual CMdERelation* NewRelationL(CMdERelationDef& aDef, 
+			TItemId aLeftObjectId, TItemId aRightObjectId, 
+			TInt32 aParameter = 0) = 0;
+
+	/**
+	 * Adds a new relation to the metadata engine database.
+	 *
+	 * @param relation
+	 *
+	 * @return  identifier of the new relation
+	 */
+	virtual TItemId AddRelationL( CMdERelation& aRelation ) = 0;
+
+	/**
+	 * Commits changes made to the relation to the metadata engine database.
+     *
+     * @param relation
+	 *
+	 * @return  identifier of the new relation
+	 */
+	virtual TItemId UpdateRelationL( CMdERelation& aRelation ) = 0;
+
+	/**
+	 * Removes the relation with the specified identifier and specified 
+	 * namespace (if namespace is NULL, the default namespace is used)
+	 * from the metadata engine database.
+	 *
+	 * @param aId   ID of the relation to remove.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  relation ID or KNoId, if there is no relation with the 
+	 *          specified ID in the metadata engine database
+	 */
+	virtual TItemId RemoveRelationL( TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+	
+	/**
+	 * Removes multiple relations with the specified IDs and specified 
+	 * namespace (if namespace is NULL, the default namespace is used)
+	 * from the metadata engine database.
+	 *
+	 * @param aId IDs of relations to remove.
+	 * @param aSuccessful Successfully removed IDs of relations (if removing 
+	 *                    has failed KNoId is added).
+	 * @param aNamespaceDef namespace
+	 */
+	virtual TInt RemoveRelationsL( 
+			const RArray<TItemId>& aId, RArray<TItemId>& aSuccessful, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/**
+	 * Removes multiple relations asynchronous with the specified IDs and 
+	 * specified namespace (if namespace is NULL, the default namespace is 
+	 * used) from the metadata engine database. Returned serialized list of 
+	 * item IDs must be deserialized with DeserializeIdsL method.
+	 *
+	 * @param aId IDs of relations to remove.
+     * @param aStatus returns the result code after the asynchronous call 
+     *                completes.
+     * @param aSerializedRelationIds returned serialized list of relation IDs
+	 * @param aNamespaceDef namespace
+	 */
+	virtual void RemoveRelationsAsyncL( 
+			const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+			RMdEDataBuffer& aSerializedRelationIds, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+	/* Methods for managing events. */
+
+	/**
+	 * Constructs a new empty event. Note that the event is not inserted in the
+	 * database. The ownership of the new event is passed to the caller (that 
+	 * is, the caller is responsible for deleting the event).
+	 *
+	 * Example:
+	 *   CMdEEventDef* eventDef = &iDefaultNamespace->GetEventDefL( Events::KCreated );
+	 *   CMdEEvent* event = iMdeSession->NewEventLC( *eventDef, objectId, time );
+	 * 
+	 * @param aDef  definition of the new event
+	 * @param aObjectId the target object id
+	 * @param aTime time of the event
+	 * @param aSource source of the event
+	 * @param aParticipant participant of the event
+	 *
+	 * @return  new event
+	 */
+	virtual CMdEEvent* NewEventLC(CMdEEventDef& aDef, 
+			TItemId aObjectId, TTime aTime, 
+			const TDesC* aSource = NULL, const TDesC* aParticipant = NULL) = 0;
+
+	/**
+	 * Constructs a new empty event. Note that the event is not inserted in the
+	 * database. The ownership of the new event is passed to the caller (that 
+	 * is, the caller is responsible for deleting the event).
+	 *
+	 * Example:
+	 *   CMdEEventDef* eventDef = &iDefaultNamespace->GetEventDefL( Events::KCreated );
+	 *   CMdEEvent* event = iMdeSession->NewEventL( *eventDef, objectId, time );
+	 * 
+	 * @param aDef  definition of the new event
+	 * @param aObjectId the target object id
+	 * @param aTime time of the event
+	 * @param aSource source of the event
+	 * @param aParticipant participant of the event
+	 *
+	 * @return  new event
+	 */
+	virtual CMdEEvent* NewEventL(CMdEEventDef& aDef, 
+			TItemId aObjectId, TTime aTime, 
+			const TDesC* aSource = NULL, const TDesC* aParticipant = NULL) = 0;
+
+	/**
+	 * Returns the event with the specified identifier and specified namespace 
+	 * (if namespace is NULL, the default namespace is used).
+	 * Note that the ownership of the returned event is passed to the caller of
+	 * the method (that is, the caller is responsible for deleting the event).
+	 *
+	 * @param aId  Identifier.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  Event or NULL, if there is no event with the specified 
+	 *          identifier in the metadata engine database.
+	 */
+	virtual CMdEEvent* GetEventL(TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Adds a new event to the metadata engine database.
+	 *
+	 * @param event
+	 *
+	 * @return  Identifier of the new event.
+	 */
+	virtual TItemId AddEventL( CMdEEvent& aEvent ) = 0;
+
+	/**
+	 * Removes the event with the specified identifier and specified namespace 
+	 * (if namespace is NULL, the default namespace is used) from the metadata 
+	 * engine database.
+	 *
+	 * @param aId   ID of the event to remove.
+	 * @param aNamespaceDef namespace
+	 *
+	 * @return  event ID or KNoId, if there is no event with the specified ID
+	 *          in the metadata engine database
+	 */
+	virtual TItemId RemoveEventL( TItemId aId, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+	
+	/**
+	 * Removes multiple events with the specified IDs and specified 
+	 * namespace (if namespace is NULL, the default namespace is used)
+	 * from the metadata engine database.
+	 *
+	 * @param aId IDs of events to remove.
+	 * @param aSuccessful Successfully removed IDs of events (if removing has 
+	 *                    failed KNoId is added).
+	 * @param aNamespaceDef namespace
+	 */
+	virtual TInt RemoveEventsL(
+			const RArray<TItemId>& aId, RArray<TItemId>& aSuccessful, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+	
+	/**
+	 * Removes multiple events asynchronous with the specified IDs and 
+	 * specified namespace (if namespace is NULL, the default namespace is 
+	 * used) from the metadata engine database. Returned serialized list of 
+	 * item IDs must be deserialized with DeserializeIdsL method.
+	 *
+	 * @param aId IDs of events to remove.
+     * @param aStatus returns the result code after the asynchronous call 
+     *                completes.
+     * @param aSerializedEventIds returned serialized list of event IDs
+	 * @param aNamespaceDef namespace
+	 */
+	virtual void RemoveEventsAsyncL(
+			const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+			RMdEDataBuffer& aSerializedEventIds, 
+			CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+
+	/* Methods for searching objects, relations, and events. */
+
+    /**
+	 * Creates a new object query.
+	 * 
+	 * Note that the ownership of the returned query is passed to the caller of
+	 * the method (that is, the caller is responsible for deleting the query).
+	 *
+	 * @param aNamespaceDef namespace where query will be run
+	 * @param aObjectDef object definition which defines objects which will be 
+	 *                   queried
+	 * @param aObserver observer which callback methods will be called
+	 *
+	 * @return  New object query.
+     */
+    virtual CMdEObjectQuery* NewObjectQueryL(CMdENamespaceDef& aNamespaceDef, 
+    		CMdEObjectDef& aObjectDef, MMdEQueryObserver* aObserver = 0) = 0;
+
+    /**
+	 * Creates a new object query.
+	 * 
+	 * Note that the ownership of the returned query is passed to the caller of
+	 * the method (that is, the caller is responsible for deleting the query).
+	 *
+	 * @param aObjectDef Object definition which defines the parent object.
+	 * @param aObjectDefs Object definitions which defines objects which will 
+	 *                    be queried. Ownership of aObjectDefs will change to 
+	 *                    query.
+	 * @param aObserver Observer which callback methods will be called.
+	 *
+	 * @return  New object query.
+     */
+    virtual CMdEObjectQuery* NewObjectQueryL(
+    		CMdEObjectDef& aObjectDef, 
+    		RPointerArray<CMdEObjectDef>* aObjectDefs, 
+    		MMdEQueryObserver* aObserver = 0) = 0;
+
+    /**
+	 * Creates a new relation query.
+	 * 
+	 * Note that the ownership of the returned query is passed to the caller of
+	 * the method (that is, the caller is responsible for deleting the query).
+	 *
+	 * @param aNamespaceDef namespace where query will be run
+	 * @param aObserver observer which callback methods will be called
+	 *
+     * @return  New relation query.
+     */
+    virtual CMdERelationQuery* NewRelationQueryL(
+    		CMdENamespaceDef& aNamespaceDef, 
+    		MMdEQueryObserver* aObserver = 0) = 0;
+
+    /**
+	 * Creates a new event query.
+	 * 
+	 * Note that the ownership of the returned query is passed to the caller of
+	 * the method (that is, the caller is responsible for deleting the query).
+	 *
+	 * @param aNamespaceDef namespace where query will be run
+	 * @param aObserver observer which callback methods will be called
+	 *
+     * @return  New event query.
+     */
+    virtual CMdEEventQuery* NewEventQueryL(CMdENamespaceDef& aNamespaceDef, 
+    		MMdEQueryObserver* aObserver = 0) = 0;
+
+
+	/* Methods for managing observers. */
+
+	/**
+	 * Adds a new schema observer to the session. No duplicate
+	 * observers are allowed.
+	 *
+	 * @param aObserver  observer
+	 */
+	virtual void AddSchemaObserverL(MMdESchemaObserver& aObserver) = 0;
+
+	/**
+	 * Removes the specified schema observer from the session.
+	 *
+	 * @param aObserver  observer
+	 */
+	virtual void RemoveSchemaObserverL(MMdESchemaObserver& aObserver) = 0;
+
+	/**
+	 * Adds a new object observer to the session. No duplicate observers are 
+     * allowed.
+     *
+     * The following restrictions are placed on the condition nodes:
+     * - Only CMdEObjectCondition and CMdEPropertyCondition nodes can be
+     *   used. CMdERangePropertyConditions are not allowed.
+     * - No nested logic conditions are allowed.
+	 *
+	 * @param aObserver   Observer.
+	 * @param aCondition  Condition that the objects, about which the observer
+	 *                    wants to receive notifications, must fulfill or NULL,
+	 *                    to receive notifications of all objects.
+     *                    Ownership of the condition is transferred to the
+     *                    session.
+     * @param aNotificationType what event type (add, modify, remove) should
+     *                          be notified to client
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+     * 
+     * @leave KErrAlreadyExists if the same observer has already been added
+	 */
+	virtual void AddObjectObserverL(MMdEObjectObserver& aObserver,
+			CMdELogicCondition* aCondition = NULL, 
+			TUint32 aNotificationType = ENotifyAdd | ENotifyModify | ENotifyRemove,
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Removes the specified object observer from the session.
+	 *
+	 * @param aObserver  observer
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+	 */
+	virtual void RemoveObjectObserverL(MMdEObjectObserver& aObserver, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Adds a new object present observer to the session. No duplicate 
+	 * observers are allowed.
+     *
+	 * @param aObserver   Observer
+	 * 
+     * @leave KErrAlreadyExists if the same observer has already been added
+	 */
+	virtual void AddObjectPresentObserverL(
+			MMdEObjectPresentObserver& aObserver) = 0;
+
+	/**
+	 * Removes the specified object present observer from the session.
+	 *
+	 * @param aObserver  observer
+	 */
+	virtual void RemoveObjectPresentObserverL(
+			MMdEObjectPresentObserver& aObserver)= 0;
+
+	/**
+	 * Adds a new relation observer to the session. No duplicate observers 
+     * are allowed.
+	 *
+     * The following restrictions are placed on the condition nodes:
+     * - Only CMdERelationCondition nodes are allowed.
+     * - No nested logic conditions are allowed.
+     *
+	 * @param aObserver   Observer.
+	 * @param aCondition  Condition that the relations, about which the observer
+	 *                    wants to receive notifications, must fulfill
+	 *                    or NULL, to receive notifications of all relations.
+     *                    Ownership of the condition is transferred to the
+     *                    session.
+     * @param aNotificationType what event type (add, modify, remove) should
+     *                          be notified to client
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+     * 
+     * @leave KErrAlreadyExists if the same observer has already been added
+	 */
+	virtual void AddRelationObserverL(MMdERelationObserver& aObserver,
+			CMdECondition* aCondition = NULL, 
+			TUint32 aNotificationType = ENotifyAdd | ENotifyModify | ENotifyRemove,
+			CMdENamespaceDef* aNamespaceDef = NULL)= 0;
+	/**
+	 * Removes the specified relation observer from the session.
+	 *
+	 * @param aObserver  Observer.
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+	 */
+	virtual void RemoveRelationObserverL(MMdERelationObserver& aObserver, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Adds a new relation item observer to the session.
+	 * No duplicate observers are allowed.
+	 *
+     * The following restrictions are placed on the condition nodes:
+     * - Only CMdERelationCondition nodes are allowed.
+     * - No nested logic conditions are allowed.
+     *
+	 * @param aObserver   Observer.
+	 * @param aCondition  Condition that the relations, about which the observer
+	 *                    wants to receive notifications, must fulfill
+	 *                    or NULL, to receive notifications of all relations.
+     *                    Ownership of the condition is transferred to the
+     *                    session.
+     * @param aNotificationType what event type (add, modify, remove) should
+     *                          be notified to client
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+     * 
+     * @leave KErrAlreadyExists if the same observer has already been added
+	 */
+	virtual void AddRelationItemObserverL(MMdERelationItemObserver& aObserver,
+			CMdECondition* aCondition = NULL, 
+			TUint32 aNotificationType = /*ENotifyAdd | ENotifyModify |*/ ENotifyRemove,
+			CMdENamespaceDef* aNamespaceDef = NULL)= 0;
+	/**
+	 * Removes the specified relation observer from the session.
+	 *
+	 * @param aObserver  Observer.
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+	 */
+	virtual void RemoveRelationItemObserverL(MMdERelationItemObserver& aObserver, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+	
+	/**
+	 * Adds a new realation present observer to the session. No duplicate observers are 
+     * allowed.
+     *
+	 * @param aObserver   Observer.
+	 * 
+     * @leave KErrAlreadyExists if the same observer has already been added
+	 */
+	virtual void AddRelationPresentObserverL(
+			MMdERelationPresentObserver& aObserver) = 0;
+
+	/**
+	 * Removes the specified relation present observer from the session.
+	 *
+	 * @param aObserver  observer
+	 */
+	virtual void RemoveRelationPresentObserverL(
+			MMdERelationPresentObserver& aObserver)= 0;
+
+	/**
+	 * Adds a new event observer to the session. No duplicate observers 
+     * are allowed.
+     *
+     * The following restrictions are placed on the condition nodes:
+     * - Only CMdEEventCondition nodes are allowed.
+     * - No nested logic conditions are allowed.
+	 *
+	 * @param aObserver   Observer.
+	 * @param aCondition  Condition that the events, about which the observer
+	 *                    wants to receive notifications, must fulfill
+	 *                    or NULL, to receive notifications of all events.
+     * @param aNotificationType what event type (add or remove) should
+     *                          be notified to client
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+     * 
+     * @leave KErrAlreadyExists if the same observer has already been added
+	 */
+	virtual void AddEventObserverL(MMdEEventObserver& aObserver,
+			CMdECondition* aCondition = NULL, 
+			TUint32 aNotificationType = ENotifyAdd | ENotifyRemove,
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+	/**
+	 * Removes the specified event observer from the session.
+	 *
+	 * @param aObserver  Observer.
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used)
+	 */
+	virtual void RemoveEventObserverL(MMdEEventObserver& aObserver, 
+			CMdENamespaceDef* aNamespaceDef = NULL) = 0;
+
+
+    /* Methods for import/export */
+
+	/**
+	 * Imports schemadata from file to default database.
+	 *
+	 * @param aFileName  filename where the schemadata to import is.
+	 */
+	virtual void ImportSchemaL( const TDesC& aFileName ) = 0;
+
+	/**
+	 * Imports metadata from file to default database.
+	 *
+	 * @param aFileName  filename where the metadata to import is.
+	 * @return The number of failed imports
+	 */
+	virtual TInt ImportMetadataL( const TDesC& aFileName ) = 0;
+
+	/**
+	 * Imports metadata asynchronously from file to default database.
+	 *
+	 * @param aFileName Filename where the metadata to import is.
+	 * @param aResult The number of failed imports and possible error code.
+	 * @param aStatus Returned status of method call.
+	 */
+	virtual void ImportMetadata( const TDesC& aFileName, 
+			TPckgBuf<TInt>& aResult, TRequestStatus& aStatus ) = 0;
+
+	/**
+	 * Exports metadata to file.
+	 *
+	 * @param aFileName  filename where the metadata is to be exported.
+     * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+     *                      default namespace is used), ownership doesn't 
+     *                      change
+     * @param aObjectDefs object types to export (if NULL all objects are 
+     *                    exported), ownership doesn't change
+     * @param aRelationDefs relation types to export (if NULL all relations 
+     *                      are exported), ownership doesn't change
+     * @param aEventDefs event types to export (if NULL all events are 
+     *                   exported), ownership doesn't change
+	 */
+	virtual void ExportMetadataL( const TDesC& aFileName, 
+			const CMdENamespaceDef* aNamespaceDef = NULL, 
+	        const RPointerArray<CMdEObjectDef>* aObjectDefs = NULL, 
+	        const RPointerArray<CMdERelationDef>* aRelationDefs = NULL, 
+            const RPointerArray<CMdEEventDef>* aEventDefs = NULL ) = 0;
+
+	/**
+	 * Exports metadata asynchronously to file.
+	 *
+	 * @param aFileName Filename where the metadata is to be exported.
+	 * @param aStatus Returns the result code after the asynchronous call 
+     *                completes.
+	 * @param aBuffer Serialized buffer of export types, must be valid until 
+	 *                aStatus is completed and can be closed after that.
+     * @param aNamespaceDef Specified namespace (if namespace is NULL, the 
+     *                      default namespace is used), ownership doesn't 
+     *                      change.
+     * @param aObjectDefs Object types to export (if NULL all objects are 
+     *                    exported), ownership doesn't change.
+     * @param aRelationDefs Relation types to export (if NULL all relations 
+     *                      are exported), ownership doesn't change.
+     * @param aEventDefs Event types to export (if NULL all events are 
+     *                   exported), ownership doesn't change.
+	 */
+	virtual void ExportMetadataL( const TDesC& aFileName, 
+			TRequestStatus& aStatus, RMdEDataBuffer& aBuffer, 
+        	const CMdENamespaceDef* aNamespaceDef = NULL, 
+	        const RPointerArray<CMdEObjectDef>* aObjectDefs = NULL, 
+            const RPointerArray<CMdERelationDef>* aRelationDefs = NULL, 
+            const RPointerArray<CMdEEventDef>* aEventDefs = NULL ) = 0;
+	/**
+	 * Load whole schema from server side.
+	 */
+	virtual void LoadSchemaL() = 0;
+
+	/**
+	 * Get schema version's major and minor version.
+	 *
+	 * @param aMajorVersion returned major version
+	 * @param aMinorVersion returned minor version
+	 */
+	virtual void GetSchemaVersionL(
+			TInt& aMajorVersion, TInt& aMinorVersion) = 0;
+
+	/**
+	 * Set object to "present" state by GUID.
+	 *
+	 * @param aGuidHigh Guid's high part
+	 * @param aGuidLow Guid's low part
+	 *
+	 * @leave KErrNotFound MdE can't find object in "not present" state 
+	 *                     with matching GUID
+	 */
+	virtual void SetObjectToPresentByGuidL( 
+			const TInt64& aGuidHigh, const TInt64& aGuidLow ) = 0;
+	
+    /**
+      * Adds a new object observer to the session. No duplicate observers are 
+      * allowed.
+      *
+      * The following restrictions are placed on the condition nodes:
+      * - Only CMdEObjectCondition and CMdEPropertyCondition nodes can be
+      *   used. CMdERangePropertyConditions are not allowed.
+      * - No nested logic conditions are allowed.
+      * 
+      * Be adviced, this version with the URI in the callback is much less
+      * efficient than using version without the URI
+      *
+      * @param aObserver   Observer.
+      * @param aCondition  Condition that the objects, about which the observer
+      *                    wants to receive notifications, must fulfill or NULL,
+      *                    to receive notifications of all objects.
+      *                    Ownership of the condition is transferred to the
+      *                    session.
+      * @param aNotificationType what event type (add, modify, remove) should
+      *                          be notified to client
+      * @param aNamespaceDef specified namespace (if namespace is NULL, the 
+      *                      default namespace is used)
+      * @param aUriRequired determines if uri is required in the callback
+      * 
+      * @leave KErrAlreadyExists if the same observer has already been added
+      */
+     virtual void AddObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver,
+             CMdELogicCondition* aCondition = NULL, 
+             TUint32 aNotificationType = ENotifyAdd | ENotifyModify | ENotifyRemove,
+             CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+
+     /**
+      * Removes the specified object observer from the session.
+      *
+      * @param aObserver  observer
+      */
+     virtual void RemoveObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver, 
+                             CMdENamespaceDef* aNamespaceDef = NULL ) = 0;
+     
+protected:
+
+	/* Constructors. */
+
+	/**
+	 * Constructor.
+	 */
+	CMdESession();
+
+	/**
+	 * Second-phase constructor.
+	 */
+	void SessionConstruct();
+	};
+
+// includes only for client more convinient usage
+#include <mdeitem.h>
+#include <mdenamespacedef.h>
+#include <mdepropertydef.h>
+#include <mdeobjectdef.h>
+#include <mderelationdef.h>
+#include <mdeeventdef.h>
+#include <mdeproperty.h>
+#include <mdeobject.h>
+#include <mderelation.h>
+#include <mdeevent.h>
+#include <mdedatabuffer.h>
+
+#endif  // __MDESESSION_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/mdesessionimpl.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,650 @@
+/*
+* Copyright (c) 2005-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:  Metadata engine client session implementation*
+*/
+
+
+#ifndef __MDESESSIONIMPL_H__
+#define __MDESESSIONIMPL_H__
+
+#include "mdesession.h"
+
+
+// forward declarations
+class CMdENotifierAO;
+class CMdEDataBuffer;
+class CMdCSerializationBuffer;
+class CMdESessionStartupAO;
+class CMdESessionAsyncHandler;
+
+class RMdESessionAsyncRequest
+	{
+		friend class CMdESessionAsyncHandler;
+	private:
+		enum TRequestType
+		{
+			EAddRequest,
+			EUpdateRequest,
+			ERemoveRequest
+		};
+	
+		RMdESessionAsyncRequest(TRequestType aRequestType, 
+			CMdCSerializationBuffer* aBuffer, 
+			CMdCSerializationBuffer& aResultBuffer,
+			TRequestStatus& aRequestStatus);
+		
+		void Close();
+
+	private:
+		TRequestType iRequestType;
+		CMdCSerializationBuffer* iBuffer;
+		CMdCSerializationBuffer* iResultBuffer;
+		TRequestStatus* iRequestStatus;
+	};
+
+NONSHARABLE_CLASS(CMdESessionAsyncHandler) : public CTimer
+{
+public:
+	
+	static CMdESessionAsyncHandler* NewL(MMdESessionObserver& aObserver);
+	
+	~CMdESessionAsyncHandler();
+		
+private:
+	
+	void RunL();
+
+	void ConstructL();
+	
+	CMdESessionAsyncHandler(MMdESessionObserver& aObserver);
+
+private:
+	RArray<RMdESessionAsyncRequest> iRequests;
+	MMdESessionObserver& iObserver;
+};
+
+/**
+ * Metadata engine session implementation.
+ */
+NONSHARABLE_CLASS(CMdESessionImpl) : public CMdESession
+	{
+	friend class CMdESessionStartupAO;
+
+    public: // Constructors and destructor.
+
+    	/**
+    	 * Constructor.
+    	 *
+    	 * @param aObserver observer to notify when opening the session has 
+    	 *                  been completed
+    	 */
+    	CMdESessionImpl( MMdESessionObserver& aObserver );
+
+    	/**
+    	 * Second-phase constructor.
+    	 */
+    	void ConstructL();
+
+    	/**
+    	 * Destructor.
+    	 */
+    	virtual ~CMdESessionImpl();
+
+		/** From MdESession */
+		TInt NamespaceDefCount() const;
+
+		/** From MdESession */
+		CMdENamespaceDef& NamespaceDefL(TInt aIndex);
+
+		/** From MdESession */
+		CMdENamespaceDef& GetNamespaceDefL(const TDesC& aName);
+
+		CMdENamespaceDef& GetNamespaceDefL(TDefId aId);
+
+		/** From MdESession */
+		CMdENamespaceDef& GetDefaultNamespaceDefL();
+
+		/** From MdESession */
+		CMdEObject* NewObjectL( CMdEObjectDef& aDef, const TDesC& aUri, 
+                TUint32 aMediaId = 0 );
+
+		/** From MdESession */
+		CMdEObject* NewObjectLC( CMdEObjectDef& aDef, const TDesC& aUri, 
+				TUint32 aMediaId = 0 );
+
+		/** From MdESession */
+	    TInt AddObjectsL(RPointerArray<CMdEObject>& aObjects);
+
+		/** From MdESession */
+	    void CommitObjectL(CMdEObject& aObject);
+
+		/** From MdESession */
+	    void CommitObjectsL(RPointerArray<CMdEObject>& aObjects);
+
+		/** From MdESession */
+	    TItemId CancelObjectL(CMdEObject& aObject);
+
+		/** From MdESession */
+		CMdERelation* NewRelationLC(CMdERelationDef& aDef, 
+				TItemId aLeftObjectId, TItemId aRightObjectId, 
+				TInt32 aParameter);
+
+		/** From MdESession */
+		CMdERelation* NewRelationL(CMdERelationDef& aDef, 
+				TItemId aLeftObjectId, TItemId aRightObjectId, 
+				TInt32 aParameter);
+
+		/** From MdESession */
+		CMdEEvent* NewEventLC(CMdEEventDef& aDef, TItemId aObjectId, 
+				TTime aTime, const TDesC* aSource, const TDesC* aParticipant);
+
+		/** From MdESession */
+		CMdEEvent* NewEventL(CMdEEventDef& aDef, TItemId aObjectId, 
+				TTime aTime, const TDesC* aSource, const TDesC* aParticipant);
+
+		/** From MdESession */
+		void AddSchemaObserverL(MMdESchemaObserver& aObserver);
+
+		/** From MdESession */
+		void RemoveSchemaObserverL(MMdESchemaObserver& aObserver);
+
+		/** From MdESession */
+		void AddRelationDefL(const CMdENamespaceDef &aNamespaceDef, 
+				const TDesC &aName);
+
+		/** From MdESession */
+		void AddEventDefL(const CMdENamespaceDef &aNamespaceDef, 
+				const TDesC &aName);
+
+		/* From MdESession */
+    	TItemId AddObjectL(CMdEObject& aObject);
+    	
+    	/* From MdESession */
+		TInt DeserializeIdsL( RMdEDataBuffer& aSerializedItemIds, 
+				RArray<TItemId>* aResultObjects = NULL,
+				RArray<TItemId>* aResultEvents = NULL, 
+				RArray<TItemId>* aResultRelations = NULL );
+
+    	/* From MdESession */
+   		TInt DeserializeItemsL( RMdEDataBuffer& aSerializedItems, 
+   				RPointerArray<CMdEInstanceItem>& aItems );
+
+    	/* From MdESession */
+    	TItemId RemoveObjectL( TItemId aId, CMdENamespaceDef* aNamespaceDef );
+    	
+    	/* From MdESession */
+    	TItemId RemoveObjectL( const TDesC& aUri, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+		TInt RemoveObjectsL( const RArray<TItemId>& aId, 
+				RArray<TItemId>& aResult, CMdENamespaceDef* aNamespaceDef );
+	
+    	/* From MdESession */
+		TInt RemoveObjectsL( const RPointerArray<TDesC>& aUri, 
+				RArray<TItemId>& aResult, CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+		void RemoveObjectsAsyncL( 
+				const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+				RMdEDataBuffer& aSerializedObjectIds, 
+				CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+		void RemoveObjectsAsyncL( 
+				const RPointerArray<TDesC>& aUri, TRequestStatus& aStatus, 
+				RMdEDataBuffer& aSerializedObjectIds, 
+				CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* GetObjectL( const TItemId aId, 
+    			CMdEObjectDef& aObjectDef );
+
+    	/* From MdESession */
+    	CMdEObject* OpenObjectL( const TItemId aId, 
+    			CMdEObjectDef& aObjectDef );
+
+    	/* From MdESession */
+    	CMdEObject* GetObjectL( 
+    			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+    			CMdEObjectDef& aObjectDef );
+
+    	/* From MdESession */
+    	CMdEObject* OpenObjectL( 
+    			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+    			CMdEObjectDef& aObjectDef );
+    	
+    	/* From MdESession. */
+    	CMdEObject* GetObjectL( const TDesC& aUri, 
+    			CMdEObjectDef& aObjectDef );
+
+    	/* From MdESession. */
+    	CMdEObject* OpenObjectL( const TDesC& aUri, 
+    			CMdEObjectDef& aObjectDef );
+
+    	/* From MdESession */
+    	CMdEObject* GetObjectL( const TItemId aId, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* OpenObjectL( const TItemId aId, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* GetObjectL(
+    			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* OpenObjectL( 
+    			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+    			CMdENamespaceDef* aNamespaceDef );
+    	
+    	/* From MdESession. */
+    	CMdEObject* GetObjectL( const TDesC& aUri, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession. */
+    	CMdEObject* OpenObjectL( const TDesC& aUri, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* GetFullObjectL( const TItemId aId, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* OpenFullObjectL( const TItemId aId, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* GetFullObjectL( 
+    			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession */
+    	CMdEObject* OpenFullObjectL( 
+    			const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+    			CMdENamespaceDef* aNamespaceDef );
+    	
+    	/* From MdESession. */
+    	CMdEObject* GetFullObjectL( const TDesC& aUri, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession. */
+    	CMdEObject* OpenFullObjectL( const TDesC& aUri, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	void CheckObjectL( 	TMdEObject& aObject, const TDesC& aUri, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	void CheckObjectL( TMdEObject& aObject, TItemId aId, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	void CheckObjectL( RArray<TMdEObject>& aObjects, 
+    			const RArray<TItemId>& aIds, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession. */
+     	TItemId AddRelationL( CMdERelation& aRelation );
+
+    	/* From MdESession. */
+     	TItemId UpdateRelationL( CMdERelation& aRelation );
+
+    	/* From MdESession. */
+        TInt AddItemsL( RPointerArray<CMdEInstanceItem>& aItems );
+
+    	/* From MdESession. */
+        TInt UpdateItemsL( RPointerArray<CMdEInstanceItem>& aItems );
+
+		/* From MdESession. */
+        void AddItemsAsyncL( 
+        		RPointerArray<CMdEInstanceItem>& aItems, 
+        		TRequestStatus& aStatus,
+        		RMdEDataBuffer& aSerializedItemIds );
+
+		/* From MdESession. */
+        void UpdateItemsAsyncL( 
+        		RPointerArray<CMdEInstanceItem>& aItems, 
+        		TRequestStatus& aStatus,
+        		RMdEDataBuffer& aSerializedItemIds );
+
+    	/* From MdESession. */
+        CMdERelation* GetRelationL(TItemId aId, 
+        		CMdENamespaceDef* aNamespaceDef);
+
+    	/* From MdESession. */
+    	TItemId RemoveRelationL(TItemId aId, 
+    			CMdENamespaceDef* aNamespaceDef);
+    	
+    	/* From MdESession. */
+    	TInt RemoveRelationsL(const RArray<TItemId>& aId, 
+    			RArray<TItemId>& aSuccessful, CMdENamespaceDef* aNamespaceDef);
+
+    	/* From MdESession. */
+    	void RemoveRelationsAsyncL(
+    			const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+    			RMdEDataBuffer& aSerializedRelationIds, 
+    			CMdENamespaceDef* aNamespaceDef );
+
+    	/* From MdESession. */
+        CMdEObjectQuery* NewObjectQueryL(CMdENamespaceDef& aNamespaceDef, 
+        		CMdEObjectDef& aObjectDef, MMdEQueryObserver* aObserver);
+
+        /* From MdESession. */
+        CMdEObjectQuery* NewObjectQueryL(CMdEObjectDef& aObjectDef, 
+        		RPointerArray<CMdEObjectDef>* aObjectDefs, 
+        		MMdEQueryObserver* aObserver);
+        
+    	/* From MdESession. */
+        CMdEEvent* GetEventL(TItemId aId, CMdENamespaceDef* aNamespaceDef);
+
+    	/* From MdESession. */
+        TItemId AddEventL( CMdEEvent& aEvent );   
+    						
+    	/* From MdESession. */		   
+		TItemId RemoveEventL( TItemId aId, CMdENamespaceDef* aNamespaceDef );
+		
+		/* From MdESession. */
+		TInt RemoveEventsL( const RArray<TItemId>& aId, 
+				RArray<TItemId>& aSuccessful, 
+				CMdENamespaceDef* aNamespaceDef );
+		
+		/* From MdESession. */
+		void RemoveEventsAsyncL( 
+				const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+				RMdEDataBuffer& aSerializedEventIds, 
+				CMdENamespaceDef* aNamespaceDef );
+	
+    	/* From MdESession. */
+        CMdERelationQuery* NewRelationQueryL(CMdENamespaceDef& aNamespaceDef, 
+        		MMdEQueryObserver* aObserver);
+
+    	/* From MdESession. */
+        CMdEEventQuery* NewEventQueryL(CMdENamespaceDef& aNamespaceDef, 
+        		MMdEQueryObserver* aObserver);
+
+        /* From MdESession. */
+    	void AddObjectObserverL(MMdEObjectObserver& aObserver,
+    							CMdELogicCondition* aCondition,
+    							TUint32 aNotificationType,
+    							CMdENamespaceDef* aNamespaceDef);
+
+        /* From MdESession. */
+    	void RemoveObjectObserverL(MMdEObjectObserver& aObserver, 
+    							  CMdENamespaceDef* aNamespaceDef);
+
+		/* From MdESession. */
+		void AddObjectPresentObserverL(
+				MMdEObjectPresentObserver& aObserver);
+
+		/* From MdESession. */
+		void RemoveObjectPresentObserverL(
+				MMdEObjectPresentObserver& aObserver);
+	
+        /* From MdESession. */
+    	void AddRelationObserverL(MMdERelationObserver& aObserver,
+    							  CMdECondition* aCondition,
+    							  TUint32 aNotificationType,
+    							  CMdENamespaceDef* aNamespaceDef);
+
+        /* From MdESession. */
+    	void RemoveRelationObserverL(MMdERelationObserver& aObserver,
+    								CMdENamespaceDef* aNamespaceDef);
+
+    	/* From MdESession. */
+    	void AddRelationItemObserverL(MMdERelationItemObserver& aObserver,
+    								  CMdECondition* aCondition,
+    								  TUint32 aNotificationType,
+    								  CMdENamespaceDef* aNamespaceDef);
+
+    	/* From MdESession. */
+    	void RemoveRelationItemObserverL(MMdERelationItemObserver& aObserver, 
+    									CMdENamespaceDef* aNamespaceDef);
+
+    	/* From MdESession. */
+		void AddRelationPresentObserverL(
+				MMdERelationPresentObserver& aObserver);
+
+        /* From MdESession. */
+		void RemoveRelationPresentObserverL(
+				MMdERelationPresentObserver& aObserver);
+
+        /* From MdESession. */
+    	void AddEventObserverL(MMdEEventObserver& aObserver,
+    						   CMdECondition* aCondition, 
+ 							   TUint32 aNotificationType,
+    						   CMdENamespaceDef* aNamespaceDef);
+
+        /* From MdESession. */
+    	void RemoveEventObserverL(MMdEEventObserver& aObserver, 
+    							 CMdENamespaceDef* aNamespaceDef);
+
+        /** Finds an existing observer notifier */
+        TInt FindNotifier( TUint32 aNotifyType, TAny* aObserver, 
+        		CMdENamespaceDef& aNamespaceDef );
+
+        /** With this call Notifier announces it is in error state */
+        void NotifierInError( CMdENotifierAO* aNotifier );
+
+        /* From MdESession. */
+        void ImportSchemaL( const TDesC& aFileName );
+
+        /* From MdESession. */
+        TInt ImportMetadataL(const TDesC& aFileName );
+
+        /* From MdESession. */
+        void ImportMetadata( const TDesC& aFileName, TPckgBuf<TInt>& aResult, 
+        		TRequestStatus& aStatus );
+
+        /* From MdESession. */
+        void ExportMetadataL( const TDesC& aFileName, 
+        					  const CMdENamespaceDef* aNamespaceDef = NULL, 
+	                		  const RPointerArray<CMdEObjectDef>* aObjectDefs = NULL, 
+                    		  const RPointerArray<CMdERelationDef>* aRelationDefs = NULL, 
+                        	  const RPointerArray<CMdEEventDef>* aEventDefs = NULL );
+
+        /* From MdESession. */
+        void ExportMetadataL( const TDesC& aFileName, TRequestStatus& aStatus, 
+        					  RMdEDataBuffer& aBuffer, 
+        					  const CMdENamespaceDef* aNamespaceDef = NULL, 
+	                		  const RPointerArray<CMdEObjectDef>* aObjectDefs = NULL, 
+                    		  const RPointerArray<CMdERelationDef>* aRelationDefs = NULL, 
+                        	  const RPointerArray<CMdEEventDef>* aEventDefs = NULL );
+
+		void LoadSchemaL();
+
+		/* From MdESession. */
+    	void GetSchemaVersionL(TInt& aMajorVersion, TInt& aMinorVersion);
+
+    	/* From MdESession. */
+    	void SetObjectToPresentByGuidL( 
+    			const TInt64& aGuidHigh, const TInt64& aGuidLow );
+    	
+        void GetCountL( CMdCSerializationBuffer* aBuffer, TUint32& aResult );
+
+        void GetItemIdL( CMdCSerializationBuffer* aBuffer, 
+        		RArray<TItemId>& aIdArray );
+
+        void GetDistinctValuesL( CMdCSerializationBuffer& aBuffer, 
+        		CDesCArray& aResults );
+
+		/**
+		 * Should be called to notify the base class about errors, which are 
+		 * not a direct consequence of the operations initiated by the client 
+		 * but caused by some external source (e.g., other clients). Attempts 
+		 * to recover from the error have failed. All on-going operations 
+		 * initiated by the client should be aborted before calling this 
+		 * method. After calling this method any attempts to use the session 
+		 * will cause a panic.
+		 *
+		 * @param aError  one of the system-wide error codes
+		 */
+		void NotifyError(TInt aError);
+
+        /* From MdESession. */
+        void AddObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver,
+                                CMdELogicCondition* aCondition,
+                                TUint32 aNotificationType,
+                                CMdENamespaceDef* aNamespaceDef );
+        
+        /* From MdESession. */
+        void RemoveObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver, 
+                                CMdENamespaceDef* aNamespaceDef );
+    protected:
+
+        /*
+        * Loads the schema
+        */
+        void DoLoadSchemaL();
+
+       	void Close();
+
+		/* Methods to notify the base class about different events. */
+
+		/**
+		 * Should be called to notify the base class that opening the session 
+		 * has been completed and, if the opening succeeded, the session is 
+		 * ready for use.
+		 *
+		 * @param aError <code>KErrNone</code>, if opening the session 
+		 *               succeeded; or one of the system-wide error codes, 
+		 *               if opening the session failed
+		 */
+		void NotifySessionOpened(TInt aError);
+
+		/* Utility methods for concrete session implementations. */	
+
+		/**
+		 * Panics if the session has not been succesfully opened.
+		 */
+		void CheckOpened() const;
+
+	public:
+
+		void DeserializeQueryResultL( CMdCSerializationBuffer& aBuffer, 
+				RPointerArray<CMdEInstanceItem>& aItems );
+
+	protected:						   		       
+		CMdCSerializationBuffer* SerializeItemsL( 
+				RPointerArray<CMdEInstanceItem>& aItems );					   		       
+		
+		TItemId AddItemL( CMdEInstanceItem& aItem );
+		
+		void DeserializeAddingResultsL( 
+				RPointerArray<CMdEInstanceItem>& aItems, 
+				CMdCSerializationBuffer& aResultBuffer );
+		
+		/**
+		 * Creates a serialized buffer with id marked to be removed
+		 *
+		 * @param aNamespaceDef namespace where items should be removed
+		 * @param aObjects objects id to remove (could be NULL)
+		 * @param aEvents events id to remove (could be NULL)
+		 * @param aRelations relation id to remove (could be NULL)
+		 * @return serialized buffer
+		 */
+		CMdCSerializationBuffer* RemoveCommonL( 
+				CMdENamespaceDef& aNamespaceDef, 
+				const RPointerArray<TDesC16>* aObjects,
+				const RArray<TItemId>* aEvents, 
+				const RArray<TItemId>* aRelations );
+		
+	 	/**
+		 * Creates a serialized buffer with id marked to be removed
+		 *
+		 * @param aNamespaceDef namespace where items should be removed
+		 * @param aObjects objects uri to remove (could be NULL)
+		 * @param aEvents events id to remove (could be NULL)
+		 * @param aRelations relation id to remove (could be NULL)
+		 * @return serialized buffer
+		 */
+		CMdCSerializationBuffer* RemoveCommonL( 
+				CMdENamespaceDef& aNamespaceDef, 
+				const RArray<TItemId>* aObjects, 
+				const RArray<TItemId>* aEvents, 
+				const RArray<TItemId>* aRelations );
+
+		/**
+		 * Creates a serialized buffer with defs id items to be exported
+		 *
+		 * @param aNamespaceDef namespace from where items should be removed 
+		 *                      (NULL means from every)
+		 * @param aObjectDefs objectDefs to export
+		 * @param aRelationDefs
+		 * @param aEventDefs
+		 * @return serialized items ids
+		 */
+		CMdCSerializationBuffer* ExportCommonL( 
+				const CMdENamespaceDef* aNamespaceDef,
+				const RPointerArray<CMdEObjectDef>* aObjectDefs,
+                const RPointerArray<CMdERelationDef>* aRelationDefs,
+                const RPointerArray<CMdEEventDef>* aEventDefs );
+
+	private:
+		/**
+		 * If aId is KNoId it isn't used. If aUri is KNullDesC, it isn't used.
+		 */
+//		CMdEObject* GetObjectL( CMdEObjectDef& aObjectDef, const TItemId aId, 
+//				                const TInt64 aGuidHigh, const TInt64 aGuidLow, 
+//				                const TDesC& aUri, TMdCQueryLockType aLocktype,
+//				                TBool aIncludeFreetexts );
+
+		/**
+		 * Return namespace definition or default namespace definition
+		 * 
+		 * @param aNamespaceDef namespace definition or NULL
+		 * @return default namespace definition if parameter was NULL, 
+		 *         othrewise namespace definition which was given as parameter
+		 */
+		CMdENamespaceDef* GetNamespaceDefL( CMdENamespaceDef* aNamespaceDef );
+		
+    private: // data members
+
+		/**
+		*
+		*/
+		CMdESessionStartupAO* iSessionStartupAO;
+
+        /**
+        * array of observer notifier active objects
+        */
+        RPointerArray<CMdENotifierAO> iNotifiers;
+                
+		/** Open observer. */
+		MMdESessionObserver* iSessionObserver;
+		
+		RChunk iSchemaChunk;
+		
+		CMdCSerializationBuffer* iSchemaBuffer;
+		
+		RPointerArray<CMdENamespaceDef> iNamespaceDefs;
+		
+//		CMdESessionAsyncHandler* iAsyncHandler;
+
+		TUint32 iNextQueryId;
+		
+	protected:
+	
+		enum TSessionState
+			{
+				EMdESessionClosed = 0,
+				EMdESessionOpen,
+				EMdESessionError,
+			};
+		TSessionState iSessionState;
+		
+		CMdESessionAsyncHandler* iTimer;
+	};
+
+#endif  // __MDESESSIONIMPL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/inc/vcxmyvideoscollectionutil.h	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,232 @@
+/*
+* 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 the License "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 VCXMYVIDEOSCOLLECTIONUTIL_H
+#define VCXMYVIDEOSCOLLECTIONUTIL_H
+
+// INCLUDES
+
+// FORWARD DECLARATIONS
+class CMPXMedia;
+class RFs;
+
+// CONSTANTS
+
+// CLASS DECLARATION
+
+/**
+* Util functions.
+*
+* @lib mpxmyvideoscollectionplugin.lib
+*/
+NONSHARABLE_CLASS(TVcxMyVideosCollectionUtil)
+    {
+    public:
+    
+        /**
+        * Creates media container and sets up empty media array to it.
+        *
+        * @return CMPXMedia media list.
+        */
+        static CMPXMedia* CreateEmptyMediaListL();
+
+        /**
+        * Creates message list and sets up empty message array to it.
+        *
+        * @return CMPXMessage message list.
+        */
+        static CMPXMedia* CreateEmptyMessageListL();
+        
+        /**
+        * Tries to find aMdsIds from aFromList and if found, copies them
+        * to aToList. KMPXMediaArrayContents arrays must be set for aFromList
+        * and aToList, othewise leave (KErrArgument) occurs.
+        *
+        * @param aFromList Items are copied from here.
+        * @param aToList   Items are copied here.
+        * @param aMdsIds   Item IDs which are copied.
+        */
+        static void CopyFromListToListL(
+                CMPXMedia& aFromList,
+                CMPXMedia& aToList,
+                RArray<TUint32>& aMdsIds );
+
+        /**
+        * Tries to find aMdsIds from aFromArray and if found, copies them
+        * to aToList. KMPXMediaArrayContents arrays must be set for aToList,
+        * othewise leave (KErrArgument) occurs.
+        *
+        * @param aFromArray Items are copied from here.
+        * @param aToList    Items are copied here.
+        * @param aMdsIds    Item IDs which are copied.
+        */
+        static void CopyFromListToListL(
+                RArray<CMPXMedia*>& aFromArray,
+                CMPXMedia& aToList,
+                RArray<TUint32>& aMdsIds );
+
+        /**
+        * Converts drive letter to drive number.
+        *
+        * @param aDrive drive letter
+        * @return       drive number
+        */
+        static TInt DriveLetter2DriveNumber( const TDesC &aDrive );
+
+        /**
+        * Checks that file system does not have aPath file already, if it does
+        * then the aPath is changed to unique by adding digits to it. Result
+        * is stored to aUniquePath, (event if it is the same as aPath).
+        *
+        * @param aFs          Open session to file server.
+        * @param aPath        File name to make unique.
+        * @param aUniquePath  Generated unique path.
+        */
+        static void MakeUniqueFileNameL( RFs& aFs, const TDesC& aPath, TDes& aUniquePath );
+        
+        /**
+        * Gets KVcxMediaMyVideosOrigin attribute of aVideo.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        Origin, see values from TVcxMyVideosOrigin in vcxmyvideosdefs.h
+        */
+        static TUint8 OriginL( CMPXMedia& aVideo );
+
+        /**
+        * Gets KMPXMediaGeneralFlags attribute of aVideo.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        Flags, see values from TVcxMyVideosVideoFlags in vcxmyvideosdefs.h
+        */        
+        static TUint32 FlagsL( CMPXMedia& aVideo );
+
+        /**
+        * Gets KVcxMediaMyVideosDownloadId attribute of aVideo.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        Download ID in Download Manager.
+        */        
+        static TUint32 DownloadIdL( CMPXMedia& aVideo );
+
+        /**
+        * Gets KVcxMediaMyVideosDownloadState attribute of aVideo.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        Download state.
+        */        
+        static TVcxMyVideosDownloadState DownloadStateL( CMPXMedia& aVideo );
+
+        /**
+        * Gets KMPXMediaGeneralId attribute of aVideo.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        ID.
+        */
+        static TMPXItemId IdL( CMPXMedia& aVideo );
+
+        /**
+        * Gets KVcxMediaMyVideosDuration attribute of aVideo.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        Duration.
+        */        
+        static TReal32 DurationL( CMPXMedia& aVideo );
+        
+        /**
+        * Gets KMPXMediaGeneralTitle attribute of the video.
+        *
+        * @return  KMPXMediaGeneralTitle value. If attribute is not supported,
+        *          then KNullDesC is returned.
+        */
+        static const TDesC& Title( CMPXMedia& aVideo );
+
+        /**
+        * Gets KVcxMediaMyVideosRating attribute of the video.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        KVcxMediaMyVideosRating value. If attribute is not supported,
+        *                then 0 is returned.
+        */        
+        static TUint8 RatingL( CMPXMedia& aVideo );
+
+        /**
+        * Gets KVcxMediaMyAudioFourCc attribute of the video.
+        *
+        * @param aVideo  Media object to fetch parameter from.
+        * @return        KVcxMediaMyAudioFourCc value. If attribute is not supported,
+        *                then 0 is returned.
+        */
+        static TUint32 AudioFourCcL( CMPXMedia& aVideo );
+
+        /**
+        * Checks if aAttrs contains attributes which are not supported in aVideo.
+        *
+        * @param aVideo   Attributes to check from.
+        * @param aAttrs   Attributes to check.
+        * @param aNonSupportedAttrCanBeFoundFromMds  Set to ETrue if at least one of non supported
+        *                                            attributes can be found from MDS.
+        * @return         ETrue if all aAttrs attributes are supported in aVideo, EFalse
+        *                 otherwise.
+        */
+        static TBool AreSupported( CMPXMedia& aVideo, const TArray<TMPXAttribute>& aAttrs,
+                TBool& aNonSupportedAttrCanBeFoundFromMds );
+
+        /**
+        * Checks if aAttrs belongs to "full" set of parameters which is saved to MDS but not
+        * cached by collection.
+        *
+        * @param aAttr    Attribute to check.
+        * @return         ETrue if aAttr belongs to full set and can be found from MDS, EFalse
+        *                 otherwise.
+        */
+        static TBool AttrBelongsToFullSet( const TMPXAttribute& aAttr );
+        
+        /**
+        * Converts collection category ID to origin.
+        *
+        * @param aCategoryId  Category ID
+        * @return             Returns Origin or KErrNotFound if not found. KVcxMvcCategoryIdAll
+        *                     returns also KErrNotFound.
+        */
+        static TInt Origin( TInt aCategoryId );
+
+#ifdef _DEBUG
+        /**
+        * Prints process names which have file handle open to aFileName
+        *
+        * @param aFileName  File to check for open file handles.
+        */
+        static void PrintOpenFileHandlesL( const TDesC& aFileName, RFs& aFs );
+        
+        /**
+        * Gets process name.
+        *
+        * @param aThreadId    Thread ID
+        * @param aProcessName Upon completion process name is written here.
+        */
+        static void GetProcessName( TInt aThreadId, TFullName& aProcessName );
+
+    private:
+        TBuf<500> iProcessName;        
+#endif
+    };
+#endif   // VCXMYVIDEOSCOLLECTIONUTIL_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/init/testframework.ini	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,169 @@
+#
+# This is STIFTestFramework initialization file 123
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions 
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Sret of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases' 
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.sd
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if 
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+
+[Engine_Defaults]
+
+TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', 'TestCases' or 'FullReport'
+
+CreateTestReport= YES			# Possible values: YES or NO
+
+TestReportFilePath= c:\Logs\testframework\
+TestReportFileName= testreport_mpxvideoplayertest
+
+TestReportFormat= TXT			# Possible values: TXT or HTML
+TestReportOutput= FILE			# Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementplugin04 
+UITestingSupport= YES 
+SeparateProcesses= YES 
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+
+[New_Module]
+ModuleName= TestScripter
+TestCaseFile= c:\testframework\VcxMyVideosMdsDbTest.cfg
+[End_Module]
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIFTestFramework logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
+
+#CreateLogDirectories= YES		# Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML			# Possible values: TXT or HTML
+#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+#HardwareBasePath=  C:\
+#HardwareFormat= TXT			# Possible values: TXT or HTML
+#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES			# Possible values: YES or NO
+#WithTimeStamp= YES			# Possible values: YES or NO
+#WithLineBreak= YES			# Possible values: YES or NO
+#WithEventRanking= YES			# Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/VcxMyVideosMdsDbTest.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,211 @@
+/*
+* 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: This file contains testclass implementation.
+*
+*/
+
+// Version : %version: 1 %
+
+
+// INCLUDE FILES
+#include <StifTestInterface.h>
+#include "VcxMyVideosMdsDbTest.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// GLOBAL
+CVcxMyVideosMdsDbTest* test;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosMdsDbTest::CVcxMyVideosMdsDbTest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CVcxMyVideosMdsDbTest::CVcxMyVideosMdsDbTest( 
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    test = this;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosMdsDbTest::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CVcxMyVideosMdsDbTest::ConstructL()
+    {
+    User::LeaveIfError ( iFs.Connect() );
+    
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings; 
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        } 
+    // Close Setting server session
+    settingServer.Close();
+
+    TFileName logFileName;
+    
+    if(loggerSettings.iAddTestCaseTitle)
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        logFileName.Format(KVcxMyVideosMdsDbTestLogFileWithTitle, &title);
+        }
+    else
+        {
+        logFileName.Copy(KVcxMyVideosMdsDbTestLogFile);
+        }
+
+    iLog = CStifLogger::NewL( KVcxMyVideosMdsDbTestLogPath, 
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+    
+    SendTestClassVersion();
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosMdsDbTest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CVcxMyVideosMdsDbTest* CVcxMyVideosMdsDbTest::NewL( 
+    CTestModuleIf& aTestModuleIf )
+    {
+    CVcxMyVideosMdsDbTest* self = new (ELeave) CVcxMyVideosMdsDbTest( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CVcxMyVideosMdsDbTest::~CVcxMyVideosMdsDbTest()
+    { 
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog; 
+
+    iFs.Close();
+    }
+
+//-----------------------------------------------------------------------------
+// CVcxMyVideosMdsDbTest::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CVcxMyVideosMdsDbTest::SendTestClassVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+	
+	TFileName moduleName;
+	moduleName = _L("VcxMyVideosMdsDbTest.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	}
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL( 
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CVcxMyVideosMdsDbTest::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/VcxMyVideosMdsDbTestBlocks.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,346 @@
+/*
+* 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: This file contains testclass implementation.
+*
+*/
+
+// Version : %version: 1 %
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+
+#include <mpxlog.h>
+#include <mdeconstants.h>
+#include <mdequery.h>
+#include <bautils.h>
+#include <mpxmedia.h>
+#include <vcxmyvideosdefs.h>
+#include <mpxmediacontainerdefs.h>
+#include <mpxmediageneraldefs.h>
+#include <mpxmediageneralextdefs.h>
+#include <mpxmediaarray.h>
+#include <mpxmediavideodefs.h>
+#include <centralrepository.h>
+
+#include "vcxmyvideosmdsdb.h"
+#include "vcxmyvideoscollectionutil.h"
+
+
+#include "VcxMyVideosMdsDbTest.h"
+
+
+        
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+
+TInt NextIntOrZero( CStifItemParser& aItem ) 
+    {
+    TInt a ( 0 );
+    if ( !aItem.GetNextInt( a ) )
+        {
+        return a;
+        }
+    else
+        {
+        return 0;
+        }
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosMdsDbTest::Delete
+// Delete here all resources allocated and opened from test methods. 
+// Called from destructor. 
+// -----------------------------------------------------------------------------
+//
+void CVcxMyVideosMdsDbTest::Delete() 
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxMyVideosMdsDbTest::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CVcxMyVideosMdsDbTest::RunMethodL( 
+    CStifItemParser& aItem ) 
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {  
+        ENTRY( "CreateL", CVcxMyVideosMdsDbTest::CreateL ),
+        ENTRY( "DeleteL", CVcxMyVideosMdsDbTest::DeleteL ),
+        ENTRY( "CancelL", CVcxMyVideosMdsDbTest::CancelL ),
+        ENTRY( "AddVideoL", CVcxMyVideosMdsDbTest::AddVideoL ),
+        ENTRY( "RemoveVideoL", CVcxMyVideosMdsDbTest::RemoveVideoL ),
+        ENTRY( "UpdateVideoL", CVcxMyVideosMdsDbTest::UpdateVideoL ),
+        ENTRY( "CreateVideoListL", CVcxMyVideosMdsDbTest::CreateVideoListL ),
+        ENTRY( "CreateVideoL", CVcxMyVideosMdsDbTest::CreateVideoL )
+        };
+
+    const TInt count = sizeof( KFunctions ) / 
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+TInt CVcxMyVideosMdsDbTest::CreateL( CStifItemParser& aItem )
+    {
+    int a ( 0 );
+    
+    if ( !aItem.GetNextInt( a ) )
+        {
+        mdssessionerror = a;
+        }
+    
+    if ( !aItem.GetNextInt( a ) )
+        {
+        mdssessionasyncerror = a;
+        }
+    
+    iMdsDb = CVcxMyVideosMdsDb::NewL( this, iFs );
+    
+    return KErrNone;
+    }
+
+TInt CVcxMyVideosMdsDbTest::DeleteL( CStifItemParser& aItem )
+    {
+    delete iMdsDb;
+    return KErrNone;
+    }
+
+TInt CVcxMyVideosMdsDbTest::CancelL( CStifItemParser& aItem )
+    {
+    iMdsDb->Cancel();
+    return KErrNone;
+    }
+
+TInt CVcxMyVideosMdsDbTest::AddVideoL( CStifItemParser& aItem )
+    {
+    PrepareMdsL( aItem  );
+    
+    CMPXMedia* media  = CMPXMedia::NewL();
+    
+    TUint32 mdsId;
+    
+    //1. MPX ID, set by collection
+    //2
+    media->SetTextValueL( KMPXMediaGeneralTitle, _L("KMPXMediaGeneralTitle") );
+    //3
+    media->SetTextValueL( KMPXMediaGeneralComment, _L("KMPXMediaGeneralComment") );
+    //4
+    media->SetTextValueL( KMPXMediaGeneralUri, _L("c:\\data\\videos\\addtest1.mp4") );
+    //5
+    media->SetTObjectValueL<TInt>( KMPXMediaGeneralSize, 100 );
+    //6 Creation date
+    TTime time;
+    time.HomeTime();
+    media->SetTObjectValueL<TInt64>( KMPXMediaGeneralDate, time.Int64() );
+    //7
+    TUint32 flags = EVcxMyVideosVideoDrmProtected || EVcxMyVideosVideoNew;
+    media->SetTObjectValueL<TUint32>( KMPXMediaGeneralFlags, flags );
+    //8
+    media->SetTextValueL( KMPXMediaGeneralCopyright, _L("Copyright info") ); 
+    //9
+    media->SetTextValueL( KMPXMediaGeneralMimeType, _L("Mime type") );
+    
+    //10
+    TInt lastPlaybackPos( 13232 );
+    media->SetTObjectValueL<TInt>( KMPXMediaGeneralLastPlaybackPosition, lastPlaybackPos );
+    //11
+    media->SetTObjectValueL<TInt64>( KVcxMediaMyVideosModifiedDate, time.Int64() );    
+    //12
+    media->SetTObjectValueL<TInt64>( KVcxMediaMyVideosAgeProfile, 18 );
+    //13
+    media->SetTextValueL( KVcxMediaMyVideosAudioLanguage, _L("Audio language") );
+    //14
+    media->SetTextValueL( KVcxMediaMyVideosAuthor, _L("Author") );
+    //15
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin, 1 );
+    //16
+    TReal32 duration( 1212 );
+    media->SetTObjectValueL<TReal32>( KVcxMediaMyVideosDuration, duration );
+    //17
+    media->SetTObjectValueL<TUint32>( KVcxMediaMyVideosDownloadId, 0 );
+    //18
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosRating, 1 );
+
+    media->SetTObjectValueL<TInt>( KVcxMediaMyVideosDownloadError, -1 );
+    
+    media->SetTObjectValueL<TInt>( KVcxMediaMyVideosDownloadGlobalError, -2 );
+    
+    iMdsDb->AddVideoL( *media, mdsId );
+    
+    delete media;
+    return KErrNone;
+    }
+
+TInt CVcxMyVideosMdsDbTest::RemoveVideoL( CStifItemParser& aItem )
+    {
+    PrepareMdsL( aItem  );
+    
+    TInt id;
+    aItem.GetNextInt( id );
+    return iMdsDb->RemoveVideo( id );
+    }
+
+TInt CVcxMyVideosMdsDbTest::UpdateVideoL( CStifItemParser& aItem )
+    {
+    PrepareMdsL( aItem  );
+    
+    CMPXMedia* media  = CMPXMedia::NewL();
+    CleanupStack::PushL(media);
+    //1. MPX ID, set by collection
+    //2
+    media->SetTextValueL( KMPXMediaGeneralTitle, _L("Titteli") );
+    //3
+    media->SetTextValueL( KMPXMediaGeneralComment, _L("Desciä") );
+    //4
+    media->SetTextValueL( KMPXMediaGeneralUri, _L("c:\\data\\videos\\addtest1.mp4") );
+    //5
+    media->SetTObjectValueL<TInt>( KMPXMediaGeneralSize, 100 );
+    //6 Creation date
+    TTime time;
+    time.HomeTime();
+    media->SetTObjectValueL<TInt64>( KMPXMediaGeneralDate, time.Int64() );
+    //7
+    TUint32 flags = EVcxMyVideosVideoDrmProtected || EVcxMyVideosVideoNew;
+    media->SetTObjectValueL<TUint32>( KMPXMediaGeneralFlags, flags );
+    //8
+    media->SetTextValueL( KMPXMediaGeneralCopyright, _L("Copyright info") );    
+    //9
+    media->SetTextValueL( KMPXMediaGeneralMimeType, _L("Mime type") );    
+    //10
+    TInt lastPlaybackPos( 13232 );
+    media->SetTObjectValueL<TInt>( KMPXMediaGeneralLastPlaybackPosition, lastPlaybackPos );
+    //11
+    media->SetTObjectValueL<TInt64>( KVcxMediaMyVideosModifiedDate, time.Int64() );    
+    //12
+    media->SetTObjectValueL<TInt64>( KVcxMediaMyVideosAgeProfile, 18 );
+    //13
+    media->SetTextValueL( KVcxMediaMyVideosAudioLanguage, _L("Audio language") );
+    //14
+    media->SetTextValueL( KVcxMediaMyVideosAuthor, _L("Author") );
+    //15
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin, 1 );
+    //16
+    TReal32 duration( 1212 );
+    media->SetTObjectValueL<TReal32>( KVcxMediaMyVideosDuration, duration );
+    //17
+    media->SetTObjectValueL<TUint32>( KVcxMediaMyVideosDownloadId, 0 );
+    //18
+    media->SetTObjectValueL<TUint8>( KVcxMediaMyVideosRating, 1 );
+
+    media->SetTObjectValueL<TInt>( KVcxMediaMyVideosDownloadError, -1 );
+    
+    media->SetTObjectValueL<TInt>( KVcxMediaMyVideosDownloadGlobalError, -2 );
+    
+    iMdsDb->UpdateVideoL( *media );
+    
+    CleanupStack::PopAndDestroy( media );
+    
+    return KErrNone;
+    }
+
+TInt CVcxMyVideosMdsDbTest::CreateVideoListL( CStifItemParser& aItem )
+    {
+    TVcxMyVideosSortingOrder sortingorder = ( TVcxMyVideosSortingOrder ) NextIntOrZero( aItem );
+    TBool ascending                       = NextIntOrZero( aItem );
+    TBool fullDetails                     = NextIntOrZero( aItem );
+    TBool docreate                        = NextIntOrZero( aItem );
+    
+    CMPXMedia* videoList( NULL );
+    CMPXMediaArray* mediaArray( NULL );
+                        
+    if ( docreate )
+        {
+        videoList = CMPXMedia::NewL();
+        CleanupStack::PushL( videoList );
+        mediaArray = CMPXMediaArray::NewL();
+        videoList->SetCObjectValueL<CMPXMediaArray>( KMPXMediaArrayContents, mediaArray );
+        CleanupStack::PushL( mediaArray );
+        }
+    
+    iMdsDb->CreateVideoListL( sortingorder, ascending, fullDetails, videoList );
+    
+    if ( docreate )
+        {
+        CleanupStack::PopAndDestroy( videoList );
+        }
+    else
+        {
+        delete videoList;
+        }
+    
+    return KErrNone;
+    }
+
+TInt CVcxMyVideosMdsDbTest::CreateVideoL( CStifItemParser& aItem )
+    {
+    PrepareMdsL( aItem );
+    
+    TUint32 aId;
+    TBool aFullDetails = ETrue;
+    CMPXMedia* media = iMdsDb->CreateVideoL( aId, aFullDetails );
+    delete media;
+    return KErrNone;
+    }
+
+
+void CVcxMyVideosMdsDbTest::PrepareMdsL(  CStifItemParser& aItem  ) 
+    {
+    mdsoperationreturns = NextIntOrZero( aItem );
+    
+    mdsoperationleaves = NextIntOrZero( aItem );
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeinstanceitem.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#include "mdeinstanceitem.h"
+
+
+CMdEInstanceItem::CMdEInstanceItem(CMdESession* aSession, TItemId aId)
+		: CMdEItem(aSession, aId)
+	{
+	}
+
+
+void CMdEInstanceItem::InstanceItemBaseConstruct()
+	{
+	ItemBaseConstruct();
+	}
+
+
+CMdEInstanceItem::~CMdEInstanceItem()
+	{
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeitem.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#include "mdeitem.h"
+
+
+CMdEItem::CMdEItem(CMdESession* aSession, TItemId aId)
+		: iSession(aSession), iId(aId)
+	{
+	}
+
+
+void CMdEItem::ItemBaseConstruct()
+	{
+	}
+
+
+CMdEItem::~CMdEItem()
+	{
+	}
+
+
+EXPORT_C TBool CMdEItem::BelongsToSession() const
+	{
+	}
+
+
+EXPORT_C CMdESession& CMdEItem::Session() const
+	{
+	}
+
+
+void CMdEItem::CheckSession() const
+	{
+	}
+
+
+void CMdEItem::SetSession(CMdESession& aSession)
+	{
+	}
+
+
+EXPORT_C TBool CMdEItem::InDatabase() const
+	{
+	}
+
+
+EXPORT_C TItemId CMdEItem::Id() const
+	{
+	}
+
+
+void CMdEItem::SetId(TItemId aId)
+	{
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdenamespacedef.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,117 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#include "mdenamespacedef.h"
+
+#include "mdeobjectdef.h"
+#include "mderelationdef.h"
+#include "mdeeventdef.h"
+
+CMdENamespaceDef::CMdENamespaceDef( const CMdESession& aMdeSession, 
+		const TMdCNamespaceDef& aNamespaceDef )
+	: iMdeSession( aMdeSession ), iNamespaceDef( aNamespaceDef )
+	{
+	}
+
+CMdENamespaceDef* CMdENamespaceDef::NewL( const CMdESession& aMdeSession, 
+		const TMdCNamespaceDef& aNamespaceDef, 
+		CMdCSerializationBuffer& aSchemaBuffer )
+	{
+    }
+
+CMdENamespaceDef* CMdENamespaceDef::NewLC( const CMdESession& aMdeSession, 
+		const TMdCNamespaceDef& aNamespaceDef, 
+		CMdCSerializationBuffer& aSchemaBuffer )
+	{
+	}
+
+void CMdENamespaceDef::ConstructL(CMdCSerializationBuffer& aSchemaBuffer)
+	{
+	}
+
+CMdENamespaceDef::~CMdENamespaceDef()
+	{
+	}
+
+TDefId CMdENamespaceDef::Id() const
+	{
+	}
+
+EXPORT_C TBool CMdENamespaceDef::ReadOnly() const
+	{
+	}
+
+EXPORT_C const TDesC& CMdENamespaceDef::Name() const
+	{
+	}
+
+EXPORT_C TInt CMdENamespaceDef::Compare( const CMdENamespaceDef& aNamespaceDef ) const
+	{
+	}
+
+EXPORT_C TInt CMdENamespaceDef::ObjectDefCount() const
+	{
+	}
+
+EXPORT_C CMdEObjectDef& CMdENamespaceDef::ObjectDefL(TInt aIndex)
+	{
+	}
+
+EXPORT_C CMdEObjectDef& CMdENamespaceDef::GetObjectDefL(const TDesC& aName)
+	{
+	}
+
+CMdEObjectDef* CMdENamespaceDef::GetObjectDefL(TDefId aId)
+	{
+	}
+
+EXPORT_C TInt CMdENamespaceDef::RelationDefCount() const
+	{
+	}
+
+EXPORT_C CMdERelationDef& CMdENamespaceDef::RelationDefL(TInt aIndex)
+	{
+	}
+
+EXPORT_C CMdERelationDef& CMdENamespaceDef::GetRelationDefL(const TDesC& aName)
+	{
+	}
+
+CMdERelationDef* CMdENamespaceDef::GetRelationDefL(TDefId aId)
+	{
+	}
+
+EXPORT_C TInt CMdENamespaceDef::EventDefCount() const
+	{
+	}
+
+EXPORT_C CMdEEventDef& CMdENamespaceDef::EventDefL(TInt aIndex)
+	{
+	}
+
+EXPORT_C CMdEEventDef& CMdENamespaceDef::GetEventDefL(const TDesC& aName)
+	{
+	}
+
+CMdEEventDef* CMdENamespaceDef::GetEventDefL(TDefId aId)
+	{
+	}
+
+const CMdESession& CMdENamespaceDef::Session() const
+	{
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeobject.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,333 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#include <mdeobject.h>
+
+#include <mdeproperty.h>
+#include <mdeobjectdef.h>
+#include <mdenamespacedef.h>
+#include <mdesession.h>
+
+//////////////////////////////
+//                          //
+//        TMdEObject        //
+//                          //
+//////////////////////////////
+
+EXPORT_C TMdEObject::TMdEObject() : 
+	iDef( NULL )
+	{
+	}
+
+EXPORT_C TItemId TMdEObject::Id() const
+	{
+	}
+
+EXPORT_C const CMdEObjectDef& TMdEObject::DefL() const
+	{
+	}
+
+EXPORT_C TBool TMdEObject::Confidential() const
+	{
+	}
+
+EXPORT_C TBool TMdEObject::Placeholder() const
+	{
+	}
+
+EXPORT_C TBool TMdEObject::Removed() const
+	{
+	}
+
+EXPORT_C TBool TMdEObject::NotPresent() const
+	{
+	}
+
+TUint32 TMdEObject::RequiredBufferSize()
+	{
+	}
+
+void TMdEObject::DeSerializeL(CMdCSerializationBuffer& aBuffer, 
+		CMdENamespaceDef& aNamespaceDef)
+	{
+	}
+
+//////////////////////////////
+//                          //
+//        CMdEObject        //
+//                          //
+//////////////////////////////
+
+CMdEObject* CMdEObject::NewL( CMdEObjectDef& aDef, const TDesC& aUri, TUint32 aMediaId )
+	{
+    CMdEObject* nev = new CMdEObject(NULL,aMediaId,aDef);
+    return nev;
+	}
+
+CMdEObject* CMdEObject::NewLC( CMdEObjectDef& aDef, const TDesC& aUri, TUint32 aMediaId )
+	{
+    CMdEObject* nev = new CMdEObject(NULL,aMediaId,aDef);
+    CleanupStack::PushL( nev );
+    return nev;
+	}
+
+CMdEObject::CMdEObject(CMdESession* aSession, TItemId aId, CMdEObjectDef& aDef)
+		: CMdEInstanceItem( aSession, aId), iDef( &aDef )
+	{
+	}
+
+void CMdEObject::ConstructL( const TDesC& aUri, TUint32 aMediaId )
+	{
+   	}
+
+CMdEObject::~CMdEObject()
+	{
+    delete iProperty;
+	}
+
+EXPORT_C CMdEObjectDef& CMdEObject::Def() const
+	{
+	}
+
+EXPORT_C void CMdEObject::SetDefL(CMdEObjectDef& aDef)
+	{
+	}
+
+EXPORT_C const TDesC& CMdEObject::Uri() const
+	{
+    return KNullDesC();
+	}
+
+EXPORT_C void CMdEObject::SetUriL(const TDesC& aUri)
+	{
+	}
+
+EXPORT_C TUint32 CMdEObject::MediaId() const
+	{
+	}
+
+EXPORT_C void CMdEObject::SetMediaId(TUint32 aMediaId)
+	{
+	}
+
+EXPORT_C TUint32 CMdEObject::UsageCount() const
+	{
+	}
+
+EXPORT_C void CMdEObject::Guid( TInt64& aGuidHigh, TInt64& aGuidLow ) const
+	{
+	}
+	
+EXPORT_C void CMdEObject::SetGuid( const TInt64& aGuidHigh, const TInt64& aGuidLow )
+	{
+	}
+
+
+EXPORT_C TBool CMdEObject::Confidential() const
+	{
+	}
+
+EXPORT_C void CMdEObject::SetConfidential( TBool aValue )
+	{
+    
+	}
+
+EXPORT_C TBool CMdEObject::Placeholder() const
+	{
+	}
+
+EXPORT_C void CMdEObject::SetPlaceholder( TBool aValue )
+	{
+	}
+
+void CMdEObject::DoSetUriL(const TDesC& aUri)
+	{
+	}
+
+EXPORT_C TInt CMdEObject::PropertyCount() const
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::PropertyL(TInt aIndex) const
+	{
+	}
+
+EXPORT_C TInt CMdEObject::PropertyCount(const CMdEPropertyDef& aDef) const
+	{
+	}
+
+EXPORT_C TInt CMdEObject::Property(const CMdEPropertyDef& aDef, CMdEProperty*& aProperty, TInt aStartAt) const
+    {
+    if( !iProperty )
+        {
+        iProperty = new CMdEProperty();
+        }
+    
+    aProperty = iProperty;
+    }
+    
+EXPORT_C CMdEProperty& CMdEObject::AddBoolPropertyL(CMdEPropertyDef& aDef, TBool aValue)
+	{
+
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddInt8PropertyL(CMdEPropertyDef& aDef, TInt8 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddUint8PropertyL(CMdEPropertyDef& aDef, TUint8 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddInt16PropertyL(CMdEPropertyDef& aDef, TInt16 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddUint16PropertyL(CMdEPropertyDef& aDef, TUint16 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddInt32PropertyL(CMdEPropertyDef& aDef, TInt32 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddUint32PropertyL(CMdEPropertyDef& aDef, TUint32 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddInt64PropertyL(CMdEPropertyDef& aDef, TInt64 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddReal32PropertyL(CMdEPropertyDef& aDef, TReal32 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddReal64PropertyL(CMdEPropertyDef& aDef, TReal64 aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddTextPropertyL(CMdEPropertyDef& aDef, const TDesC& aValue)
+	{
+	}
+
+EXPORT_C CMdEProperty& CMdEObject::AddTimePropertyL(CMdEPropertyDef& aDef, TTime aValue)
+	{
+
+	}
+
+void CMdEObject::DoAddPropertyL(CMdEProperty& aProperty)
+	{
+	}
+
+EXPORT_C void CMdEObject::RemoveProperty(TInt aIndex)
+	{
+	}
+
+TInt CMdEObject::CompareProperties(const CMdEProperty& aFirst, const CMdEProperty& aSecond)
+	{
+	}
+
+EXPORT_C TInt CMdEObject::FreeTextCount() const
+	{
+	return iFreeTextArray.Count();
+	}
+
+EXPORT_C TPtrC CMdEObject::FreeText(TInt aIndex) const
+	{
+	return *iFreeTextArray[aIndex];
+	}
+
+EXPORT_C TInt CMdEObject::FreeTextIndex(const TDesC& aFreeText) const
+	{
+	}
+
+EXPORT_C void CMdEObject::AddFreeTextL(const TDesC& aFreeText)
+	{
+	}
+
+TInt CMdEObject::DoAddFreeTextL(const HBufC& aFreeText)
+	{
+	}
+
+EXPORT_C void CMdEObject::RemoveFreeText(TInt aIndex)
+	{
+	}
+
+TInt CMdEObject::CompareFreeTexts(const HBufC& aFirst, const HBufC& aSecond)
+	{
+	}
+
+EXPORT_C void CMdEObject::MovePropertiesL(CMdEObject& aObject)
+	{
+	}
+
+
+TBool CMdEObject::ObjectModified() const
+    {
+    }
+
+TBool CMdEObject::FreeTextModified() const
+    {
+    }
+
+TBool CMdEObject::PropertyModified() const
+    {
+    }
+
+void CMdEObject::AutoLockL() const
+	{
+	}
+
+EXPORT_C TBool CMdEObject::OpenForModifications() const
+	{
+	}
+
+void CMdEObject::ClearObject( TBool aClearFlags )
+	{
+	}
+
+void CMdEObject::SetNotOpenForModifications()
+	{
+	}
+
+TUint32 CMdEObject::ModifiedPropertiesCount() const
+	{
+	}
+
+TUint32 CMdEObject::RequiredBufferSize() const
+	{
+	}
+
+TMdCOffset CMdEObject::SerializeL(CMdCSerializationBuffer& aBuffer, TMdCOffset aFreespaceOffset) const
+	{
+	}
+
+CMdEObject* CMdEObject::NewL( CMdESession* aSession, CMdCSerializationBuffer& aBuffer, CMdENamespaceDef& aNamespaceDef )
+	{
+	}
+
+
+CMdEObject* CMdEObject::NewLC( CMdESession* aSession, CMdCSerializationBuffer& aBuffer, CMdENamespaceDef& aNamespaceDef )
+	{
+	}
+
+TMdEInstanceType CMdEObject::InstanceType() const
+	{
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeobjectdef.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2005-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 "mdeobjectdef.h"
+#include "mdenamespacedef.h"
+#include "mdepropertydef.h"
+
+
+
+CMdEObjectDef::CMdEObjectDef( const TMdCObjectDef& aObjectDef, CMdENamespaceDef& aNamespaceDef )
+    : iObjectDef( aObjectDef ), iNamespaceDef(aNamespaceDef)
+    {
+    }
+
+CMdEObjectDef* CMdEObjectDef::NewL( const TMdCObjectDef& aObjectDef,
+		CMdCSerializationBuffer& aSchemaBuffer, CMdENamespaceDef& aNamespaceDef )
+    {
+    }
+
+CMdEObjectDef* CMdEObjectDef::NewLC( const TMdCObjectDef& aObjectDef,
+		CMdCSerializationBuffer& aSchemaBuffer, CMdENamespaceDef& aNamespaceDef )
+    {
+    }
+
+void CMdEObjectDef::ConstructL(CMdCSerializationBuffer& aSchemaBuffer)
+    {
+    }
+
+CMdEObjectDef::~CMdEObjectDef()
+    {
+    }
+
+EXPORT_C TDefId CMdEObjectDef::Id() const
+    {
+    }
+
+EXPORT_C CMdENamespaceDef& CMdEObjectDef::NamespaceDef() const
+    {
+    }
+
+EXPORT_C CMdEObjectDef* CMdEObjectDef::ParentL()
+    {
+    }
+
+EXPORT_C const TDesC& CMdEObjectDef::Name() const
+    {
+    }
+
+EXPORT_C TInt CMdEObjectDef::Compare( const CMdEObjectDef& aObjectDef ) const
+    {
+    }
+
+EXPORT_C TInt CMdEObjectDef::PropertyDefCount() const
+    {
+    }
+
+EXPORT_C CMdEPropertyDef& CMdEObjectDef::PropertyDefL(TInt aIndex)
+	{
+	}
+
+EXPORT_C CMdEPropertyDef& CMdEObjectDef::GetPropertyDefL( const TDesC& aName )
+	{
+	}
+
+CMdEPropertyDef* CMdEObjectDef::GetPropertyDefL( const TDesC& aName, CMdEObjectDef* aChild )
+    {    
+    }
+
+CMdEPropertyDef* CMdEObjectDef::GetPropertyDefL(TDefId aId, CMdEObjectDef* aChild)
+    {
+    }
+
+CMdEPropertyDef* CMdEObjectDef::PropertyDefL(TInt aIndex, CMdEObjectDef* /*aChild*/)
+	{
+	}
+
+TInt CMdEObjectDef::CompareProperties(const CMdEPropertyDef& aFirst, const CMdEPropertyDef& aSecond)
+    {
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeobjectquery.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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:  Interface for object query
+*
+*/
+
+
+#include "mdeobjectquery.h"
+#include "mdeobject.h"
+
+
+CMdEObjectQuery::CMdEObjectQuery(CMdESession& aSession, CMdENamespaceDef& aNamespaceDef, 
+		CMdEObjectDef& aObjectDef, RPointerArray<CMdEObjectDef>* aObjectDefs)
+        : CMdEQuery(EQueryTypeObject, aSession, aNamespaceDef), 
+          iObjectDef(aObjectDef), iObjectDefs(aObjectDefs),
+          iFreetextsInResult( ETrue )
+    {
+    }
+CMdEObjectQuery::CMdEObjectQuery()
+        : iObjectDef(*(CMdEObjectDef*)NULL), iObjectDefs((RPointerArray<CMdEObjectDef>*)NULL),
+          iFreetextsInResult( ETrue )
+    {
+    }
+
+void CMdEObjectQuery::ObjectQueryConstructL()
+    {
+    }
+
+CMdEObjectQuery::~CMdEObjectQuery()
+	{
+	}
+
+EXPORT_C CMdEObject& CMdEObjectQuery::Result(TInt aIndex) const
+    {
+    }
+
+EXPORT_C CMdEObjectDef& CMdEObjectQuery::ObjectDef() const
+	{
+	}
+
+EXPORT_C void CMdEObjectQuery::AddPropertyFilterL(const CMdEPropertyDef* aProperty)
+    {
+    }
+
+EXPORT_C void CMdEObjectQuery::ResetPropertyFilter()
+    {
+    }
+    
+RPointerArray<CMdEPropertyDef>& CMdEObjectQuery::PropertyFilter()
+	{
+	}
+
+RPointerArray<CMdEObjectDef>* CMdEObjectQuery::ObjectDefs() const
+	{
+	}
+
+void CMdEObjectQuery::DoCancel() 
+    {
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeorderrule.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#include "mdeorderrule.h"
+#include "mdepropertydef.h"
+
+
+EXPORT_C TMdEOrderRule::TMdEOrderRule(TOrderRuleType aType, TBool aAscending)
+        : iType(aType), 
+          iAscending(aAscending),
+          iCaseSensitive(ETrue)
+    {
+    }
+        
+
+EXPORT_C TMdEOrderRule::TMdEOrderRule(const CMdEPropertyDef& aPropertyDef, TBool aAscending)
+        : iType(EOrderRuleTypeProperty), iPropertyDef(&aPropertyDef), 
+          iAscending(aAscending), iCaseSensitive(ETrue)
+    {
+    }
+
+
+EXPORT_C TOrderRuleType TMdEOrderRule::Type() const
+    {
+    }
+
+
+EXPORT_C void TMdEOrderRule::SetType(TOrderRuleType aType)
+    {
+    }
+
+
+EXPORT_C TBool TMdEOrderRule::Ascending() const
+    {
+    }
+    
+
+EXPORT_C void TMdEOrderRule::SetAscending(TBool aAscending)
+    {
+    }
+
+
+EXPORT_C const CMdEPropertyDef* TMdEOrderRule::PropertyDef() const
+    {
+    }
+
+
+EXPORT_C void TMdEOrderRule::SetPropertyDef(const CMdEPropertyDef& aPropertyDef)
+    {
+    }
+
+EXPORT_C void TMdEOrderRule::SetCaseSensitive(TBool aCaseSensitive)
+    {
+    }
+
+EXPORT_C TBool TMdEOrderRule::CaseSensitive()
+    {
+    }
+
+TUint32 TMdEOrderRule::RequiredBufferSize() const
+	{
+	}
+
+void TMdEOrderRule::SerializeL(CMdCSerializationBuffer& aBuffer, 
+		TMdCOffset& aFreespaceOffset) const
+	{
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdeproperty.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,206 @@
+/*
+* 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:  ?Description
+*
+*/
+
+
+#include "mdeproperty.h"
+#include "mdepropertydef.h"
+#include "mdeobject.h"
+#include "mdeobjectdef.h"
+#include "mdeerror.h"
+#include "mdesession.h"
+
+CMdEProperty::CMdEProperty(const CMdEPropertyDef& aDef, const CMdEObject& aObject)
+		: CMdEInstanceItem( CONST_CAST( CMdESession*, &aDef.NamespaceDef().Session() ), KNoId), 
+		iModFlags(0), iDef(aDef), iObject(aObject)
+	{
+	}
+
+CMdEProperty* CMdEProperty::NewL(const CMdEPropertyDef& aDef, const CMdEObject& aObject)
+    {
+    }
+
+CMdEProperty::CMdEProperty() :  
+        CMdEInstanceItem(  NULL, 0  ), 
+        iDef(const_cast<const CMdEPropertyDef&>( *(CMdEPropertyDef*)0) ), 
+        iObject(*(CMdEObject*)0)
+    {
+    }
+
+CMdEProperty* CMdEProperty::NewLC(const CMdEPropertyDef& aDef, const CMdEObject& aObject)
+    {
+    }
+
+
+CMdEProperty* CMdEProperty::NewL( const CMdEObject& aObject, CMdCSerializationBuffer& aBuffer )
+	{
+	}
+
+CMdEProperty* CMdEProperty::NewLC( const CMdEObject& aObject, CMdCSerializationBuffer& aBuffer )
+	{
+	}
+
+void CMdEProperty::BaseConstructL()
+	{
+	}
+
+CMdEProperty::~CMdEProperty()
+	{
+	}
+
+EXPORT_C const CMdEPropertyDef& CMdEProperty::Def() const
+	{
+	}
+
+EXPORT_C const CMdEObject& CMdEProperty::Object() const
+	{
+	}
+
+EXPORT_C TBool CMdEProperty::Modified() const
+	{
+	}
+
+TUint8 CMdEProperty::ModFlags() const
+	{
+	}
+
+void CMdEProperty::SetRemoved()
+	{
+	}
+
+TBool CMdEProperty::Removed()
+	{
+	}
+
+void CMdEProperty::ClearFlags()
+	{
+	}
+
+void CMdEProperty::SetModified()
+	{
+	}
+
+TMdEInstanceType CMdEProperty::InstanceType() const
+	{
+	}
+
+EXPORT_C TBool CMdEProperty::BoolValueL() const
+	{
+	}
+
+EXPORT_C TInt8 CMdEProperty::Int8ValueL() const
+	{
+	}
+
+EXPORT_C TUint8 CMdEProperty::Uint8ValueL() const
+	{
+	}
+
+EXPORT_C TInt16 CMdEProperty::Int16ValueL() const
+	{
+	}
+
+EXPORT_C TUint16 CMdEProperty::Uint16ValueL() const
+	{
+	}
+
+EXPORT_C TInt32 CMdEProperty::Int32ValueL() const
+	{
+	}
+
+EXPORT_C TUint32 CMdEProperty::Uint32ValueL() const
+	{
+	}
+
+EXPORT_C TInt64 CMdEProperty::Int64ValueL() const
+	{
+	}
+
+EXPORT_C TReal32 CMdEProperty::Real32ValueL() const
+	{
+	}
+
+EXPORT_C TReal64 CMdEProperty::Real64ValueL() const
+	{
+	}
+
+EXPORT_C TTime CMdEProperty::TimeValueL() const
+	{
+	}
+
+EXPORT_C const TDesC& CMdEProperty::TextValueL() const
+	{
+    return KNullDesC();
+	}
+
+
+EXPORT_C void CMdEProperty::SetBoolValueL(TBool aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetInt8ValueL(TInt8 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetUint8ValueL(TUint8 aValue)
+	{
+	}
+
+
+EXPORT_C void CMdEProperty::SetInt16ValueL(TInt16 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetUint16ValueL(TUint16 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetInt32ValueL(TInt32 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetUint32ValueL(TUint32 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetInt64ValueL(TInt64 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetReal32ValueL(TReal32 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetReal64ValueL(TReal64 aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetTimeValueL(const TTime& aValue)
+	{
+	}
+
+EXPORT_C void CMdEProperty::SetTextValueL(const TDesC& aValue)
+    {
+    }
+
+void CMdEProperty::DoSetTextValueL(const TDesC& aValue)
+    {
+	}
+
+TMdCOffset CMdEProperty::SerializeL(CMdCSerializationBuffer& aBuffer, TMdCOffset aFreespaceOffset) const
+	{
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdepropertydef.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2005-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 "mdepropertydef.h"
+
+#include "mdeobjectdef.h"
+#include "mdenamespacedef.h"
+
+
+CMdEPropertyDef::CMdEPropertyDef( const TMdCPropertyDef& aPropertyDef, CMdEObjectDef& aObjectDef )
+    : iPropertyDef(aPropertyDef), iObjectDef(aObjectDef)
+    {
+    }
+
+CMdEPropertyDef* CMdEPropertyDef::NewL( const TMdCPropertyDef& aPropertyDef,
+    CMdCSerializationBuffer& aSchemaBuffer, CMdEObjectDef& aObjectDef )
+    {
+    }
+
+CMdEPropertyDef* CMdEPropertyDef::NewLC( const TMdCPropertyDef& aPropertyDef,
+    CMdCSerializationBuffer& aSchemaBuffer, CMdEObjectDef& aObjectDef )
+    {
+    }
+
+void CMdEPropertyDef::ConstructL( CMdCSerializationBuffer& aSchemaBuffer )
+    {
+    }
+
+CMdEPropertyDef::~CMdEPropertyDef()
+    {
+    }
+
+TDefId CMdEPropertyDef::Id() const
+    {
+    }
+
+TDefId CMdEPropertyDef::ObjectDefId() const
+	{
+	}
+
+EXPORT_C CMdEObjectDef& CMdEPropertyDef::ObjectDef() const
+    {
+    }
+    
+EXPORT_C const TDesC& CMdEPropertyDef::Name() const
+    {
+    }
+
+EXPORT_C TInt CMdEPropertyDef::Compare( const CMdEPropertyDef& aPropertyDef ) const
+    {
+    }
+
+EXPORT_C TPropertyType CMdEPropertyDef::PropertyType() const
+    {
+    }
+
+EXPORT_C TBool CMdEPropertyDef::ReadOnly() const
+    {
+    }
+
+EXPORT_C TBool CMdEPropertyDef::Mandatory() const
+	{
+	}
+
+EXPORT_C TInt32 CMdEPropertyDef::MinInt32ValueL() const
+    {
+    }
+
+EXPORT_C TInt32 CMdEPropertyDef::MaxInt32ValueL() const
+    {
+    }
+
+EXPORT_C TUint32 CMdEPropertyDef::MinUint32ValueL() const
+    {
+    }
+
+EXPORT_C TUint32 CMdEPropertyDef::MaxUint32ValueL() const
+    {
+    }
+
+EXPORT_C TInt64 CMdEPropertyDef::MinInt64ValueL() const
+    {
+    }
+
+EXPORT_C TInt64 CMdEPropertyDef::MaxInt64ValueL() const
+    {
+    }
+
+EXPORT_C TReal CMdEPropertyDef::MinRealValueL() const
+    {
+    }
+
+EXPORT_C TReal CMdEPropertyDef::MaxRealValueL() const
+    {
+    }
+
+EXPORT_C TTime CMdEPropertyDef::MinTimeValueL() const
+    {
+    }
+
+EXPORT_C TTime CMdEPropertyDef::MaxTimeValueL() const
+    {
+    }
+
+EXPORT_C TInt CMdEPropertyDef::MinTextLengthL() const
+    {
+    }
+
+EXPORT_C TInt CMdEPropertyDef::MaxTextLengthL() const
+    {
+    
+    }
+
+EXPORT_C CMdENamespaceDef& CMdEPropertyDef::NamespaceDef() const
+    {
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdequery.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,224 @@
+/*
+* 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:  Query base class
+*
+*/
+
+
+#include "mdequery.h"
+
+#include "mdeorderrule.h"
+#include "mdeinstanceitem.h"
+#include "mdelogiccondition.h"
+#include "mdenamespacedef.h"
+
+
+CMdEQuery::CMdEQuery(TQueryType aType, CMdESession& aSession, CMdENamespaceDef& aNamespaceDef)
+        : iQueryId( 0 ), iSession(aSession), iNamespaceDef(aNamespaceDef), iType(aType), 
+          iResultMode(EQueryResultModeItem), iState(EStateNew), iError(KErrNone), 
+          iObjectResult(NULL), iCountResult(0), iDistinctResults(NULL), iDestroyed(EFalse)
+    {
+    }
+
+
+CMdEQuery::CMdEQuery()
+        : iQueryId( 0 ), iSession(*(CMdESession*)0), iNamespaceDef(*(CMdENamespaceDef*)0), iType((TQueryType)0), 
+          iResultMode(EQueryResultModeItem), iState(EStateNew), iError(KErrNone), 
+          iObjectResult(NULL), iCountResult(0), iDistinctResults(NULL), iDestroyed(EFalse)
+    {
+    }
+
+void CMdEQuery::QueryConstructL()
+    {
+    }
+
+
+CMdEQuery::~CMdEQuery()
+	{
+	}
+
+
+EXPORT_C TQueryType CMdEQuery::Type() const
+    {
+    }
+
+EXPORT_C CMdENamespaceDef& CMdEQuery::NamespaceDef() const
+	{
+	}
+    
+EXPORT_C CMdESession& CMdEQuery::Session() const
+    {
+    }
+
+
+EXPORT_C CMdELogicCondition& CMdEQuery::Conditions() const
+    {
+    }
+    
+    
+EXPORT_C void CMdEQuery::AppendOrderRuleL(const TMdEOrderRule& aRule)
+    {
+    }
+
+
+EXPORT_C void CMdEQuery::InsertOrderRuleL(const TMdEOrderRule& aRule, TInt aPos)
+    {
+    }
+
+
+EXPORT_C TInt CMdEQuery::OrderRuleCount() const
+    {
+    }
+
+
+EXPORT_C void CMdEQuery::RemoveOrderRule(TInt aIndex)
+    {
+    }
+
+
+EXPORT_C TMdEOrderRule CMdEQuery::OrderRule(TInt aIndex) const
+    {   
+    }
+    
+
+EXPORT_C void CMdEQuery::FindL(TUint aMaxCount, TUint aNotifyCount)
+    {
+    }
+
+
+EXPORT_C void CMdEQuery::Cancel()
+    {
+    }
+
+
+EXPORT_C TBool CMdEQuery::IsComplete() const
+    {
+    }
+
+
+EXPORT_C TInt CMdEQuery::Error() const
+    {
+    }
+
+
+EXPORT_C TInt CMdEQuery::Count() const
+    {
+    }
+
+EXPORT_C CMdEItem& CMdEQuery::ResultItem(TInt aIndex) const
+    {
+    }
+
+
+EXPORT_C TItemId CMdEQuery::ResultId(TInt aIndex) const
+    {
+    }
+
+EXPORT_C const RArray<TItemId>& CMdEQuery::ResultIds() const
+	{
+	}
+
+EXPORT_C CMdEItem* CMdEQuery::TakeOwnershipOfResult(TInt aIndex)
+    {
+    }
+
+
+EXPORT_C TBool CMdEQuery::OwnsResult(TInt aIndex)
+    {
+    }
+
+
+EXPORT_C CMdEQuery::TState CMdEQuery::State() const
+    {
+    }
+
+void CMdEQuery::DoCancel()
+    {
+    }
+
+void CMdEQuery::SetState(TState aState)
+    {
+    }
+
+
+void CMdEQuery::AssertInState(TState aState)
+    {
+    }
+    
+
+void CMdEQuery::AssertNotInState(TState aState)
+    {
+    }
+    
+
+void CMdEQuery::NotifyNewResultsL(const RPointerArray<CMdEInstanceItem>& aNewResults)
+    {
+    }
+
+
+void CMdEQuery::NotifyNewResultsL(const RArray<TItemId>& aNewResults)
+    {
+    }
+
+void CMdEQuery::NotifyNewResultsL( const CDesCArray& aNewResults )
+    {
+    }
+
+void CMdEQuery::NotifyNewResults(TUint32 aResult)
+	{
+
+    }
+
+void CMdEQuery::AppendResultsL(const RPointerArray<CMdEInstanceItem>& aNewResults)
+    {
+    }
+
+void CMdEQuery::AppendResultsL(const RArray<TItemId>& aNewResults)
+    {
+    }
+
+void CMdEQuery::AppendResultsL( const CDesCArray& aNewResults )
+    {
+    }
+    
+void CMdEQuery::NotifyCompleted(TInt aError)
+    {
+    }
+
+EXPORT_C void CMdEQuery::AddObserverL(MMdEQueryObserver& aObserver)
+	{
+	}
+
+EXPORT_C void CMdEQuery::RemoveObserver(MMdEQueryObserver& aObserver)
+	{
+	}
+
+EXPORT_C void CMdEQuery::SetResultMode( TQueryResultMode aMode )
+    {    
+    }
+
+EXPORT_C TQueryResultMode CMdEQuery::ResultMode() const
+    {
+    }
+EXPORT_C CMdEItem& CMdEQuery::ResultObjectItem() const
+    {
+    }
+
+EXPORT_C TPtrC16 CMdEQuery::ResultDistinctValue(TInt aIndex) const
+	{
+	}
+
+RArray<TMdEOrderRule>& CMdEQuery::OrderRules()
+	{
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdesession.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* 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:  Metadata engine client session
+*
+*/
+
+
+#include "VcxMyVideosMdsDbTest.h"
+#include "mdesession.h"
+#include "mdesessionimpl.h"
+
+EXPORT_C CMdESession* CMdESession::NewL(MMdESessionObserver& aObserver)
+	{
+    if ( test->mdssessionerror )
+        {
+        return NULL;
+        }
+    return new CMdESessionImpl( aObserver );
+	}
+
+EXPORT_C CMdESession* CMdESession::NewLC(MMdESessionObserver& aObserver)
+	{
+	}
+
+CMdESession::CMdESession()
+	{
+	}
+
+void CMdESession::SessionConstruct()
+	{
+	}
+
+CMdESession::~CMdESession()
+	{
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/mdesessionimpl.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,628 @@
+/*
+* Copyright (c) 2007-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:  Metadata engine client session implementation*
+*/
+
+#include <etel3rdparty.h>
+#include <e32property.h> 
+
+#include "mdesession.h"
+#include "mdesessionimpl.h"
+
+
+#include "mdeobjectdef.h"
+#include "mdeobjectquery.h"
+#include "mderelationdef.h"
+#include "mdeeventdef.h"
+#include "mdeobject.h"
+#include "mderelation.h"
+#include "mdeevent.h"
+
+#include "mdeobjectdef.h"
+#include "mdenamespacedef.h"
+#include "mdedatabuffer.h"
+#include "mdelogiccondition.h"
+#include "mdeobjectcondition.h"
+
+#include "VcxMyVideosMdsDbTest.h"
+
+
+// for CleanupResetAndDestroyPushL
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
+CMdESessionAsyncHandler* CMdESessionAsyncHandler::NewL(MMdESessionObserver& aObserver)
+    {
+    CMdESessionAsyncHandler* self = new CMdESessionAsyncHandler( aObserver );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CMdESessionAsyncHandler::ConstructL()
+    {
+    CTimer::ConstructL();
+    }   
+
+CMdESessionAsyncHandler::~CMdESessionAsyncHandler()
+	{
+	Cancel();
+	}		
+
+void CMdESessionAsyncHandler::RunL()
+	{
+	iObserver.HandleSessionOpened(*(CMdESession*) 0  ,test->mdssessionasyncerror);
+	}
+
+CMdESessionAsyncHandler::CMdESessionAsyncHandler(MMdESessionObserver& aObserver)
+	: CTimer( CActive::EPriorityStandard ), iObserver( aObserver )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+CMdESessionImpl::CMdESessionImpl(MMdESessionObserver& aObserver)
+	: iSessionStartupAO( NULL ), iSessionObserver(&aObserver), 
+	  iSchemaBuffer( NULL ), iNextQueryId( 0 )
+	{
+    iTimer = CMdESessionAsyncHandler::NewL( aObserver );
+    
+    iTimer->After( 1000 );
+	}
+
+CMdESessionImpl::~CMdESessionImpl()
+	{
+    delete iTimer;
+    // No session errors should be sent during deconstruction to avoid possible double deletion
+    iSessionObserver = NULL;
+
+	delete iSchemaBuffer;
+
+	iNotifiers.ResetAndDestroy();
+	iNotifiers.Close();
+
+	
+	iSchemaChunk.Close();
+	
+	iNamespaceDefs.ResetAndDestroy();
+	iNamespaceDefs.Close();
+	
+	delete iSessionStartupAO;
+	}
+
+void CMdESessionImpl::ConstructL()
+	{
+    }
+
+void CMdESessionImpl::Close()
+	{
+	}
+
+TInt CMdESessionImpl::NamespaceDefCount() const
+	{
+	return iNamespaceDefs.Count();
+	}
+
+CMdENamespaceDef& CMdESessionImpl::NamespaceDefL( TInt aIndex )
+	{
+	return *iNamespaceDefs[aIndex];
+	}
+
+CMdENamespaceDef& CMdESessionImpl::GetNamespaceDefL( const TDesC& aName )
+	{
+	const TInt KNamespaceCount = iNamespaceDefs.Count();
+	for ( TInt i = 0; i < KNamespaceCount; ++i )
+		{
+		if ( !aName.Compare( iNamespaceDefs[i]->Name() ) )
+			{
+			return NamespaceDefL( i );
+			}
+		}
+
+	User::Leave( KErrNotFound );
+	return NamespaceDefL( -1 ); // never reached
+	}
+
+CMdENamespaceDef& CMdESessionImpl::GetNamespaceDefL(TDefId aId)
+	{
+	const TInt KNamespaceCount = iNamespaceDefs.Count();
+	for ( TInt i = 0; i < KNamespaceCount; ++i )
+		{
+		if ( iNamespaceDefs[i]->Id() == aId )
+			{
+			return NamespaceDefL( i );
+			}
+		}
+
+	User::Leave( KErrNotFound );
+	return NamespaceDefL( -1 ); // never reached
+	}
+
+CMdENamespaceDef& CMdESessionImpl::GetDefaultNamespaceDefL()
+	{
+	}
+
+CMdEObject* CMdESessionImpl::NewObjectL( CMdEObjectDef& aDef, const TDesC& aUri, TUint32 aMediaId )
+	{
+	CMdEObject* object = NewObjectLC( aDef, aUri, aMediaId );
+	CleanupStack::Pop(object);
+	return object;
+	}
+
+CMdEObject* CMdESessionImpl::NewObjectLC( CMdEObjectDef& aDef, const TDesC& aUri, TUint32 aMediaId )
+	{
+	CMdEObject* object = CMdEObject::NewLC( aDef, aUri, aMediaId );
+	return object;
+	}
+
+void CMdESessionImpl::CommitObjectL(CMdEObject& aObject)
+    {
+    }
+
+void CMdESessionImpl::CommitObjectsL(RPointerArray<CMdEObject>& aObjects)
+    {
+    }
+
+TItemId CMdESessionImpl::CancelObjectL(CMdEObject& aObject)
+    {
+    }
+
+CMdERelation* CMdESessionImpl::NewRelationLC( CMdERelationDef& aDef, TItemId aLeftObjectId, 
+										      TItemId aRightObjectId, TInt32 aParameter )
+	{
+	}
+
+CMdERelation* CMdESessionImpl::NewRelationL( CMdERelationDef& aDef, TItemId aLeftObjectId, 
+										     TItemId aRightObjectId, TInt32 aParameter )
+	{
+	}
+
+
+CMdEEvent* CMdESessionImpl::NewEventLC(CMdEEventDef& aDef, TItemId aObjectId, TTime aTime, const TDesC* aSource, const TDesC* aParticipant)
+	{
+	}
+
+CMdEEvent* CMdESessionImpl::NewEventL(CMdEEventDef& aDef, TItemId aObjectId, TTime aTime, const TDesC* aSource, const TDesC* aParticipant)
+	{
+	}
+	
+void CMdESessionImpl::AddSchemaObserverL(MMdESchemaObserver& aObserver)
+	{
+	}
+
+
+void CMdESessionImpl::RemoveSchemaObserverL(MMdESchemaObserver& aObserver)
+	{
+	}
+
+void CMdESessionImpl::NotifySessionOpened(TInt aError)
+	{
+	}
+
+
+void CMdESessionImpl::NotifyError(TInt aError)
+	{
+	if(iSessionObserver)
+		{
+		iSessionObserver->HandleSessionError(*this, aError);
+		}
+	iSessionState = EMdESessionClosed;
+	}
+
+void CMdESessionImpl::LoadSchemaL()
+	{
+	DoLoadSchemaL();
+	}
+
+void CMdESessionImpl::DoLoadSchemaL()
+    {    }
+
+void CMdESessionImpl::AddRelationDefL( const CMdENamespaceDef &aNamespaceDef, const TDesC &aName )
+	{
+	}
+
+void CMdESessionImpl::AddEventDefL( const CMdENamespaceDef &aNamespaceDef, const TDesC &aName )
+	{
+	}
+
+
+CMdEObject* CMdESessionImpl::GetObjectL( const TItemId aId, CMdENamespaceDef* aNamespaceDef )
+	{}
+	
+CMdEObject* CMdESessionImpl::GetFullObjectL( const TItemId aId, CMdENamespaceDef* aNamespaceDef )
+	{
+	}
+
+CMdEObject* CMdESessionImpl::GetObjectL( const TItemId aId, CMdEObjectDef& aObjectDef )
+	{
+    if( test->mdsoperationleaves )
+        {
+        User::Leave( test->mdsoperationleaves );
+        }
+    if ( test->mdsoperationreturns )
+        {
+        return NULL;
+        }
+    else
+        {
+        CMdEObject* object = CMdEObject::NewL( aObjectDef, KNullDesC(), aId );
+        return object;
+        }
+	}
+
+CMdEObject* CMdESessionImpl::GetObjectL( const TInt64 aGuidHigh, const TInt64 aGuidLow, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::GetFullObjectL( const TInt64 aGuidHigh, const TInt64 aGuidLow, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::GetObjectL( const TInt64 aGuidHigh, const TInt64 aGuidLow, CMdEObjectDef& aObjectDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenObjectL( const TItemId aId, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenFullObjectL( const TItemId aId, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenObjectL( const TItemId aId, CMdEObjectDef& aObjectDef )
+    {
+    if( test->mdsoperationleaves )
+        {
+        User::Leave( test->mdsoperationleaves );
+        }
+    if ( test->mdsoperationreturns )
+        {
+        return NULL;
+        }
+    else
+        {
+        CMdEObject* object = CMdEObject::NewL( aObjectDef, KNullDesC(), aId );
+        return object;
+        }
+    }
+
+CMdEObject* CMdESessionImpl::OpenObjectL( const TInt64 aGuidHigh, const TInt64 aGuidLow, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenFullObjectL( const TInt64 aGuidHigh, const TInt64 aGuidLow, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenObjectL( const TInt64 aGuidHigh, const TInt64 aGuidLow, CMdEObjectDef& aObjectDef )
+    { }
+
+EXPORT_C CMdEObject* CMdESessionImpl::GetObjectL( const TDesC& aUri, CMdENamespaceDef* aNamespaceDef )
+	{}
+    
+CMdEObject* CMdESessionImpl::GetFullObjectL( const TDesC& aUri, CMdENamespaceDef* aNamespaceDef )
+	{}
+    
+CMdEObject* CMdESessionImpl::GetObjectL( const TDesC& aUri, CMdEObjectDef& aObjectDef )
+    { }
+
+    
+CMdEObject* CMdESessionImpl::OpenObjectL( const TDesC& aUri, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenFullObjectL( const TDesC& aUri, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdEObject* CMdESessionImpl::OpenObjectL( const TDesC& aUri, CMdEObjectDef& aObjectDef )
+    { 
+    CMdEObject* object = CMdEObject::NewLC( aObjectDef, aUri, 0 );
+    return object;
+    }
+
+void CMdESessionImpl::CheckObjectL( TMdEObject& aObject, const TDesC& aUri, 
+		CMdENamespaceDef* aNamespaceDef )
+	{}
+
+void CMdESessionImpl::CheckObjectL( TMdEObject& aObject, TItemId aId, 
+		CMdENamespaceDef* aNamespaceDef )
+	{}
+
+void CMdESessionImpl::CheckObjectL( RArray<TMdEObject>& aObjects, 
+		const RArray<TItemId>& aIds, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+CMdERelation* CMdESessionImpl::GetRelationL(TItemId aId, CMdENamespaceDef* aNamespaceDef)
+    { }
+
+
+CMdEEvent* CMdESessionImpl::GetEventL(TItemId aId, 
+		CMdENamespaceDef* aNamespaceDef)
+    {}
+CMdCSerializationBuffer* CMdESessionImpl::RemoveCommonL( 
+		CMdENamespaceDef& aNamespaceDef, const RArray<TItemId>* aObjects,
+		const RArray<TItemId>* aEvents, const RArray<TItemId>* aRelations )
+	{}
+
+CMdCSerializationBuffer* CMdESessionImpl::RemoveCommonL( 
+		CMdENamespaceDef& aNamespaceDef, 
+		const RPointerArray<TDesC16>* aObjects,
+		const RArray<TItemId>* aEvents, const RArray<TItemId>* aRelations )
+	{
+	}
+
+TInt CMdESessionImpl::DeserializeIdsL( RMdEDataBuffer& aSerializedItemIds, 
+		RArray<TItemId>* aResultObjects, RArray<TItemId>* aResultEvents, 
+		RArray<TItemId>* aResultRelations )
+	{}
+
+TItemId CMdESessionImpl::RemoveObjectL( TItemId aId, 
+		CMdENamespaceDef* aNamespaceDef )
+    {
+    if ( test->mdsoperationleaves )
+        {
+        User::Leave( test->mdsoperationleaves );
+        }
+    else if ( test->mdsoperationreturns )
+        {
+        return 0;
+        }
+    else
+        {
+        return 1;
+        }
+    }
+
+TItemId CMdESessionImpl::RemoveObjectL( const TDesC& aUri, 
+		CMdENamespaceDef* aNamespaceDef )
+    { }
+
+TInt CMdESessionImpl::RemoveObjectsL( const RArray<TItemId>& aId, 
+		RArray<TItemId>& aResult, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+TInt CMdESessionImpl::RemoveObjectsL( const RPointerArray<TDesC>& aUri, 
+		RArray<TItemId>& aResult, CMdENamespaceDef* aNamespaceDef )
+	{}
+
+void CMdESessionImpl::RemoveObjectsAsyncL( 
+		const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+		RMdEDataBuffer& aSerializedObjectIds, 
+		CMdENamespaceDef* aNamespaceDef )
+	{}
+	
+void CMdESessionImpl::RemoveObjectsAsyncL( 
+		const RPointerArray<TDesC>& aUri, TRequestStatus& aStatus, 
+		RMdEDataBuffer& aSerializedObjectIds, 
+		CMdENamespaceDef* aNamespaceDef )
+	{}
+
+TItemId CMdESessionImpl::RemoveRelationL(TItemId aId, 
+		CMdENamespaceDef* aNamespaceDef)
+    {}
+
+TInt CMdESessionImpl::RemoveRelationsL(const RArray<TItemId>& aId, 
+		RArray<TItemId>& aSuccessful, CMdENamespaceDef* aNamespaceDef)
+	{}
+
+void CMdESessionImpl::RemoveRelationsAsyncL(
+		const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+		RMdEDataBuffer& aSerializedRelationIds, 
+		CMdENamespaceDef* aNamespaceDef)
+	{}
+
+/**
+* Add methods
+*/
+TItemId CMdESessionImpl::AddItemL( CMdEInstanceItem& aItem )
+	{}
+
+CMdCSerializationBuffer* CMdESessionImpl::SerializeItemsL( 
+		RPointerArray<CMdEInstanceItem>& aItems )
+    { }
+
+void CMdESessionImpl::DeserializeQueryResultL( 
+		CMdCSerializationBuffer& aBuffer, 
+		RPointerArray<CMdEInstanceItem>& aItems )
+	{}
+
+TItemId CMdESessionImpl::AddObjectL( CMdEObject& aObject )
+    {
+    if( test->mdsoperationleaves )
+        {
+        User::Leave( test->mdsoperationleaves );
+        }
+    if ( test->mdsoperationreturns )
+        {
+        return 0;
+        }
+    else
+        {
+        return 1;
+        }
+    }
+
+TInt CMdESessionImpl::AddObjectsL( RPointerArray<CMdEObject>& aObjects )
+    {
+    }
+
+TItemId CMdESessionImpl::AddRelationL( CMdERelation& aRelation ) 
+    {
+    }
+
+TItemId CMdESessionImpl::UpdateRelationL( CMdERelation& aRelation ) 
+    {
+    }
+
+TInt CMdESessionImpl::AddItemsL( RPointerArray<CMdEInstanceItem>& aItems )
+    {    
+    }
+
+void CMdESessionImpl::AddItemsAsyncL( 
+		RPointerArray<CMdEInstanceItem>& aItems, TRequestStatus& aStatus, 
+		RMdEDataBuffer& aSerializedItemIds )
+    {    
+    }
+
+TInt CMdESessionImpl::UpdateItemsL( RPointerArray<CMdEInstanceItem>& aItems )
+    {    }
+void CMdESessionImpl::UpdateItemsAsyncL( 
+		RPointerArray<CMdEInstanceItem>& aItems, TRequestStatus& aStatus,
+		RMdEDataBuffer& aSerializedItemIds )
+    {
+
+    }
+
+TInt CMdESessionImpl::DeserializeItemsL( RMdEDataBuffer& aSerializedItems, 
+		RPointerArray<CMdEInstanceItem>& aItems )
+	{
+	}
+
+TItemId CMdESessionImpl::AddEventL( CMdEEvent& aEvent )
+    {
+    }
+
+TItemId CMdESessionImpl::RemoveEventL( TItemId aId, 
+		CMdENamespaceDef* aNamespaceDef )
+    {
+    }
+
+TInt CMdESessionImpl::RemoveEventsL( const RArray<TItemId>& aId, 
+		RArray<TItemId>& aSuccessful, CMdENamespaceDef* aNamespaceDef )
+	{
+	}    
+	
+void CMdESessionImpl::RemoveEventsAsyncL( 
+		const RArray<TItemId>& aId, TRequestStatus& aStatus, 
+		RMdEDataBuffer& aSerializedEventIds, 
+		CMdENamespaceDef* aNamespaceDef )
+	{
+	}
+	
+
+// Query 
+
+CMdEObjectQuery* CMdESessionImpl::NewObjectQueryL(
+		CMdENamespaceDef& aNamespaceDef, CMdEObjectDef& aObjectDef, 
+		MMdEQueryObserver* aObserver)
+    {    
+    return new CMdEObjectQuery();
+    }
+
+CMdEObjectQuery* CMdESessionImpl::NewObjectQueryL(
+		CMdEObjectDef& aObjectDef, RPointerArray<CMdEObjectDef>* aObjectDefs, 
+		MMdEQueryObserver* aObserver)
+	{
+	}
+
+CMdERelationQuery* CMdESessionImpl::NewRelationQueryL(
+		CMdENamespaceDef& aNamespaceDef, MMdEQueryObserver* aObserver)
+    {}
+CMdEEventQuery* CMdESessionImpl::NewEventQueryL(
+		CMdENamespaceDef& aNamespaceDef, MMdEQueryObserver* aObserver)
+    {}
+void CMdESessionImpl::AddObjectObserverL( MMdEObjectObserver& aObserver,
+    									  CMdELogicCondition* aCondition, 
+     									  TUint32 aNotificationType,
+    									  CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::AddObjectObserverWithUriL( MMdEObjectObserverWithUri& aObserver,
+                                          CMdELogicCondition* aCondition, 
+                                          TUint32 aNotificationType,
+                                          CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::AddObjectPresentObserverL(
+		MMdEObjectPresentObserver& aObserver)
+	{}
+void CMdESessionImpl::RemoveObjectObserverWithUriL( 
+        MMdEObjectObserverWithUri& aObserver, CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::AddRelationObserverL( MMdERelationObserver& aObserver,
+    										CMdECondition* aCondition, 
+    										TUint32 aNotificationType,
+    										CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::AddRelationItemObserverL( 
+		MMdERelationItemObserver& aObserver, CMdECondition* aCondition, 
+		TUint32 aNotificationType, CMdENamespaceDef* aNamespaceDef )
+	{}
+void CMdESessionImpl::AddRelationPresentObserverL(
+		MMdERelationPresentObserver& aObserver)
+	{}
+void CMdESessionImpl::AddEventObserverL( MMdEEventObserver& aObserver,
+    									 CMdECondition* aCondition, 
+    									 TUint32 aNotificationType,
+    									 CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::RemoveObjectObserverL( 
+		MMdEObjectObserver& aObserver, CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::RemoveObjectPresentObserverL(
+		MMdEObjectPresentObserver& aObserver)
+	{}
+void CMdESessionImpl::RemoveRelationObserverL( 
+		MMdERelationObserver& aObserver, CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::RemoveRelationItemObserverL( 
+		MMdERelationItemObserver& aObserver, CMdENamespaceDef* aNamespaceDef )
+    {}
+void CMdESessionImpl::RemoveRelationPresentObserverL(
+		MMdERelationPresentObserver& aObserver)
+	{}
+void CMdESessionImpl::RemoveEventObserverL( 
+		MMdEEventObserver& aObserver, CMdENamespaceDef* aNamespaceDef )
+    {}
+TInt CMdESessionImpl::FindNotifier( TUint32 aNotifyType, TAny* aObserver, 
+									CMdENamespaceDef& aNamespaceDef )
+    {}
+void CMdESessionImpl::NotifierInError( CMdENotifierAO* aNotifier )
+    {}
+void CMdESessionImpl::ImportSchemaL( const TDesC& aFileName )
+    {}
+TInt CMdESessionImpl::ImportMetadataL( const TDesC& aFileName )
+    {}
+void CMdESessionImpl::ImportMetadata( const TDesC& aFileName, 
+		TPckgBuf<TInt>& aResult, TRequestStatus& aStatus )
+	{}
+CMdCSerializationBuffer* CMdESessionImpl::ExportCommonL( 
+		const CMdENamespaceDef* aNamespaceDef,
+		const RPointerArray<CMdEObjectDef>* aObjectDefs,
+        const RPointerArray<CMdERelationDef>* aRelationDefs,
+        const RPointerArray<CMdEEventDef>* aEventDefs )
+	{}
+void CMdESessionImpl::ExportMetadataL( const TDesC& aFileName,
+    	const CMdENamespaceDef* aNamespaceDef,
+	    const RPointerArray<CMdEObjectDef>* aObjectDefs,
+        const RPointerArray<CMdERelationDef>* aRelationDefs,
+        const RPointerArray<CMdEEventDef>* aEventDefs )
+    {}
+
+void CMdESessionImpl::ExportMetadataL( const TDesC& aFileName, 
+		TRequestStatus& aStatus, RMdEDataBuffer& aBuffer, 
+        const CMdENamespaceDef* aNamespaceDef, 
+	    const RPointerArray<CMdEObjectDef>* aObjectDefs, 
+        const RPointerArray<CMdERelationDef>* aRelationDefs, 
+        const RPointerArray<CMdEEventDef>* aEventDefs )
+    {}
+void CMdESessionImpl::GetSchemaVersionL(
+		TInt& aMajorVersion, TInt& aMinorVersion)
+	{}
+void CMdESessionImpl::SetObjectToPresentByGuidL( 
+		const TInt64& aGuidHigh, const TInt64& aGuidLow )
+	{}
+void CMdESessionImpl::CheckOpened() const {}
+void CMdESessionImpl::GetCountL( CMdCSerializationBuffer* aBuffer, 
+		TUint32& aResult )
+	{}
+void CMdESessionImpl::GetItemIdL( CMdCSerializationBuffer* aBuffer, 
+		RArray<TItemId>& aIdArray )
+	{}
+void CMdESessionImpl::GetDistinctValuesL( CMdCSerializationBuffer& aBuffer, 
+		CDesCArray& aResults )
+	{}
+CMdENamespaceDef* CMdESessionImpl::GetNamespaceDefL( 
+		CMdENamespaceDef* aNamespaceDef )
+	{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/mpxmyvideoscollection/tsrc/ut_vcxmyvideosmdsdb/src/vcxmyvideoscollectionutil.cpp	Tue May 25 12:44:54 2010 +0300
@@ -0,0 +1,232 @@
+/*
+* 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 the License "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 FILES
+#include <mpxmedia.h>
+#include <mpxmediaarray.h>
+#include <mpxlog.h>
+#include <mpxmediacontainerdefs.h>
+#include <mpxmediageneraldefs.h>
+#include <vcxmyvideosdefs.h>
+#include <mpxmessagecontainerdefs.h>
+#include <bautils.h>
+#include <mpxmediavideodefs.h>
+#ifdef _DEBUG
+#include <flogger.h>
+#include <f32file.h> 
+#endif
+#include "vcxmyvideoscollectionutil.h"
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtil::CreateEmptyMediaListL
+// ----------------------------------------------------------------------------
+//
+CMPXMedia* TVcxMyVideosCollectionUtil::CreateEmptyMediaListL()
+    {
+    RArray<TInt> supportedIds;
+    CleanupClosePushL( supportedIds ); // 1->
+                
+    supportedIds.AppendL( KMPXMediaIdContainer );
+    supportedIds.AppendL( KMPXMediaIdGeneral );
+
+    //create container
+    CMPXMedia* container = CMPXMedia::NewL( supportedIds.Array() );
+    CleanupStack::PushL( container ); // 2->
+
+    CMPXMediaArray* mediaArray = CMPXMediaArray::NewL();
+    CleanupStack::PushL( mediaArray ); // 3->
+
+    container->SetCObjectValueL( KMPXMediaArrayContents, mediaArray );
+
+    CleanupStack::PopAndDestroy( mediaArray );    // <-3
+    CleanupStack::Pop( container );               // <-2    
+    CleanupStack::PopAndDestroy( &supportedIds ); // <-1
+    return container;
+    }
+
+// ----------------------------------------------------------------------------
+// CVcxMyVideosCollectionUtil::CreateEmptyMessageListL
+// ----------------------------------------------------------------------------
+//
+CMPXMedia* TVcxMyVideosCollectionUtil::CreateEmptyMessageListL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::CopyFromListToListL
+// ---------------------------------------------------------------------------
+//
+void TVcxMyVideosCollectionUtil::CopyFromListToListL(
+        CMPXMedia& aFromList,
+        CMPXMedia& aToList,
+        RArray<TUint32>& aMdsIds )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::CopyFromListToListL
+// ---------------------------------------------------------------------------
+//
+void TVcxMyVideosCollectionUtil::CopyFromListToListL(
+        RArray<CMPXMedia*>& aFromArray,
+        CMPXMedia& aToList,
+        RArray<TUint32>& aMdsIds )
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// This helper function converts drive letter to drive number
+// ---------------------------------------------------------------------------
+//
+TInt TVcxMyVideosCollectionUtil::DriveLetter2DriveNumber( const TDesC &aDrive )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::MakeUniqueFileNameL
+// ---------------------------------------------------------------------------
+//
+void TVcxMyVideosCollectionUtil::MakeUniqueFileNameL( RFs& aFs, const TDesC& aPath,
+        TDes& aUniquePath )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::OriginL
+// ----------------------------------------------------------------------------
+//
+TUint8 TVcxMyVideosCollectionUtil::OriginL( CMPXMedia& aVideo )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::FlagsL
+// ----------------------------------------------------------------------------
+//
+TUint32 TVcxMyVideosCollectionUtil::FlagsL( CMPXMedia& aVideo )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::DownloadIdL
+// ----------------------------------------------------------------------------
+//
+TUint32 TVcxMyVideosCollectionUtil::DownloadIdL( CMPXMedia& aVideo )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::DownloadStateL
+// ----------------------------------------------------------------------------
+//
+TVcxMyVideosDownloadState TVcxMyVideosCollectionUtil::DownloadStateL( CMPXMedia& aVideo )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::IdL
+// ----------------------------------------------------------------------------
+//
+TMPXItemId TVcxMyVideosCollectionUtil::IdL( CMPXMedia& aVideo )
+    {
+    }
+
+
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::DurationL
+// ----------------------------------------------------------------------------
+//
+TReal32 TVcxMyVideosCollectionUtil::DurationL( CMPXMedia& aVideo )
+    {
+    }
+
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::Title
+// ----------------------------------------------------------------------------
+//
+const TDesC& TVcxMyVideosCollectionUtil::Title( CMPXMedia& aVideo )
+    {                            
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::RatingL
+// ----------------------------------------------------------------------------
+//
+TUint8 TVcxMyVideosCollectionUtil::RatingL( CMPXMedia& aVideo )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::AudioFourCcL
+// ----------------------------------------------------------------------------
+//
+TUint32 TVcxMyVideosCollectionUtil::AudioFourCcL( CMPXMedia& aVideo )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::AreSupported
+// ----------------------------------------------------------------------------
+//
+TBool TVcxMyVideosCollectionUtil::AreSupported( CMPXMedia& aVideo,
+        const TArray<TMPXAttribute>& aAttrs,
+        TBool& aNonSupportedAttrCanBeFoundFromMds )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::AttrBelongsToFullSet
+// ----------------------------------------------------------------------------
+//
+TBool TVcxMyVideosCollectionUtil::AttrBelongsToFullSet( const TMPXAttribute& aAttr )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::Origin
+// ----------------------------------------------------------------------------
+//
+TInt TVcxMyVideosCollectionUtil::Origin( TInt aCategoryId )
+    {
+    }
+    
+#ifdef _DEBUG
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::PrintOpenFileHandlesL
+// ----------------------------------------------------------------------------
+//
+void TVcxMyVideosCollectionUtil::PrintOpenFileHandlesL( const TDesC& aFileName, RFs& aFs )
+    {
+    }   
+
+// ----------------------------------------------------------------------------
+// TVcxMyVideosCollectionUtil::GetProcessName
+// ----------------------------------------------------------------------------
+//
+void TVcxMyVideosCollectionUtil::GetProcessName( TInt aThreadId, TFullName& aProcessName )
+    {
+    }   
+#endif
+   
+// End of file
--- a/videoplayback/inc/mpxvideoplaybackcontainer.h	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/inc/mpxvideoplaybackcontainer.h	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 8 %
+// Version : %version: 9 %
 
 
 #ifndef __CMPXVIDEOPLAYBACKCONTAINER_H__
@@ -231,10 +231,6 @@
         //
         CEikImage*                              iRealOneBitmap;
 
-        TBool                                   iVolumeRepeatUp;
-        TBool                                   iSurfaceCreated;
-        TBool                                   iTvOutConnected;
-
         CMPXVideoPlaybackViewFileDetails*       iFileDetails;
         TKeyResponse                            iKeyResponse;
 
--- a/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 15 %
+// Version : %version: 17 %
 
 
 #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
@@ -26,6 +26,7 @@
 #include <mpxplaybackframeworkdefs.h>
 #include <aknlayoutscalable_avkon.cdl.h>
 #include <f32file.h>
+#include <MMFScalingCustomCommandConstants.h>
 
 #include "mpxvideo_debug.h"
 #include "mpxvideoplaybackviewfiledetails.h"
@@ -117,6 +118,11 @@
         */
         inline TMPXPlaybackState State();
 
+        /*
+         *   Return the Aspect Ratio for the clip
+         */
+        inline TMMFScalingType AspectRatio();
+
         /**
         * Return file details
         */
@@ -129,14 +135,12 @@
 
         void SetRealOneBitmapVisibility( TBool aVisible );
 
-        TBool SetBackgroundBlack();
-
         inline TBool IsRealMediaFormat();
 
         /**
          *  Check aspect ratio icon
-         *  In case that Clip's AR is equals to Screen Display AR, also hide AR icon.  
-         *  
+         *  In case that Clip's AR is equals to Screen Display AR, also hide AR icon.
+         *
          *  @return ETrue in case that clip's AspectRatioIcon can be shown
          */
         TBool ShowAspectRatioIcon();
@@ -362,13 +366,13 @@
         TInt                                    iVideoResourceOffset;
 
         TMPXPlaybackState                       iState;
+        TMMFScalingType                         iAspectRatio;
 
         CMPXVideoPlaybackViewFileDetails*       iFileDetails;     //  not owned
 
         RFs                                     iFs;
         TFileName                               iBitmapFileName;
 
-        TBool                                   iSurfaceCreated;
         TBool                                   iTvOutConnected;
         TBool                                   iRNFormat;
 
@@ -410,6 +414,13 @@
     return iRNFormat;
 }
 
+inline
+TMMFScalingType CMPXVideoPlaybackControlsController::AspectRatio()
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::AspectRatio(%d)"), iAspectRatio);
+    return iAspectRatio;
+}
+
 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_*/
 
 // End of File
Binary file videoplayback/videohelix/conf/mpxvideopbplugins.confml has changed
--- a/videoplayback/videohelix/group/mpxvideohelixplayback.mmp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/group/mpxvideohelixplayback.mmp	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackmode.h	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackstate.h	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplayerutility.h	Tue May 25 12:44:54 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	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Tue May 25 12:44:54 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	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h	Tue May 25 12:44:54 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	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp	Tue May 25 12:44:54 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	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtest.cpp	Tue May 25 12:44:54 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	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Tue May 25 12:44:54 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/videoplayback/videoplaybackcontrols/inc/mpxvideoplaybackaspectratioicon.h	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/inc/mpxvideoplaybackaspectratioicon.h	Tue May 25 12:44:54 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -15,8 +15,8 @@
 *
 */
 
-// Version : %version: 6 %
 
+// Version : %version: 7 %
 
 
 #ifndef MPXVIDEOPLAYBACKASPECTRATIOICON_H
@@ -24,7 +24,6 @@
 
 //  INCLUDES
 #include <coecntrl.h>
-#include <MMFScalingCustomCommandConstants.h>
 
 // FORWARD DECLARATIONS
 class CMPXVideoPlaybackControlsController;
@@ -39,7 +38,7 @@
         /**
         * Two-phased constructor.
         */
-        static CMPXVideoPlaybackAspectRatioIcon* NewL( 
+        static CMPXVideoPlaybackAspectRatioIcon* NewL(
                 CMPXVideoPlaybackControlsController* aController, TRect aRect );
 
         /**
@@ -59,7 +58,7 @@
          */
         void ConstructL( TRect aRect );
 
-    private: 
+    private:
 
         /**
         * From CoeControl,CountComponentControls.
@@ -98,7 +97,6 @@
         CGulIcon*        iStretchIcon;
         CGulIcon*        iZoomIcon;
 
-        TMMFScalingType  iAspectRatio;
         TRect            iAspectRatioRect;
 
 #ifdef RD_TACTILE_FEEDBACK
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackaspectratioicon.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackaspectratioicon.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 12 %
+
+// Version : %version: 14 %
 
 
 // INCLUDE FILES
@@ -50,7 +51,7 @@
 //
 void CMPXVideoPlaybackAspectRatioIcon::ConstructL( TRect aRect )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::ConstructL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::ConstructL()"));
 
     SetRect( TRect( 0, 0, aRect.Width(), aRect.Height() ) );
 
@@ -93,7 +94,7 @@
 //
 CMPXVideoPlaybackAspectRatioIcon::~CMPXVideoPlaybackAspectRatioIcon()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::~CMPXVideoPlaybackAspectRatioIcon()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::~CMPXVideoPlaybackAspectRatioIcon()"));
 
     if ( iNaturalIcon )
     {
@@ -114,7 +115,7 @@
     }
 
 #ifdef RD_TACTILE_FEEDBACK
-    if (iFeedback)
+    if ( iFeedback )
     {
         iFeedback->RemoveFeedbackForControl(this);
     }
@@ -127,7 +128,7 @@
 //
 void CMPXVideoPlaybackAspectRatioIcon::SkinChangeL()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::SkinChangeL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::SkinChangeL()"));
 
     //
     // Create icons
@@ -218,33 +219,20 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-            gc.Clear( aRect );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-            gc.Clear( aRect );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
+        gc.Clear( aRect );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        // draw a solid background so that the entire progress
-        // bar is shown not just the area representing the
-        // portion that has been played.
-        gc.SetBrushColor( KRgbBlack );
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.DrawRect( aRect );
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+        gc.Clear( aRect );
     }
 
-    switch( iAspectRatio )
+    switch ( iController->AspectRatio() )
     {
         case EMMFStretch:
         {
@@ -282,7 +270,8 @@
 //
 void CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL( const TPointerEvent& aPointerEvent )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL()"),
+                   _L("aPointerEvent.iType = %d"), aPointerEvent.iType );
 
     if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
     {
@@ -301,7 +290,7 @@
     {
         TMPXVideoPlaybackViewCommandIds cmd = EMPXPbvCmdNaturalAspectRatio;
 
-        switch ( iAspectRatio )
+        switch ( iController->AspectRatio() )
         {
             case EMMFStretch:
             {
@@ -327,8 +316,6 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::AspectRatioChanged() (%d)"), aAspectRatio);
 
-    iAspectRatio = (TMMFScalingType)aAspectRatio;
-
     if ( IsVisible() )
     {
         DrawNow();
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbrandinganimation.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbrandinganimation.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 9 %
+
+// Version : %version: 10 %
 
 
 // INCLUDE FILES
@@ -217,30 +218,17 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-            gc.Clear( aRect );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-            gc.Clear( aRect );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
+        gc.Clear( aRect );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        // draw a solid background so that the entire progress
-        // bar is shown not just the area representing the
-        // portion that has been played.
-        gc.SetBrushColor( KRgbBlack );
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.DrawRect( aRect );
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+        gc.Clear( aRect );
     }
 
     //
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbutton.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbutton.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,8 +15,8 @@
 *
 */
 
-// Version : %version: 9 %
 
+// Version : %version: 10 %
 
 
 // INCLUDE FILES
@@ -39,7 +39,7 @@
 // Symbian 2nd phase constructor can leave.
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackButton::ConstructL( CMPXVideoPlaybackControlsController* aController, 
+void CMPXVideoPlaybackButton::ConstructL( CMPXVideoPlaybackControlsController* aController,
                                           TRect aRect, const TDesC &aIconPath )
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackButton::ConstructL()"));
@@ -55,8 +55,9 @@
 // Two-phased constructor.
 // -------------------------------------------------------------------------------------------------
 //
-CMPXVideoPlaybackButton* CMPXVideoPlaybackButton::NewL( CMPXVideoPlaybackControlsController* aController, 
-                                                        TRect aRect, const TDesC &aIconPath)
+CMPXVideoPlaybackButton*
+CMPXVideoPlaybackButton::NewL( CMPXVideoPlaybackControlsController* aController,
+                               TRect aRect, const TDesC &aIconPath )
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackButton::NewL()"));
 
@@ -196,33 +197,20 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-            gc.Clear( aRect );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-            gc.Clear( aRect );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
+        gc.Clear( aRect );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        // draw a solid background so that the entire progress
-        // bar is shown not just the area representing the
-        // portion that has been played.
-        gc.SetBrushColor( KRgbBlack );
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.DrawRect( aRect );
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+        gc.Clear( aRect );
     }
 
-    switch( iState )
+    switch ( iState )
     {
         case EMPXButtonNormal:
         {
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 19 %
+// Version : %version: 20 %
 
 
 // INCLUDE FILES
@@ -133,7 +133,7 @@
     iController->LocateBitmapFileL( iconsPath );
 
     //
-    // Since button bar has 3 visible buttons - divide the height of aRect by 3
+    //  Since button bar has 3 visible buttons - divide the height of aRect by 3
     //
     TInt iconSize = Rect().Height() / 3;
     TInt leftOffset = ( Rect().Width() - iconSize ) / 2 ;
@@ -279,14 +279,13 @@
 //
 void CMPXVideoPlaybackButtonBar::HandlePointerEventL( const TPointerEvent& aPointerEvent )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandlePointerEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandlePointerEventL()"));
 
     switch ( aPointerEvent.iType )
     {
         case TPointerEvent::EButton1Down:
         {
             HandleButtonDownEventL( aPointerEvent );
-
             break;
         }
         case TPointerEvent::EButton1Up:
@@ -309,10 +308,6 @@
             {
                 HandleMiddleButtonUpEventL();
             }
-            else
-            {
-                //Pass an event to controller to call toggle visibility
-            }
 
             iButtonPressed = EMPXNotPressed;
             break;
@@ -326,7 +321,7 @@
 //
 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()"));
 
     if ( iSeekingTimer->IsActive() )
     {
@@ -371,7 +366,7 @@
 //
 void CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL( const TPointerEvent& aPointerEvent )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL()"));
 
     if ( iSeekingTimer->IsActive() )
     {
@@ -416,7 +411,7 @@
 //
 void CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL()"));
 
     switch ( iController->State() )
     {
@@ -466,7 +461,7 @@
 //
 void CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL( const TPointerEvent& aPointerEvent )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL()"));
 
     if ( iSeekingTimer->IsActive() )
     {
@@ -495,7 +490,7 @@
         }
         else
         {
-			// Short press backward:
+            // Short press backward:
             iController->HandleCommandL( EMPXPbvCmdShortPressBackward );
         }
     }
@@ -522,7 +517,7 @@
 //
 void CMPXVideoPlaybackButtonBar::DoStartSeekingL()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::DoStartSeekingL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::DoStartSeekingL()"));
 
 #ifdef RD_TACTILE_FEEDBACK
     if (iFeedback)
@@ -560,30 +555,17 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-            gc.Clear( aRect );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-            gc.Clear( aRect );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
+        gc.Clear( aRect );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        // draw a solid background so that the entire progress
-        // bar is shown not just the area representing the
-        // portion that has been played.
-        gc.SetBrushColor( KRgbBlack );
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.DrawRect( aRect );
-        gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+        gc.Clear( aRect );
     }
 }
 
@@ -610,12 +592,12 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-// CMPXVideoPlaybackButtonBar::StateChanged()
+// CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar()
 // -------------------------------------------------------------------------------------------------
 //
 void CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar( TMPXPlaybackState aState )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::StateChanged(%d)"), aState);
+    MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar(%d)"), aState);
 
     switch ( aState )
     {
@@ -656,7 +638,6 @@
     }
 }
 
-
 // -------------------------------------------------------------------------------------------------
 // CMPXVideoPlaybackButtonBar::UpdateButtonBarState
 // -------------------------------------------------------------------------------------------------
@@ -671,7 +652,7 @@
         iButtons[EMPXButtonFastForward]->SetDimmed( EFalse );
     }
 
-    if ( !aDetails->iPausableStream )
+    if ( ! aDetails->iPausableStream )
     {
         iButtons[EMPXButtonPause]->SetDimmed( ETrue );
     }
@@ -694,5 +675,4 @@
     }
 }
 
-
 //  End of File
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 21 %
+
+// Version : %version: 22 %
 
 
 // INCLUDE FILES
@@ -174,23 +175,15 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.SetBrushColor( KRgbBlack );
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
     }
 
     gc.Clear( aRect );
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 37 %
+// Version : %version: 41 %
 
 
 // INCLUDE FILES
@@ -79,7 +79,6 @@
     CMPXVideoPlaybackContainer* aContainer, TRect aRect )
     : iControls( EMPXControlsCount ),
       iRect( aRect ),
-      iSurfaceCreated( EFalse ),
       iContainer( aContainer )
 {
 }
@@ -194,6 +193,7 @@
 
     if ( iRealOneBitmap )
     {
+        SetRealOneBitmapVisibility( EFalse );
         delete iRealOneBitmap;
         iRealOneBitmap = NULL ;
     }
@@ -337,6 +337,12 @@
 
             break;
         }
+        case EMPXControlCmdHandleForegroundEvent:
+        {
+            MPX_DEBUG(_L("    [EMPXControlCmdHandleForegroundEvent]"));
+            UpdateControlsVisibility();
+            break;
+        }
         case EMPXControlCmdHandleErrors:
         {
             MPX_DEBUG(_L("    [EMPXControlCmdHandleErrors]"));
@@ -372,15 +378,7 @@
         }
         case EMPXControlCmdSurfaceCreated:
         {
-            iSurfaceCreated = ETrue;
             SetRealOneBitmapVisibility( EFalse );
-            RedrawControlsForSurfaceChanges();
-            break;
-        }
-        case EMPXControlCmdSurfaceRemoved:
-        {
-            iSurfaceCreated = EFalse;
-            RedrawControlsForSurfaceChanges();
             break;
         }
         case EMPXControlCmdLoadingStarted:
@@ -1385,6 +1383,8 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::AspectRatioChanged() [%d]"), aAspectRatio);
 
+    iAspectRatio = (TMMFScalingType)aAspectRatio;
+
     for ( TInt i = 0 ; i < iControls.Count() ; i++ )
     {
         if ( iControls[i]->AspectRatioChanged( aAspectRatio ) )
@@ -1799,7 +1799,7 @@
 void CMPXVideoPlaybackControlsController::HandleTvOutEventL(
         TBool aConnected, TMPXVideoPlaybackControlCommandIds aEvent )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::HandleTvOutEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::HandleTvOutEventL()"));
 
     iFileDetails->iTvOutConnected = aConnected;
     iControlsConfig->UpdateControlListL( aEvent );
@@ -1923,18 +1923,6 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-//   CMPXVideoPlaybackControlsController::SetBackgroundBlack
-// -------------------------------------------------------------------------------------------------
-//
-TBool CMPXVideoPlaybackControlsController::SetBackgroundBlack()
-{
-    TBool backgroundBlack = iSurfaceCreated && ! iTvOutConnected;
-
-    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::SetBackgroundBlack(%d)"), backgroundBlack);
-    return backgroundBlack;
-}
-
-// -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackControlsController::ShowAspectRatioIcon
 // -------------------------------------------------------------------------------------------------
 //
@@ -1982,23 +1970,4 @@
     }
 }
 
-// -------------------------------------------------------------------------------------------------
-//   CMPXVideoPlaybackControlsController::RedrawControlsForSurfaceChanges
-// -------------------------------------------------------------------------------------------------
-//
-void CMPXVideoPlaybackControlsController::RedrawControlsForSurfaceChanges()
-{
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::RedrawControlsForSurfaceChanges()"));
-
-    //
-    //  A surface has been added or removed.
-    //  If the controls are visible, redraw them with the new transparency value.
-    //
-    if ( IsVisible() )
-    {
-        UpdateControlsVisibility();
-    }
-}
-
-
 // End of File
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 22 %
+
+// Version : %version: 23 %
 
 
 // INCLUDE FILES
@@ -484,32 +485,17 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-            gc.Clear( aRect );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-            gc.Clear( aRect );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
+        gc.Clear( aRect );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        //
-        //  draw a solid background so that the entire progress
-        //  bar is shown not just the area representing the
-        //  portion that has been played.
-        //
-        gc.SetBrushColor( KRgbBlack );
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.DrawRect( aRect );
-        gc.SetBrushStyle(CGraphicsContext::ENullBrush);
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+        gc.Clear( aRect );
     }
 
     //
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 22 %
+// Version : %version: 23 %
 
 
 // INCLUDE FILES
@@ -826,30 +826,17 @@
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
 
-    if ( iController->SetBackgroundBlack() )
+    if ( Window().DisplayMode() == EColor16MAP )
     {
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
-            gc.Clear( aRect );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
-            gc.SetBrushColor( TRgb::Color16MA( 0 ) );
-            gc.Clear( aRect );
-        }
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
+        gc.Clear( aRect );
     }
-    else
+    else if ( Window().DisplayMode() == EColor16MA )
     {
-        // draw a solid background so that the entire progress
-        // bar is shown not just the area representing the
-        // portion that has been played.
-        gc.SetBrushColor( KRgbBlack );
-        gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-        gc.DrawRect( aRect );
-        gc.SetBrushStyle(CGraphicsContext::ENullBrush);
+        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+        gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+        gc.Clear( aRect );
     }
 
     if ( ! iController->FileDetails()->iAudioEnabled || iMuted )
--- a/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 77 %
+// Version : %version: 79 %
 
 
 //  Include Files
@@ -1367,7 +1367,7 @@
                 delete iClipName;
                 iClipName = NULL;
             }
-            
+
             TPtrC uri( aMedia.ValueText( KMPXMediaGeneralUri ) );
             iClipName = uri.AllocL();
         }
@@ -2208,7 +2208,12 @@
 
         if ( visible & TWsVisibilityChangedEvent::ENotVisible )
         {
-            MPX_DEBUG(_L("CMpxVideoPlayerAppUi::HandleWsEventL() ENotVisible"));
+            MPX_DEBUG(_L("CMPXVideoBasePlaybackView::HandleWsEventL() ENotVisible"));
+            SendWindowCommandL( EPbCmdHandleBackground );
+        }
+        else if ( ! IsAppInFrontL() )
+        {
+            MPX_DEBUG(_L("CMPXVideoBasePlaybackView::HandleWsEventL() App in Background"));
             SendWindowCommandL( EPbCmdHandleBackground );
         }
     }
@@ -2258,6 +2263,10 @@
         {
             iMediaRequested = EFalse;
 
+            //
+            //  Refresh the screen by removing the surface and resetting the controls
+            //
+            iDisplayHandler->RemoveDisplayWindow();
             iContainer->HandleCommandL( EMPXPbvCmdResetControls );
 
             if ( iFileDetails )
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp	Tue May 25 12:44:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 28 %
+// Version : %version: 29 %
 
 
 // INCLUDE FILES
@@ -419,34 +419,18 @@
     CWindowGc& gc = SystemGc();
 
     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
-
-    //
-    //  Make the window transparent when a surface has been created
-    //  unless TV-Out is connected
-    //
-    if ( iSurfaceCreated && ! iTvOutConnected )
-    {
-        gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+    gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
 
-        if ( Window().DisplayMode() == EColor16MAP )
-        {
-            gc.SetBrushColor( TRgb::Color16MAP(255) );
-        }
-        else if ( Window().DisplayMode() == EColor16MA )
-        {
-            gc.SetBrushColor( TRgb::Color16MA(0) );
-        }
+    if ( Window().DisplayMode() == EColor16MAP )
+    {
+        gc.SetBrushColor( TRgb::Color16MAP(255) );
+    }
+    else if ( Window().DisplayMode() == EColor16MA )
+    {
+        gc.SetBrushColor( TRgb::Color16MA(0) );
+    }
 
-        gc.Clear( aRect );
-    }
-    else
-    {
-        //
-        //  Set the background to black
-        //
-        gc.SetBrushColor( KRgbBlack );
-        gc.DrawRect( aRect );
-    }
+    gc.Clear( aRect );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -466,16 +450,6 @@
     {
         iUserInputHandler->SetForeground(ETrue);
     }
-    else if ( aEvent == EMPXControlCmdTvOutConnected )
-    {
-        iTvOutConnected = ETrue;
-        DrawNow();
-    }
-    else if ( aEvent == EMPXControlCmdTvOutDisconnected )
-    {
-        iTvOutConnected = EFalse;
-        DrawNow();
-    }
 
     iControlsController->HandleEventL( aEvent, aValue );
 }
@@ -498,6 +472,13 @@
         }
         case EMPXPbvCmdResetControls:
         {
+            if ( iRealOneBitmapTimer )
+            {
+                iRealOneBitmapTimer->Cancel();
+                delete iRealOneBitmapTimer;
+                iRealOneBitmapTimer = NULL;
+            }
+
             //
             //  Recreate the controls with the new clip
             //
@@ -522,14 +503,12 @@
         }
         case EMPXPbvSurfaceCreated:
         {
-            iSurfaceCreated = ETrue;
             iControlsController->HandleEventL( EMPXControlCmdSurfaceCreated );
             DrawNow();
             break;
         }
         case EMPXPbvSurfaceRemoved:
         {
-            iSurfaceCreated = EFalse;
             iControlsController->HandleEventL( EMPXControlCmdSurfaceRemoved );
             DrawNow();
             break;
@@ -610,8 +589,6 @@
 
         DrawNow();
     }
-
-    iTvOutConnected = iFileDetails->iTvOutConnected;
 }
 
 // -------------------------------------------------------------------------------------------------
--- a/videoplayerapp/mpxvideoplayer/data/mpxvideoplayer_reg.rss	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/data/mpxvideoplayer_reg.rss	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  13 %
+// Version : %version:  da1mmcf#14 %
 
 //  INCLUDES
 #include <appinfo.rh>
@@ -53,7 +53,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"; },
 
 #ifdef __WINDOWS_MEDIA
         DATATYPE { priority=EDataTypePriorityHigh; type="video/x-ms-wmv"; },
--- a/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e92_69 %
+// Version : %version: e92_71 %
 
 
 #include <eikon.hrh>
@@ -632,7 +632,9 @@
     }
     else
     {
-        OpenMediaL( aMedia ); // Initialize and initiate playback of a single video
+        // We use file name to initialize playback instead of mpxmedia object.
+        iViewUtility->PreLoadViewL( KVideoPlaybackViewUid );
+        InitializeFileL( fileUri );
     }
 }
 
--- a/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/inc/mpxvideoplayer_appuienginetester.h	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/inc/mpxvideoplayer_appuienginetester.h	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#13 %
+// Version : %version: ou1cpsw#14 %
 
 #ifndef MPXVIDEOPLAYER_APPUIENGINETESTER_H_
 #define MPXVIDEOPLAYER_APPUIENGINETESTER_H_
@@ -146,7 +146,7 @@
         CMPXMessage* CreateMpxMessageLC( TInt aEvent, TInt aType, TInt aData );
 
         void AddLocalFileCallbacksL( TDesC& aFileName,  TBool aUseFileHandle );
-        void AddCollectionMediaCallbacksL( );
+        void AddCollectionMediaCallbacksL( TDesC& aFileName );
         void AddSdpFileCallbacksL( TDesC& aFileName, TBool aUseFileHandle, CStifItemParser& aItem );
         void AddRamFileCallbacksL( TDesC& aFileName, TBool aUseFileHandle, CStifItemParser& aItem );
         void AddAsxFileCallbacksL( TDesC& aFileName, TBool aUseFileHandle, CStifItemParser& aItem );
--- a/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayer_appuienginetester.cpp	Tue May 11 16:15:40 2010 +0300
+++ b/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayer_appuienginetester.cpp	Tue May 25 12:44:54 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e92_22 %
+// Version : %version: ou1cpsw#e92_23 %
 
 
 #include "mpxvideoplayer_appuienginetester.h"
@@ -199,9 +199,9 @@
     AddExpectedEvent( event );
 }
 
-void CMpxVideoPlayer_AppUiEngineTester::AddCollectionMediaCallbacksL()
+void CMpxVideoPlayer_AppUiEngineTester::AddCollectionMediaCallbacksL( TDesC& aFileName )
 {
-    MPX_ENTER_EXIT(_L("CMpxVideoPlayer_AppUiEngineTester::AddLocalFileCallbacksL()"));
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayer_AppUiEngineTester::AddCollectionMediaCallbacksL()"));
 
     TCallbackEvent* event = new (ELeave) TCallbackEvent;
     event->iEvent = EViewUtilityPreLoadView;
@@ -209,7 +209,8 @@
     AddExpectedEvent( event );
 
     event = new (ELeave) TCallbackEvent;
-    event->iEvent = EPlaybackUtilityInitPlaylist;
+    event->iEvent = EPlaybackUtilityInitFileName;
+    event->iFileName = aFileName;
 
     AddExpectedEvent( event );
 }
@@ -934,7 +935,7 @@
         //
         //  Add callback event
         //
-        AddCollectionMediaCallbacksL();
+        AddCollectionMediaCallbacksL( filename );
     }