Revision: 201033
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 21:31:50 +0300
changeset 50 557e19da7faf
parent 43 0a57f2fb63b1
child 52 0c0f95df01f4
Revision: 201033 Kit: 201035
tsrc/conf/ats_apitests.txt
tsrc/group/bld.inf
videoscheduler/SchedulerClient/BWINS/CseSchedulerClientU.DEF
videoscheduler/SchedulerClient/EABI/CseSchedulerClientU.DEF
videoscheduler/SchedulerClient/group/CseSchedulerClient.mmp
videoscheduler/SchedulerClient/group/bld.inf
videoscheduler/SchedulerClient/rom/videoschedulerclient.iby
videoscheduler/SchedulerClient/src/CCseScheduledProgram.cpp
videoscheduler/SchedulerClient/src/CCseSchedulerAPI.cpp
videoscheduler/SchedulerClient/src/RCseSchedulerClient.cpp
videoscheduler/SchedulerClient/src/RCseSchedulerService.cpp
videoscheduler/SchedulerClient/src/RCseSchedulerServiceBase.cpp
videoscheduler/SchedulerServer/data/102750D5.rss
videoscheduler/SchedulerServer/group/ScheduleServer.mmp
videoscheduler/SchedulerServer/group/bld.inf
videoscheduler/SchedulerServer/inc/CCseScheduleDB.h
videoscheduler/SchedulerServer/inc/CCseSchedulerLandLord.h
videoscheduler/SchedulerServer/inc/CCseSchedulerMultiPluginController.h
videoscheduler/SchedulerServer/inc/CCseSchedulerPluginControllerBase.h
videoscheduler/SchedulerServer/inc/CCseSchedulerPluginStarter.h
videoscheduler/SchedulerServer/inc/CCseSchedulerServer.h
videoscheduler/SchedulerServer/inc/CCseSchedulerServerEngine.h
videoscheduler/SchedulerServer/inc/CCseSchedulerServerSession.h
videoscheduler/SchedulerServer/inc/CCseSchedulerThreadPacket.h
videoscheduler/SchedulerServer/inc/CCseSchedulerTimer.h
videoscheduler/SchedulerServer/inc/CCseSchedulerUniPluginController.h
videoscheduler/SchedulerServer/inc/CCseSemaphoreController.h
videoscheduler/SchedulerServer/inc/CseSchedulerServer.pan
videoscheduler/SchedulerServer/inc/MCsePluginControllerObserver.h
videoscheduler/SchedulerServer/inc/MCseSchedulerTimerObserver.h
videoscheduler/SchedulerServer/inc/MCseSemaphoreSignalObserver.h
videoscheduler/SchedulerServer/rom/videoschedulerserver.iby
videoscheduler/SchedulerServer/src/CCseScheduleDB.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerLandLord.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerMultiPluginController.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerPluginControllerBase.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerPluginStarter.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerServer.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerServerEngine.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerServerSession.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerThreadPacket.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerTimer.cpp
videoscheduler/SchedulerServer/src/CCseSchedulerUniPluginController.cpp
videoscheduler/SchedulerServer/src/CCseSemaphoreController.cpp
videoscheduler/group/bld.inf
videoscheduler/inc/CseDebug.h
videoutils.pro
videoutils_plat/videoscheduler_api/group/bld.inf
videoutils_plat/videoscheduler_api/inc/ipvideo/CCseScheduledProgram.h
videoutils_plat/videoscheduler_api/inc/ipvideo/CCseSchedulerAPI.h
videoutils_plat/videoscheduler_api/inc/ipvideo/CCseSchedulerPluginIF.h
videoutils_plat/videoscheduler_api/inc/ipvideo/CCseSchedulerPluginIF.inl
videoutils_plat/videoscheduler_api/inc/ipvideo/CseEngineUids.h
videoutils_plat/videoscheduler_api/inc/ipvideo/CseSchedulerClientServerCommon.h
videoutils_plat/videoscheduler_api/inc/ipvideo/MCsePluginObserver.h
videoutils_plat/videoscheduler_api/inc/ipvideo/MCseScheduleObserver.h
videoutils_plat/videoscheduler_api/inc/ipvideo/RCseSchedulerClient.h
videoutils_plat/videoscheduler_api/inc/ipvideo/RCseSchedulerService.h
videoutils_plat/videoscheduler_api/inc/ipvideo/RCseSchedulerServiceBase.h
videoutils_plat/videoscheduler_api/tsrc/Bmarm/videoscheduler_apitestU.DEF
videoutils_plat/videoscheduler_api/tsrc/Bwins/videoscheduler_apitestU.DEF
videoutils_plat/videoscheduler_api/tsrc/EABI/videoscheduler_apitestU.def
videoutils_plat/videoscheduler_api/tsrc/conf/atsconf.txt
videoutils_plat/videoscheduler_api/tsrc/conf/videoscheduler_apitest.cfg
videoutils_plat/videoscheduler_api/tsrc/custom/postrun_custom.xml
videoutils_plat/videoscheduler_api/tsrc/custom/prerun_custom.xml
videoutils_plat/videoscheduler_api/tsrc/group/bld.inf
videoutils_plat/videoscheduler_api/tsrc/group/videoscheduler_apitest.mmp
videoutils_plat/videoscheduler_api/tsrc/group/videoscheduler_apitest.pkg
videoutils_plat/videoscheduler_api/tsrc/inc/vcxtestlog.h
videoutils_plat/videoscheduler_api/tsrc/inc/videoscheduler_apitest.h
videoutils_plat/videoscheduler_api/tsrc/init/TestFramework.ini
videoutils_plat/videoscheduler_api/tsrc/src/videoscheduler_apitest.cpp
videoutils_plat/videoscheduler_api/tsrc/src/videoscheduler_apitestblocks.cpp
videoutils_plat/videoscheduler_api/videoscheduler_api.metaxml
--- a/tsrc/conf/ats_apitests.txt	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-;Run \vado\videoplayer\tsrc\testing\tools\genATSdrop.pl from 
-;the tsrc folder to create ATS3 drop.
-DEVICE INSERT_DEVICE
-EMAIL INSERT_EMAIL
-FLASH INSERT_FLASH_IMAGE
-FLASH INSERT_FLASH_IMAGE
-FLASH INSERT_FLASH_IMAGE
-SIS \VideoApp_Domain\videoplayer\videoplayerapp\mpxvideoplayer\sis\VideoPlayer.sisx
-INC ..\..\videoutils_plat\videoconnutility_api\tsrc\conf\atsconf.txt
-INC ..\..\videoutils_plat\videoscheduler_api\tsrc\conf\atsconf.txt
--- a/tsrc/group/bld.inf	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Build information file for Generic test modules under videoutils*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-#include "../../videoutils_plat/videoconnutility_api/tsrc/group/bld.inf"
-#include "../../videoutils_plat/videoscheduler_api/tsrc/group/bld.inf"
--- a/videoscheduler/SchedulerClient/BWINS/CseSchedulerClientU.DEF	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-EXPORTS
-	??0CCseScheduledProgram@@IAE@XZ @ 1 NONAME ; CCseScheduledProgram::CCseScheduledProgram(void)
-	??1CCseScheduledProgram@@UAE@XZ @ 2 NONAME ; CCseScheduledProgram::~CCseScheduledProgram(void)
-	??1CCseSchedulerApi@@UAE@XZ @ 3 NONAME ; CCseSchedulerApi::~CCseSchedulerApi(void)
-	?AddSchedule@CCseSchedulerApi@@QBEHAAVCCseScheduledProgram@@@Z @ 4 NONAME ; int CCseSchedulerApi::AddSchedule(class CCseScheduledProgram &) const
-	?AppUid@CCseScheduledProgram@@QBEJXZ @ 5 NONAME ; long CCseScheduledProgram::AppUid(void) const
-	?ApplicationData@CCseScheduledProgram@@QAE?AVTPtrC8@@XZ @ 6 NONAME ; class TPtrC8 CCseScheduledProgram::ApplicationData(void)
-	?DbIdentifier@CCseScheduledProgram@@QBEKXZ @ 7 NONAME ; unsigned long CCseScheduledProgram::DbIdentifier(void) const
-	?DebugDump@CCseScheduledProgram@@QBEXXZ @ 8 NONAME ; void CCseScheduledProgram::DebugDump(void) const
-	?EndTime@CCseScheduledProgram@@QAEAAVTTime@@XZ @ 9 NONAME ; class TTime & CCseScheduledProgram::EndTime(void)
-	?ExternalizeL@CCseScheduledProgram@@QAEXAAVRWriteStream@@@Z @ 10 NONAME ; void CCseScheduledProgram::ExternalizeL(class RWriteStream &)
-	?ExternalizeLength@CCseScheduledProgram@@QAEHXZ @ 11 NONAME ; int CCseScheduledProgram::ExternalizeLength(void)
-	?GetOverlappingSchedules@CCseSchedulerApi@@QAEHAAVCCseScheduledProgram@@AAV?$RPointerArray@VCCseScheduledProgram@@@@@Z @ 12 NONAME ; int CCseSchedulerApi::GetOverlappingSchedules(class CCseScheduledProgram &, class RPointerArray<class CCseScheduledProgram> &)
-	?GetSchedule@CCseSchedulerApi@@QBEHKPAVCCseScheduledProgram@@@Z @ 13 NONAME ; int CCseSchedulerApi::GetSchedule(unsigned long, class CCseScheduledProgram *) const
-	?GetSchedulesByAppUid@CCseSchedulerApi@@QBEHJAAV?$RPointerArray@VCCseScheduledProgram@@@@@Z @ 14 NONAME ; int CCseSchedulerApi::GetSchedulesByAppUid(long, class RPointerArray<class CCseScheduledProgram> &) const
-	?GetSchedulesByPluginUid@CCseSchedulerApi@@QBEHJAAV?$RPointerArray@VCCseScheduledProgram@@@@@Z @ 15 NONAME ; int CCseSchedulerApi::GetSchedulesByPluginUid(long, class RPointerArray<class CCseScheduledProgram> &) const
-	?GetSchedulesByTime@CCseSchedulerApi@@QBEHABVTTime@@0AAV?$RPointerArray@VCCseScheduledProgram@@@@@Z @ 16 NONAME ; int CCseSchedulerApi::GetSchedulesByTime(class TTime const &, class TTime const &, class RPointerArray<class CCseScheduledProgram> &) const
-	?GetSchedulesByType@CCseSchedulerApi@@QBEHJAAV?$RPointerArray@VCCseScheduledProgram@@@@@Z @ 17 NONAME ; int CCseSchedulerApi::GetSchedulesByType(long, class RPointerArray<class CCseScheduledProgram> &) const
-	?InternalizeL@CCseScheduledProgram@@QAEXAAVRReadStream@@@Z @ 18 NONAME ; void CCseScheduledProgram::InternalizeL(class RReadStream &)
-	?Name@CCseScheduledProgram@@QBE?AVTPtrC8@@XZ @ 19 NONAME ; class TPtrC8 CCseScheduledProgram::Name(void) const
-	?NewL@CCseScheduledProgram@@SAPAV1@AAV1@@Z @ 20 NONAME ; class CCseScheduledProgram * CCseScheduledProgram::NewL(class CCseScheduledProgram &)
-	?NewL@CCseScheduledProgram@@SAPAV1@XZ @ 21 NONAME ; class CCseScheduledProgram * CCseScheduledProgram::NewL(void)
-	?NewL@CCseSchedulerApi@@SAPAV1@XZ @ 22 NONAME ; class CCseSchedulerApi * CCseSchedulerApi::NewL(void)
-	?PluginType@CCseScheduledProgram@@QBEJXZ @ 23 NONAME ; long CCseScheduledProgram::PluginType(void) const
-	?PluginUid@CCseScheduledProgram@@QBEJXZ @ 24 NONAME ; long CCseScheduledProgram::PluginUid(void) const
-	?RemoveSchedule@CCseSchedulerApi@@QBEHK@Z @ 25 NONAME ; int CCseSchedulerApi::RemoveSchedule(unsigned long) const
-	?ScheduleType@CCseScheduledProgram@@QBEJXZ @ 26 NONAME ; long CCseScheduledProgram::ScheduleType(void) const
-	?SetAppUid@CCseScheduledProgram@@QAEXJ@Z @ 27 NONAME ; void CCseScheduledProgram::SetAppUid(long)
-	?SetApplicationDataL@CCseScheduledProgram@@QAEXABVTDesC8@@@Z @ 28 NONAME ; void CCseScheduledProgram::SetApplicationDataL(class TDesC8 const &)
-	?SetDbIdentifier@CCseScheduledProgram@@QAEXK@Z @ 29 NONAME ; void CCseScheduledProgram::SetDbIdentifier(unsigned long)
-	?SetEndTime@CCseScheduledProgram@@QAEXABVTTime@@@Z @ 30 NONAME ; void CCseScheduledProgram::SetEndTime(class TTime const &)
-	?SetName@CCseScheduledProgram@@QAEXABVTDesC8@@@Z @ 31 NONAME ; void CCseScheduledProgram::SetName(class TDesC8 const &)
-	?SetPluginType@CCseScheduledProgram@@QAEXJ@Z @ 32 NONAME ; void CCseScheduledProgram::SetPluginType(long)
-	?SetPluginUid@CCseScheduledProgram@@QAEXJ@Z @ 33 NONAME ; void CCseScheduledProgram::SetPluginUid(long)
-	?SetScheduleType@CCseScheduledProgram@@QAEXJ@Z @ 34 NONAME ; void CCseScheduledProgram::SetScheduleType(long)
-	?SetStartTime@CCseScheduledProgram@@QAEXABVTTime@@@Z @ 35 NONAME ; void CCseScheduledProgram::SetStartTime(class TTime const &)
-	?StartTime@CCseScheduledProgram@@QAEAAVTTime@@XZ @ 36 NONAME ; class TTime & CCseScheduledProgram::StartTime(void)
-
--- a/videoscheduler/SchedulerClient/EABI/CseSchedulerClientU.DEF	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-EXPORTS
-	_ZN16CCseSchedulerApi23GetOverlappingSchedulesER20CCseScheduledProgramR13RPointerArrayIS0_E @ 1 NONAME
-	_ZN16CCseSchedulerApi4NewLEv @ 2 NONAME
-	_ZN16CCseSchedulerApiD0Ev @ 3 NONAME
-	_ZN16CCseSchedulerApiD1Ev @ 4 NONAME
-	_ZN16CCseSchedulerApiD2Ev @ 5 NONAME
-	_ZN20CCseScheduledProgram10SetEndTimeERK5TTime @ 6 NONAME
-	_ZN20CCseScheduledProgram12ExternalizeLER12RWriteStream @ 7 NONAME
-	_ZN20CCseScheduledProgram12InternalizeLER11RReadStream @ 8 NONAME
-	_ZN20CCseScheduledProgram12SetPluginUidEl @ 9 NONAME
-	_ZN20CCseScheduledProgram12SetStartTimeERK5TTime @ 10 NONAME
-	_ZN20CCseScheduledProgram13SetPluginTypeEl @ 11 NONAME
-	_ZN20CCseScheduledProgram15ApplicationDataEv @ 12 NONAME
-	_ZN20CCseScheduledProgram15SetDbIdentifierEm @ 13 NONAME
-	_ZN20CCseScheduledProgram15SetScheduleTypeEl @ 14 NONAME
-	_ZN20CCseScheduledProgram17ExternalizeLengthEv @ 15 NONAME
-	_ZN20CCseScheduledProgram19SetApplicationDataLERK6TDesC8 @ 16 NONAME
-	_ZN20CCseScheduledProgram4NewLERS_ @ 17 NONAME
-	_ZN20CCseScheduledProgram4NewLEv @ 18 NONAME
-	_ZN20CCseScheduledProgram7EndTimeEv @ 19 NONAME
-	_ZN20CCseScheduledProgram7SetNameERK6TDesC8 @ 20 NONAME
-	_ZN20CCseScheduledProgram9SetAppUidEl @ 21 NONAME
-	_ZN20CCseScheduledProgram9StartTimeEv @ 22 NONAME
-	_ZN20CCseScheduledProgramC1Ev @ 23 NONAME
-	_ZN20CCseScheduledProgramC2Ev @ 24 NONAME
-	_ZN20CCseScheduledProgramD0Ev @ 25 NONAME
-	_ZN20CCseScheduledProgramD1Ev @ 26 NONAME
-	_ZN20CCseScheduledProgramD2Ev @ 27 NONAME
-	_ZNK16CCseSchedulerApi11AddScheduleER20CCseScheduledProgram @ 28 NONAME
-	_ZNK16CCseSchedulerApi11GetScheduleEmP20CCseScheduledProgram @ 29 NONAME
-	_ZNK16CCseSchedulerApi14RemoveScheduleEm @ 30 NONAME
-	_ZNK16CCseSchedulerApi18GetSchedulesByTimeERK5TTimeS2_R13RPointerArrayI20CCseScheduledProgramE @ 31 NONAME
-	_ZNK16CCseSchedulerApi18GetSchedulesByTypeElR13RPointerArrayI20CCseScheduledProgramE @ 32 NONAME
-	_ZNK16CCseSchedulerApi20GetSchedulesByAppUidElR13RPointerArrayI20CCseScheduledProgramE @ 33 NONAME
-	_ZNK16CCseSchedulerApi23GetSchedulesByPluginUidElR13RPointerArrayI20CCseScheduledProgramE @ 34 NONAME
-	_ZNK20CCseScheduledProgram10PluginTypeEv @ 35 NONAME
-	_ZNK20CCseScheduledProgram12DbIdentifierEv @ 36 NONAME
-	_ZNK20CCseScheduledProgram12ScheduleTypeEv @ 37 NONAME
-	_ZNK20CCseScheduledProgram4NameEv @ 38 NONAME
-	_ZNK20CCseScheduledProgram6AppUidEv @ 39 NONAME
-	_ZNK20CCseScheduledProgram9DebugDumpEv @ 40 NONAME
-	_ZNK20CCseScheduledProgram9PluginUidEv @ 41 NONAME
-	_ZTI16CCseSchedulerApi @ 42 NONAME ; #<TI>#
-	_ZTI19RCseSchedulerClient @ 43 NONAME ; #<TI>#
-	_ZTI20CCseScheduledProgram @ 44 NONAME ; #<TI>#
-	_ZTI20RCseSchedulerService @ 45 NONAME ; #<TI>#
-	_ZTI24RCseSchedulerServiceBase @ 46 NONAME ; #<TI>#
-	_ZTV16CCseSchedulerApi @ 47 NONAME ; #<VT>#
-	_ZTV19RCseSchedulerClient @ 48 NONAME ; #<VT>#
-	_ZTV20CCseScheduledProgram @ 49 NONAME ; #<VT>#
-	_ZTV20RCseSchedulerService @ 50 NONAME ; #<VT>#
-	_ZTV24RCseSchedulerServiceBase @ 51 NONAME ; #<VT>#
-
--- a/videoscheduler/SchedulerClient/group/CseSchedulerClient.mmp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    This is a project specification file for Common Scheduling Engine / client*
-*/
-
-
-
-
-#include <platform_paths.hrh>
-#include <bldvariant.hrh>
-
-//OPTION ARMCC --asm --interleave
-ALWAYS_BUILD_AS_ARM
-
-TARGET              cseschedulerclient.dll
-TARGETTYPE          dll
-UID                 0x1000008d 0x10281F1F 
-
-CAPABILITY          CAP_ECOM_PLUGIN DRM
-
-// ECom Dll recognition UID followed by the unique UID for this dll
-
-SOURCEPATH          ../src
-SOURCE              CCseSchedulerAPI.cpp
-SOURCE              RCseSchedulerClient.cpp
-SOURCE              RCseSchedulerService.cpp
-SOURCE              RCseSchedulerServiceBase.cpp
-SOURCE              CCseScheduledProgram.cpp
-
-
-USERINCLUDE         ../inc
-USERINCLUDE         ../../inc
-
-MW_LAYER_SYSTEMINCLUDE
- 
-SOURCEPATH          ../data
-
-LIBRARY             euser.lib
-LIBRARY             efsrv.lib
-LIBRARY             bafl.lib
-LIBRARY             flogger.lib
-LIBRARY             estor.lib
-
-LANGUAGE_IDS 
--- a/videoscheduler/SchedulerClient/group/bld.inf	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2004-2005 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 <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-../rom/videoschedulerclient.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(videoschedulerclient.iby)
-PRJ_MMPFILES
-CseSchedulerClient.mmp
--- a/videoscheduler/SchedulerClient/rom/videoschedulerclient.iby	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* 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: 
-*
-*/
-
-
-#ifndef __VIDEOSCHEDULERCLIENT_IBY__
-#define __VIDEOSCHEDULERCLIENT_IBY__
-
-#include <data_caging_paths_for_iby.hrh>
-
-file=ABI_DIR\BUILD_DIR\CseSchedulerClient.dll                 SHARED_LIB_DIR\CseSchedulerClient.dll
-
-#endif // __VIDEOSCHEDULERCLIENT_IBY__
--- a/videoscheduler/SchedulerClient/src/CCseScheduledProgram.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,552 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    This class contains data for scheduled programs.*
-*/
-
-
-
-
-// INCLUDES
-#include <ipvideo/CCseScheduledProgram.h>   // Header file for this class
-#include "CseDebug.h"               // Debug macros
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::CCseScheduledProgram()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C CCseScheduledProgram::CCseScheduledProgram() :
-									iStartTime( 0 ),
-									iEndTime( 0 ),									
-									iAppUid( 0 ),
-									iPluginUid( 0 ),
-									iDbIdentifier( 0 ),
-									iScheduleType ( ECseOther ),
-									iPluginType( ECseUniPlugin )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::CCseScheduledProgram");
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::CCseScheduledProgram");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::NewL()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C CCseScheduledProgram* CCseScheduledProgram::NewL( CCseScheduledProgram& aProg)
-	{
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::NewL");
-    
-    CCseScheduledProgram* self = new ( ELeave ) CCseScheduledProgram();    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    self->SetName( aProg.Name() );
-    self->SetStartTime( aProg.StartTime() );
-    self->SetEndTime( aProg.EndTime() );
-    self->SetAppUid( aProg.AppUid() );
-    self->SetPluginUid( aProg.PluginUid() );
-    self->SetDbIdentifier( aProg.DbIdentifier() );    
-    self->SetApplicationDataL( aProg.ApplicationData() );   
-    self->SetScheduleType( aProg.ScheduleType() );
-    self->SetPluginType( aProg.PluginType() );
-    CleanupStack::Pop( self );   
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::NewL");
-    return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::NewL()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C CCseScheduledProgram* CCseScheduledProgram::NewL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::NewL");
-    
-    CCseScheduledProgram* self = new ( ELeave ) CCseScheduledProgram();    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::NewL");
-    return self;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::ConstructL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduledProgram::ConstructL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::ConstructL");
-    iAppData = HBufC8::NewL( 0 );    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::ConstructL");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::~CCseScheduledProgram()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C CCseScheduledProgram::~CCseScheduledProgram()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::~CCseScheduledProgram");
-    delete iAppData;
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::~CCseScheduledProgram");	
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::SetScheduleType()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C void CCseScheduledProgram::SetScheduleType( const TInt32 aScheduleType )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetScheduleType");
-    iScheduleType = aScheduleType;	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::SetScheduleType");	
-	}
-		
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::SetApplicationDataL()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C void CCseScheduledProgram::SetApplicationDataL( const TDesC8& aAppData )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetApplicationData");
-    delete iAppData;
-	iAppData = NULL;
-	iAppData = aAppData.AllocL();
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::SetApplicationData");	
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduledProgram::ApplicationData()
-//
-// ---------------------------------------------------------------------------	
-EXPORT_C TPtrC8 CCseScheduledProgram::ApplicationData()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::ApplicationData");
-    return *iAppData;    
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::InternalizeL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::InternalizeL( RReadStream& aStream )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::InternalizeL");
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-	TInt32 buffLen( 0 );	
-
-	// Name
-	buffLen = aStream.ReadInt32L();
-	aStream.ReadL( iName, buffLen );
-
-	// Start time
-    lower = aStream.ReadUint32L();
-    upper = aStream.ReadUint32L();
-    TInt64 time( 0 );
-    time = (TInt64) lower;    
-    TInt64 longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    iStartTime = time;  
-        
-	// End time
-	lower = aStream.ReadUint32L();
-    upper = aStream.ReadUint32L();
-    time = (TInt64) lower;    
-    longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    iEndTime = time;  
-
-	// Application UID
-	iAppUid = aStream.ReadInt32L();
-	
-	// Notifier plug-in UID
-	iPluginUid = aStream.ReadInt32L();
-	
-	// Db identifier
-	iDbIdentifier = aStream.ReadUint32L();
-	
-	// Schedule type
-	iScheduleType = aStream.ReadInt32L();
-	
-	// Plugin type
-	iPluginType = aStream.ReadInt32L();
-		
-	// Application data length
-	buffLen = aStream.ReadInt32L();
-	
-	// Application data
-	delete iAppData;
-	iAppData = NULL;
-	iAppData = HBufC8::NewL( buffLen );
-	TPtr8 ptr( iAppData->Des() );
-	aStream.ReadL( ptr, buffLen );
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::InternalizeL");	
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::ExternalizeL
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::ExternalizeL(RWriteStream& aStream)
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::ExternalizeL");
-	TInt64 temp( 0 );
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-	TInt32 buffLen( 0 );
-
-	// Name
-	buffLen = iName.Length();
-	aStream.WriteInt32L( buffLen );
-	aStream.WriteL( iName );
-	// Start time
-	temp = iStartTime.Int64();
-    lower = (0x00000000FFFFFFFFULL) & temp;
-    upper = (0x00000000FFFFFFFFULL) & (temp >> 32);
-    aStream.WriteUint32L( lower );
-    aStream.WriteUint32L( upper );
-    
-    // End time
-	temp = iEndTime.Int64();
-    lower = (0x00000000FFFFFFFFULL) & temp;
-    upper = (0x00000000FFFFFFFFULL) & (temp >> 32);
-    aStream.WriteUint32L( lower );
-    aStream.WriteUint32L( upper );
-    
-	// Application UID
-	aStream.WriteInt32L( iAppUid );
-	
-	// Notifier plug-in UID
-	aStream.WriteInt32L( iPluginUid );
-	
-	// DbIdentifier
-	aStream.WriteUint32L( iDbIdentifier );
-	
-	// Schedule type	
-	aStream.WriteInt32L( iScheduleType );
-	
-	// Schedule type	
-	aStream.WriteInt32L( iPluginType );
-	
-	// Application data length
-	buffLen = iAppData->Length();
-	aStream.WriteInt32L( buffLen );
-	
-	// Application data
-	aStream.WriteL( *iAppData );
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::ExternalizeL");	
-	}
-
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::ExternalizeLength
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseScheduledProgram::ExternalizeLength( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::ExternalizeLength");
-	TInt retValue( 0 );
-		retValue =   sizeof( iStartTime )
-				    +sizeof( iEndTime )
-				    +sizeof( iAppUid )
-				    +sizeof( iPluginUid )
-				    +sizeof( iDbIdentifier )
-				    +sizeof( iScheduleType )
-				    +sizeof( iPluginType )
-				    +sizeof( TInt32 )         // Application data length
-				    +sizeof( TInt32 )         // Name length
-				    +iName.Size( )			  // Name
-				    +iAppData->Size( );	      // Application data size
-		
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::ExternalizeLength");
-	return retValue;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetPluginType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetPluginType( TInt32 aPluginType )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetPluginType");
-	iPluginType = aPluginType;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetName
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetName( const TDesC8& aName )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetName");
-	iName = aName;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetDbIdentifier
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetDbIdentifier( const TUint32 aDbIdentifier )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetDbIdentifier");
-	iDbIdentifier = aDbIdentifier;
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetStartTime
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetStartTime( const TTime& aStartTime )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetStartTime");
-	iStartTime = aStartTime;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetEndTime
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetEndTime( const TTime& aEndTime )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetEndTime");
-	iEndTime = aEndTime;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetAppUid
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetAppUid( const TInt32 aAppUid )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetAppUid");
-	iAppUid = aAppUid;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::SetPluginUid
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::SetPluginUid( const TInt32 aPluginUid )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetPluginUid");
-	iPluginUid = aPluginUid;
-	}
-
-
-// Getters for the instance data
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::GetPluginType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt32 CCseScheduledProgram::PluginType() const
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::PluginType");
-	return iPluginType;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::Name
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TPtrC8 CCseScheduledProgram::Name() const
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::Name");
-	return iName;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::DbIdentifier
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TUint32 CCseScheduledProgram::DbIdentifier() const
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::DbIdentifier");
-	return iDbIdentifier;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::StartTime
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TTime& CCseScheduledProgram::StartTime()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::SetDbIdentifier");
-	return iStartTime;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::EndTime
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TTime& CCseScheduledProgram::EndTime()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::EndTime");
-	return iEndTime;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::ScheduleType
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt32 CCseScheduledProgram::ScheduleType() const
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::ScheduleType");
-	return iScheduleType;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::AppUid
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt32 CCseScheduledProgram::AppUid() const
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::Appuid");
-	return iAppUid;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::PluginUid
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt32 CCseScheduledProgram::PluginUid() const
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::PluginUid");
-	return iPluginUid;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CCseScheduledProgram::DebugDump
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CCseScheduledProgram::DebugDump() const
-	{	
-#ifdef _DEBUG	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduledProgram::DebugDump");
-	
-	// Write schedule name
-	// Change 8-bit buffer to 16-bit.
-	HBufC* writeBuff = NULL;
-	TRAPD( err, writeBuff = HBufC::NewL( iName.Length() ) );
-    if(err == KErrNone)
-        {            
-        TPtr writePtr = writeBuff->Des();
-        writePtr.Copy( iName );
-        CSELOGSTRING2_HIGH_LEVEL("Schedule name:                    %S", writeBuff);
-        }
-    else
-        {    
-        CSELOGSTRING2_HIGH_LEVEL("Schedule name:                    %S", &iName);
-        }
-        
-    // Start time
-	TBuf<100> startTimeBuf;
-	_LIT( KDateTimeFormat,"%1%*D/%2%*M/%3%*Y %H:%T:%S" );
-	TRAP( err, iStartTime.FormatL( startTimeBuf, KDateTimeFormat ) );
-	if ( KErrNone == err )
-	    {
-    	CSELOGSTRING2_HIGH_LEVEL("Schedule start time:              %S", &startTimeBuf);
-	    }
-	
-	// End time
-	TBuf<100> endTimeBuf;	
-	TRAP( err, iEndTime.FormatL( endTimeBuf, KDateTimeFormat ) );
-	if ( KErrNone == err )
-	    {
-    	CSELOGSTRING2_HIGH_LEVEL("Schedule end time:                %S", &endTimeBuf);
-	    }
-	
-	// Application UID
-	CSELOGSTRING2_HIGH_LEVEL("Schedule application uid:         0x%x", (unsigned)iAppUid);
-	
-	// Plugin UID
-	CSELOGSTRING2_HIGH_LEVEL("Schedule plugin uid:              0x%x", (unsigned)iPluginUid);
-		
-	// Application data
-	// Write only length of data
-	CSELOGSTRING2_HIGH_LEVEL("Schedule application data length: %d", iAppData->Length() );
-	
-	// DB identifier
-	CSELOGSTRING2_HIGH_LEVEL("Schedule DB identifier:           %x", iDbIdentifier);
-	
-	// Schedule type
-	switch(iScheduleType)
-	    {
-	        case ECseReminder:
-	        CSELOGSTRING_HIGH_LEVEL("Schedule type:                    ECseReminder");
-	        break;
-	        
-	        case ECseRecording:
-	        CSELOGSTRING_HIGH_LEVEL("Schedule type:                    ECseRecording");
-	        break;
-	        
-	        case ECseProgramGuideUpdate:
-	        CSELOGSTRING_HIGH_LEVEL("Schedule type:                    ECseProgramGuideUpdate");
-	        break;
-	        
-	        case ECseScheduleDownload:
-	        CSELOGSTRING_HIGH_LEVEL("Schedule type:                    ECseScheduleDownload");
-	        break;
-	        
-	        case ECseOther:
-	        CSELOGSTRING_HIGH_LEVEL("Schedule type:                    ECseOther");
-	        break;
-	        
-	        default:
-	        break;	        
-	    }
-	delete writeBuff;
-    writeBuff = NULL;
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduledProgram::DebugDump");
-#endif
-	}
-
-
-// End of file
--- a/videoscheduler/SchedulerClient/src/CCseSchedulerAPI.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Implementation of Scheduler server's client api*
-*/
-
-
-
-// INCLUDE FILES
-#include <ipvideo/CCseSchedulerAPI.h>                   // Header file for this class
-#include <ipvideo/CCseScheduledProgram.h>               // Represent one schedule in database
-#include <ipvideo/CseSchedulerClientServerCommon.h>     // Common defines for client and server
-#include <ipvideo/RCseSchedulerClient.h>                // Client common methods (server start up etc)
-#include "CseDebug.h"                           // Debug macros
-#include <s32mem.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================ MEMBER FUNCTIONS ===============================
-// FUNCTION PROTOTYPES
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::CCseSchedulerApi
-//
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerApi::CCseSchedulerApi()  
-    { 
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::CCseSchedulerApi");
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::CCseSchedulerApi");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::NewL
-// Static two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CCseSchedulerApi* CCseSchedulerApi::NewL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::NewL");
-    CCseSchedulerApi* self = new ( ELeave ) CCseSchedulerApi();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self ); 
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerApi::ConstructL()
-    {    
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::ConstructL");
-    User::LeaveIfError( iClient.Connect() );
-    User::LeaveIfError( iService.Open( iClient ) );
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::ConstructL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::~CCseSchedulerApi
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CCseSchedulerApi::~CCseSchedulerApi()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::~CCseSchedulerApi");
-    iService.Close();
-    iClient.Close();
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::~CCseSchedulerApi");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::AddSchedule
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::AddSchedule( CCseScheduledProgram& aData ) const
-    {    
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::AddSchedule");
-    TRAPD( err, iService.AddScheduleL( aData ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::AddSchedule");
-	return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::RemoveSchedule
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::RemoveSchedule( const TUint32 aDbIdentifier ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::RemoveSchedule");
-    TRAPD( err, iService.RemoveScheduleL( aDbIdentifier ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::RemoveSchedule");
-	return err;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::GetSchedule
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::GetSchedule( const TUint32 aDbIdentifier,
-											  CCseScheduledProgram* aProg ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::GetSchedule");
-    TRAPD( err, iService.GetScheduleL( aDbIdentifier, aProg ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::GetSchedule");
-	return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::GetSchedulesByAppUid
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::GetSchedulesByAppUid( const TInt32 aAppUid, 
-					RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::GetSchedulesByAppUid");
-    TRAPD( err, iService.GetSchedulesL( aAppUid, aArray ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::GetSchedulesByAppUid");
-	return err;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::GetSchedulesByPluginUid
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::GetSchedulesByPluginUid( const TInt32 aPluginUid,
-                                                         RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::GetSchedulesByPluginUid");
-    TRAPD( err, iService.GetSchedulesByPluginUidL( aPluginUid, aArray ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::GetSchedulesByPluginUid");
-	return err;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::GetSchedulesByScheduleType
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::GetSchedulesByType( const TInt32 aType, 
-                                                    RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::GetSchedulesByType");
-    TRAPD( err, iService.GetSchedulesByTypeL( aType, aArray ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::GetSchedulesByType");
-	return err;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::GetSchedulesByTime
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::GetSchedulesByTime( const TTime& aBeginning,
-                                                    const TTime& aEnd,
-                                                    RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::GetSchedulesByTime");
-    TRAPD( err, iService.GetSchedulesByTimeL( aBeginning, aEnd, aArray ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::GetSchedulesByTime");
-	return err;
-    }    
-    
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerApi::GetOverlappingSchedule
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CCseSchedulerApi::GetOverlappingSchedules( CCseScheduledProgram& aProgram,
-                                                         RPointerArray<CCseScheduledProgram>& aResultArray )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerApi::GetOverlappingSchedules");
-	TRAPD( err, iService.GetOverlappingSchedulesL( aProgram, aResultArray ) );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerApi::GetOverlappingSchedules");
-	return err;
-	}
-
-// End of File
--- a/videoscheduler/SchedulerClient/src/RCseSchedulerClient.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Implementation of CseScheduler client's Server*
-*/
-
-
-
-// INCLUDE FILES
-#include <ipvideo/RCseSchedulerClient.h>            // Header for this class
-#include "CseDebug.h"                       // Debug macros
-#include <ipvideo/CseSchedulerClientServerCommon.h> // Common defines for client and server
-#include <e32math.h>
-#include <f32file.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-const TUint KSchedulingDefaultMessageSlots( 4 );
-const TUint KSchedulingNumberOfServerStartupAttempts( 2 );
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// LOCAL FUNCTION PROTOTYPES
-static TInt StartServer();
-static TInt CreateServerProcess();
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================= LOCAL FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// StartServer 
-// Returns: Error code
-// -----------------------------------------------------------------------------
-//
-static TInt StartServer()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::StartServer");
-    TFindServer findServer( KCseSchedulerServerName );
-    TFullName name;
-    
-    // Server already running?    
-    if ( !findServer.Next( name ) )
-        {
-        return KErrNone;
-        }
-        
-    TInt result( CreateServerProcess() );
-    
-    CSELOGSTRING2_HIGH_LEVEL("<<<RCseSchedulerClient::StartServer: %d", result);
-    return result;
-    }
-
-// -----------------------------------------------------------------------------
-// CreateServerProcess 
-//
-// -----------------------------------------------------------------------------
-//
-static TInt CreateServerProcess()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::CreateServerProcess");
-    RProcess server;
-    TInt result( server.Create( KCseSchedulerServerFileName , _L( "" ) ) );
-
-    if ( result )
-        {
-        return  result;
-        }
-
-    // Makes the server eligible for execution.    
-    TRequestStatus reqStatus;
-    server.Rendezvous(reqStatus);
-    
-    server.Resume();
-    
-    User::WaitForRequest(reqStatus);
-    
-    if( reqStatus.Int() != KErrNone )
-        {
-        server.Close();
-        }
-    
-    CSELOGSTRING2_HIGH_LEVEL("<<<RCseSchedulerClient::CreateServerProcess: %d", reqStatus.Int());
-    return reqStatus.Int();
-    }
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerClient::RCseSchedulerClient
-//
-// -----------------------------------------------------------------------------
-//
-RCseSchedulerClient::RCseSchedulerClient() : RSessionBase()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::RCseSchedulerClient");
-    // None
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerClient::RCseSchedulerClient");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerClient::~RCseSchedulerClient
-//
-// -----------------------------------------------------------------------------
-//
-RCseSchedulerClient::~RCseSchedulerClient()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::~RCseSchedulerClient");
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerClient::~RCseSchedulerClient");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerClient::Connect
-//
-// -----------------------------------------------------------------------------
-// 
-TInt RCseSchedulerClient::Connect()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::Connect");
-    TInt ret( KErrNotFound );
-    TInt retry( KSchedulingNumberOfServerStartupAttempts );
-    do
-        {
-        // Start
-        ret = StartServer();
-        if ( ret!=KErrNone && ret!=KErrAlreadyExists )
-            {
-            return ret;
-            }
-        
-        // Subsession
-        ret = CreateSession( KCseSchedulerServerName, Version(), KSchedulingDefaultMessageSlots );
-        if ( ret != KErrNotFound && ret != KErrServerTerminated )
-            {
-            return ret;
-            }
-
-        retry--;
-        }
-    while( retry >= 0 );
-
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerClient::Connect");
-    return ret;
-    }
-    
-// -----------------------------------------------------------------------------
-// RCseSchedulerClient::Close
-// 
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerClient::Close()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::Close");
-
-    TIpcArgs args( TIpcArgs::ENothing );
-    SendReceive( ECseServCloseSession, args );
-     
-    RHandleBase::Close();
-
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerClient::Connect");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerClient::Version
-// 
-// -----------------------------------------------------------------------------
-//
-TVersion RCseSchedulerClient::Version( void ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerClient::Version");
-
-    return( TVersion( KCseServMajorVersionNumber, 
-                      KCseServMinorVersionNumber,
-                      KCseServBuildVersionNumber ) );
-    }
-
-// End of File
--- a/videoscheduler/SchedulerClient/src/RCseSchedulerService.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,659 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Implementation of Scheduler engine client's Service*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <ipvideo/RCseSchedulerService.h>               // Header fo this class
-#include <ipvideo/CCseScheduledProgram.h>               // Represent one schedule in database
-#include "CseDebug.h"                           // Debug macros
-#include <ipvideo/CseSchedulerClientServerCommon.h>     // Client common methods (server start up etc)
-#include <s32mem.h>
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-// None.
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::RCseSchedulerService
-//
-// -----------------------------------------------------------------------------
-//
-RCseSchedulerService::RCseSchedulerService() : RCseSchedulerServiceBase()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::RCseSchedulerService");
-    // None
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::RCseSchedulerService");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::~RCseSchedulerService
-//
-// -----------------------------------------------------------------------------
-//
-RCseSchedulerService::~RCseSchedulerService()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::~RCseSchedulerService");
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::~RCseSchedulerService");
-    }
-    
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::AddScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::AddScheduleL( CCseScheduledProgram& aData ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::AddScheduleL");
-    if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-    // First we to "externalize" (put CCseScheduledProgram-class content to array)
-    // information from given scheduled program.
-    HBufC8* msg = HBufC8::NewLC( aData.ExternalizeLength() );
-	HBufC8* id = HBufC8::NewLC( 4 );
-    TPtr8 ptr( msg->Des() );
-    TPtr8 idPtr( id->Des() );
-    
-    RDesWriteStream writeStream;
-    CleanupClosePushL( writeStream );
-    writeStream.Open( ptr );
-    aData.ExternalizeL( writeStream );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    TIpcArgs args( &ptr, &idPtr );
-    
-    // Send array to server side.
-    User::LeaveIfError( SendReceive( ECseAddSchedule, args ) );
-    
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( idPtr );
-    aData.SetDbIdentifier( readStream.ReadUint32L() );
-    CleanupStack::PopAndDestroy( &readStream );
-	
-	CleanupStack::PopAndDestroy( id );
-	CleanupStack::PopAndDestroy( msg );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::AddScheduleL");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::RemoveScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::RemoveScheduleL( const TUint32 aDbIdentifier ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::RemoveScheduleL");
-    if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-
-    // Put integer value to stream
-    HBufC8* msg = HBufC8::NewL( 4 );
-	CleanupStack::PushL( msg );
-    TPtr8 ptr( msg->Des() );
-    RDesWriteStream writeStream;
-    CleanupClosePushL( writeStream );
-    writeStream.Open( ptr );
-	writeStream.WriteUint32L( aDbIdentifier );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    TIpcArgs args( &ptr );
-    
-    // Send stream to server side
-    User::LeaveIfError( SendReceive( ECseRemoveSchedule, args ) );  
-	CleanupStack::PopAndDestroy( msg );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::RemoveScheduleL");
-    }
-    
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::GetScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::GetScheduleL( const TUint32 aDbIdentifier,
-										 CCseScheduledProgram* aProg ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::GetScheduleL");
-    if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-    if ( !aProg )
-    	{
-    	User::Leave( KErrArgument );
-    	}
-    // Buffer for DbIdentifier
-    HBufC8* msgDbId = HBufC8::NewLC( 4 );
-    TPtr8 dbIdPtr( msgDbId->Des() );
-    
-	// Buffer for incoming message length
-    HBufC8* lengthBuff = HBufC8::NewLC( 4 );
-    TPtr8 lengthPtr( lengthBuff->Des() );
-    TInt length( 0 );
-    
-    // Initialize DbIdentifier
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-    writeStream.Open( dbIdPtr );
-    writeStream.WriteUint32L( aDbIdentifier );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    // Set args for IPC
-    TIpcArgs args( &dbIdPtr, &lengthPtr );
-    
-    // Ask for message length
-    User::LeaveIfError( SendReceive( ECseGetScheduleLength, args ) ); 
-    
-    // Read length from the message
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( lengthPtr );
-	length = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Now ask for the scheduled program information
-	HBufC8* programBuffer = HBufC8::NewLC( length );
-	TPtr8 programPtr( programBuffer->Des() );
-	
-	TIpcArgs progArgs( &dbIdPtr, &programPtr );
-	User::LeaveIfError( SendReceive( ECseGetSchedule, progArgs ) );
-	
-	// Internalize (change stream to CCseScheduledProgram-class) stream that we got.
-	RDesReadStream readStr;
-	CleanupClosePushL( readStr );
-	readStr.Open( programPtr );
-	aProg->InternalizeL( readStr );
-	CleanupStack::PopAndDestroy( &readStr );
-	
-	CleanupStack::PopAndDestroy( programBuffer );
-	CleanupStack::PopAndDestroy( lengthBuff );
-	CleanupStack::PopAndDestroy( msgDbId );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::GetSchduleL");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::GetSchedulesL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::GetSchedulesL( const TInt32 aAppUid, 
-						RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::GetSchdulesL");
-    if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-        
-    // Buffer for app UID
-    HBufC8* msgAppUid = HBufC8::NewLC( 4 );
-    TPtr8 appUidPtr( msgAppUid->Des() );
-    
-	// Buffer for incoming message length
-    HBufC8* lengthBuff = HBufC8::NewLC( 4 );
-    TPtr8 lengthPtr( lengthBuff->Des() );
-    TInt length( 0 );
-    
-    // Write App Uid
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-    writeStream.Open( appUidPtr );
-    writeStream.WriteInt32L( aAppUid );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    // Set args for IPC
-    TIpcArgs args( &appUidPtr, &lengthPtr );
-    
-    // Ask for message length
-    User::LeaveIfError( SendReceive( ECseGetScheduleArrayLengthByAppUid, args ) ); 
-    
-    // Read length from the message
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( lengthPtr );
-	length = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Now ask for the scheduled program information
-	HBufC8* programBuffer = HBufC8::NewLC( length );
-	TPtr8 programPtr( programBuffer->Des() );
-	
-	TIpcArgs progArgs( &appUidPtr, &programPtr );
-	User::LeaveIfError( SendReceive( ECseGetSchedulesByAppUid, progArgs ) );
-	
-	RDesReadStream readStr;
-	CleanupClosePushL( readStr );
-	readStr.Open( programPtr );
-	
-	// read number of items in stream
-	TInt itemCount ( 0 );
-	itemCount = readStr.ReadInt32L();
-	
-	// read all items from stream to array
-	for ( TInt i = 0; i < itemCount; i++ )
-		{
-		// Internalize (change stream to CCseScheduledProgram-class) stream that we got.
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );
-		prog->InternalizeL( readStr );
-		aArray.AppendL( prog );	
-		CleanupStack::Pop( prog );
-		}
-		
-	readStr.Close();
-
-	CleanupStack::PopAndDestroy( &readStr );
-	CleanupStack::PopAndDestroy( programBuffer );
-	CleanupStack::PopAndDestroy( lengthBuff );
-	CleanupStack::PopAndDestroy( msgAppUid );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::GetSchdulesL");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::GetOverlappingScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::GetOverlappingSchedulesL( 
-	CCseScheduledProgram& aProgram, 
-	RPointerArray<CCseScheduledProgram>& aResultArray )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::GetOverlappingSchedulesL");
-	if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-
-	// Buffer for schedule data
-    HBufC8* schedData = HBufC8::NewLC( sizeof( TInt32 ) + // type
-									  	sizeof( TInt64 ) + // start time
-									   sizeof( TInt64 ) ); // end time
-    TPtr8 schedDataPtr( schedData->Des() );
-    
-	// Buffer for incoming message length
-    HBufC8* lengthBuf = HBufC8::NewLC( sizeof( TInt32 ) ); 
-    TPtr8 lengthBufPtr( lengthBuf->Des() );
-    TUint32 length( 0 );    
-
-    // Schedule type
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-    writeStream.Open( schedDataPtr );
-    writeStream.WriteInt32L( aProgram.ScheduleType() );
-
-	// Start time
-	TInt64 temp( 0 );
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-
-    // Change TTime to stream format.
-	temp = aProgram.StartTime().Int64();
-    lower = (0x00000000FFFFFFFFULL) & temp;
-    upper = (0x00000000FFFFFFFFULL) & (temp >> 32);
-    writeStream.WriteUint32L( lower );
-    writeStream.WriteUint32L( upper );
-
-	// End time
-	temp = aProgram.EndTime().Int64();
-    lower = (0x00000000FFFFFFFFULL) & temp;
-    upper = (0x00000000FFFFFFFFULL) & (temp >> 32);
-    writeStream.WriteUint32L( lower );
-    writeStream.WriteUint32L( upper );
-
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    // Set args for IPC
-    TIpcArgs args( &schedDataPtr, &lengthBufPtr );
-    
-    // Ask for db id
-    User::LeaveIfError( SendReceive( ECseGetOverlappingSchedulesLength, args ) ); 
-    
-	// Read length
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( lengthBufPtr );
-	length = readStream.ReadUint32L();
-	CleanupStack::PopAndDestroy( &readStream );
-
-	if ( length > 0 )
-		{
-		HBufC8* schedulesBuf = HBufC8::NewLC( length + 
-									sizeof( TInt32 ) ); // item count as TInt32
-		TPtr8 schedulesPtr( schedulesBuf->Des() );
-
-		TIpcArgs schedArgs( &schedDataPtr, &schedulesPtr );
-
-		User::LeaveIfError( SendReceive( ECseGetOverlappingSchedules, schedArgs ) );
-
-		RDesReadStream readStr;
-		CleanupClosePushL( readStr );
-		readStr.Open( schedulesPtr );
-		// read item count
-		TInt32 count( readStr.ReadInt32L() );
-
-		// read all items from stream to array
-		for ( TInt i = 0; i < count; i++ )
-			{
-			// Internalize (change stream to CCseScheduledProgram-class) stream that we got.
-			CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-			CleanupStack::PushL( prog );
-			prog->InternalizeL( readStr );
-			aResultArray.AppendL( prog );	
-			CleanupStack::Pop( prog );
-			}
-			
-		readStr.Close();
-		CleanupStack::PopAndDestroy( &readStr );
-		CleanupStack::PopAndDestroy( schedulesBuf );	
-		}
-	
-	CleanupStack::PopAndDestroy( lengthBuf );
-	CleanupStack::PopAndDestroy( schedData );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::GetOverlappingSchedulesL");
-	}
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::GetSchedulesByPluginUidL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::GetSchedulesByPluginUidL( const TInt32 aPluginUid, 
-						                             RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::GetSchedulesByPluginUidL");
-    if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-        
-    // Buffer for app UID
-    HBufC8* msgPluginUid = HBufC8::NewLC( 4 );
-    TPtr8 pluginUidPtr( msgPluginUid->Des() );
-    
-	// Buffer for incoming message length
-    HBufC8* lengthBuff = HBufC8::NewLC( 4 );
-    TPtr8 lengthPtr( lengthBuff->Des() );
-    TInt length( 0 );
-    
-    // Write App Uid
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-    writeStream.Open( pluginUidPtr );
-    writeStream.WriteInt32L( aPluginUid );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    // Set args for IPC
-    TIpcArgs args( &pluginUidPtr, &lengthPtr );
-    
-    // Ask for message length
-    User::LeaveIfError( SendReceive( ECseGetScheduleArrayLengthByPluginUid, args ) );
-    
-    // Read length from the message
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( lengthPtr );
-	length = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Now ask for the scheduled program information
-	HBufC8* programBuffer = HBufC8::NewLC( length );
-	TPtr8 programPtr( programBuffer->Des() );
-	
-	TIpcArgs progArgs( &pluginUidPtr, &programPtr );
-	User::LeaveIfError( SendReceive( ECseGetSchedulesByPluginUid, progArgs ) );
-	
-	RDesReadStream readStr;
-	CleanupClosePushL( readStr );
-	readStr.Open( programPtr );
-	
-	// read number of items in stream
-	TInt itemCount ( 0 );
-	itemCount = readStr.ReadInt32L();
-	
-	// read all items from stream to array
-	for ( TInt i = 0; i < itemCount; i++ )
-		{
-		// Internalize (change stream to CCseScheduledProgram-class) stream that we got.
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );
-		prog->InternalizeL( readStr );
-		aArray.AppendL( prog );	
-		CleanupStack::Pop( prog );
-		}
-		
-	readStr.Close();
-
-	CleanupStack::PopAndDestroy( &readStr );
-	CleanupStack::PopAndDestroy( programBuffer );
-	CleanupStack::PopAndDestroy( lengthBuff );
-	CleanupStack::PopAndDestroy( msgPluginUid );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::GetSchedulesByPluginUidL");    
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::GetSchedulesByTypeL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::GetSchedulesByTypeL( const TInt32 aType, 
-						                        RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::GetSchedulesByTypeL");
-    if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-        
-    // Buffer for app UID
-    HBufC8* msgScheduleType = HBufC8::NewLC( 4 );
-    TPtr8 typePtr( msgScheduleType->Des() );
-    
-	// Buffer for incoming message length
-    HBufC8* lengthBuff = HBufC8::NewLC( 4 );
-    TPtr8 lengthPtr( lengthBuff->Des() );
-    TInt length( 0 );
-    
-    // Write App Uid
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-    writeStream.Open( typePtr );
-    writeStream.WriteInt32L( aType );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    // Set args for IPC
-    TIpcArgs args( &typePtr, &lengthPtr );
-    
-    // Ask for message length
-    User::LeaveIfError( SendReceive( ECseGetScheduleArrayLengthByType, args ) );
-    
-    // Read length from the message
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( lengthPtr );
-	length = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Now ask for the scheduled program information
-	HBufC8* programBuffer = HBufC8::NewLC( length );
-	TPtr8 programPtr( programBuffer->Des() );
-	
-	TIpcArgs progArgs( &typePtr, &programPtr );
-	User::LeaveIfError( SendReceive( ECseGetSchedulesByType, progArgs ) );
-	
-	RDesReadStream readStr;
-	CleanupClosePushL( readStr );
-	readStr.Open( programPtr );
-	
-	// read number of items in stream
-	TInt itemCount ( 0 );
-	itemCount = readStr.ReadInt32L();
-	
-	// read all items from stream to array
-	for ( TInt i = 0; i < itemCount; i++ )
-		{
-		// Internalize (change stream to CCseScheduledProgram-class) stream that we got.
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );
-		prog->InternalizeL( readStr );
-		aArray.AppendL( prog );	
-		CleanupStack::Pop( prog );
-		}
-		
-	readStr.Close();
-
-	CleanupStack::PopAndDestroy( &readStr );
-	CleanupStack::PopAndDestroy( programBuffer );
-	CleanupStack::PopAndDestroy( lengthBuff );
-	CleanupStack::PopAndDestroy( msgScheduleType );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::GetSchedulesByTypeL");    
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerService::GetSchedulesByTimeL
-//
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerService::GetSchedulesByTimeL( const TTime& aBeginning, 
-                                                const TTime& aEnd,
-						                        RPointerArray<CCseScheduledProgram>& aArray ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerService::GetSchedulesByTimeL");
-	if ( !SubSessionHandle() )
-        {
-		User::Leave( ECseNoSubsessionHandle );
-        }
-
-	// Buffer for schedule data
-    HBufC8* timeframe = HBufC8::NewLC( sizeof( TInt64 ) +  // start time
-									   sizeof( TInt64 ) ); // end time
-									   
-    TPtr8 timeframePtr( timeframe->Des() );
-    
-	// Buffer for incoming message length
-    HBufC8* lengthBuf = HBufC8::NewLC( sizeof( TInt32 ) ); 
-    TPtr8 lengthBufPtr( lengthBuf->Des() );
-    TUint32 length( 0 );    
-
-    // Schedule type
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-    writeStream.Open( timeframePtr );
-    
-	// Start time
-	TInt64 temp( 0 );
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-
-    // Change TTime to stream format.
-	temp = aBeginning.Int64();
-    lower = (0x00000000FFFFFFFFULL) & temp;
-    upper = (0x00000000FFFFFFFFULL) & (temp >> 32);
-    writeStream.WriteUint32L( lower );
-    writeStream.WriteUint32L( upper );
-
-	// End time
-	temp = aEnd.Int64();
-    lower = (0x00000000FFFFFFFFULL) & temp;
-    upper = (0x00000000FFFFFFFFULL) & (temp >> 32);
-    writeStream.WriteUint32L( lower );
-    writeStream.WriteUint32L( upper );
-
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    // Set args for IPC
-    TIpcArgs args( &timeframePtr, &lengthBufPtr );
-    
-    // Ask for db id
-    User::LeaveIfError( SendReceive( ECseGetScheduleArrayLengthByTimeframe, args ) ); 
-    
-	// Read length
-    RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-    readStream.Open( lengthBufPtr );
-	length = readStream.ReadUint32L();
-	CleanupStack::PopAndDestroy( &readStream );
-
-	if ( length > 0 )
-		{
-		HBufC8* schedulesBuf = HBufC8::NewLC( length + 
-									          sizeof( TInt32 ) ); // item count as TInt32
-		TPtr8 schedulesPtr( schedulesBuf->Des() );
-
-		TIpcArgs schedArgs( &timeframePtr, &schedulesPtr );
-
-		User::LeaveIfError( SendReceive( ECseGetSchedulesByTimeframe, schedArgs ) );
-
-		RDesReadStream readStr;
-		CleanupClosePushL( readStr );
-		readStr.Open( schedulesPtr );
-		// read item count
-		TInt32 count( readStr.ReadInt32L() );
-
-		// read all items from stream to array
-		for ( TInt i = 0; i < count; i++ )
-			{
-			// Internalize (change stream to CCseScheduledProgram-class) stream that we got.
-			CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-			CleanupStack::PushL( prog );
-			prog->InternalizeL( readStr );
-			aArray.AppendL( prog );	
-			CleanupStack::Pop( prog );
-			}
-			
-		readStr.Close();
-		CleanupStack::PopAndDestroy( &readStr );
-		CleanupStack::PopAndDestroy( schedulesBuf );	
-		}
-	
-	CleanupStack::PopAndDestroy( lengthBuf );
-	CleanupStack::PopAndDestroy( timeframe );
-	CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerService::GetSchedulesByTimeL");    
-    }
-
-
-
-// End of File
--- a/videoscheduler/SchedulerClient/src/RCseSchedulerServiceBase.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Implementation of CseScheduler client's ServiceBase*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <ipvideo/RCseSchedulerServiceBase.h>       // Client common methods (open, close etc)
-#include <ipvideo/RCseSchedulerClient.h>            // Client common methods (server start up etc)
-#include "CseDebug.h"                       // Debug macros
-#include <ipvideo/CseSchedulerClientServerCommon.h> // Common defines for client and server
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-// None.
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerServiceBase::RCseSchedulerServiceBase
-//
-// -----------------------------------------------------------------------------
-//
-RCseSchedulerServiceBase::RCseSchedulerServiceBase() 
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerServiceBase::RCseSchedulerServiceBase");
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerServiceBase::RCseSchedulerServiceBase");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerServiceBase::~RCseSchedulerServiceBase
-//
-// -----------------------------------------------------------------------------
-//    
-RCseSchedulerServiceBase::~RCseSchedulerServiceBase() 
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>~RCseSchedulerServiceBase::~RCseSchedulerServiceBase");
-    CSELOGSTRING_HIGH_LEVEL("<<<~RCseSchedulerServiceBase::~RCseSchedulerServiceBase");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerServiceBase::Open
-// 
-// -----------------------------------------------------------------------------
-//
-TInt RCseSchedulerServiceBase::Open( RCseSchedulerClient& aClient )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerServiceBase::Open");
-    __ASSERT_ALWAYS( aClient.Handle(), PanicClient( KErrBadHandle ) );
-    iClient = &aClient;
-
-    TIpcArgs args( TIpcArgs::ENothing );
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerServiceBase::Open");
-    return CreateSubSession( aClient, ECseServCreateSubSession, args );  
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerServiceBase::Close
-// 
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerServiceBase::Close()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerServiceBase::Close");
-    RSubSessionBase::CloseSubSession( ECseServCloseSubSession );
-    CSELOGSTRING_HIGH_LEVEL("<<<RCseSchedulerServiceBase::Close");
-    }
-
-// -----------------------------------------------------------------------------
-// RCseSchedulerServiceBase::PanicClient
-// 
-// -----------------------------------------------------------------------------
-//
-void RCseSchedulerServiceBase::PanicClient( TInt aFault ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>RCseSchedulerServiceBase::PanicClient");
-    _LIT( KCseRTPClientFault, "CseRTPApi Client Fault" );
-    User::Panic( KCseRTPClientFault, aFault );
-    }
-
-// End of File
--- a/videoscheduler/SchedulerServer/data/102750D5.rss	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2007 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 <StartupItem.rh>
-
-RESOURCE STARTUP_ITEM_INFO CseSchedulerServer
-{
-    executable_name = "!:\\sys\\bin\\CseSchedulerServer.exe";
-    recovery = EStartupItemExPolicyNone;
-}
--- a/videoscheduler/SchedulerServer/group/ScheduleServer.mmp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Project definition file*
-*/
-
-
-
-
-#include <platform_paths.hrh>
-#include <bldvariant.hrh>
-
-//OPTION ARMCC --asm --interleave
-ALWAYS_BUILD_AS_ARM
-
-TARGET            cseschedulerserver.exe
-#if !defined(__SERIES60_30__) && !defined(__SERIES60_31__) && !defined(__SERIES60_32__)
-EPOCSTACKSIZE     0x10000
-#else
-EPOCSTACKSIZE     0x5000
-#endif // !defined(__SERIES60_30__) && !defined(__SERIES60_31__) && !defined(__SERIES60_32__)
-
-targettype exe
-UID               0x1000008c 0x102750D6
-VENDORID VID_DEFAULT
-SECUREID	0x102750D6
-CAPABILITY 		 CAP_SERVER -DRM -AllFiles
-
-SOURCEPATH			../src
-SOURCE				CCseSchedulerServer.cpp
-SOURCE				CCseScheduleDB.cpp
-SOURCE				CCseSchedulerTimer.cpp
-SOURCE				CCseSchedulerServerSession.cpp
-SOURCE				CCseSchedulerServerEngine.cpp
-SOURCE              CCseSchedulerPluginControllerBase.cpp
-SOURCE              CCseSchedulerUniPluginController.cpp
-SOURCE              CCseSchedulerMultiPluginController.cpp
-SOURCE              CCseSchedulerPluginStarter.cpp
-SOURCE              CCseSchedulerLandLord.cpp
-SOURCE              CCseSchedulerThreadPacket.cpp
-SOURCE              CCseSemaphoreController.cpp
-SOURCEPATH			../data
-
-START RESOURCE      102750D5.rss
-END // RESOURCE
-
-USERINCLUDE         ../inc
-USERINCLUDE         ../../inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY				euser.lib
-LIBRARY             efsrv.lib
-LIBRARY				bafl.lib
-LIBRARY				flogger.lib
-LIBRARY				edbms.lib
-LIBRARY				ws32.lib
-LIBRARY				apgrfx.lib
-LIBRARY				apparc.lib
-LIBRARY				estor.lib
-LIBRARY				cseschedulerclient.lib
-LIBRARY             ecom.lib
--- a/videoscheduler/SchedulerServer/group/bld.inf	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2004-2005 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 <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-../rom/videoschedulerserver.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(videoschedulerserver.iby)
-PRJ_MMPFILES
-ScheduleServer.mmp
--- a/videoscheduler/SchedulerServer/inc/CCseScheduleDB.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,447 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    header file for CCseScheduleDB class*
-*/
-
-
-
-#ifndef _CCSESCHEDULEDB_H
-#define _CCSESCHEDULEDB_H
-
-#include <e32base.h>
-#include <d32dbms.h>    // RDbStoreDatabase
-#include <f32file.h>    // RFs
-#include <s32file.h>
-#include <babackup.h>
-
-// CONSTANTS
-const int KCseCustomSqlLength               = 256;
-const int KCseDbCompactTimeout              = 30000000;
-
-// Constant for filename definition
-_LIT( KCseScheduleDBName, "CseSchedules.db" );
-// Database table
-_LIT( KCseDatabaseTable,                    "CseDatabase" );
-_LIT( KCseDatabaseVersionCol,               "DbVersion" );
-_LIT( KCseDatabaseReserved1Col,             "DbReserved1" );
-_LIT( KCseDatabaseReserved2Col,             "DbReserved2" );
-
-// Program table
-_LIT( KCseScheduleTable, 					"ScheduleEvent" );
-_LIT( KCseScheduleDbKeyCol, 				"Key" );
-_LIT( KCseScheduleNameCol,					"Name" );
-_LIT( KCseScheduleStartTimeCol,				"StartTime" );
-_LIT( KCseScheduleEndTimeCol,				"EndTime" );
-_LIT( KCseScheduleApplicationUIDCol, 		"ApplicationUID" );
-_LIT( KCseSchedulePlugInUIDCol,    			"PlugInUID" );
-_LIT( KCseScheduleTypeCol,					"Type" );
-_LIT( KCseScheduleApplicationSpecificCol,	"ApplicationSpecificData" );
-_LIT( KCseScheduleRunCountCol,              "ScheduleRunCount" );
-_LIT( KCseScheduleStateCol,                 "ScheduleState" );
-_LIT( KCseSchedulePluginTypeCol,            "PluginType" );
-_LIT( KCseScheduleReserved1Col,             "ScheduleReserved1" );
-_LIT( KCseScheduleReserved2Col,             "ScheduleReserved2" );
-
-class CCseScheduledProgram;
-
-/**  
-* Version of CleanupXxxxPushL() that can be used to 'ResetAndDestroy'
-* the supplied object if the clean-up stack unwinds.
-*/
-template <class T>
-class CleanupResetAndDestroy
-    {
-    public:
-        inline static void PushL( T& aRef );
-    private:
-        static void ResetAndDestroy( TAny *aPtr );
-    };
-    
-template <class T>
-    inline void CleanupResetAndDestroyPushL( T& aRef );
-
-template <class T>
-inline void CleanupResetAndDestroy<T>::PushL( T& aRef )
-     {
-     CleanupStack::PushL( TCleanupItem( &ResetAndDestroy, &aRef ) );
-     }
-
-template <class T>
-void CleanupResetAndDestroy<T>::ResetAndDestroy( TAny *aPtr )
-    {
-    ( static_cast<T*>( aPtr ) )->ResetAndDestroy();
-    }
-    
-template <class T>
-inline void CleanupResetAndDestroyPushL( T& aRef )
-    {
-    CleanupResetAndDestroy<T>::PushL( aRef );
-    }
-    
-    
-/**
-* Schedule database.
-*/
-class CCseScheduleDB : public CBase,
-                       public MBackupObserver
-{
-	public:	// Constructors and destructors	
-		virtual ~CCseScheduleDB();
-		
-		/**
-        * Two-phased constructor.
-        */
-		IMPORT_C static CCseScheduleDB* NewL();
-		
-		/**
-        * Enum for schedule state
-        */
-		enum TCseScheduleState
-            {
-            ECseWaiting = 0,
-            ECseRunning            
-            };
-        
-        /**
-        * Enum for database access
-        */    
-        enum TCseDatabaseAccess
-            {
-            ECseDbOpen = 0,
-            ECseDbLocked            
-            };
-            
-    public: // Methods from MBackupObserver
-        void ChangeFileLockL(const TDesC &aFileName, TFileLockFlags aFlags);
-		
-	public: // New methods
-		/**
-		* Adds given schedule to database. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param	aData schedule to be added to database.
-		* @return	None
-		*/
-		void AddScheduleL( CCseScheduledProgram& aData );
-		
-		/**
-		* Removes schedule from database. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param	aData schedule to be removed from database.
-		* @return	None
-		*/
-		void RemoveScheduleL( const TUint32 aDbIdentifier );
-		
-		/**
-		* Finds start time of the schedule that is happening next from the database.
-		* Method will leave with KErrLocked -error code if Backup/Restore is going on.
-		* @return	Start time of the next schedule.
-		*/
-		TTime GetNextScheduleTimeL();
-		
-		/**
-		* Fills parameter array with schedules that have same starting time as
-		* paramter time. Method will leave with KErrLocked -error code if
-		* Backup/Restore is going on.
-		* @param	aSchdeduleTime      Start time of the schedules fetched.
-		* @param	aNextScheduleArray  Array containing schedules after call
-		*                               is completed.
-		* @return	None
-		*/
-		void FillScheduleArrayByTimeL( const TTime& aScheduleTime, 
-			 		RPointerArray<CCseScheduledProgram>& aNextScheduleArray );
-		
-		/**
-		* Gets the given schedule from database. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param	aDbIdentifier       Database identifier of the schedule fetched.
-		* @param	aSchedule           Pointer where schedule is stored when call
-		*                               is completed.
-		* @return	None
-		*/	 						 
-		void GetScheduleByDbIdentifierL( const TUint32 aDbIdentifier, 
-                                         CCseScheduledProgram* aSchedule );
-	
-		/**
-		* Get application specific schedules from db. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aAppUid         Application UID.
-		* @param    aScheduleArray  Array where to put scheduled events.
-		* @return	None
-		*/
-		void GetApplicationSchedulesL( const TInt32 aAppUid, 
-                                       RPointerArray<CCseScheduledProgram>& aArray );
-
-		/**
-		* Get overlapping schedules. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aType           Schedule type (one from 
-		* 		                    CCseScheduledProgram::TCseScheduleType)
-		* @param    aStartTime      Start time
-		* @param    aEndTime        End Time
-		* @param    aResultArray    On return, contains pointers to overlapping schedules
-		*               		    empty if none found.
-		* @return   None.
-		*/
-		void GetOverlappingSchedulesL( const TInt32 aType, 
-			                           const TTime& aStartTime,
-			                           const TTime& aEndTime,
-			                           RPointerArray<CCseScheduledProgram>& aResultArray );
-			
-		/**
-		* Increases runcount of given schedule in DB. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aDbIdentifier   Database identifier of the schedule thats
-		*                           runcount is to be incremented		
-		*/
-		void IncreaseRunCountL( const TUint32 aDbIdentifier );
-		
-		/**
-		* Gets the runcount of give schedule. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aDbIdentifier   DbIdentifier of the schedule whos runcount is fetched.
-		* @return   Run count of the schedule.
-		*/
-		TInt32 GetRunCountL( const TUint32 aDbIdentifier );
-		
-		/**
-		* Gets the state of give schedule. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aDbIdentifier   DbIdentifier of the schedule whos state is fetched.
-		* @return   Schedule state (one of the CCseScheduledDB::TCseScheduleState)
-		*/
-		TInt32 GetScheduleStateL( const TUint32 aDbIdentifier );
-		
-		/**
-		* Sets the state of give schedule. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aDbIdentifier   DbIdentifier of the schedule whos state is fetched.
-		* @param    aState          State to be set.
-		* @return   None
-		*/
-		void SetScheduleStateL( const TUint32 aDbIdentifier,
-                                const TInt32 aState );
-        
-        /**
-		* Gets the startup schedules from the DB. When phone is set on, we try to run all
-		* schdeulus that were on run when the phone was set off (run count is bigger than 0).
-		* Method will leave with KErrLocked -error code if Backup/Restore is going on.
-		* @param    aResultArray   Array where schedules that were on run are stored.
-		* @return   None
-		*/
-        void StartupSchedulesL( RPointerArray<CCseScheduledProgram>& aResultArray );
-        
-        /**
-		* Get plugin specific schedules from db. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aPluginUid      Application UID.
-		* @param    aScheduleArray  Array where to put scheduled events.
-		* @return	None
-		*/
-        void GetSchedulesByPluginL( const TInt32 aPluginUid,
-						            RPointerArray<CCseScheduledProgram>& aArray );
-
-        /**
-		* Get plugin specific schedules of specific type from db. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.
-		* @param    aType           Schedule type
-		* @param    aScheduleArray  Array where to put scheduled events.
-		* @return	None
-		*/
-        void GetSchedulesByTypeL( const TInt32 aType,
-						          RPointerArray<CCseScheduledProgram>& aArray );
-						          
-        /**
-		* Get schedules in given timeframe. Method will leave with
-		* KErrLocked -error code if Backup/Restore is going on.	
-		* @param    aBeginning      Start time of timeframe
-		* @param    aEnd            End Time of timeframe
-		* @param    aResultArray    On return, contains pointers to overlapping schedules
-		*               		    empty if none found.
-		* @return   None.
-		*/
-		void GetSchedulesByTimeframeL( const TTime& aStartTime,
-			                           const TTime& aEndTime,
-			                           RPointerArray<CCseScheduledProgram>& aResultArray );
-			                           
-        /**
-		* Gets all the uid's of different plugins that are in DB.
-		* KErrLocked -error code if Backup/Restore is going on.	
-		* @param    aPlugins    On return, contains all the different plugin uid's in
-		*               		db. Empty if none found.
-		*/
-		void GetPluginsL( RArray<TInt32>& aPlugins );
-		
-		/**
-		* Get the next happening time of schedule from database based on plugin uid.
-		* KErrLocked -error code if Backup/Restore is going on.	
-		* @param    aPluginUid  Plugin uid in which to base the search
-	    * @return   Next start time of the schedule of given plugin Uid.
-		*/
-		TTime GetNextScheduleTimeByPluginL( TInt32 aPluginUid );
-		
-		/**
-		* Gets all the schedules that are going to happen at the given time based on plugin uid.
-		* KErrLocked -error code if Backup/Restore is going on.	
-		* @param    aScheduleTime       Start time in which to base the search
-		* @param    aPluginUid          Plugin uid in which to base the search
-		* @param    aNextScheduleArray  On return, contains pointers to schedules.
-		*/
-		void GetSchedulesByTimeAndPluginL( 
-		                         const TTime& aScheduleTime, 
-                                 TInt32 aPluginUid,
-					             RPointerArray<CCseScheduledProgram>& aNextScheduleArray );
-
-
-	private:
-	    /**
-        * C++ default constructor.        
-        */
-		CCseScheduleDB();
-	
-		/**
-        * By default Symbian 2nd phase constructor is private.
-        */
-		void ConstructL();
-
-	private: // Methods        
-        /**
-        * Checks the db version from db. If it is older than current one, destroy it
-        * and create new one.
-        * @return	None
-        */
-        void CheckDbVersionL();
-        
-        /**        
-        * Open DB or create new database if DB file is not found. 
-        * @return	None
-        */
-        void OpenOrCreateDbL();
-            	
-    	/**
-		* Create schedule table.
-		* @param	aDatabase where to create schedule table.
-		* @return	None
-		*/
-    	void CreateScheduleTableL( RDbStoreDatabase& aDatabase ) const;
-    	
-    	/**
- 		* Create database table.
- 		* @param	aDatabase where to create database table.
- 		* @return	None
- 		*/
-     	void CreateDatabaseTableL( RDbStoreDatabase& aDatabase );
-     	
-     	/**
-  		* Gets the database version number
-  		* @param	None
-  		* @return	None
-  		*/
-      	TInt GetDbVersionL(  );
-      	
-     	/**
-  		* Set hardcoded database version to database. Used after creating new database.
-  		* @param	None
-  		* @return	None
-  		*/
-      	void SetDatabaseVersionL();
-
-        /**
-        * Removes existing database.
-        * @return   None
-        */
-		void RemoveDbL();
-		
-		/**
-        * Static call back for CPeriodic.
-        * @param    aThis   Pointer to CCseScheduleDB so that we can
-        *                   direct call back to class. 
-        * @return   Always TFalse
-        */
-		static TInt CompactCallback( TAny* aThis );
-		
-		/**
-        * We want to compact database 30 seconds after last database operation.
-        * this resets 30 sec counter.
-        * @return   None
-        */
-		void ResetCompactTimer( );
-		
-		/**
-        * Compacts database.
-        * @return   None
-        */
-		void CompactDb();
-		
-		/**
-        * Closed Db file and sets iDbAccess to ECseDbLocked.
-        * @return   None
-        */
-		void CloseDbFile();
-		
-		/**
-        * Closed Db file and sets iDbAccess to ECseDbOpen.
-        * @return   None
-        */
-		void OpenDbFileL();
-		
-		/**
-        * Leaves with KErrLocked if iDbAccess is ECseDbLocked.
-        * @return   None
-        */
-		void LeaveIfDbLockedL() const;
-
-	private: // Data
-		/**
-		* File server session is connected in construction and closed in
-		* destruction
-		*/
-    	RFs iFsSession;
-    	
-    	/**
-    	* File name of the database which to handle
-    	*/    	
-		TFileName iDbFile;
-		
-		/**
-		* For database operations
-		*/
-        RDbStoreDatabase iScheduleDb;
-        
-        /**
-        * For creating and opening services database file. Own.
-        */
-        CFileStore* iScheduleFileStore;
-
-        /**
-        * Timer used in compacting database. Own.
-        */
-		CPeriodic* iCompactTimer;  
-        
-        /**
-        * SQL string for SQL calls
-        */
-        TBuf<KCseCustomSqlLength> iSqlSchedule;
-        
-        /**
-        * Status is database accessible
-        */
-        TCseDatabaseAccess iDbAccess;
-        
-        /**
-        * Wrapper to get notification if backup/restore is
-        * about to happen. Own.
-        */
-        CBaBackupSessionWrapper* iBackupWrapper;
-};
-#endif _CCSESCHEDULEDB_H
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerLandLord.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header file for CCseSchedulerThreadCrossroads-class.*
-*/
-
-
-
-
-#ifndef _CCSESCHEDULERLANDLORD_H
-#define _CCSESCHEDULERLANDLORD_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "MCseSemaphoreSignalObserver.h"
-
-// CONSTANTS
-#define KThreadNameSize     19
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class MCseScheduleObserver;
-class RThread;
-class CCseScheduledProgram;
-class CCseSchedulerThreadPacket;
-class CCseSemaphoreController;
-class CActiveSchedulerWait;
-
-/**
-* LandLord controlling shared data that is given to thread. After plugin thread is started,
-* nothing should be accessed before thread has died.
-*
-* Also observes thread when it dies.
-*/
-class CCseSchedulerLandLord : public CActive,
-                              public MCseSemaphoreSignalObserver
-                              
-{
-	public:	// Constructors and destructors
-		/**
-        * Destructor.
-        */
-		virtual ~CCseSchedulerLandLord();
-		
-		/**
-        * Two-phased constructor.
-        * @param    aObserver   A pointer back to plugin controller.
-        */
-		static CCseSchedulerLandLord* NewL( MCseScheduleObserver* aObserver );
-
-	private: // Constructors and destructors
-	 	/**
-        * By default Symbian 2nd phase constructor is private.
-        */
-		void ConstructL();
-		
-		/**
-        * C++ default constructor.
-		* @param    aObserver   A pointer back to plugin controller.
-        */
-		CCseSchedulerLandLord( MCseScheduleObserver* aObserver );	
-		
-    public:
-        /**
-        * Set schedule to LandLord.
-        * @param aData  CCseScheduledProgram to be set.
-        */
-        void SetScheduleL( CCseScheduledProgram& aData );
-        
-        /**
-        * Returns ThreadPacket of the LandLord
-        * @return pointer to ThreadPacket
-        */
-        CCseSchedulerThreadPacket* ThreadPacket( );
-		
-		/**
-        * Run plugin. Creates thread where the CCseSchedulerPluginStarter is run
-        * and sets itself observing when thread dies.        
-        */
-		void RunPluginL( );
-		
-		/**
-         * Clears landlord. Uses semaphore to signal plugin thread that thread needs
-         * to be taken down.
-         * Synchronous.        
-         */
-		void ClearL();
-		
-		/**
-        * Returns ETrue if LandLord is working (plugin is running).        
-        */
-		TBool IsWorking();
-		
-	private: // CActive
-		/**
-        * RunL
-        * @return   None
-        */	
-		void RunL();
-		
-		/**
-        * RunError
-        * @return   
-        */
-		TInt RunError( TInt aError );
-		
-		/**
-        * DoCancel
-        * @return   None
-        */
-		void DoCancel();
-    
-	private:  // from MCseSemaphoreSignalObserver
-        void SemaphoreSignalled( );   
-		
-    private:    // New methods
-        /**
-        * Generates unique thread name to internal iThreadName-buffer.
-        */
-        void GenerateThreadNameL();
-        
-        /**
-         * Generates semaphores to signal thread shutdown and when shutdown
-         * is completed.
-         */
-        void GenerateSemaphoresL( );
-        
-        /**
-         * Starts or stops active wait. Used when thread needs to be taken down.
-         */
-        void ActiveWait( TBool aStart );     
-		
-	private: // Data
-		/**
-		* Pointer back to plugin controller. Own.
-		*/
-		MCseScheduleObserver* iObserver;
-		
-		/**
-		* ThreadPacket. Contains data to be given plugin thread when run. Own.
-		*/
-		CCseSchedulerThreadPacket* iThreadPacket;
-		
-		/**
-		* Thread where plugin is run.
-		*/
-		RThread iThread;
-		
-		/**
-		* Unique thread name. Own.
-		*/
-		HBufC* iThreadName;
-		
-		/**
-		* ETrue if thread is running, EFalse if not.
-		*/
-		TBool iThreadRunning;
-		
-		/**
-		* Semaphore signalled when plugin is wanted to take down.
-		*/
-		RSemaphore iPluginShutdownSemaphore;
-
-     	/**
-		* Semaphore signalled when plugin has been taken down.
-		*/		
-		RSemaphore iPluginShutdownCompleteSemaphore;
-		
-		/**
-		* ActiveSchedulerWait. Own.
-		*/
-		CActiveSchedulerWait* iActiveSchedulerWait;
-		
-		/**
-		* Checks once a while if plugin shutdown has been completed.
-		* Own.
-		*/
-		CCseSemaphoreController* iShutdownCompleteMonitor;
-		
-		/**
-         * ETrue if shutdown has been signalled to CCSeSchedulerPluginStarter.
-         * EFalse if not.
-         */
-		TBool iTakedownRequested;
-};
-
-#endif //_CCSESCHEDULERLANDLORD_H
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerMultiPluginController.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header for MultiPluginController-class*
-*/
-
-
-
-
-#ifndef __CCSESCHEDULERMULTIPLUGINCONTROLLER_H
-#define __CCSESCHEDULERMULTIPLUGINCONTROLLER_H
-
-// INCLUDES
-#include "CCseSchedulerPluginControllerBase.h"
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-class CCseSchedulerPluginStarter;
-class CCseSchedulerLandLord;
-
-/**
-* Controller for plugins that can be several in run at same time
-*/
-class CCseSchedulerMultiPluginController : public CCseSchedulerPluginControllerBase								  
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * @params aEngine reference to engine
-        * @params aPluginUid plugin uid of the plugin this plugin controller is made for
-        * @return CCseSchedulerPluginControllerBase pointer to CCseSchedulerPluginControllerBase class
-        */
-        static CCseSchedulerMultiPluginController* NewL( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerMultiPluginController();
-    
-    public: // from CCseSchedulerPluginControllerBase
-        void ClearControllerL();
-
-        TBool IsControllerActive();
-        
-        void RunPluginsL() ;
-                
-        void DoCleanUp() ;
-                
-        void ScheduleCompletedL( const TUint32 aDbIdentifier, TInt aCompletitionCode );
-
-    private: // Constructors and destructor
-        /**
-        * C++ default constructor.
-        */
-        CCseSchedulerMultiPluginController( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-    private: // New methods
-        /**
-        * Handles succesfully completed schedules.
-        * @param aDbIdentifier DbIdentifier of schedule just completed
-        */
-		void ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier );
-    
-        /**
-        * Handles failed schedules.
-        * @param aDbIdentifier DbIdentifier of schedule just completed
-        * @param aCompletitionCode Error code of the completed schedule.
-        */
-        void HandleScheduleErrorL( const TUint32 aDbIdentifier,
-                                   TUint32 aCompletitionCode );
-    private: // Data
-    
-        /**
-        * LandLords. Owns data that is given to new thread and acts as observer to thread.
-        * Own.
-        */  
-        RPointerArray<CCseSchedulerLandLord> iLandLords;        
-    };
-    
-#endif // __CCSESCHEDULERMULTIPLUGINCONTROLLER_H
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerPluginControllerBase.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header for PluginControllerBase-class*
-*/
-
-
-
-
-#ifndef __CCSESCHEDULERPLUGINCONTROLLERBASE_H
-#define __CCSESCHEDULERPLUGINCONTROLLERBASE_H
-
-// INCLUDES
-#include <e32base.h>
-#include <ipvideo/MCsePluginObserver.h>
-#include <ipvideo/MCseScheduleObserver.h>
-#include "MCseSchedulerTimerObserver.h"
-#include "MCsePluginControllerObserver.h"
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-class CCseScheduledProgram;
-class CCseSchedulerTimer;
-class CCseSchedulerServerEngine;
-
-/**
-* Base class for plugin controllers. Handles all plugin related stuff except scheduling logic.
-*/
-class CCseSchedulerPluginControllerBase : public CBase,                                          
-                                          public MCseScheduleObserver,
-                                          public MCseSchedulerTimerObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * @params aEngine reference to engine
-        * @params aPluginUid plugin uid of the plugin this plugin controller is made for
-        * @return CCseSchedulerPluginControllerBase pointer to CCseSchedulerPluginControllerBase class
-        */
-        static CCseSchedulerPluginControllerBase* NewL( MCsePluginControllerObserver& aEngine, TInt32 aPluginUid );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerPluginControllerBase();
-
-    protected:
-        /**
-        * C++ default constructor.
-        */
-        CCseSchedulerPluginControllerBase( MCsePluginControllerObserver& aEngine, TInt32 aPluginUid );
-        
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();           
-    
-    public: // from MCseScheduleObserver-class     
-        /**
-        * Plugins uses this method to inform common scheduler engine that
-        * schedule is handled.
-		* @param aDbIdentifier DbIdentifier of scheduled program that just
-		*                      has been processed.
-        */
-        virtual void ScheduleCompletedL( const TUint32 aDbIdentifier, TInt aCompletitionCode );
-
-    public: // from MCseSchedulerTimerObserver-class        
-        /**
-        * Plugins uses this method to inform common scheduler engine that
-        * schedule is handled.
-		* @param aDbIdentifier DbIdentifier of scheduled program that just
-		*                      has been processed.
-        */
-        virtual void TimerErrorL( const TInt32 aError );
-        
-        /**
-        * Timer is up, run the Plugins!!!
-        */
-        virtual void RunPluginsL( );
-
-    public: // New methods
-    
-        /**
-         * Sets plugin to be cleared after callstack break.
-         * @param aToBeCleared ETrue if controller needs to be cleared.
-         */
-        void SetToBeCleared( TBool aToBeCleared );
-        
-        /**
-         * Clears controller: clears (takes down all threads running for the plugin)
-         * all landlords. 
-         */
-        virtual void ClearControllerL();
-        
-        /**
-        * Cleans the controller from LandLord(s) that aren't needed anymore.
-        */
-        virtual void DoCleanUp( );
-     
-        /**
-        * Sets schedules to controller. More precise information is found from Uni and Multi
-        * controller classes.
-        * @params aScheduleArrat    Array of schedules to be set into controller. All given
-        *                           schedules should have same start time.
-        */
-        virtual void SetSchedulesL( RPointerArray<CCseScheduledProgram>& aScheduleArray );
-                
-        /**
-        * Gets plugin id. This Uid of the plugin going to be run when time is right. Can be
-        * used, for example, to find right kind of controller to a schedule.
-        * @return plugin Uid of the plugin used to run the schedule.
-        */
-        TInt32 PluginUid( );        
-        
-        /**
-        * Checks if the plugin is obsolete (There are no more schedules to be run).
-        * @return ETrue if obsolete, EFalse if not.
-        */
-        TBool IsObsolete() const;
-
-        /**
-        * Checks if the plugin is set to be cleared.
-        * @return ETrue if set, EFalse if not.
-        */
-        TBool IsToBeCleared();
-        
-        /**
-        * Checks if there are active plugins in controller.
-        * @return ETrue if active plugins found, EFalse otherwise
-        */
-        virtual TBool IsControllerActive();
-        
-    protected: //data        
-        /**
-        * Array containing schedules to be run. Own.
-        */
-        RPointerArray<CCseScheduledProgram> iScheduleArray;
-        
-         /**
-        * Timer class. Own.
-        */
-        CCseSchedulerTimer* iTimer;
-        
-        /**
-        * Reference to engine
-        */
-        MCsePluginControllerObserver& iEngine;
-        
-        /**
-        * Uid of the plugin contrelled by this controller.
-        */        
-        TInt32 iPluginUid;
-        
-        /**
-        * Boolean indicating if this plugin controller is to cleared
-        * (plugin running is deleted).
-        */        
-        TBool iToBeCleared;
-    };
-    
-#endif // __CCSESCHEDULERPLUGINCONTROLLERBASE_H
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerPluginStarter.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header for PluginStarter-class*
-*/
-
-
-
-#ifndef __CCSESCHEDULERPLUGINSTARTER_H
-#define __CCSESCHEDULERPLUGINSTARTER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <ipvideo/MCsePluginObserver.h>
-#include "MCseSemaphoreSignalObserver.h"
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-class CCseSchedulerThreadPacket;
-class CCseSchedulerPluginIF;
-class CCseSchedulerLandLord;
-class CCseSemaphoreController;
-
-/**
-* Handles running and shutting down one plugin. Runs in seperate thread than rest of the SchedulerEngine
-*/
-class CCseSchedulerPluginStarter : public CBase,
-                                   public MCseSemaphoreSignalObserver,
-                                   public MCsePluginObserver
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * @param    aThreadPacket   Thread packet containing all the needed information to plugin
-        *                           to be run.
-        * @return CCseSchedulerPluginStarter pointer to CCseSchedulerPluginStarter class
-        */
-        static CCseSchedulerPluginStarter* NewL( CCseSchedulerThreadPacket* aThreadPacket );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerPluginStarter();
-        
-    public: // from MCsePluginObserver-class
-        void PluginCompleted( TInt aCompletitionValue );
-        
-    public: // from MCseSemaphoreSignalObserver-class
-        void SemaphoreSignalled( );        
-        
-    public: // New methods
-        /**
-        * Creates plugin and runs schedule in it.
-        * @param    aParam    Any pointer that actually holds CCseThreadPacket
-        * @return   KErrNone if succesful, otherwise common Symbian error codes.
-        */
-        static TInt StartThread( TAny* aParam );
-
-    private: // Constructors and destructor
-        /**
-        * C++ default constructor.
-        */
-        CCseSchedulerPluginStarter( CCseSchedulerThreadPacket* aThreadPacket );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-    private:  // New methods
-		/**
-        * Called from actual StartThread. Creates CCseSchedulerPluginStarter.
-        * @param    aParam    Any pointer that actually holds CCseThreadPacket        
-        */
-        static void DoStartThreadL( TAny* aParam );        
-        
-        /**
-        * Creates plugin based on schedule and runs schedule in it.
-        */
-        void RunPluginL( );
-        
-        /**
-		* Plugin complete callback used with CIdle. Used to break call stack.
-		* @param    aPtr    Pointer back to CCseSchedulerPluginStarter-class
-		* @return   Always  EFalse.
-		*/
-		static TInt PluginCompleteCallback( TAny* aPtr );
-
-		/**
-		* Plugin complete callback handler. Stops active scheduler, sets completition value
-		* and runs down the plugin.		
-		* @return   Always EFalse
-		*/
-		TInt HandlePluginCompleteCallback();
-        
-   private:  // Data
-        /**
-        * Thread packet. Includes all needed information for plugin and the completiotion value.
-        * Own.
-        */
-        CCseSchedulerThreadPacket* iThreadPacket;
-        
-        /**
-        * Plugin in run. Own.
-        */
-        CCseSchedulerPluginIF* iPlugin;
-        
-        /**
-        * CIdle, used to break call stack when plugin completes. Own.
-        */ 
-        CIdle* iCompletitionBreaker;
-        
-        /**
-        * Bool flagging if plugin is wanted to be shot down
-        */ 
-        TBool iPluginRdyToTakedown;
-        
-        /**
-        * Semaphore monitor. Check once a while if shutdown semaphore is signalled.
-        */ 
-        CCseSemaphoreController* iSemaphoreMonitor;
-    };
-    
-#endif // __CCSESCHEDULERPLUGINSTARTER_H
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerServer.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header for Scheduler Server class*
-*/
-
-
-
-
-#ifndef __CCSESCHEDULERSERVER_H
-#define __CCSESCHEDULERSERVER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "CseSchedulerServer.pan"   // Panic codes
-
-// CONSTANTS
-#define KCseSchedulerMinHeapSize 2*KMinHeapSize
-#define KCseSchedulerMaxHeapSize 0x1F0000 
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CCseSchedulerServerEngine;
-
-// CLASS DECLARATION
-/**
-*  Server class
-*
-*  @lib CseSchedulerServer.exe
-*/
-class CCseSchedulerServer : public CPolicyServer
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * Two-phased constructor.        
-        */
-         static CCseSchedulerServer* NewLC( );
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerServer();
-    
-    public: // New functions
-
-        /**
-        * Thread function, creates cleanup stack for the thread.
-        * @return KErrNone
-        */
-        static TInt ThreadFunction( );
-        
-        /**
-        * Thread function, the active scheduler is installed and started.
-        * @return None.
-        */
-        static void ThreadFunctionL( );
-
-        /**
-        * Panics server.
-        * @param aPanic panic code.
-        * @return None.
-        */
-        static void PanicServer( TCseSchedulerServPanic aPanic );
-        
-        /**
-        * Starts the server thread.
-        * @return None.
-        */
-        static TInt StartThread();
-        
-        /**
-        * Dec
-        * @return None.
-        */
-        void Dec();
-        
-        /**
-        * Inc
-        * @return None.
-        */
-        void Inc();
-        
-        /**
-        * Create new Session.
-        * @param aVersion server version number.
-        * @return CSharableSession pointer to new created session.
-        */
-        CSession2* NewSessionL( const TVersion &aVersion,
-                                const RMessage2& aMessage ) const;
-
-        /**
-        * Gets engine object.
-        * @return CCseSchedulerServerEngine pointer.
-        */
-        CCseSchedulerServerEngine* GetEngineObjectL();
-
-		/**
-		* Makes check if server is still needed (has schedules on run or active
-		* client), if not calls ActiveScheduler::Stop resulting server shutdown.
-		*/
-		void StopServer();
-
-    protected: // Functions from base classes
-
-        /**
-        * From CPolicyServer, called by framework to perform 
-        * custom security check for any client messages.
-        * 
-        * @param aMsg     Message.
-        * @param aAction  Action.
-        * @param aMissing Security info.
-        * @return Result of security check.
-        */
-        TCustomResult CustomSecurityCheckL( const RMessage2 &aMsg, TInt &aAction, TSecurityInfo &aMissing );
-
-	    /**
-		* Starter callback used with CIdle. Used to break call stack.
-		* @param    aPtr    Pointer back to CCseSchedulerUserInformer-class
-		* @return   Always EFalse.
-		*/
-		static TInt StarterCallback( TAny* aPtr );
-	
-		/**
-		* Starter callback handler. Checks if server is actually needed (there
-		* is client or schedules to be run). If engine is not needed, signals
-		* server to be deleted.
-		* @return   Always EFalse
-		*/
-		TInt HandleStarterCallback();
-				
-   
-    private: // Constructors and destructor 
-        
-        /**
-        * C++ default constructor.
-        */
-        CCseSchedulerServer();
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL( );
-    
-    private: // New functions
-
-        /**
-        * Deletes scheduler engine.
-        * @return None.
-        */
-        void DeleteSchedulerEngine();
-
-        
-    private: // Data    
-        /**
-        * Object container index. Own.
-        */
-        CObjectConIx* iContainerIx;
-
-        /**
-        * Object container. Own.
-        */
-        CObjectCon* iObjectCon;
-        
-        /**
-        * Number of sessions
-        */
-        TInt iSessionCount;
-
-        /**
-        * Engine object. Own.
-        */
-        CCseSchedulerServerEngine* iSchedulerEngine;       
-        
-        /**
-        * CIdle, used to break call stack when scheduler is started. Own.
-        */ 
-        CPeriodic* iStarterBreaker;
-    };
-
-#endif // __CCSESCHEDULERSERVER_H
-
-// End of File
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerServerEngine.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Interface for Scheduler Server's Engine class*
-*/
-
-
-
-
-#ifndef __CCSESCHEDULERSERVERENGINE_H
-#define __CCSESCHEDULERSERVERENGINE_H
-
-//  INCLUDES
-#include <ipvideo/MCseScheduleObserver.h>   // Observer so that CCseSchedulerTimer can inform engine.
-#include "MCsePluginControllerObserver.h"   // Observer so that CCseSchedulerTimer can inform engine.
-#include "CseSchedulerServer.pan"   // Panic codes
-
-
-// CONSTANTS
-// Usually we have only one scheduled event at a time so we set granularity to 1, but
-// in some rare cases we migth have more so we have to use array.
-const int KCseScheduleGranularity      		= 1;
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CCseScheduleDB;
-class CCseSchedulerTimer;
-class CCseScheduledProgram;
-class CCseSchedulerServerSession;
-class CCseSchedulerServer;
-class CCseSchedulerPluginControllerBase;
-
-
-// CLASS DECLARATION
-// None
-
-/**
-* Server's "brain". Controls all subsession messages to current object for 
-* futher prosessing. Manages message list thru the reguest handler. Reads from 
-* the client address space and writes back to client address space. Controls 
-* sub objet request(s).
-*/
-class CCseSchedulerServerEngine : public CObject,
-								  public MCsePluginControllerObserver
-    {
-    public: // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        * @param Reference to scheduler server
-        * @return CCseSchedulerEngine pointer to CCseSchedulerEngine class
-        */
-        static CCseSchedulerServerEngine* NewL( CCseSchedulerServer& aServer );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerServerEngine();
-        
-    public: // From MCsePluginControllerObserver        
-    	
-    	void ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier );
-    	    	
-    	void ScheduleCompletedWithErrorL( const TUint32 aDbIdentifier, TUint32 aCompletionCode );
-    	    	
-    	void IncreaseScheduleRunCountL( const TUint32 aDbIdentifier );
-    	    	
-    	TBool IsAllowedToRun( TUint32 aDbIdentifier );
-    	    	
-        void ScheduleNotValid( const TUint32 aDbIdentifier );
-                
-        void RequestReschedule( );
-                
-        void ClearingDone();
-   
-   public: // New methods     
-        /**
-		* Plugin complete callback used with CIdle. Used to break call stack.
-		* @param    aPtr    Pointer back to CCseSchedulerUserInformer-class
-		* @return   Always EFalse.
-		*/
-		static TInt CompletitionCallback( TAny* aPtr );
-
-		/**
-		* Schedule complete callback handler. Removes schedule from "on run list",
-		* informs engine that schedule has comlete and checks if the plugin where
-		* schedule was run still needed.
-		* @return   Always EFalse
-		*/
-		TInt HandleCompletitionCallback();
-		
-		/**
-         * Cleaner callback used with CIdle. Used to break call stack.         
-         * @param    aPtr    Pointer back to CCseSchedulerUserInformer-class
-         * @return   Always EFalse.
-         */
-		static TInt CleanerCallback( TAny* aPtr );
-	
-		/**
-		 * Cleaner callback handler. Goes through all plugin contollers and clears them
-		 * (shutdowns all threads running plugins).		 
-		 * @return   Always EFalse		 
-		 */
-		TInt HandleCleanerCallback();
-
-    public: // From CObject
-        /**
-        * Overwrites CObjects Close. Sets the AccesCount to zero.        
-        * @return   None
-        */
-        void Close();        
-
-    public: // New functions
-    
-        /**
-        * Does the general message handling.
-        * @param aMessage contains data from the client.
-        * @return None.
-        */
-        void GeneralServiceL( const RMessage2& aMessage );
-
-        /**
-        * Service cancellation.
-        * @param aMessage contains data from the client.
-        * @return None.
-        */
-        void CancelService( const RMessage2& aMessage );       
-        
-        /**
-        * Checks if scheduler is active atm (schedules in run or waitint)        
-        * @return ETrue if active and EFalse if not.
-        */
-        TBool IsSchedulerActive() const;
-        
-        /**
-        * Reschedules engine (get new "next schedule" from database and
-        * resets timer).       
-        * @return   None.
-        */
-		void RescheduleL();
-		
-		/**
-        * Reschedules engine (get new "next schedule" from database and
-        * resets timer).       
-        * @return   None.
-        */
-		void RescheduleByPluginL( TInt32 aPluginUid );
-		
-    private: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        * @param Reference to scheduler server.
-        */
-        CCseSchedulerServerEngine( CCseSchedulerServer& aServer );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();                
-    
-
-    private: // New functions  
-        /**
-        * Panic the client on server side.        
-        * @param    aPanic      Our panic code.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void PanicClient( TCseSchedulerServPanic aPanic, 
-                          const RMessage2& aMessage ) const;
-        
-        /**
-        * Adds schedule to database
-        * @param    aMessage    A message from client
-        * @return   None.
-        */                  
-        void AddScheduleL( const RMessage2& aMessage );
-        
-        /**
-        * Removes schedule from database
-        * @param    aMessage    A message from client
-        * @return   None.
-        */        
-        void RemoveScheduleL( const RMessage2& aMessage );
-        
-        /**
-        * Gets all schedules from database
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetSchedulesL( const RMessage2& aMessage );
-        
-        /**
-        * Adds schedule to database
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetScheduleL( const RMessage2& aMessage );
-        
-        /**
-        * Gets externalize length of one specific schedule
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetScheduleLengthL( const RMessage2& aMessage );
-        
-        /**
-        * Gets schedules based on application UID.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetSchedulesByAppUidL( const RMessage2& aMessage );
-	    
-	    /**
-        * Gets externalize length of the schedules of one application UID
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-		void GetScheduleArrayLengthByAppUidL( const RMessage2& aMessage );
-
-		/**
-        * Gets externalize length of the overlapping schedules
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-		void GetOverlappingSchedulesLengthL( const RMessage2& aMessage );
-
-	    /**
-        * Gets overlapping schedules of given timeframe
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-		void GetOverlappingSchedulesL( const RMessage2& aMessage );
-		
-		/**
-        * Gets startup schedules from database (schedules that were on run when
-        * phone was shut down)
-        * @return None.
-        */
-		void EngineSchedulesStartup();
-		
-		/**
-        * Gets externalize length of the schedules of one plugin UID
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetScheduleArrayLengthByPluginUidL( const RMessage2& aMessage );
-        
-        /**
-        * Gets schedules based on plugin UID.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetSchedulesByPluginUidL( const RMessage2& aMessage );
-    
-        /**
-        * Gets externalize length of the schedules of one type.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetScheduleArrayLengthByTypeL( const RMessage2& aMessage );
-
-        /**
-        * Gets schedules based on schedule type.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetSchedulesByTypeL( const RMessage2& aMessage );
-
-        /**
-        * Gets externalize length of the schedules of specific timeframe.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetScheduleArrayLengthByTimeframeL( const RMessage2& aMessage );
-    
-        /**
-        * Gets schedules between given timeframe.
-        * @param    aMessage    A message from client
-        * @return   None.
-        */
-        void GetSchedulesByTimeframeL( const RMessage2& aMessage );
-		
-    private:    // Data
-        /**
-        * DB class. Own.
-        */
-        CCseScheduleDB* iDb;
-
-        /**
-		* Array holding all plugin controllers.
-		*/
-        RPointerArray<CCseSchedulerPluginControllerBase> iPluginControllerArray;
-        
-        /**
-        * CIdle, used to break call stack when schedule completes. Own.
-        */ 
-        CIdle* iCompletitionBreaker;
-        
-        /**
-        * Reference to scheduler server
-        */ 
-        CCseSchedulerServer& iServer;
-    };
-
-#endif // __CCSESCHEDULERSERVERENGINE_H
-
-// End of file
-
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerServerSession.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Interface for Scheduler Server's Session class*
-*/
-
-
-
-
-#ifndef __CCSESCHEDULERSERVERSESSION_H
-#define __CCSESCHEDULERSERVERSESSION_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "CseSchedulerServer.pan"   // Panic codes
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None
-        
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-class CCseSchedulerEngine;
-class CCseSchedulerServer;
-
-// CLASS DECLARATION
-
-/**
-*  CCseSchedulerSession
-*
-*  @lib
-*/
-class CCseSchedulerServerSession : public CSession2
-    {
-    public:  // Constructors and destructor
-        
-        /**
-        * Two-phased constructor.
-        * @Param aClient reference client thread
-        * @Param aServer pointer to Server
-        * @return CCseSchedulerSession pointer to CCseSchedulerSession class
-        */
-        static CCseSchedulerServerSession* NewL( CCseSchedulerServer* aServer );
-
-        
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerServerSession();
-
-    public: // New functions   
-        
-        /**
-        * Server
-        * @return a pointer to server
-        */
-        CCseSchedulerServer* Server();
-            
-        /**
-        * Service
-        * @param aMessage contains data from the client.
-        * @return None
-        */
-        void ServiceL( const RMessage2& aMessage );
-        
-    private: // New functions   
-
-        /**
-        * Dispatch message
-        * @param aMessage contains data from the client.
-        * @return None
-        */
-        void DispatchMessageL( const RMessage2& aMessage );
-        
-        /**
-        * New Object
-        * @param aMessage contains data from the client.
-        * @return None
-        */
-        void NewObjectL( const RMessage2& aMessage );
-        
-        /**
-        * Deletes object, can't fail - can panic client
-        * @param aHandle handle
-        * @return None
-        */
-        void DeleteObject( TUint aHandle );
-        
-        /**
-        * Counts resources
-        * @return Number of resources
-        */
-        TInt CountResources();
-
-        /**
-        * Panics client
-        * @param aPanic panic code
-        * @return None
-        */
-        void PanicClient( TCseSchedulerServPanic aPanic ) const;
-        
-    private:  // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        * @Param aClient reference client thread
-        */
-        CCseSchedulerServerSession();
-
-        /**
-        * Symbian 2nd phase constructor.
-        * @Param aServer pointer to Server
-        */
-        void ConstructL( CCseSchedulerServer* aServer );
-
-    private: // Data
-        
-        /**
-        * Object index for this session. Own.
-        */
-        CObjectIx* iObjects;
-
-        /**
-        * Total number of resources allocated
-        */
-        TInt iResourceCount;
-        
-    };
-
-#endif // __CCSESCHEDULERSERVERSESSION_H
-
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerThreadPacket.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header file for CCseSchedulerThreadPacket-class.*
-*/
-
-
-
-#ifndef _CCSESCHEDULERTHREADPACKET_H
-#define _CCSESCHEDULERTHREADPACKET_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// CONSTANTS
-// None
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CCseScheduledProgram;
-
-/**
-* Class holding CCseScheduledProgram and ThreadResultCode. This is given to
-* separate plugin thread and should not be accessed before thread dies.
-*/
-class CCseSchedulerThreadPacket : public CBase
-{
-	public:	// Constructors and destructors
-		/**
-        * Destructor.
-        */
-		virtual ~CCseSchedulerThreadPacket();
-		
-		/**
-        * Two-phased constructor.
-        * @param    aObserver   A pointer back to server engine through observer
-        */
-		static CCseSchedulerThreadPacket* NewL(  );
-
-	private: // Constructors and destructors
-	 	/**
-        * By default Symbian 2nd phase constructor is private.
-        */
-		void ConstructL();
-		
-		/**
-        * C++ default constructor.
-		* @param    aObserver   A pointer back to server engine through observer.
-        */
-		CCseSchedulerThreadPacket(  );	
-		
-    public: // New methods
-        /**
-        * Sets schedule to thread packet. Overwrites existing one.
-        * @param    aData   Scheduled program to be set        
-        */
-        void SetScheduleL( CCseScheduledProgram& aData );
-        
-        /**
-        * Gets schedule from thread packet.
-        * @return   Pointer to scheduled program.
-        */
-        CCseScheduledProgram* Schedule( );
-        
-        /**
-        * Sets threads result code. Should be set before thread completes.
-        * Defaults to KErrGeneral.
-        * @param    aResultCode   New result code. Overwrites existing one.
-        */
-        void SetResultCode( TInt32 aResultCode);
-        
-        /**
-        * Gets threads result code. 
-        * @return Threads result code. Defaulted to KErrGeneral if not set.
-        */
-        TInt32 ResultCode( );
-        
-        /**
-        * Sets semaphore used to signal plugin shutdown request.
-        * @param    aSemaphore   Semaphore used to signal shutdown
-        */
-        void SetShutdownSemaphore( RSemaphore& aSemaphore );
-        
-        /**
-        * Sets semaphore used to signal when plugin shutdown has completed.
-        * @param    aSemaphore   Semaphore used to signal shutdown
-        */
-        void SetShutdownCompleteSemaphore( RSemaphore& aSemaphore );
-        
-        /**
-        * Gets semaphore used to signal plugin shutdown request.
-        * @return RSemaphore Semaphore used to signal plugin shutdown request.
-        */
-        RSemaphore& ShutdownSemaphore();
-        
-        /**
-        * Gets semaphore used to signal when plugin shutdown has completed.
-        * @return RSemaphore Semaphore used to signal when plugin shutdown has completed.
-        */
-        RSemaphore& ShutdownCompleteSemaphore();
-		
-	private: // Data
-	    /**
-	    * Scheduled program to be run in the plugin thread. Own.
-	    */
-		CCseScheduledProgram* iSchedule;
-		
-		/**
-	    * Plugin completition code after the thread dies.
-	    */
-		TInt32                iResultCode;
-		
-		/**
-	    * Semaphore signalled when plugin shutdown is wanted while plugin is running.
-	    */
-		RSemaphore            iShutdownSemaphore;
-		
-		/**
-	    * Semaphore signalled when plugin shutdown is completed.
-	    */
-		RSemaphore            iShutdownCompleteSemaphore;
-};
-
-#endif //_CCSESCHEDULERTHREADPACKET_H
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerTimer.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header file for CCSeSchdulerTimer-class.*
-*/
-
-
-
-
-#ifndef _CCSESCHEDULERTIMER_H
-#define _CCSESCHEDULERTIMER_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// CONSTANTS
-// None
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class MCseSchedulerTimerObserver;
-class CCseSchedulerPluginIF;
-
-/**
-* Timer for determining when schedules should be run.
-*/
-class CCseSchedulerTimer : public CTimer
-{
-	public:	// Constructors and destructors
-		/**
-        * Destructor.
-        */
-		virtual ~CCseSchedulerTimer();
-		
-		/**
-        * Two-phased constructor.
-        * @param    aObserver   A pointer back to server engine through observer
-        */
-		static CCseSchedulerTimer* NewL( MCseSchedulerTimerObserver* aObserver );
-
-	public:	// New methods
-		/**
-        * Sets timer to fire on given time
-        * @param    aTime   Time when timer is set to fire
-        * @return   None
-        */
-		void SetTimer( const TTime& aTime );
-
-	private: // Constructors and destructors
-	 	/**
-        * By default Symbian 2nd phase constructor is private.
-        */
-		void ConstructL();
-		
-		/**
-        * C++ default constructor.
-		* @param    aObserver   A pointer back to server engine through observer.
-        */
-		CCseSchedulerTimer( MCseSchedulerTimerObserver* aObserver );		
-		
-	private: // Functions from base classes
-		/**
-        * RunL
-        * @return   None
-        */	
-		void RunL();
-		
-		/**
-        * RunError
-        * @return   See CTimer documentation.
-        */
-		TInt RunError( TInt aError );
-		
-		/**
-        * DoCancel
-        * @return   None
-        */
-		void DoCancel();
-		
-	private: // Data
-		/**
-		* Pointer back to scheduler engine. Not own.
-		*/
-		MCseSchedulerTimerObserver* iObserver;
-};
-
-#endif //_CCSESCHEDULERTIMER_H
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/CCseSchedulerUniPluginController.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Header for UniPluginController-class*
-*/
-
-
-
-
-#ifndef __CCSESCHEDULERUNIPLUGINCONTROLLER_H
-#define __CCSESCHEDULERUNIPLUGINCONTROLLER_H
-
-// INCLUDES
-#include "CCseSchedulerPluginControllerBase.h"
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-class CCseSchedulerPluginStarter;
-class CCseSchedulerLandLord;
-
-/**
-* Controller for plugins that can be only be in run one at the time
-*/
-class CCseSchedulerUniPluginController : public CCseSchedulerPluginControllerBase								  
-    {
-    public: // Constructors and destructor
-        /**
-        * Two-phased constructor.
-        * @params aEngine reference to engine
-        * @params aPluginUid plugin uid of the plugin this plugin controller is made for
-        * @return CCseSchedulerPluginControllerBase pointer to CCseSchedulerPluginControllerBase class
-        */
-        static CCseSchedulerUniPluginController* NewL( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CCseSchedulerUniPluginController();
-        
-        
-    public: // from CCseSchedulerPluginControllerBase
-    
-        void ClearControllerL();
-        
-        TBool IsControllerActive();
-        
-        void RunPluginsL() ;
-    
-        void SetSchedulesL( RPointerArray<CCseScheduledProgram>& aScheduleArray );
-    
-        void ScheduleCompletedL( const TUint32 aDbIdentifier, TInt aCompletitionCode );
-        
-        void TimerErrorL( const TInt32 aError );
-
-    private: // Constructors and destructor
-        /**
-        * C++ default constructor.
-        */
-        CCseSchedulerUniPluginController( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid );
-
-        /**
-        * By default Symbian 2nd phase constructor is private.
-        */
-        void ConstructL();
-        
-    private: // New methods
-       	/**
-        * Handles succesfully completed schedules.
-        * @param aDbIdentifier DbIdentifier of schedule just completed
-        */
-		void ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier );
-    
-        /**
-        * Handles failed schedules.
-        * @param aDbIdentifier DbIdentifier of schedule just completed
-        * @param aCompletitionCode Error code of the completed schedule.
-        */
-        void HandleScheduleErrorL( const TUint32 aDbIdentifier,
-                                   TUint32 aCompletitionCode );
-    private: // Data
-        
-        /**
-        * LandLord. Owns data that is given to new thread and acts as observer to thread.
-        * Own.
-        */  
-        CCseSchedulerLandLord* iLandLord;
-        
-        /**
-        * Boolean representing if the LandLord is active or not.
-        */  
-        TBool iIsLandLordWorking;
-    };
-    
-#endif // __CCSESCHEDULERUNIPLUGINCONTROLLER_H
--- a/videoscheduler/SchedulerServer/inc/CCseSemaphoreController.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Semaphore controller. Checks once a while if given semaphore is*
-*/
-
-
-
-
-#ifndef __CCSESEMAPHORECONTROLLER_H
-#define __CCSESEMAPHORECONTROLLER_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None
-        
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-class RSemaphore;
-class MCseSemaphoreSignalObserver;
-
-/**
-*  CCseSemaphoreController
-*
-*  @lib
-*/
-class CCseSemaphoreController : public CTimer
-    {
-    	public:	// Constructors and destructors
-		/**
-        * Destructor.
-        */
-		virtual ~CCseSemaphoreController();
-		
-		/**
-        * Two-phased constructor.
-        * @param    aSemaphore  Semaphore to be followed.
-        * @param    aObserver   A pointer back to server engine through observer.
-        */
-		static CCseSemaphoreController* NewL( RSemaphore& aSemaphore,
-                                              MCseSemaphoreSignalObserver& aObserver );
-      		
-        /**
-        * Starts checking if semaphore is signalled. Default interval is 5000ms.
-        */
-        void Start( );
-        
-        /**
-        * Stops checking semaphore.
-        */
-        void Stop( );
-        
-	private: // Constructors and destructors
-	 	/**
-        * By default Symbian 2nd phase constructor is private.
-        */
-		void ConstructL();
-		
-		/**
-        * C++ default constructor.
-		* @param    aSemaphore  Semaphore to be followed.
-        * @param    aObserver   A pointer back to server engine through observer.
-        */
-		CCseSemaphoreController( RSemaphore& aSemaphore,
-                                 MCseSemaphoreSignalObserver& aObserver  );
-		
-	private: // Functions from base classes
-		/**
-        * RunL        
-        * @return   None
-        */	
-        void RunL();                                           
-        
-        /**
-        * Sets new interval how often semaphore signal is checked. Doesn't restart
-        * checking automatically.
-        * @param aInterval  Interval how often semaphore signal is checked in milliseconds.
-        */
-        void SetInterval( TUint aInterval );
-		
-	private: // data
-	    
-	    /**
-        * Semaphore under observation.
-        */
-	    RSemaphore& iSemaphore;
-	    
-	    /**
-        * Reference to observer.
-        */
-	    MCseSemaphoreSignalObserver& iObserver;
-        
-        /**
-        * Interval how often semaphore signal is checked in milliseconds.
-        * Default is 5000 ms.
-        */
-	    TUint iInterval;
-    };
-
-
-#endif // __CCSESEMAPHORECONTROLLER_H
--- a/videoscheduler/SchedulerServer/inc/CseSchedulerServer.pan	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2005 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 __CSESCHEDULERSERVER_PAN__
-#define __CSESCHEDULERSERVER_PAN__
-
-/** CseEngineServer panic codes */
-enum TCseSchedulerServPanic
-    {
-    ECsePanicBadRequest = 1,
-    ECsePanicBadDescriptor,
-    ECreateTrapCleanup,
-    ECseCreateTrapCleanup,
-    ECseSrvCreateServer,
-    ECsePanicBadSubSessionHandle,
-	ECsePanicCouldNotCreatePrivateDir
-    };
-
-#endif // __CSESCHEDULERSERVER_PAN__
-
-// End of File
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/MCsePluginControllerObserver.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Observer to inform common scheduling engine when plugin is*
-*/
-
-
-
-
-#ifndef __MCSEPLUGINCONTROLLEROBSERVER_H__
-#define __MCSEPLUGINCONTROLLEROBSERVER_H__
-
-class CCseSchedulerPluginControllerBase;
-
-// CLASS DECLARATION
-/**
-* MCsePluginControllerObserver
-* This class offers plugin controller some of the engine's utilities.
-*/
-class MCsePluginControllerObserver
-    {
-    public: // New functions                
-        /**
-        * Method to inform succesfully completed schedules.
-        * @param    aDbIdentifier   Identifier of the schedule that has
-        *                           completed.
-        */
-        virtual void ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier ) = 0;
-        
-        /**
-        * Method to inform failed schedules.
-        * @param    aDbIdentifier   Identifier of the schedule that has
-        *                           completed.
-        */
-        virtual void ScheduleCompletedWithErrorL( const TUint32 aDbIdentifier,
-                                                  TUint32 aErrorCode ) = 0;
-        
-        /**
-        * Orders engine to increase run count of given shedule.
-        * @param    aDbIdentifier   Identifier of the schedule who's run
-        *                           needs to be incremented.
-        */                                                 
-        virtual void IncreaseScheduleRunCountL( const TUint32 aDbIdentifier ) = 0;
-        
-        /**
-        * Asks from engine if given schedule can be run
-        * @param    aDbIdentifier   Identifier of the schedule to be checked.
-        * @return boolean value representing if schedule can be run or not.
-        */
-        virtual TBool IsAllowedToRun( const TUint32 aDbIdentifier ) = 0;
-        
-        /**
-        * Reports not valid schedule to engine (schedule cannot be run anymore).
-        * @param    aDbIdentifier   Reported schedules identifier.        
-        */
-        virtual void ScheduleNotValid( const TUint32 aDbIdentifier ) = 0;
-        
-        /**
-        * Requests rescheduling for plugin controllers        
-        */
-        virtual void RequestReschedule( ) = 0;
-        
-        /**
-         * Signals when plugin controller clearing is done.        
-         */
-        virtual void ClearingDone( ) = 0;
-    };
-
-#endif // __MCSEPLUGINCONTROLLEROBSERVER_H__
-
-// End of File
--- a/videoscheduler/SchedulerServer/inc/MCseSchedulerTimerObserver.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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 __MCSESCHEDULERTIMEROBSERVER_H__
-#define __MCSESCHEDULERTIMEROBSERVER_H__
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-/**
-* MCseSchedulerTimerObserver
-* This class specifies the function to be called when a timeout occurs.
-* Used in conjunction with CCseSchedulerTimer class.
-*/
-class MCseSchedulerTimerObserver
-    {
-    public: // New functions
-        /**
-		* Called when time is up and plugins should be run.
-		* 
-		*/
-        virtual void RunPluginsL( ) = 0;
-        
-        /**
-		* Informs about time errors (time changes, timer is set towards time already
-		* in past),
-		* @parms aError timer error code. Most common are:
-		*               KErrAbort - Phone time has changed
-		*               KErrUnderflow - Time is in the past
-		*               KErrOverFlow - Time is too far in the future
-		*/
-        virtual void TimerErrorL( TInt32 aError ) = 0;
-    };
-
-#endif // __MCSESCHEDULERTIMEROBSERVER_H__
-
-// End of File
\ No newline at end of file
--- a/videoscheduler/SchedulerServer/inc/MCseSemaphoreSignalObserver.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Observer to inform plugin starter that it is time shutdown*
-*/
-
-
-
-
-#ifndef __MCSESEMAPHORESIGNALOBSERVER_H__
-#define __MCSESEMAPHORESIGNALOBSERVER_H__
-
-// CLASS DECLARATION
-/**
-* MCseSemaphoreSignalObserver
-* Observer interface to be called once observed semaphore is signalled
-*/
-class MCseSemaphoreSignalObserver
-    {
-    public: // New functions                
-        /**
-        * Called when observed semaphore is signalled.        
-        */
-        virtual void SemaphoreSignalled( ) = 0;        
-    };
-
-#endif // __MCSESEMAPHORESIGNALOBSERVER_H__
-
-// End of File
--- a/videoscheduler/SchedulerServer/rom/videoschedulerserver.iby	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* 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: 
-*
-*/
-
-
-#ifndef __VIDEOSCHEDULERSERVER_IBY__
-#define __VIDEOSCHEDULERSERVER_IBY__
-
-#include <data_caging_paths_for_iby.hrh>
-
-file=ABI_DIR\BUILD_DIR\CseSchedulerServer.exe                 PROGRAMS_DIR\CseSchedulerServer.exe
-
-#endif // __VIDEOSCHEDULERSERVER_IBY__
--- a/videoscheduler/SchedulerServer/src/CCseScheduleDB.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2064 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Database where to store scheduled events.*
-*/
-
-
-
-
-// INCLUDE FILES
-#include "CCseScheduleDB.h"         // Header file for this class
-#include <ipvideo/CCseScheduledProgram.h>   // Represent one schedule in database
-#include <bautils.h>
-#include "CseDebug.h"               // Debug macros
-#include <babackup.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-_LIT( KCseCDiskPrefix,  "c:"                         );
-_LIT( KCseSqlGetAll,    "SELECT * FROM ScheduleEvent");
-_LIT( KCseSelectFromDb, "SELECT * FROM "             );
-_LIT( KCseWhere,        " WHERE "                    );
-_LIT( KCseEqual,        " = "                        );
-_LIT( KCseOrderBy,      " ORDER BY "                 );
-_LIT( KCseAnd,          " AND "                      );
-_LIT( KCseLess,         " < "                        );
-_LIT( KCseMore,         " > "                        );
-
-static TUint KScheduleNameMaxLength = 255;
-static TUint KCseDatbaseVersionNumber = 1;
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CCseScheduleDB()
-//
-// ---------------------------------------------------------------------------
-CCseScheduleDB::CCseScheduleDB() : iDbAccess( ECseDbOpen )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CCseScheduleDB");
-	// Default C++ Constructor		
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CCseScheduleDB");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::~CCseScheduleDB()
-//
-// ---------------------------------------------------------------------------	
-CCseScheduleDB::~CCseScheduleDB()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::~CCseScheduleDB");
-	       	
-	iScheduleDb.Close();
-	delete iScheduleFileStore;
-	iFsSession.Close(); 
-	
-	if( iCompactTimer )
-        {
-        iCompactTimer->Cancel();
-        delete iCompactTimer;
-        }
-    delete iBackupWrapper;
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::~CCseScheduleDB");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::NewL()
-//
-// ---------------------------------------------------------------------------	
-CCseScheduleDB* CCseScheduleDB::NewL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::NewL");
-    CCseScheduleDB* self = new ( ELeave ) CCseScheduleDB();    
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );    
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::NewL");
-    
-    return self;
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::ConstructL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::ConstructL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::ConstructL");
-    
-    User::LeaveIfError( iFsSession.Connect() );
-    
-    iCompactTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-            
-    iBackupWrapper = CBaBackupSessionWrapper::NewL();
-	
-	TRAPD( err, OpenOrCreateDbL() );
-
-    if ( err != KErrNone )
-        {
-		CSELOGSTRING2_HIGH_LEVEL( "CCseScheduleDB::ConstructL - Opening or creating the database FAILED: %d", err );
-
-        if ( err != KErrNoMemory && 
-             err != KErrLocked && 
-             err != KErrDisMounted &&
-             err != KErrDiskFull &&
-             err != KErrNotReady )
-            {
-            // Delete and recreate database file. Cannot recover other way. 
-    		CSELOGSTRING_HIGH_LEVEL( "CCseScheduleDB::ConstructL - deleting database" );
-            RemoveDbL();
-    		CSELOGSTRING_HIGH_LEVEL( "CCseScheduleDB::ConstructL - recreating database" );
-            TRAPD( err, OpenOrCreateDbL() );
-            if ( err != KErrNone )
-                {
-                CSELOGSTRING2_HIGH_LEVEL( "CCseScheduleDB::ConstructL couldnt recreate database (%d), leaving", err );
-                User::Leave( err );
-                }
-            }
-        else
-            {
-            CSELOGSTRING2_HIGH_LEVEL( "CCseScheduleDB::ConstructL leaving (%d)", err );
-            User::Leave( err );
-            }
-        }
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::ConstructL");	
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::RemoveDbL()
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::RemoveDbL()
-    {
-    delete iBackupWrapper;
-	iBackupWrapper = NULL;
-    iScheduleDb.Close();
-	delete iScheduleFileStore;
-	iScheduleFileStore = NULL;
-    if ( BaflUtils::FileExists( iFsSession, iDbFile ) )
-        {
-        TInt err( iFsSession.Delete( iDbFile ) );
-		CSELOGSTRING2_HIGH_LEVEL("CCseScheduleDB:: deleting database file, err = %d", err);
-        }
-	}
-
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetApplicationSchedulesL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetApplicationSchedulesL( const TInt32 aAppUid,
-								RPointerArray<CCseScheduledProgram>& aArray )
-	{
-	CSELOGSTRING2_HIGH_LEVEL(">>>CCseScheduleDB::GetApplicationSchedulesL - AppUid: %d",
-	                          aAppUid);
-	
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Gets program occurence(s) that are going to happen next
-	// from database
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleApplicationUIDCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aAppUid );
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get the SQL table indexes.
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo scheduleTypeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through the tables
-	while ( view.AtRow() )
-		{
-		// Create new CCseSceduledProgram to be added to array
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );			
-		
-		// Fill created schedule with DB information
-		view.GetL();
-		prog->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		prog->SetName( view.ColDes8( nameIndex ) );
-		prog->SetStartTime( view.ColTime( startTimeIndex ) );
-		prog->SetEndTime( view.ColTime( endTimeIndex ) );
-		prog->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		prog->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		prog->SetScheduleType( view.ColInt32( scheduleTypeIndex ) );
-		prog->SetPluginType( view.ColInt32( pluginTypeIndex ) );
-		
-		TInt streamLen( 0 );
-		streamLen = view.ColLength( applicationSpecificIndex );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex );
-		readStream.ReadL( buffPtr, streamLen );
-		readStream.Release();
-		CleanupStack::PopAndDestroy(); // readStream
-
-		prog->SetApplicationDataL( *appDataBuffer );
-		
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		User::LeaveIfError( aArray.Append( prog ) );
-		CleanupStack::Pop( prog );
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetApplicationSchedulesL");	
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::OpenOrCreateDbL()
-//
-// Create a new database. 
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::OpenOrCreateDbL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::OpenOrCreateDbL");
-	TBuf<KMaxFileName> path;
-	
-	// Get path to CSE's private directory
-	TInt err( iFsSession.PrivatePath( path ) );
-	if ( err != KErrNone )
-		{
-		CSELOGSTRING2_HIGH_LEVEL("iFsSession.PrivatePath() failed: %d", err );
-		User::Leave( err );
-		}
-
-	iDbFile.Zero();
-	iDbFile.Append( KCseCDiskPrefix );
-	iDbFile.Append( path );
-	if ( BaflUtils::CheckFolder( iFsSession, iDbFile ) != KErrNone ) 
-		{
-		err = iFsSession.CreatePrivatePath( EDriveC );
-		if ( err != KErrNone )
-			{
-			CSELOGSTRING2_HIGH_LEVEL( "CreatePrivatePath failed! %d", err );
-			User::Leave( err );
-			}
-		}
-	
-	iDbFile.Append( KCseScheduleDBName() );
-	
-	// If file doesn't exist create it
-    if ( !BaflUtils::FileExists( iFsSession, iDbFile ) )
-        {
-        CSELOGSTRING_HIGH_LEVEL("CCseScheduleDB::OpenOrCreateDbL Create New");
-        iScheduleDb.Close();
-                    
-        if( iScheduleFileStore )
-            {
-            delete iScheduleFileStore;
-            iScheduleFileStore = NULL;
-            }
-            
-		iScheduleFileStore = CPermanentFileStore::ReplaceL( iFsSession,
-                                                            iDbFile,
-                                                            EFileRead|EFileWrite );
-		// Set file store type
-		iScheduleFileStore->SetTypeL( iScheduleFileStore->Layout() ); 
-    	// Create stream object
-	    TStreamId id = iScheduleDb.CreateL( iScheduleFileStore );   
-		// Keep database id as root of store  
-    	iScheduleFileStore->SetRootL( id ); 
-		// Complete creation by commiting
-    	iScheduleFileStore->CommitL();                              
-
-        CreateDatabaseTableL( iScheduleDb );        
-        CreateScheduleTableL( iScheduleDb );
-        SetDatabaseVersionL( );
-        }
-    // Or if it exists then just open it.
-	else
-		{
-		iScheduleDb.Close();
-	    delete iScheduleFileStore;
-		iScheduleFileStore = NULL;
-		iScheduleFileStore = CPermanentFileStore::OpenL( iFsSession, iDbFile,
-														EFileRead|EFileWrite );
-		iScheduleFileStore->SetTypeL( iScheduleFileStore->Layout() );
-		iScheduleDb.OpenL( iScheduleFileStore, iScheduleFileStore->Root() );
-    	CheckDbVersionL();    	
-		User::LeaveIfError( iScheduleDb.Compact() );
-		}
-				
-	if ( !iBackupWrapper )
-	    {
-	    iBackupWrapper = CBaBackupSessionWrapper::NewL();
-	    }
-	    
-	iBackupWrapper->RegisterFileL( iDbFile, *this );
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::OpenOrCreateDbL");
-    }
-    
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CheckDbVersionL
-//
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::CheckDbVersionL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CheckDbVersionL");
-	
-	TInt dbVersion( 0 );	
-	
-	TRAPD( leave, dbVersion = GetDbVersionL() );
-	
-	if ( dbVersion != KCseDatbaseVersionNumber || leave != KErrNone )
-	    {
-    	CSELOGSTRING3_HIGH_LEVEL(
-    	    "CCseScheduleDB::CheckDbVersionL Not ok, version: %d, error: %d",
-    	    dbVersion, leave );
-    	
-	    // Destroy the old one
-	    iScheduleDb.Close();
-	    delete iScheduleFileStore;
-	    iScheduleFileStore = NULL;
-	    
-	    // Create new one
-	    iScheduleFileStore = CPermanentFileStore::ReplaceL( iFsSession,
-                                                            iDbFile,
-                                                            EFileRead|EFileWrite );
-                                                        
-		// Set file store type
-		iScheduleFileStore->SetTypeL( iScheduleFileStore->Layout() ); 
-    	// Create stream object
-	    TStreamId id = iScheduleDb.CreateL( iScheduleFileStore );   
-		// Keep database id as root of store  
-    	iScheduleFileStore->SetRootL( id ); 
-		// Complete creation by commiting
-    	iScheduleFileStore->CommitL();                              
-
-    	CreateDatabaseTableL( iScheduleDb );
-        CreateScheduleTableL( iScheduleDb );
-	    SetDatabaseVersionL( );
-	    }
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CheckDbVersionL");		
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetDbVersionL
-//
-// ---------------------------------------------------------------------------
-TInt CCseScheduleDB::GetDbVersionL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetDbVersionL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	TInt dbVersion(0);
-	
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );
-	sqlStatement.Append( KCseDatabaseTable );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next reminder
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	TDbColNo versionIndex = colSetOrder->ColNo( KCseDatabaseVersionCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-		
-	if ( view.AtRow() )
-		{				
-		view.GetL();
-		dbVersion = view.ColInt32( versionIndex );		
-		}
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-
-	CSELOGSTRING2_HIGH_LEVEL(
-	    "<<<CCseScheduleDB::GetDbVersionL, version: %d",
-	    dbVersion );
-	return dbVersion;
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CreateScheduleTableL
-//
-// Creates Schedule table.
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::CreateScheduleTableL( RDbStoreDatabase& aDatabase ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CreateScheduleTableL");
-    
-    // Create columns for the database.     
-    TDbCol keyCol( KCseScheduleDbKeyCol, EDbColUint32 );
-    keyCol.iAttributes = TDbCol::EAutoIncrement;
-    
-	TDbCol nameCol( KCseScheduleNameCol, EDbColText8, KScheduleNameMaxLength );		
-	TDbCol startTimeCol( KCseScheduleStartTimeCol, EDbColDateTime );
-	TDbCol endTimeCol( KCseScheduleEndTimeCol, EDbColDateTime );
-    TDbCol applicationUidCol( KCseScheduleApplicationUIDCol, EDbColInt32 );   
-	TDbCol plugInUidCol( KCseSchedulePlugInUIDCol, EDbColInt32 );    
-	TDbCol typeCol( KCseScheduleTypeCol, EDbColInt32 );    	
-	TDbCol applicationSpecificCol( KCseScheduleApplicationSpecificCol, EDbColLongBinary );
-	TDbCol runCountCol( KCseScheduleRunCountCol, EDbColInt32 );	
-	TDbCol stateCol( KCseScheduleStateCol, EDbColInt32 );	
-	TDbCol pluginTypeCol( KCseSchedulePluginTypeCol, EDbColInt32 );	
-	TDbCol reserved1Col( KCseScheduleReserved1Col, EDbColInt32 );	
-	TDbCol reserved2Col( KCseScheduleReserved2Col, EDbColInt32 );	
-
-	// Create column set and add defined columns in to the set
-    CDbColSet* scheduleColSet = CDbColSet::NewLC();
-    scheduleColSet->AddL( keyCol );
-	scheduleColSet->AddL( nameCol );
-	scheduleColSet->AddL( startTimeCol );
-	scheduleColSet->AddL( endTimeCol );
-    scheduleColSet->AddL( applicationUidCol );
-    scheduleColSet->AddL( plugInUidCol );
-	scheduleColSet->AddL( typeCol );
-    scheduleColSet->AddL( applicationSpecificCol );	
-    scheduleColSet->AddL( runCountCol );	
-    scheduleColSet->AddL( stateCol );
-    scheduleColSet->AddL( pluginTypeCol );
-    scheduleColSet->AddL( reserved1Col );
-    scheduleColSet->AddL( reserved2Col );
-    
-    // Create new table to the database with created columnset
-    User::LeaveIfError( aDatabase.CreateTable( KCseScheduleTable, 
-										      *scheduleColSet ) ); 
-    
-    CleanupStack::PopAndDestroy( scheduleColSet );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CreateScheduleTableL");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CreateDatabaseTableL
-//
-// Creates Database table.
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::CreateDatabaseTableL( RDbStoreDatabase& aDatabase )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CreateDatabaseTableL");
-
-    // Create columns for the database.     
-    TDbCol versionCol( KCseDatabaseVersionCol, EDbColInt32 );
-    TDbCol reserved1Col( KCseDatabaseReserved1Col, EDbColInt32 );
-    TDbCol reserved2Col( KCseDatabaseReserved2Col, EDbColInt32 );
-
-	// Create column set and add defined columns in to the set
-    CDbColSet* databaseColSet = CDbColSet::NewLC();
-    databaseColSet->AddL( versionCol );
-    databaseColSet->AddL( reserved1Col );
-    databaseColSet->AddL( reserved2Col );
-    
-    // Create new table to the database with created columnset
-    User::LeaveIfError( aDatabase.CreateTable( KCseDatabaseTable, 
-										      *databaseColSet ) ); 
-    
-    CleanupStack::PopAndDestroy( databaseColSet );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CreateDatabaseTableL");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::SetDatabaseVersionL
-//
-// Creates Database table.
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::SetDatabaseVersionL( )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::SetDatabaseVersionL");
-    
-    iSqlSchedule.Zero(); 
-    iSqlSchedule.Append( KCseSelectFromDb );
-    iSqlSchedule.Append( KCseDatabaseTable );
-    
-    RDbView view;
-    CleanupClosePushL( view );
-    
-    // Prepare DB for update
-    User::LeaveIfError(view.Prepare( iScheduleDb,
-    					TDbQuery( iSqlSchedule ),
-    					TDbWindow::EUnlimited,
-    					RDbView::EInsertOnly ));    
-    view.InsertL();
-    
-    // Create colomn set (row) to be added
-    CDbColSet* databaseColSet = view.ColSetL();
-    CleanupStack::PushL( databaseColSet );
-
-    // Fill row with Schedule information
-	view.SetColL( databaseColSet->ColNo( KCseDatabaseVersionCol ),
-										 KCseDatbaseVersionNumber );
-    CleanupStack::PopAndDestroy( databaseColSet );
-    view.PutL();
-	CleanupStack::PopAndDestroy( &view ); // closes view
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::SetDatabaseVersionL");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::AddScheduleL()
-//
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::AddScheduleL( CCseScheduledProgram& aData )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::AddScheduleL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	iSqlSchedule.Zero();
-	iSqlSchedule.Append( KCseSqlGetAll );
-    RDbView view;
-    CleanupClosePushL( view );
-
-    // Prepare DB for update
-    User::LeaveIfError(view.Prepare( iScheduleDb,
-    					TDbQuery( iSqlSchedule ),
-    					TDbWindow::EUnlimited,
-    					RDbView::EInsertOnly ));    
-    view.InsertL();
-    
-    // Create colomn set (row) to be added
-    CDbColSet* scheduleColSet = view.ColSetL();
-    CleanupStack::PushL( scheduleColSet );
-
-    // Fill row with Schedule information
-	view.SetColL( scheduleColSet->ColNo( KCseScheduleNameCol ),
-										aData.Name() );
-
-	view.SetColL( scheduleColSet->ColNo( KCseScheduleStartTimeCol ),
-										aData.StartTime() );
-
-	view.SetColL( scheduleColSet->ColNo( KCseScheduleEndTimeCol ),
-										aData.EndTime() );
-
-	view.SetColL( scheduleColSet->ColNo( KCseScheduleApplicationUIDCol ), 
-										aData.AppUid() );
-
-	view.SetColL( scheduleColSet->ColNo( KCseSchedulePlugInUIDCol ), 
-										 aData.PluginUid() );	
-
-	view.SetColL( scheduleColSet->ColNo( KCseScheduleTypeCol ), 
-										 aData.ScheduleType() );	
-	
-	view.SetColL( scheduleColSet->ColNo( KCseScheduleRunCountCol ), 
-										 0 );
-										 
-    view.SetColL( scheduleColSet->ColNo( KCseScheduleStateCol ), 
-										 ECseWaiting );
-										 
-    view.SetColL( scheduleColSet->ColNo( KCseSchedulePluginTypeCol ), 
-										 aData.PluginType() );
-										 
-	// Description is long one, it needs to be handled by stream
-	RDbColWriteStream write;
-	write.OpenLC( view, scheduleColSet->ColNo( KCseScheduleApplicationSpecificCol ) );
-	write.WriteL( aData.ApplicationData() );
-	write.CommitL();
-	CleanupStack::PopAndDestroy(); // write
-	
-	TDbColNo keyColumnNo = scheduleColSet->ColNo( KCseScheduleDbKeyCol );
-    CleanupStack::PopAndDestroy( scheduleColSet );
-    view.PutL();
-
-    // Get new program key
-    aData.SetDbIdentifier( view.ColUint32( keyColumnNo ) );
-    
-    CleanupStack::PopAndDestroy( &view ); // closes view
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::AddScheduleL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::RemoveScheduleL()
-//
-// ---------------------------------------------------------------------------
-void CCseScheduleDB::RemoveScheduleL( const TUint32 aDbIdentifier )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::RemoveScheduleL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Create SQL string to find given schedule from DB
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleDbKeyCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aDbIdentifier );
-	
-	User::LeaveIfError( iScheduleDb.Begin() );
-	
-	// Prepare DB to update
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-									  TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	view.FirstL();
-
-	TInt count( 0 );
-
-    // If schedule found, remove it.
-	while ( view.AtRow() )
-		{
-		view.DeleteL();
-		count++;
-		view.NextL();	
-		}		
-	
-	CleanupStack::PopAndDestroy( &view ); // closes view
-	User::LeaveIfError( iScheduleDb.Commit() );
-	    	
-    CSELOGSTRING3_HIGH_LEVEL("---- %d Items for identifier %d removed from DB", count, aDbIdentifier);
-	if ( count == 0 )
-		{
-		User::Leave( KErrNotFound );	
-		}
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::RemoveScheduleL");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetNextScheduleTimeL()
-//
-// ---------------------------------------------------------------------------	
-TTime CCseScheduleDB::GetNextScheduleTimeL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetNextScheduleTimeL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Create SQL satring to get schedule occurence(s) that are
-	// going to happen next from database.
-	TTime nextScheduleTime( 0 );
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleStateCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( ECseWaiting );
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next schedule
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Schedule found get its start time.
-	if ( view.AtRow() )	
-		{		
-		view.GetL();				
-		nextScheduleTime = view.ColTime( startTimeIndex );
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetNextScheduleTimeL");
-	
-	return nextScheduleTime;
-	}
-	
-	
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::FillScheduleArrayByTimeL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::FillScheduleArrayByTimeL( const TTime& aScheduleTime, 
-					RPointerArray<CCseScheduledProgram>& aNextScheduleArray )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::FillScheduleArrayByTimeL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Gets program occurence(s) that are going to happen next
-	// from database
-	TBuf<100> startTimeBuf;
-	
-	_LIT( KDateTimeFormat,"# %1%*D/%2%*M/%3%*Y %H:%T:%S.%C#" ); 
-
-	aScheduleTime.FormatL( startTimeBuf, KDateTimeFormat );
-		
-	// Create SQL string to get all schedules to be happen at given time
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.Append( startTimeBuf );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next reminder
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get column indexes
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo typeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through all found schedules.
-	while ( view.AtRow() )
-		{
-		// Create new schedule to be added to array
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );			
-		view.GetL();
-		
-		// Copy information from DB to schedule.
-		prog->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		prog->SetName( view.ColDes8( nameIndex ) );
-		prog->SetStartTime( view.ColTime( startTimeIndex ) );
-		prog->SetEndTime( view.ColTime( endTimeIndex ) );
-		prog->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		prog->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		prog->SetScheduleType( CCseScheduledProgram::TCseScheduleType( 
-		                       view.ColInt32( typeIndex ) ) );
-        prog->SetPluginType( CCseScheduledProgram::TCsePluginType( 
-							   view.ColInt32( pluginTypeIndex ) ) );
-		TInt streamLen( view.ColLength( applicationSpecificIndex ) );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex );
-		readStream.ReadL( buffPtr, streamLen );
-		readStream.Release();
-		CleanupStack::PopAndDestroy(); // readStream;
-
-		prog->SetApplicationDataL( *appDataBuffer );
-		
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		User::LeaveIfError( aNextScheduleArray.Append( prog ) );
-		CleanupStack::Pop( prog );
-		
-		// And next schedule...
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::FillScheduleArrayByTimeL");
-	}
-
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetScheduleByDbIdentifierL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetScheduleByDbIdentifierL( const TUint32 aDbIdentifier, 
-								           CCseScheduledProgram* aSchedule )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetScheduleByDbIdentifierL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	if ( !aSchedule )
-		{
-		return; 
-		}		
-	
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleDbKeyCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aDbIdentifier );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next reminder
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo typeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-		
-	while ( view.AtRow() )
-		{				
-		view.GetL();
-		aSchedule->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		aSchedule->SetName( view.ColDes8( nameIndex ) );
-		aSchedule->SetStartTime( view.ColTime( startTimeIndex ) );
-		aSchedule->SetEndTime( view.ColTime( endTimeIndex ) );
-		aSchedule->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		aSchedule->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		
-		aSchedule->SetScheduleType( CCseScheduledProgram::TCseScheduleType( 
-							   view.ColInt32( typeIndex ) ) );
-        aSchedule->SetPluginType( CCseScheduledProgram::TCsePluginType( 
-							   view.ColInt32( pluginTypeIndex ) ) );
-
-		TInt streamLen( 0 );
-		streamLen = view.ColLength( applicationSpecificIndex );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex ); // |->1
-		readStream.ReadL(buffPtr, streamLen);
-		readStream.Release();
-		CleanupStack::PopAndDestroy( ); // 1<-| Popping pointer to Col that we dont have here
-		TPtrC8 ptr8( appDataBuffer->Des() );
-		aSchedule->SetApplicationDataL( *appDataBuffer );
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetScheduleByDbIdentifierL");
-	}
-
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetOverlappingSchedulesL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetOverlappingSchedulesL( const TInt32 aType,
-                                               const TTime& aStartTime,
-                                               const TTime& aEndTime,
-                                               RPointerArray<CCseScheduledProgram>& aResultArray
-                                               )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetOverlappingSchedulesL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	TBuf<100> startTimeBuf;
-	_LIT( KDateTimeFormat,"# %1%*D/%2%*M/%3%*Y %H:%T:%S#" ); 
-	aStartTime.FormatL( startTimeBuf, KDateTimeFormat );
-	TBuf<100> endTimeBuf;
-	aEndTime.FormatL( endTimeBuf, KDateTimeFormat );  
-
-    // Create SQL string to find all overlapping schedules from database between given
-    // timeframe.
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleTypeCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aType );
-	sqlStatement.Append( KCseAnd );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-	sqlStatement.Append( KCseLess );
-	sqlStatement.Append( endTimeBuf );
-	sqlStatement.Append( KCseAnd );
-	sqlStatement.Append( KCseScheduleEndTimeCol );
-	sqlStatement.Append( KCseMore );
-	sqlStatement.Append( startTimeBuf );	
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-
-    // Order table		
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Move to the first row
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get colon indexes.
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo typeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through all found schedules.
-	while ( view.AtRow() )
-		{
-		// Create new schedule to be added to array.
-		CCseScheduledProgram* schedule = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( schedule );	
-		view.GetL();
-		
-		// Set schedule information.
-		schedule->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		schedule->SetName( view.ColDes8( nameIndex ) );
-		schedule->SetStartTime( view.ColTime( startTimeIndex ) );
-		schedule->SetEndTime( view.ColTime( endTimeIndex ) );
-		schedule->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		schedule->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		
-		schedule->SetScheduleType( CCseScheduledProgram::TCseScheduleType( 
-							   view.ColInt32( typeIndex ) ) );
-        schedule->SetPluginType( CCseScheduledProgram::TCsePluginType( 
-							   view.ColInt32( pluginTypeIndex ) ) );
-
-		TInt streamLen( 0 );
-		streamLen = view.ColLength( applicationSpecificIndex );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream; // |->1
-		readStream.OpenLC( view, applicationSpecificIndex );
-		readStream.ReadL(buffPtr, streamLen);
-		readStream.Release();
-		CleanupStack::PopAndDestroy( ); //  1<-| Popping pointer to Col that we dont have here
-		TPtrC8 ptr8( appDataBuffer->Des() );
-		schedule->SetApplicationDataL( *appDataBuffer );
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		if ( schedule->StartTime() < aEndTime && schedule->EndTime() > aStartTime )
-			{
-			aResultArray.AppendL( schedule );
-			CleanupStack::Pop( schedule );	
-			}
-		else
-			{
-			CleanupStack::PopAndDestroy( schedule );
-			schedule = NULL;
-			}
-		
-		// Next shcedule...
-		view.NextL();
-		}
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetOverlappingSchedulesL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::IncreaseRunCountL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::IncreaseRunCountL( const TUint32 aDbIdentifier )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::IncreaseRunCountL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-
-    // Create SQL string to find given schedule
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleDbKeyCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aDbIdentifier );
-		
-	// Order table based on DB identifier
-	RDbView readView;
-	CleanupClosePushL( readView );
-    
-    User::LeaveIfError( readView.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( readView.EvaluateAll() );
-    	
-	// Get the next reminder
-	readView.FirstL();
-	
-	// First we read existint run count
-	CDbColSet* readColSet = readView.ColSetL();
-	CleanupStack::PushL( readColSet );		
-	TDbColNo runCountCol = readColSet->ColNo( KCseScheduleRunCountCol );	
-	CleanupStack::PopAndDestroy( readColSet );
-	TInt32 runCount( 0 );
-	if ( readView.AtRow() )
-		{				
-		readView.GetL();
-		runCount = readView.ColInt32( runCountCol );
-		runCount++;		
-		}
-	// Close read view
-	CleanupStack::PopAndDestroy( &readView );
-
-	// Update run count
-	if ( runCount > 0 )
-		{
-		// Open write view
-        RDbView writeView;
-		CleanupClosePushL( writeView );    
-        User::LeaveIfError( writeView.Prepare( iScheduleDb,
-    				        TDbQuery( sqlStatement ),
-    					    TDbWindow::EUnlimited,
-    					    RDbView::EUpdatable ));
-    	User::LeaveIfError( writeView.EvaluateAll() );
-    	
-    	writeView.FirstL();
-    	CDbColSet* writeColSet = writeView.ColSetL();
-		CleanupStack::PushL( writeColSet );		
-		TDbColNo runCountColNo = writeColSet->ColNo( KCseScheduleRunCountCol );	
-		CleanupStack::PopAndDestroy( writeColSet );
-
-    	writeView.UpdateL();
-    	
-    	// If we found (as we should) schedule again we update its value.
-    	if ( writeView.AtRow() )
-    	    {    	        
-	        writeView.SetColL( runCountColNo, runCount );
-    	    }
-	    
-	    writeView.PutL();
-        
-        CleanupStack::PopAndDestroy( &writeView );
-		}	
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::IncreaseRunCountL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetRunCountL()
-//
-// ---------------------------------------------------------------------------	
-TInt32 CCseScheduleDB::GetRunCountL( const TUint32 aDbIdentifier )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetRunCountL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	TInt32 runCount( 0 );
-
-    // Create SQL string to find given schedule	
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleDbKeyCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aDbIdentifier );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next reminder
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-		
-	TDbColNo runCountCol = colSetOrder->ColNo( KCseScheduleRunCountCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-
-    // If we found schedule get its run count.
-	if ( view.AtRow() )
-		{				
-		view.GetL();
-		
-		runCount = view.ColInt32( runCountCol );
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseScheduleDB::GetRunCountL: runCount=%d", runCount);
-	
-	return runCount;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::SetScheduleStateL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::SetScheduleStateL( const TUint32 aDbIdentifier,
-                                        const TInt32 aState )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::SetScheduleStateL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-    // Create SQL string to find given schedule	
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleDbKeyCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aDbIdentifier );
-		
-	// Open write view
-    RDbView writeView;
-	CleanupClosePushL( writeView );    
-    User::LeaveIfError( writeView.Prepare( iScheduleDb,
-				        TDbQuery( sqlStatement ),
-					    TDbWindow::EUnlimited,
-					    RDbView::EUpdatable ));
-	User::LeaveIfError( writeView.EvaluateAll() );
-	
-	writeView.FirstL();
-	CDbColSet* writeColSet = writeView.ColSetL();
-	CleanupStack::PushL( writeColSet );		
-	TDbColNo stateColNo = writeColSet->ColNo( KCseScheduleStateCol );	
-	CleanupStack::PopAndDestroy( writeColSet );
-
-	writeView.UpdateL();
-	
-	// If we found schedule, we change the column value.
-	if ( writeView.AtRow() )
-	    {    	        
-        writeView.SetColL( stateColNo, aState );
-	    }
-    
-    writeView.PutL();
-    CleanupStack::PopAndDestroy( &writeView );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::SetScheduleStateL");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetScheduleStateL()
-//
-// ---------------------------------------------------------------------------	
-TInt32 CCseScheduleDB::GetScheduleStateL( const TUint32 aDbIdentifier )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetScheduleStateL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Create SQL string to find given schedule	
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleDbKeyCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aDbIdentifier );
-		
-	// Order table based on DB identifier
-	RDbView readView;
-	CleanupClosePushL( readView );    
-    User::LeaveIfError( readView.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( readView.EvaluateAll() );    		
-    	
-	// Get the reminder
-	readView.FirstL();
-	
-	CDbColSet* readColSet = readView.ColSetL();
-	CleanupStack::PushL( readColSet );		
-	TDbColNo stateCol = readColSet->ColNo( KCseScheduleStateCol );	
-	CleanupStack::PopAndDestroy( readColSet );
-	TInt32 state( KErrNotFound );
-	
-    // If we found schedule, get the schedule state.
-	if ( readView.AtRow() )
-		{				
-		readView.GetL();
-		state = readView.ColInt32( stateCol );
-		}
-	// Close read view
-	CleanupStack::PopAndDestroy( &readView );
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetScheduleStateL");
-	
-	return state;
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::StartupSchedulesL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::StartupSchedulesL( RPointerArray<CCseScheduledProgram>& aScheduleArray )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::StartupSchedulesL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-
-	// Create SQL string to find wanted schedules.
-	// At startup phase we are first interested for
-	// those schedules that were on run when phone was
-	// shutdown (eg runcount is bigger than 0).	
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleRunCountCol );
-	sqlStatement.Append( KCseMore );
-	sqlStatement.AppendNum( 0 );
-
-    // Order table
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the first reminder
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Column indexes
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo typeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-
-    // Loop through the found schedules.		
-	while ( view.AtRow() )
-		{
-		// Create CseScheduledProgram to be added to string.
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );			
-		view.GetL();
-		
-		// Set schedule information.
-		prog->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		prog->SetName( view.ColDes8( nameIndex ) );
-		prog->SetStartTime( view.ColTime( startTimeIndex ) );
-		prog->SetEndTime( view.ColTime( endTimeIndex ) );
-		prog->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		prog->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		
-		prog->SetScheduleType( CCseScheduledProgram::TCseScheduleType( 
-							   view.ColInt32( typeIndex ) ) );
-        prog->SetPluginType( CCseScheduledProgram::TCsePluginType( 
-							   view.ColInt32( pluginTypeIndex ) ) );
-							   
-		TInt streamLen( view.ColLength( applicationSpecificIndex ) );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex ); // |->1
-		readStream.ReadL( buffPtr, streamLen );
-		readStream.Release();
-		CleanupStack::PopAndDestroy( ); // 1<-| Popping pointer to Col that we dont have here
-
-		prog->SetApplicationDataL( *appDataBuffer );
-		
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		User::LeaveIfError( aScheduleArray.Append( prog ) );
-		CleanupStack::Pop( prog );
-		
-		// Next shcedule
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::StartupSchedulesL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::ResetCompactTimer()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::ResetCompactTimer()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::ResetCompactTimer");
-    
-    // If iCompatTimer is not running start it.
-    if( !iCompactTimer )
-        {
-        TRAPD(err, iCompactTimer = CPeriodic::NewL( CActive::EPriorityStandard ));
-        
-        if(err != KErrNone )
-            {
-            CSELOGSTRING2_HIGH_LEVEL("CCseScheduleDB::ResetCompactTimer - Can't create iCompactTimer: %d", err);
-            }
-        }
-        
-    // If iCompactTimer is running cancel it and start over again.
-    if( iCompactTimer )
-        {            
-        iCompactTimer->Cancel();
-        
-        iCompactTimer->Start( KCseDbCompactTimeout,
-                              KCseDbCompactTimeout, 
-                              TCallBack( CompactCallback, this ) );
-        }
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::ResetCompactTimer");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CompactCallback()
-//
-// ---------------------------------------------------------------------------
-TInt CCseScheduleDB::CompactCallback( TAny* aThis )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CompactCallback");
-    
-    // Direct call to class method.
-    static_cast<CCseScheduleDB*>( aThis )->CompactDb();
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CompactCallback");
-    return EFalse;    
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CompactDb()
-//
-// ---------------------------------------------------------------------------    
-void CCseScheduleDB::CompactDb()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CompactDb");
-    // Compact database
-    TInt err( iScheduleDb.Compact() );
-    if ( err != KErrNone )
-        {
-        CSELOGSTRING2_HIGH_LEVEL("iScheduleDb.Compact() failed: %d", err);    
-        }
-    // Cancel timer if it is running    
-	if ( iCompactTimer )
-		{
-		iCompactTimer->Cancel();
-    	delete iCompactTimer;
-    	iCompactTimer = NULL;    	
-		}
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CompactDb");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::ChangeFileLockL()
-//
-// ---------------------------------------------------------------------------    
-//
-void CCseScheduleDB::ChangeFileLockL(
-    const TDesC& /*aFileName*/,
-    TFileLockFlags aFlags )
-    {
-    CSELOGSTRING_HIGH_LEVEL( ">>>CCseScheduleDB::ChangeFileLockL" );
-    
-    switch ( aFlags )
-        {
-        case MBackupObserver::EReleaseLockReadOnly:
-        case MBackupObserver::EReleaseLockNoAccess:
-            {
-            // Backup and restore starting, close the db
-            CloseDbFile();
-            }
-            break;
-            
-        default:
-            {
-            OpenDbFileL();
-            }
-            break;                
-        }
-
-    CSELOGSTRING_HIGH_LEVEL( "<<<CCseScheduleDB::ChangeFileLockL" );
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::CloseDbFile()
-//
-// ---------------------------------------------------------------------------    
-void CCseScheduleDB::CloseDbFile()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::CloseDbFile");
-    
-    iDbAccess = ECseDbLocked;
-    iScheduleDb.Close();
-    delete iScheduleFileStore;
-    iScheduleFileStore = NULL;    
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::CloseDbFile");
-    }
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::OpenDbFileL()
-//
-// ---------------------------------------------------------------------------    
-void CCseScheduleDB::OpenDbFileL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::OpenDbFileL");
-    
-    iScheduleDb.Close();
-    if( iScheduleFileStore )
-        {
-        delete iScheduleFileStore;
-        iScheduleFileStore = NULL;
-        }
-	iScheduleFileStore = CPermanentFileStore::OpenL( iFsSession, iDbFile,
-												     EFileRead|EFileWrite );
-	iScheduleFileStore->SetTypeL( iScheduleFileStore->Layout() );	
-    iScheduleDb.OpenL( iScheduleFileStore, iScheduleFileStore->Root() );
-	User::LeaveIfError( iScheduleDb.Compact() );    
-	
-	iDbAccess = ECseDbOpen;
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::OpenDbFileL");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::LeaveIfDbLocked()
-//
-// ---------------------------------------------------------------------------    
-void CCseScheduleDB::LeaveIfDbLockedL() const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::LeaveIfDbLocked");
-    
-    if(iDbAccess == ECseDbLocked)
-        {
-        CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::LeaveIfDbLocked - Leave, DB locked!!");
-        User::Leave( KErrLocked );
-        }
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::LeaveIfDbLocked");
-    }
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetSchedulesByPluginL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetSchedulesByPluginL( const TInt32 aPluginUid,
-								            RPointerArray<CCseScheduledProgram>& aArray )
-	{
-	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetSchedulesByPluginL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Gets program occurence(s) that are going to happen next
-	// from database
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseSchedulePlugInUIDCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aPluginUid );
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get the SQL table indexes.
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo scheduleTypeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through the tables
-	while ( view.AtRow() )
-		{
-		// Create new CCseSceduledProgram to be added to array
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );			
-		
-		// Fill created schedule with DB information
-		view.GetL();
-		prog->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		prog->SetName( view.ColDes8( nameIndex ) );
-		prog->SetStartTime( view.ColTime( startTimeIndex ) );
-		prog->SetEndTime( view.ColTime( endTimeIndex ) );
-		prog->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		prog->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		prog->SetScheduleType( view.ColInt32( scheduleTypeIndex ) );
-		prog->SetPluginType( view.ColInt32( pluginTypeIndex ) );
-		
-		TInt streamLen( 0 );
-		streamLen = view.ColLength( applicationSpecificIndex );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex ); // |->1
-		readStream.ReadL( buffPtr, streamLen );
-		readStream.Release();
-		CleanupStack::PopAndDestroy( ); // 1<-| Popping pointer to Col that we dont have here
-
-		prog->SetApplicationDataL( *appDataBuffer );
-		
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		User::LeaveIfError( aArray.Append( prog ) );
-		CleanupStack::Pop( prog );
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetSchedulesByPluginL");	
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetSchedulesByTypeL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetSchedulesByTypeL( const TInt32 aType,
-								          RPointerArray<CCseScheduledProgram>& aArray )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetSchedulesByPluginL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Gets program occurence(s) that are going to happen next
-	// from database
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleTypeCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aType );
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get the SQL table indexes.
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo scheduleTypeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through the tables
-	while ( view.AtRow() )
-		{
-		// Create new CCseSceduledProgram to be added to array
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );			
-		
-		// Fill created schedule with DB information
-		view.GetL();
-		prog->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		prog->SetName( view.ColDes8( nameIndex ) );
-		prog->SetStartTime( view.ColTime( startTimeIndex ) );
-		prog->SetEndTime( view.ColTime( endTimeIndex ) );
-		prog->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		prog->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		prog->SetScheduleType( view.ColInt32( scheduleTypeIndex ) );
-		prog->SetPluginType( view.ColInt32( pluginTypeIndex ) );
-		
-		TInt streamLen( 0 );
-		streamLen = view.ColLength( applicationSpecificIndex );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex ); // |-> 1
-		readStream.ReadL( buffPtr, streamLen );
-		readStream.Release();
-		CleanupStack::PopAndDestroy( ); // 1 <-| Popping pointer to Col that we dont have here
-
-		prog->SetApplicationDataL( *appDataBuffer );
-		
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		User::LeaveIfError( aArray.Append( prog ) );
-		CleanupStack::Pop( prog );
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetSchedulesByPluginL");	
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetSchedulesByTimeframeL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetSchedulesByTimeframeL( const TTime& aBeginning,
-                                               const TTime& aEnd,
-                                               RPointerArray<CCseScheduledProgram>& aResultArray
-                                               )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetSchedulesByTimeframeL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	TBuf<100> startTimeBuf;
-	_LIT( KDateTimeFormat,"# %1%*D/%2%*M/%3%*Y %H:%T:%S#" ); 
-	aBeginning.FormatL( startTimeBuf, KDateTimeFormat );
-	TBuf<100> endTimeBuf;
-	aEnd.FormatL( endTimeBuf, KDateTimeFormat );  
-
-    // Create SQL string to find all overlapping schedules from database between given
-    // timeframe.
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-	sqlStatement.Append( KCseLess );
-	sqlStatement.Append( endTimeBuf );
-	sqlStatement.Append( KCseAnd );
-	sqlStatement.Append( KCseScheduleEndTimeCol );
-	sqlStatement.Append( KCseMore );
-	sqlStatement.Append( startTimeBuf );	
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-
-    // Order table		
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Move to the first row
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get colon indexes.
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo typeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through all found schedules.
-	while ( view.AtRow() )
-		{
-		// Create new schedule to be added to array.
-		CCseScheduledProgram* schedule = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( schedule );	
-		view.GetL();
-		
-		// Set schedule information.
-		schedule->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		schedule->SetName( view.ColDes8( nameIndex ) );
-		schedule->SetStartTime( view.ColTime( startTimeIndex ) );
-		schedule->SetEndTime( view.ColTime( endTimeIndex ) );
-		schedule->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		schedule->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		
-		schedule->SetScheduleType( CCseScheduledProgram::TCseScheduleType( 
-							   view.ColInt32( typeIndex ) ) );
-        schedule->SetPluginType( CCseScheduledProgram::TCseScheduleType( 
-							   view.ColInt32( pluginTypeIndex ) ) );
-
-		TInt streamLen( 0 );
-		streamLen = view.ColLength( applicationSpecificIndex );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex ); // |-> 1
-		readStream.ReadL(buffPtr, streamLen);
-		readStream.Release();
-		CleanupStack::PopAndDestroy( ); // 1 <-| Popping pointer to Col that we dont have here
-		TPtrC8 ptr8( appDataBuffer->Des() );
-		schedule->SetApplicationDataL( *appDataBuffer );
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		
-		aResultArray.AppendL( schedule );
-		CleanupStack::Pop( schedule );	
-	
-		// Next shcedule...
-		view.NextL();
-		}
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetSchedulesByTimeframeL");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetPluginsL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetPluginsL( RArray<TInt32>& aPlugins )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetPluginsL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();	
-	
-	// Gets program occurence(s) that are going to happen next
-	// from database
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseSchedulePlugInUIDCol );
-	
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get the SQL table indexes.	
-	TDbColNo pluginUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	TInt32 currentPluginUid( 0 );
-	TInt32 newPluginUid( 0 );
-	
-	// Loop through the tables
-	while ( view.AtRow() )
-	    {	    
-	    view.GetL();
-	    
-	    // Get plugin Uid from row	        
-		newPluginUid = view.ColInt32( pluginUidIndex );
-		
-		// If it is different that the current plugin uid add it to
-		// array and set new "current" uid.
-		if( newPluginUid != currentPluginUid )
-		    {
-		    // Query results are sorted by plugin uid
-		    // so if uid changes we can add it to array
-		    // without fearing that we will have
-		    // duplicates.		    
-		    aPlugins.Append( newPluginUid );
-		    currentPluginUid = newPluginUid;
-		    }		
-		
-		view.NextL();
-		}
-		
-    view.Close();		
-	CleanupStack::PopAndDestroy( &view ); // Closes view	
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetPluginsL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetNextScheduleTimeByPluginL()
-//
-// ---------------------------------------------------------------------------	
-TTime CCseScheduleDB::GetNextScheduleTimeByPluginL( TInt32 aPluginUid )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetNextScheduleTimeByPluginL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Create SQL satring to get schedule occurence(s) that are
-	// going to happen next from database.
-	TTime nextScheduleTime( 0 );
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleStateCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( ECseWaiting );
-	sqlStatement.Append( KCseAnd );
-	sqlStatement.Append( KCseSchedulePlugInUIDCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aPluginUid );
-	sqlStatement.Append( KCseOrderBy );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next schedule
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Schedule found get its start time.
-	if ( view.AtRow() )	
-		{		
-		view.GetL();				
-		nextScheduleTime = view.ColTime( startTimeIndex );
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetNextScheduleTimeByPluginL");
-	
-	return nextScheduleTime;
-	}
-
-// ---------------------------------------------------------------------------
-// CCseScheduleDB::GetSchedulesByTimeAndPluginL()
-//
-// ---------------------------------------------------------------------------	
-void CCseScheduleDB::GetSchedulesByTimeAndPluginL(
-                                     const TTime& aScheduleTime, 
-                                     TInt32 aPluginUid,
-					                 RPointerArray<CCseScheduledProgram>& aNextScheduleArray )
-	{
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseScheduleDB::GetSchedulesByTimeAndPluginL");
-	LeaveIfDbLockedL();
-	ResetCompactTimer();
-	
-	// Gets program occurence(s) that are going to happen next
-	// from database
-	TBuf<100> startTimeBuf;
-	
-	_LIT( KDateTimeFormat,"# %1%*D/%2%*M/%3%*Y %H:%T:%S.%C#" ); 
-
-	aScheduleTime.FormatL( startTimeBuf, KDateTimeFormat );
-		
-	// Create SQL string to get all schedules to be happen at given time
-	TBuf<KCseCustomSqlLength> sqlStatement;
-	sqlStatement.Append( KCseSelectFromDb );	
-	sqlStatement.Append( KCseScheduleTable );
-	sqlStatement.Append( KCseWhere );
-	sqlStatement.Append( KCseScheduleStartTimeCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.Append( startTimeBuf );
-	sqlStatement.Append( KCseAnd );
-	sqlStatement.Append( KCseSchedulePlugInUIDCol );
-	sqlStatement.Append( KCseEqual );
-	sqlStatement.AppendNum( aPluginUid );
-		
-	// Order table based on start time
-	RDbView view;
-	CleanupClosePushL( view );
-	User::LeaveIfError( view.Prepare( iScheduleDb, 
-						TDbQuery( sqlStatement ) ) );
-	User::LeaveIfError( view.EvaluateAll() );
-	
-	// Get the next reminder
-	view.FirstL();
-	
-	CDbColSet* colSetOrder = view.ColSetL();
-	CleanupStack::PushL( colSetOrder );
-	
-	// Get column indexes
-	TDbColNo keyIndex = colSetOrder->ColNo( KCseScheduleDbKeyCol );
-	TDbColNo nameIndex = colSetOrder->ColNo( KCseScheduleNameCol );
-	TDbColNo startTimeIndex = colSetOrder->ColNo( KCseScheduleStartTimeCol );
-	TDbColNo endTimeIndex = colSetOrder->ColNo( KCseScheduleEndTimeCol );
-	TDbColNo applicationUidIdIndex = colSetOrder->ColNo( KCseScheduleApplicationUIDCol );
-	TDbColNo plugInUidIndex = colSetOrder->ColNo( KCseSchedulePlugInUIDCol );
-	TDbColNo typeIndex = colSetOrder->ColNo( KCseScheduleTypeCol );
-	TDbColNo applicationSpecificIndex = colSetOrder->ColNo( KCseScheduleApplicationSpecificCol );
-	TDbColNo pluginTypeIndex = colSetOrder->ColNo( KCseSchedulePluginTypeCol );
-	
-	CleanupStack::PopAndDestroy( colSetOrder );
-	
-	// Loop through all found schedules.
-	while ( view.AtRow() )
-		{
-		// Create new schedule to be added to array
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );			
-		view.GetL();
-		
-		// Copy information from DB to schedule.
-		prog->SetDbIdentifier( view.ColUint32( keyIndex ) );
-		prog->SetName( view.ColDes8( nameIndex ) );
-		prog->SetStartTime( view.ColTime( startTimeIndex ) );
-		prog->SetEndTime( view.ColTime( endTimeIndex ) );
-		prog->SetAppUid( view.ColInt32( applicationUidIdIndex ) );
-		prog->SetPluginUid( view.ColInt32( plugInUidIndex ) );
-		
-		prog->SetScheduleType( CCseScheduledProgram::TCseScheduleType( 
-							   view.ColInt32( typeIndex ) ) );
-        prog->SetPluginType( view.ColInt32( pluginTypeIndex ) );
-		TInt streamLen( view.ColLength( applicationSpecificIndex ) );
-	
-		HBufC8* appDataBuffer = HBufC8::NewL( streamLen );
-		CleanupStack::PushL( appDataBuffer );
-		
-		TPtr8 buffPtr( appDataBuffer->Des() );
-		RDbColReadStream readStream;
-		readStream.OpenLC( view, applicationSpecificIndex ); // |-> 1
-		readStream.ReadL( buffPtr, streamLen );
-		readStream.Release();
-		CleanupStack::PopAndDestroy(); // 1 <-|
-
-		prog->SetApplicationDataL( *appDataBuffer );
-		
-		CleanupStack::PopAndDestroy( appDataBuffer );
-		User::LeaveIfError( aNextScheduleArray.Append( prog ) );
-		CleanupStack::Pop( prog );
-		
-		// And next schedule...
-		view.NextL();
-		}
-		
-	CleanupStack::PopAndDestroy( &view ); // Closes view
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseScheduleDB::GetSchedulesByTimeAndPluginL");
-	}
-
-
-// End of file.
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerLandLord.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Timer for the notifier*
-*/
-
-
-
-
-#include "CCseSchedulerLandLord.h"
-#include "CCseSchedulerPluginStarter.h"
-#include <ipvideo/CCseScheduledProgram.h>
-#include "CCseSchedulerThreadPacket.h"
-#include <ipvideo/MCseScheduleObserver.h>   // Observer for informing engine
-#include <e32std.h>
-#include "CseDebug.h"               // Debug macros
-#include "CCseSemaphoreController.h"
-
-_LIT( KCseUniThreadName, "CseThread" );
-_LIT( KCseLine,          "-" );
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::CCseSchedulerTimer()
-//
-// ---------------------------------------------------------------------------
-CCseSchedulerLandLord::CCseSchedulerLandLord( MCseScheduleObserver* aObserver ) :
-                            CActive( CActive::EPriorityStandard ),
-                            iThreadRunning( EFalse ),
-                            iTakedownRequested( EFalse )
-
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::CCseSchedulerLandLord");
-	
-	// C++ default constructor
-	iObserver = aObserver;	
-		
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::CCseSchedulerLandLord");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerLandLord::~CCseSchedulerLandLord()
-//
-// ---------------------------------------------------------------------------	
-CCseSchedulerLandLord::~CCseSchedulerLandLord()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::~CCseSchedulerLandLord");
-
-	Cancel();
-
-    delete iShutdownCompleteMonitor;    
-    iShutdownCompleteMonitor = NULL;    
-    delete iActiveSchedulerWait;
-    iActiveSchedulerWait = NULL;    
-	iObserver = NULL;
-	delete iThreadPacket;
-	iThreadPacket = NULL;
-	delete iThreadName;
-		
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::~CCseSchedulerLandLord");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerLandLord::NewL()
-//
-// ---------------------------------------------------------------------------	
-CCseSchedulerLandLord* CCseSchedulerLandLord::NewL( 
-	                        MCseScheduleObserver* aObserver )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::NewL");
-	
-	// Symbian C++ constructor
-	CCseSchedulerLandLord* self = new ( ELeave ) CCseSchedulerLandLord( aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( );
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::NewL");
-    return self;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerLandLord::ConstructL()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerLandLord::ConstructL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::ConstructL");	
-
-    iActiveSchedulerWait = new (ELeave) CActiveSchedulerWait;    
-    CActiveScheduler::Add( this );
-  
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::ConstructL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerLandLord::DoCancel()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerLandLord::DoCancel()
-	{
-	CSELOGSTRING_HIGH_LEVEL( ">>>CCseSchedulerLandLord::DoCancel" );
-
-	if ( iThreadRunning )
-	    {
-    	CSELOGSTRING_HIGH_LEVEL(
-    	    "CCseSchedulerLandLord::DoCancel Canceling thread" );
-        
-	    // Signal thread to die away!
-	    iPluginShutdownSemaphore.Signal();
-	
-    	iThreadRunning = EFalse;
-    	
-    	// Complete schedule with KErrAbort
-    	TRAP_IGNORE( iObserver->ScheduleCompletedL(
-    	    iThreadPacket->Schedule( )->DbIdentifier(), KErrAbort ) );    	
-	    }
-
-	CSELOGSTRING_HIGH_LEVEL( "<<<CCseSchedulerLandLord::DoCancel" );
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::RunL()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerLandLord::RunL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::RunL");
-	
-    iThreadRunning = EFalse;
-
-    // In case we have not cancelled operation, complete schedule with result code.
-    // If we have cancelled it, we're not interested about the result as the
-    // schedule has already been removed from the DB
-    if( !iTakedownRequested )
-        {        
-        iObserver->ScheduleCompletedL( iThreadPacket->Schedule( )->DbIdentifier(),
-                                       iThreadPacket->ResultCode( ) );
-        }
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::RunL");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::SetScheduleL()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerLandLord::SetScheduleL( CCseScheduledProgram& aData )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::SetSchedule");
-	
-	delete iThreadPacket;
-	iThreadPacket = NULL;
-	iThreadPacket = CCseSchedulerThreadPacket::NewL();
-	iThreadPacket->SetScheduleL( aData );	    
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::SetSchedule");
-	}
-		
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::ThreadPacket()
-//
-// ---------------------------------------------------------------------------		
-CCseSchedulerThreadPacket* CCseSchedulerLandLord::ThreadPacket( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::Schedule");
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::Schedule");
-   
-    return iThreadPacket;
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::RunError
-// From CActive, called when RunL leaves.
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerLandLord::RunError( TInt /*aError*/ )
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::RunError");	
-    // ATM there isn't leaving code in RunL so we just cancel timer if it is active.    
-    Cancel();
-    // Return KErrNone to avoid crash.
-	return KErrNone;
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::GenerateThreadName
-// Generates "unique" name for thread
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerLandLord::GenerateThreadNameL( )
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::GenerateThreadName");	
-
-    delete iThreadName;
-    iThreadName = NULL;
-    iThreadName = KCseUniThreadName().AllocL();
-    iThreadName = iThreadName->ReAllocL(
-                                iThreadName->Size() +   // Length of original name.
-                                sizeof( TUint32 ) * 2 + // Space for Plugin Uid and DbIdentifier
-                                2 );                    // Two "-" as a separator between
-                                                        // Uid and identifier
-
-    // Separator                                                        
-    iThreadName->Des( ).Append( KCseLine );
-    
-    // Plugin uid
-    iThreadName->Des( ).AppendNum( iThreadPacket->Schedule()->PluginUid() );
-    
-    // Separator
-    iThreadName->Des( ).Append( KCseLine );
-    
-    // Finally schedule identifier to make thread name unique
-    iThreadName->Des( ).AppendNum( iThreadPacket->Schedule()->DbIdentifier() );
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::GenerateThreadName");	
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::GenerateSemahoresL
-// Generates semaphores for shutdown signalling
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerLandLord::GenerateSemaphoresL( )
-    {
-    iPluginShutdownSemaphore.CreateLocal( 0 );
-    iThreadPacket->SetShutdownSemaphore( iPluginShutdownSemaphore );
-    
-    iPluginShutdownCompleteSemaphore.CreateLocal( 0 );
-    iThreadPacket->SetShutdownCompleteSemaphore( iPluginShutdownCompleteSemaphore );
-    }
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::RunPluginL
-// From CActive, called when RunL leaves.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerLandLord::RunPluginL( )
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::RunPluginL");	
-    TInt error( KErrNone );
-    
-    // Create semaphores for shutdown signalling
-    GenerateSemaphoresL();
-    
-    // First we create unique thread name
-    GenerateThreadNameL( );
-    
-    // Create thread where to run schedule
-    error = iThread.Create( *iThreadName,
-                             CCseSchedulerPluginStarter::StartThread,
-                             KDefaultStackSize,
-                             NULL, // uses caller thread's heap
-                             iThreadPacket, // Schedule
-                             EOwnerThread );
-    
-    if( error == KErrNone )
-        {
-        // Creation succesfull, start running it and logon on it.
-        CSELOGSTRING_HIGH_LEVEL(
-            "CCseSchedulerLandLord::RunPluginL - Thread creation succesfull");
-        iThread.Resume();
-        iThread.Logon( iStatus );
-        SetActive();
-        iThreadRunning = ETrue;
-        }
-    else
-        {
-        CSELOGSTRING2_HIGH_LEVEL(
-            "CCseSchedulerLandLord::RunPluginL - Thread creation FAILED: %d",
-             error);
-        }
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::RunPluginL");    
-    } 
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::ActiveWait
-//
-// -----------------------------------------------------------------------------
-//	
-void CCseSchedulerLandLord::ActiveWait( TBool aStart )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::ActiveWait()");    
-    if (aStart)
-        {
-	    if(!iActiveSchedulerWait->IsStarted())
-	        {
-	        CSELOGSTRING_HIGH_LEVEL("CCseSchedulerLandLord::ActiveWait - Wait start");    
-	        iActiveSchedulerWait->Start();		
-	        }
-        }
-    else
-        {
-		if(iActiveSchedulerWait->IsStarted())
-			{
-			CSELOGSTRING_HIGH_LEVEL("CCseSchedulerLandLord::ActiveWait - Wait stop");    
-			iActiveSchedulerWait->AsyncStop();		
-			}
-        }
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::ActiveWait()");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::ActiveWait
-//
-// -----------------------------------------------------------------------------
-//	    
-void CCseSchedulerLandLord::SemaphoreSignalled()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::ShutdownPlugin()"); 
-    
-    ActiveWait( EFalse );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::ShutdownPlugin()"); 
-    }
-    
-// ---------------------------------------------------------------------------
-// CCseSchedulerLandLord::ClearL()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerLandLord::ClearL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::ClearL");	
-
-	if( iThreadRunning )
-	    {
-	    // Flag the takedown. We're cancelling the operation, so we have
-	    // no interest about result code as the schedule has already
-	    // been removed from the DB.
-	    iTakedownRequested = ETrue;
-	    
-    	// Signal thread to die away!
-        iPluginShutdownSemaphore.Signal();
-            
-        if( !iShutdownCompleteMonitor )
-            {
-            CSELOGSTRING_HIGH_LEVEL("CCseSchedulerLandLord::ClearL - New semaphore monitor" );
-            iShutdownCompleteMonitor = CCseSemaphoreController::NewL( iPluginShutdownCompleteSemaphore, *this );
-            }
-        
-        CSELOGSTRING_HIGH_LEVEL("CCseSchedulerLandLord::ClearL - StartMonitor" );    
-        iShutdownCompleteMonitor->Start();    
-        
-        ActiveWait( ETrue );     
-            
-        iThreadRunning = EFalse;	
-	    }
-  
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::ClearL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerLandLord::ActiveWait
-//
-// -----------------------------------------------------------------------------
-//      
-TBool CCseSchedulerLandLord::IsWorking()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerLandLord::IsWorking()"); 
-    
-    CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerLandLord::IsWorking(): %d", iThreadRunning);
-    
-    return iThreadRunning;
-    }
-
-// End of file
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerMultiPluginController.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Base class for multi plugin controllers*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerMultiPluginController.h"
-#include "CseDebug.h"                           // Debug macros
-#include "CCseSchedulerPluginStarter.h"
-#include "CCseSchedulerLandLord.h"
-#include <ipvideo/CCseScheduledProgram.h>
-#include "CCseSchedulerTimer.h"
-#include "CCseSchedulerServerEngine.h"
-#include "CCseSchedulerThreadPacket.h"
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::CCseSchedulerMultiPluginController
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerMultiPluginController::CCseSchedulerMultiPluginController(
-                                        CCseSchedulerServerEngine& aEngine,
-                                        TInt32 aPluginUid ) :
-                                        CCseSchedulerPluginControllerBase( aEngine, aPluginUid )
-
-    {
-    CSELOGSTRING_HIGH_LEVEL(
-        ">>>CCseSchedulerMultiPluginController::CCseSchedulerMultiPluginController");
-        
-    CSELOGSTRING_HIGH_LEVEL(
-        "<<<CCseSchedulerMultiPluginController::CCseSchedulerMultiPluginController");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerMultiPluginController* CCseSchedulerMultiPluginController::NewL( 
-                                        CCseSchedulerServerEngine& aEngine,
-                                        TInt32 aPluginUid )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::NewL");
-    
-    CCseSchedulerMultiPluginController* self = 
-            new( ELeave ) CCseSchedulerMultiPluginController( aEngine, aPluginUid );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::ConstructL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::ConstructL");
-
-    CCseSchedulerPluginControllerBase::ConstructL();
-       
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::ConstructL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::~CCseSchedulerMultiPluginController
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerMultiPluginController::~CCseSchedulerMultiPluginController()
-    {
-    CSELOGSTRING_HIGH_LEVEL(
-        ">>>CCseSchedulerMultiPluginController::~CCseSchedulerMultiPluginController");
-    
-    iLandLords.ResetAndDestroy( );
-    iLandLords.Close();    
-		
-    CSELOGSTRING_HIGH_LEVEL(
-        "<<<CCseSchedulerMultiPluginController::~CCseSchedulerMultiPluginController");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::RunPluginsL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::RunPluginsL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::RunPluginsL");
-    TBool scheduleAlreadyRunning( EFalse );
-    
-    if(iScheduleArray.Count() >0 )
-        {
-        // Kick those schedules running that aren't already running
-        for( TInt i = 0; i < iScheduleArray.Count(); i++)
-            {
-            for ( TInt ii = 0; ii < iLandLords.Count(); ii++ )
-                {
-                if( iScheduleArray[i]->DbIdentifier() ==
-                        iLandLords[ii]->ThreadPacket()->Schedule()->DbIdentifier() )
-                    {
-                    scheduleAlreadyRunning = ETrue;
-                    }                
-                }
-            if( !scheduleAlreadyRunning )
-                {
-                if( iEngine.IsAllowedToRun( iScheduleArray[i]->DbIdentifier() ) )
-                    {                    
-                    // Create new LandLord for each schedule to be run
-                    CCseSchedulerLandLord* landLord = CCseSchedulerLandLord::NewL( this );
-                                                  
-                    CleanupStack::PushL( landLord );                    
-                                                                                    
-                    // Set schedule for LandLord
-                    landLord->SetScheduleL( *iScheduleArray[i] );
-                    
-                    // Increase run count
-                    iEngine.IncreaseScheduleRunCountL( iScheduleArray[0]->DbIdentifier() );
-                    
-                    // Order the LandLord to run plugin
-                    landLord->RunPluginL();
-                    
-                    CleanupStack::Pop( landLord );
-                    
-                    // Add created landLord to array. Destroyed later when landLord
-                    // is not needed anymore.
-                    iLandLords.AppendL( landLord );
-                    
-                    CleanupStack::Pop( landLord );
-                    }        
-                else
-                    {
-                    // Schedule cannot be run anymore due to security reasons
-                    // Signal engine to remove schedule from DB
-                    iEngine.ScheduleNotValid( iScheduleArray[i]->DbIdentifier() );
-                    
-                    // Remove schedule own list
-                    delete iScheduleArray[i];
-                    iScheduleArray.Remove( i );
-                    i--;
-                    }
-                }
-            }
-        if( iLandLords.Count() == 0 )
-            {
-            // We've gone through all our schedules and still no LandLords.
-            // We need to request new schedules.
-            iEngine.RequestReschedule(); 
-            }
-        }
-    else
-        {
-        // No schedules...!?!? REEEEESCHEDULE!!!
-        iEngine.RequestReschedule();
-        }     
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::RunPluginsL");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::ScheduleCompletedL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::ScheduleCompletedL( const TUint32 aDbIdentifier,
-                                                             TInt aCompletitionCode )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::ScheduleCompletedL");
-
-    if ( aCompletitionCode == KErrNone )
-        {
-        ScheduleCompletedSuccesfullyL( aDbIdentifier );            
-        }
-    else
-        {
-        HandleScheduleErrorL( aDbIdentifier, aCompletitionCode );
-        }    
- 
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::ScheduleCompletedL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::ScheduleCompletedSuccesfullyL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::ScheduleCompletedSuccesfullyL");
-
-    // Remove schedule from list
-    for ( TInt i = 0; i < iScheduleArray.Count(); i ++)
-        {
-        if( iScheduleArray[i]->DbIdentifier() == aDbIdentifier )
-            {
-            delete iScheduleArray[i];
-            iScheduleArray.Remove( i );                
-            }
-        }
-        
-    // Notify engine about completition.
-    iEngine.ScheduleCompletedSuccesfullyL( aDbIdentifier );
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::ScheduleCompletedSuccesfullyL");	
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::HandleScheduleErrorl
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::HandleScheduleErrorL( const TUint32 aDbIdentifier,
-                                                              TUint32 aCompletitionCode )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::HandleScheduleError");
-	
-	// Here we could try to handle plugin errors. Problem is that scheduler doesn't
-	// know anything about schedule it is running and so there cannot be tailored
-	// error handling for each plugin. In the end, we just complete schedule
-	// to engine with error code (ends up removing schedule from DB).
-	
-	// Remove schedule from list
-    for ( TInt i = 0; i < iScheduleArray.Count(); i ++)
-        {
-        if( iScheduleArray[i]->DbIdentifier() == aDbIdentifier )
-            {
-            delete iScheduleArray[i];
-            iScheduleArray.Remove( i ); 
-            break;               
-            }
-        }
-	
-	iEngine.ScheduleCompletedWithErrorL( aDbIdentifier, aCompletitionCode );
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::HandleScheduleError");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::DoCleanUp::DoCleanUp
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::DoCleanUp( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::DoCleanUp");
-    TBool scheduleFound( EFalse );
-
-    // Check all LandLords. If we found that there is no schedules related to 
-    // one we destroy it.
-    for (TInt i = iLandLords.Count(); i > 0; i--)
-        {
-        for ( TInt ii = 0; ii < iScheduleArray.Count(); ii++ )
-            {
-            // Compare LandLords DbIdentifier with the ones in schedules
-            if( iLandLords[i-1]->ThreadPacket()->Schedule()->DbIdentifier() ==
-                    iScheduleArray[ii]->DbIdentifier() )
-                {
-                scheduleFound = ETrue;
-                break;
-                }            
-            }
-        // Remove LandLord if there is no schedule for it.
-        if( !scheduleFound )
-            {
-            delete iLandLords[i-1];
-            iLandLords.Remove(i-1);
-            }
-        scheduleFound = EFalse;
-        }
-   
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::DoCleanUp");	
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::ClearPlugin
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerMultiPluginController::ClearControllerL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerMultiPluginController::ClearControllerL");
-	for( TInt i = 0 ; i < iLandLords.Count() ; i++ )
-	    {
-	    iLandLords[i]->ClearL();
-	    }
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerMultiPluginController::ClearControllerL");
-	}	
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerMultiPluginController::IsControllerActive
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerMultiPluginController::IsControllerActive( )
-    {
-    TBool retVal( EFalse );
-    
-    for( TInt i = 0; i < iLandLords.Count(); i++ )
-        {
-        if( iLandLords[i]->IsWorking() )
-            {
-            retVal = ETrue ;
-            break;
-            }            
-        }
-    return retVal;
-    }   
-
-// End of file.
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerPluginControllerBase.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Base class for plugin controllers*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerPluginControllerBase.h"
-#include "CseDebug.h"                           // Debug macros
-#include <ipvideo/CCseScheduledProgram.h>
-#include "CCseSchedulerTimer.h"
-#include "CCseSchedulerServerEngine.h"
-
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::CCseSchedulerPluginControllerBase
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerPluginControllerBase::CCseSchedulerPluginControllerBase( MCsePluginControllerObserver& aEngine,
-                                                                      TInt32 aPluginUid ) :
-                                                                      iEngine( aEngine ),
-                                                                      iPluginUid( aPluginUid )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::CCseSchedulerPluginControllerBase");
-            
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::CCseSchedulerPluginControllerBase");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerPluginControllerBase* CCseSchedulerPluginControllerBase::NewL( MCsePluginControllerObserver& aEngine,
-                                                                      TInt32 aPluginUid )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::NewL");
-    
-    CCseSchedulerPluginControllerBase* self = new( ELeave ) CCseSchedulerPluginControllerBase( aEngine, aPluginUid );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::ConstructL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::ConstructL");
-    
-    iTimer = CCseSchedulerTimer::NewL( this );    
-               
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::ConstructL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::~CCseSchedulerPluginControllerBase
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerPluginControllerBase::~CCseSchedulerPluginControllerBase()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::~CCseSchedulerPluginControllerBase");
-    
-    delete iTimer;    
-    iScheduleArray.ResetAndDestroy();
-		
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::~CCseSchedulerPluginControllerBase");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::SetSchedulesL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::SetSchedulesL( RPointerArray<CCseScheduledProgram>& aScheduleArray )
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::SetSchedules");
-
-    //  The aScheduleArray parameter contains schedules which are either before
-    //  or at the same time as the existing ones in the iScheduleArray.
-    //  Just destroy the old ones and replace with new ones.
-    //  Also cancel the timer because the schedule to run may be different
-
-    iScheduleArray.ResetAndDestroy();
-    iTimer->Cancel();
-
-	// Go through all given schedules and copy them our array
-	for( TInt i = 0; i < aScheduleArray.Count(); i++)
-	    {
-        CCseScheduledProgram* schedule =
-                CCseScheduledProgram::NewL(*aScheduleArray[i] );
-        CleanupStack::PushL( schedule );
-
-	    iScheduleArray.AppendL( schedule );
-
-	    CleanupStack::Pop( schedule );
-	    }
-
-    //  If we have schedules, set the timer
-    if (iScheduleArray.Count() > 0)
-        {
-        //  All the schedules have same time
-        iTimer->SetTimer( iScheduleArray[0]->StartTime() );
-        }
-
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::SetSchedules");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::GetPluginUid
-//
-// -----------------------------------------------------------------------------
-//
-TInt32 CCseSchedulerPluginControllerBase::PluginUid( )
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::PluginUid");
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::PluginUid: UID = %d",
-	                             iPluginUid);
-    return iPluginUid;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::RunPluginsL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::RunPluginsL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::RunPluginsL");
-    CSELOGSTRING_HIGH_LEVEL(
-        "CCseSchedulerPluginControllerBase::RunPluginsL - Base class, do nothing");
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::RunPluginsL");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::IsObsolote
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerPluginControllerBase::IsObsolete() const
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::IsObsolete");
-    
-    TBool ret( EFalse );
-    
-    // If we have no schedules in array we declare ourselves as "obsolete".
-    if( iScheduleArray.Count() == 0 )
-        {
-        ret = ETrue;
-        }
-    
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::IsObsolete: %d", ret);
-	
-	return ret;
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::ScheduleCompleted
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::ScheduleCompletedL( const TUint32 /*aDbIdentifier*/,
-                                                            TInt /*aCompletitionCode*/ )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ScheduleCompleted");	
-	CSELOGSTRING_HIGH_LEVEL(
-	    "CCseSchedulerUniPluginController::ScheduledEventCompleted - WTF LEIK BSAE KLASS");
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::ScheduleCompleted");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::TimerErrorL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::TimerErrorL( const TInt32 aError )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginControllerBase::TimerErrorL");
-	
-	if ( aError == KErrAbort )
-		{
-		 // System time changed. Make sanity check and start timer again.
-		CSELOGSTRING_HIGH_LEVEL(
-		    ">>>CCseSchedulerPluginControllerBase::TimerErrorL, system time has changed");
-		if ( iScheduleArray.Count() > 0 )
-			{
-			TTime now;
-			now.UniversalTime();
-			// Time still in the future
-			if ( now < iScheduleArray[0]->StartTime() )
-				{
-				iTimer->SetTimer( iScheduleArray[0]->StartTime() );
-				}
-			else
-				{
-				RunPluginsL();
-				}
-			}
-		return; 
-		}
-
-	if ( aError == KErrUnderflow )
-		{
-		 // Scheduled time is in the past, pass it to notifier. It should decide what to do
-		CSELOGSTRING_HIGH_LEVEL(
-		    ">>>CCseSchedulerPluginControllerBase::TimerErrorL, scheduled time is in the past");
-		RunPluginsL();
-		return;
-		}
-			
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginControllerBase::TimerErrorL");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::DoCleanUp
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::DoCleanUp( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::DoCleanUp");	
-	CSELOGSTRING_HIGH_LEVEL(
-	    "CCseSchedulerUniPluginController::DoCleanUp - Base class");
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::DoCleanUp");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::SetAsObsolete
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::SetToBeCleared( TBool aToBeCleared )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::SetToBeCleared");	
-	
-	iToBeCleared = aToBeCleared;
-	    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::SetToBeCleared");
-	}
-
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::ClearController
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginControllerBase::ClearControllerL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ClearControllerL");	
-
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ClearControllerL - Baseclass, nothing here");	
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::ClearControllerL");
-	}
-
-
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::ClearPlugin
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerPluginControllerBase::IsToBeCleared( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::IsToBeCleared");	
-
-    CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::IsToBeCleared: %d", iToBeCleared );	
-    return iToBeCleared;	
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginControllerBase::IsControllerActive
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerPluginControllerBase::IsControllerActive( )
-    {   
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::IsControllerActive");  
-
-    CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::IsControllerActive: %d", iToBeCleared );  
-    return ETrue;    
-    }
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerPluginStarter.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Plugin starter, this is run in separate thread from engine*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerPluginStarter.h"
-#include "CseDebug.h"                           // Debug macros
-#include <ipvideo/CCseScheduledProgram.h>   // Represent one schedule in database
-#include <ipvideo/CCseSchedulerPluginIF.h>
-#include "CCseSchedulerThreadPacket.h"
-#include "CCseSemaphoreController.h"
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::CCseSchedulerPluginStarter
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerPluginStarter::CCseSchedulerPluginStarter ( CCseSchedulerThreadPacket* aThreadPacket ) :                                
-                                iThreadPacket( aThreadPacket ),
-                                iPluginRdyToTakedown( EFalse )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::CCseSchedulerPluginStarter");
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::CCseSchedulerPluginStarter");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerPluginStarter* CCseSchedulerPluginStarter::NewL( CCseSchedulerThreadPacket* aThreadPacket )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::NewL");
-    
-    CCseSchedulerPluginStarter* self = new( ELeave ) CCseSchedulerPluginStarter( aThreadPacket );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginStarter::ConstructL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::ConstructL");
-    
-    iCompletitionBreaker = CIdle::NewL( CActive::EPriorityLow );
-    // Start completition breaker. This time we do not inform about completition of
-    // plugin but we break call chain and start running plugin from RunL
-    iCompletitionBreaker->Start(TCallBack( PluginCompleteCallback, this ));
-    
-    iSemaphoreMonitor = CCseSemaphoreController::NewL( iThreadPacket->ShutdownSemaphore(),
-                                                       *this );
-           
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::ConstructL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerEngineBackdoorClient::~CCseSchedulerPluginStarter
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerPluginStarter::~CCseSchedulerPluginStarter()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::~CCseSchedulerPluginStarter");
-
-    delete iCompletitionBreaker;    
-    delete iPlugin;
-    iPlugin = NULL;
-    REComSession::FinalClose();
-        
-    delete iSemaphoreMonitor;    
-    iSemaphoreMonitor = NULL;
-        
-    // We DO NOT destroy thread packet, we just null the pointer.
-    // Information is still needed on other side after thread dies
-    iThreadPacket = NULL;
-    		
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::~CCseSchedulerPluginStarter");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::StartThread
-//
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerPluginStarter::StartThread( TAny* aParam )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::RunPlugin");
-    
-    TInt err( KErrNone );
-    
-    //create cleanupstack
-    CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
-    if (!cleanup)
-        {
-        err = KErrNoMemory;
-        }
-    if (!err)
-        {
-        TRAP(err, DoStartThreadL( aParam ));
-        }
-    delete cleanup;
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::RunPlugin");
-    return err;	
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::DoStartThreadL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginStarter::DoStartThreadL( TAny* aParam )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::DoStartThreadL");
-    
-    CCseSchedulerThreadPacket* threadPacket = static_cast<CCseSchedulerThreadPacket*>(aParam);
-    
-    CActiveScheduler* scheduler = new ( ELeave ) CActiveScheduler;
-    
-    // If schedule doesn't exist there is really nothing we can do
-    if( scheduler )
-        {            
-        CleanupStack::PushL( scheduler );          //   |->1
-        CActiveScheduler::Install( scheduler );
-
-        // Create the starter
-        CCseSchedulerPluginStarter* starter = CCseSchedulerPluginStarter::NewL( threadPacket );
-        CleanupStack::PushL(starter);              //   |->2
-            
-        // Ready to run
-        CActiveScheduler::Start();
-        
-        CSELOGSTRING_HIGH_LEVEL("CCseSchedulerPluginStarter::DoStartThreadL - Out from CActiveScheduler::Start!");
-        
-        // Cleanup the server and scheduler
-        CleanupStack::PopAndDestroy( starter );   // 2<-|
-        CleanupStack::PopAndDestroy( scheduler ); // 1<-|
-        
-        threadPacket->ShutdownCompleteSemaphore().Signal();  
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL("CCseSchedulerPluginStarter::DoStartThreadL - No schedule available, GTFO");
-        }
-        
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::DoStartThreadL");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::RunPluginL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginStarter::RunPluginL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::RunPluginL");
-    
-    // Create plugin
-    TUid pluginUid = TUid::Uid( iThreadPacket->Schedule()->PluginUid() );
-    
-    iPlugin = CCseSchedulerPluginIF::NewL( pluginUid );
-
-    iPlugin->RunTaskL( *iThreadPacket->Schedule(), this );
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::RunPluginL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::PluginCompleted
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginStarter::PluginCompleted( TInt aCompletitionCode )
-	{	
-	CSELOGSTRING2_HIGH_LEVEL(
-	    ">>>CCseSchedulerPluginStarter::PluginCompleted - Code: %d", aCompletitionCode);
-	
-    // Start taking down The Thread    
-    // Start Completition breaker if not already active to break call chain.
-    // Set plugin completition value
-    iThreadPacket->SetResultCode( aCompletitionCode );
-
-    iPluginRdyToTakedown = ETrue;
-    
-    if( !iCompletitionBreaker->IsActive() )
-        {                    
-        iCompletitionBreaker->Start(TCallBack( PluginCompleteCallback, this ));
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL(
-            "CCseSchedulerPluginStarter::PluginCompleted:Breaker already running!");
-        }
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::PluginCompleted");
-	}	
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerPluginStarter::PluginCompleteCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerPluginStarter::PluginCompleteCallback( TAny* aPtr )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>PluginCompleteCallback::ScheduleCompleteCallback");
-	CSELOGSTRING_HIGH_LEVEL("<<<PluginCompleteCallback::ScheduleCompleteCallback");
-	return static_cast<CCseSchedulerPluginStarter*>( aPtr )->HandlePluginCompleteCallback();
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerUserInformer::HandlePluginCompleteCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerPluginStarter::HandlePluginCompleteCallback() 
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::HandleScheduleCompleteCallback ");
-	
-	if( iPluginRdyToTakedown )
-	    {
-	    // First clear flag
-	    iPluginRdyToTakedown = EFalse;    	
-    	// Takedown thread
-    	CActiveScheduler::Stop();
-	    }
-    else
-	    {
-	    // First start monitor
-	    iSemaphoreMonitor->Start();
-	    // Plugin ready to be run	    
-	    TRAPD( err, RunPluginL() );
-	    if ( err != KErrNone )
-	        {
-	        // Run plugin leaved for some reason. Set error code and get outta here!
-	        iThreadPacket->SetResultCode( err );
-            iPluginRdyToTakedown = ETrue;
-            iCompletitionBreaker->Start(TCallBack( PluginCompleteCallback, this ));	        
-	        }
-	    }
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::HandleScheduleCompleteCallback ");
-	return EFalse;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUserInformer::SemaphoreSignalled
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerPluginStarter::SemaphoreSignalled()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerPluginStarter::SemaphoreSignalled");
-
-    delete iPlugin;
-    iPlugin = NULL;
-
-    CActiveScheduler::Stop();
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerPluginStarter::SemaphoreSignalled");
-    }
-
-// End of file.
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerServer.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,506 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Implementation of Scheduler server's Server class*
-*/
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerServer.h"                // Header file for this class
-#include "CCseSchedulerServerSession.h"         // Server session
-#include "CCseSchedulerServerEngine.h"          // Server intelligence aka engine
-#include <ipvideo/CseSchedulerClientServerCommon.h>     // Common defines for client and server
-#include "CseSchedulerServer.pan"               // Server panic codes
-#include "CseDebug.h"                           // Debug macros
-#include <e32svr.h>
-#include <e32math.h>
-#include <e32uid.h>
-#include <e32def.h>
-
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// Platform security. Custom check is applied to all IPCs.
-static const int KRangeCount( 1 );
-
-static const TInt SecurityRanges[KRangeCount] =
-    {
-    0, // Range is from 0 to KMaxTInt
-    };
-
-static const TUint8 SecurityRangesPolicy[KRangeCount] =
-    {
-    CPolicyServer::ECustomCheck
-    };
-
-static const CPolicyServer::TPolicy Policy =
-    {
-    CPolicyServer::EAlwaysPass,
-    KRangeCount,
-    SecurityRanges,
-    SecurityRangesPolicy,
-    NULL,
-    };
-
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-const TInt KDbStartTimeout              = 2000000;
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::CCseSchedulerServer()
-// C++ constructor 
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServer::CCseSchedulerServer()
-    : CPolicyServer( EPriorityRealTimeServer, Policy, ESharableSessions ),
-    iContainerIx( NULL ),
-    iObjectCon( NULL ),
-    iSessionCount( 0 ),
-    iSchedulerEngine( NULL )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::CCseSchedulerServer");
-    __DECLARE_NAME( _S( "CCseSchedulerServer" ) );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::CCseSchedulerServer");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::NewLC()
-// 
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServer* CCseSchedulerServer::NewLC( )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::NewLC");
-    
-    CCseSchedulerServer* self = new ( ELeave ) CCseSchedulerServer;
-    CleanupStack::PushL( self );
-    
-    self->ConstructL( );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::NewLC");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::ConstructL()
-// second-phase constructor; create the object container index.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServer::ConstructL( )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::ConstructL");
-    iContainerIx = CObjectConIx::NewL();
-    iObjectCon = iContainerIx->CreateL(); 
-    StartL( KCseSchedulerServerName );
-    GetEngineObjectL();
-    iStarterBreaker = CPeriodic::NewL( CActive::EPriorityStandard );
-    
-    // break call chain
-	if( !iStarterBreaker->IsActive() )
-        {
-        // Give client 2 secs to make server session before we check 
-        // if server is needed or not.
-        iStarterBreaker->Start( KDbStartTimeout,
-                                KDbStartTimeout,
-                                TCallBack( StarterCallback, this ));
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL(
-            "CCseSchedulerServer::ConstructL - Breaker already active");
-        }
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::ConstructL");    
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::~CCseSchedulerServer()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServer::~CCseSchedulerServer()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::~CCseSchedulerServer");
-    DeleteSchedulerEngine();
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::~CCseSchedulerServer");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::ThreadFunction()
-// The active scheduler is installed and started here.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServer::ThreadFunction( )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::ThreadFunction");
-	CTrapCleanup* cleanupStack = CTrapCleanup::New();    
-    if ( !cleanupStack )
-        {
-        PanicServer( ECseCreateTrapCleanup );
-        }
-
-    TRAPD( err, ThreadFunctionL( ) );
-    if ( err )
-        {
-        PanicServer( ECseSrvCreateServer );
-        }
-
-    delete cleanupStack;    
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::ThreadFunction");
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::ThreadFunctionL()
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServer::ThreadFunctionL( )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::ThreadFunctionL");
-
-    // Construct active scheduler
-    CActiveScheduler* activeScheduler = new ( ELeave ) CActiveScheduler;
-    CleanupStack::PushL( activeScheduler ); // |-> 1
-
-    // Install active scheduler. 
-    // We don't need to check whether an active scheduler is already installed
-    // as this is a new thread, so there won't be one
-    CActiveScheduler::Install( activeScheduler );
-
-    // Construct our server, pushed cleanup stack and leaved there
-    CCseSchedulerServer* server = CCseSchedulerServer::NewLC( );  // |-> 2    
-    
-    // Signal server is up
-    RProcess::Rendezvous( KErrNone );
-
-    // Start handling requests
-    CActiveScheduler::Start();
-
-    CleanupStack::PopAndDestroy( server ); // 2<-|
-    CleanupStack::PopAndDestroy( activeScheduler ); // 1<-|
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::ThreadFunctionL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::PanicServer
-// Utility - panic the server
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CCseSchedulerServer::PanicServer( TCseSchedulerServPanic aPanic )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::PanicServer");
-    _LIT( KSchedulerServer, "SchedulerServer" );
-    User::Panic( KSchedulerServer, aPanic );
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::PanicServer");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::GetEngineObjectL()
-//
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServerEngine* CCseSchedulerServer::GetEngineObjectL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::GetEngineObjectL");
-        
-    if ( iObjectCon->Count() == 0 )
-        {
-        // Create scheduler engine
-        iSchedulerEngine = CCseSchedulerServerEngine::NewL( *this );
-       
-        // Add our engine to container
-        iObjectCon->AddL( iSchedulerEngine );
-        }
-    else
-        {
-        // default implementation return KErrNone.
-        if ( KErrNone != iSchedulerEngine->Open() )
-            {
-            User::Leave( KErrGeneral );
-            }
-        }
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::GetEngineObjectL");
-    
-    // We have only one object in our container
-    return iSchedulerEngine;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::Inc()
-// 
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServer::Inc()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::Inc");
-    if ( iSessionCount!=KErrNotFound )
-        {
-        iSessionCount++;
-        }
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::Inc");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseRTPServer::Dec()
-// 
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServer::Dec()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::Dec");
-    iSessionCount--;
-
-    if ( iSessionCount<=0 )
-        {
-        StopServer();
-        }
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::Dec");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::DeleteSchedulerEngine
-// Stops active scheduler and deletes object container and other objects.
-// -----------------------------------------------------------------------------
-void CCseSchedulerServer::DeleteSchedulerEngine()
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::DeleteSchedulerEngine");
-    
-    if ( iContainerIx )
-        {
-        iSchedulerEngine->Close();
-        iContainerIx->Remove( iObjectCon );
-        delete iContainerIx; 
-		iContainerIx = NULL;
-		iSchedulerEngine = NULL;
-        }
-
-    if( iStarterBreaker->IsActive() )
-        {
-        iStarterBreaker->Cancel();
-        }
-    delete iStarterBreaker;    
-    iStarterBreaker = NULL;
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::DeleteSchedulerEngine");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::NewSessionL()
-// 
-// -----------------------------------------------------------------------------
-//
-
-CSession2* CCseSchedulerServer::NewSessionL( const TVersion& aVersion,
-                                             const RMessage2& /*aMessage*/ ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::NewSessionL");
-    
-    // Check version is ok
-    TVersion v( KCseServMajorVersionNumber,
-                KCseServMinorVersionNumber,
-                KCseServBuildVersionNumber );
-    
-    if ( !User::QueryVersionSupported( v, aVersion ) )
-        {
-        User::Leave( KErrNotSupported );
-        }
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::NewSessionL");        
-    
-    // Make new session
-	return CCseSchedulerServerSession::NewL( ( CCseSchedulerServer* ) this );
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServer::StopServer
-// Stops the server thread if no sessions active.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServer::StopServer()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::StopServer");
-    TBool schedulerActive( iSchedulerEngine->IsSchedulerActive() );    
-    CSELOGSTRING2_HIGH_LEVEL("CCseSchedulerServer::StopServer - Session count: %d", iSessionCount);    
-    if ( (iSessionCount<=0) && (schedulerActive == EFalse))
-        {
-        CSELOGSTRING_HIGH_LEVEL("CCseSchedulerServer::StopServer - Call ActiveScheduler::Stop()");
-        CActiveScheduler::Stop();
-        }        
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::StopServer");
-    }
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-// -----------------------------------------------------------------------------
-// StartThread()
-// Start the server thread. This is called from the client.
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServer::StartThread()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::StartThread");
-#if _DEBUG
-    __UHEAP_MARK;
-#endif
-       
-    // Check server not already started
-    TFindServer findCountServer( KCseSchedulerServerName );
-    TFullName name;
-    if ( findCountServer.Next( name ) == KErrNone )
-        { 
-        // Found server already
-        RProcess::Rendezvous( KErrNone );
-        CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::StartThread - Return value: KErrAlreadyExists");
-        return KErrAlreadyExists;
-        }
-
-    ThreadFunction( );
-
-#if _DEBUG
-    __UHEAP_MARKEND;
-#endif    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::StartThread - Server down!");
-	
-    // All well
-    return KErrNone;
-    }
-
-// --------------------------------------------------------------------------
-// CCseSchedulerServer::CustomSecurityCheckL()
-// --------------------------------------------------------------------------
-//
-CPolicyServer::TCustomResult CCseSchedulerServer::CustomSecurityCheckL(
-    const RMessage2& aMsg,
-    TInt& /*aAction*/,
-    TSecurityInfo& /*aMissing*/ )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::CustomSecurityCheckL");
-    TCustomResult retVal ( EFail );
-    
-    // Check the messagge function range
-    if ( aMsg.Function() > ECseRequestBase && 
-         aMsg.Function() < ECseRequestLast )
-        {
-        
-        // Check if the client has required capabilities
-        // From .mmp-file capablity NetworkControl
-        if( // From .mmp-file following are CAP_SERVER capabilities
-            ! aMsg.HasCapability(ECapabilityNetworkServices ) ||
-            ! aMsg.HasCapability(ECapabilityLocalServices ) ||
-            ! aMsg.HasCapability(ECapabilityLocation ) ||
-            ! aMsg.HasCapability(ECapabilityReadUserData ) ||
-            ! aMsg.HasCapability(ECapabilityWriteUserData ) ||
-            ! aMsg.HasCapability(ECapabilityReadDeviceData ) ||
-            ! aMsg.HasCapability(ECapabilityWriteDeviceData ) ||        
-            ! aMsg.HasCapability(ECapabilityUserEnvironment ) ||
-            ! aMsg.HasCapability(ECapabilitySwEvent ) )
-            {         
-            CSELOGSTRING2_HIGH_LEVEL(
-                "CCseSchedulerServer::CustomSecurityCheckL() No capability for message %d!!!",
-                aMsg.Function() );                 
-            }
-        else
-            {
-            CSELOGSTRING2_HIGH_LEVEL(
-                "CCseSchedulerServer::CustomSecurityCheckL() Message %d inside range and capabilities ok",
-                aMsg.Function() );
-            retVal = EPass;
-            }
-        }
-    else
-        {
-        CSELOGSTRING2_HIGH_LEVEL(
-            "CCseSchedulerServer::CustomSecurityCheckL() Message %d outside known range!!!",
-            aMsg.Function() );            
-        }
-    
-    if( retVal == EPass )
-        {
-        CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::CustomSecurityCheckL - Passed");
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::CustomSecurityCheckL - Failed");
-        }    
-    return retVal;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::StarterCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServer::StarterCallback( TAny* aPtr )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::StarterCallback");
-	TBool retVal( EFalse);
-	retVal = static_cast<CCseSchedulerServer*>( aPtr )->HandleStarterCallback();
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::StarterCallback");
-	return retVal;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::HandleCompletitionCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServer::HandleStarterCallback() 
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServer::HandleStarterCallback ");
-	
-	// We dont want to use periodic anymore, so we cancel it. We just wanted to
-	// make call here 2 secs after server has been created.
-	iStarterBreaker->Cancel();  
-	
-	// Check if server can be stopped.
-    iSchedulerEngine->RequestReschedule();
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServer::HandleStarterCallback ");
-	return EFalse;
-	}
-
-// -----------------------------------------------------------------------------
-// E32Main()
-// Server startup
-// Returns: KErrNone
-// -----------------------------------------------------------------------------
-//
-GLDEF_C TInt E32Main()
-    {
-    return CCseSchedulerServer::StartThread();
-    }
-
-// End of File
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerServerEngine.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1676 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Actual intelligence of scheduler server*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include <s32mem.h>
-#include <e32def.h>
-#include <e32const.h>
-#include "CCseSchedulerServerEngine.h"      // Common methods for server
-#include <ipvideo/CseSchedulerClientServerCommon.h> // Common defines for client and server
-#include <ipvideo/CCseScheduledProgram.h>           // Represent one schedule in database
-#include "CseDebug.h"                       // Debug macros
-#include "CCseScheduleDB.h"                 // Schedule database
-#include "CCseSchedulerTimer.h"             // Schedule timer for determining schedule times
-#include <ipvideo/CCseSchedulerPluginIF.h>          // Scheduler plugin interface
-#include "CCseSchedulerUniPluginController.h"
-#include "CCseSchedulerMultiPluginController.h"
-#include "CCseSchedulerServer.h"
-
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::CCseSchedulerServerEngine
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServerEngine::CCseSchedulerServerEngine( CCseSchedulerServer& aServer ) :
-    iServer( aServer )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::CCseSchedulerServerEngine");
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::CCseSchedulerServerEngine");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServerEngine* CCseSchedulerServerEngine::NewL( CCseSchedulerServer& aServer ) 
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::NewL");
-    
-    CCseSchedulerServerEngine* self = new( ELeave ) CCseSchedulerServerEngine( aServer );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::ConstructL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::ConstructL");
-        
-    iDb = CCseScheduleDB::NewL();
-    iCompletitionBreaker = CIdle::NewL( CActive::EPriorityLow );
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::ConstructL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::~CCseSchedulerServerEngine
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServerEngine::~CCseSchedulerServerEngine()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::~CCseSchedulerServerEngine");
-    
-    delete iDb;
-    	
-	iPluginControllerArray.ResetAndDestroy();
-	iPluginControllerArray.Close();
-    delete iCompletitionBreaker;    
-		
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::~CCseSchedulerServerEngine");
-    }
-
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GeneralServiceL
-//
-// Schedule operations
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GeneralServiceL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GeneralService");
-	
-	switch( aMessage.Function() )
-		{
-		case ECseAddSchedule:
-			{
-			AddScheduleL( aMessage );
-			break; 		
-			}
-		case ECseRemoveSchedule:
-			{
-			RemoveScheduleL( aMessage );
-			break;
-			}
-		case ECseGetSchedules:
-			{
-			GetSchedulesL( aMessage );	
-			break;
-			}
-		case ECseGetSchedule:
-			{
-			GetScheduleL( aMessage );
-			break;
-			}
-		case ECseGetScheduleLength:
-			{
-			GetScheduleLengthL( aMessage );
-			break;
-			}
-		case ECseGetSchedulesByAppUid:
-			{
-			GetSchedulesByAppUidL( aMessage );
-			break;
-			}
-		case ECseGetScheduleArrayLengthByAppUid:
-			{
-			GetScheduleArrayLengthByAppUidL( aMessage );
-			break;
-			}
-		case ECseGetOverlappingSchedulesLength:
-			{
-			GetOverlappingSchedulesLengthL( aMessage );
-			break;
-			}
-		case ECseGetOverlappingSchedules:
-			{
-			GetOverlappingSchedulesL( aMessage );
-			break;
-			}			
-		case ECseGetScheduleArrayLengthByPluginUid:
-			{
-			GetScheduleArrayLengthByPluginUidL( aMessage );
-			break;
-			}
-		case ECseGetSchedulesByPluginUid:
-			{
-			GetSchedulesByPluginUidL( aMessage );
-			break;
-			}
-		case ECseGetScheduleArrayLengthByType:
-			{
-			GetScheduleArrayLengthByTypeL( aMessage );
-			break;
-			}
-		case ECseGetSchedulesByType:
-			{
-			GetSchedulesByTypeL( aMessage );
-			break;
-			}
-		case ECseGetScheduleArrayLengthByTimeframe:		     
-			{
-			GetScheduleArrayLengthByTimeframeL( aMessage );
-			break;
-			}
-		case ECseGetSchedulesByTimeframe:
-			{
-			GetSchedulesByTimeframeL( aMessage );
-			break;
-			}
-			
-		default:
-			{
-			aMessage.Complete( KErrNotSupported ); 
-		    break; 
-			}
-		}
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GeneralService");
-	}
-
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::PanicClient
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::PanicClient( TCseSchedulerServPanic aPanic,
-											 const RMessage2& aMessage ) const
-    {    
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::PanicClient");
-    
-    // Panic the client on server side
-    _LIT( KTxtClientFault, "CseSchedulerServer" );
-    aMessage.Panic( KTxtClientFault, aPanic );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::PanicClient");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::AddScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::AddScheduleL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::AddScheduleL");
-	TInt ret( KErrNone );
-	TBuf8<4> id;
-	
-	// Initialize buffers...
-	CCseScheduledProgram* schedule = CCseScheduledProgram::NewL();
-	CleanupStack::PushL( schedule );
-	HBufC8* msg = HBufC8::NewL( aMessage.GetDesLengthL( 0 ) );
-	CleanupStack::PushL( msg );
-	TPtr8 ptr( msg->Des() );
-	
-	// Read schedule as a stream format to buffer
-	aMessage.ReadL( 0, ptr, 0 );
-			
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( ptr );
-	
-	// Change stream formatted schedule to "CseScheduledProgram"-format
-	schedule->InternalizeL( readStream );
-	
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Add it to DB	
-	iDb->AddScheduleL( *schedule );
-	
-	// Make the completition value
-	id.FillZ();
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( id );
-	writeStream.WriteUint32L( schedule->DbIdentifier() );
-	writeStream.CommitL();
-	CleanupStack::PopAndDestroy( &writeStream );
-	
-	aMessage.WriteL( 1, id, 0 );
-
-    RescheduleByPluginL( schedule->PluginUid() );
-
-	CleanupStack::PopAndDestroy( msg );
-	CleanupStack::PopAndDestroy( schedule );
-
-    aMessage.Complete( ret );    
-    CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerServerEngine::AddScheduleL, ret=%d", ret);
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::RemoveScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::RemoveScheduleL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::RemoveScheduleL");
-	
-	TUint32 dbIdentifier( 0 );
-	TBuf8<4> idBuff;
-	TInt32 pluginUid( 0 );
-	
-	idBuff.FillZ();
-	
-	// Read db identifier from aMessager
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	dbIdentifier = readStream.ReadUint32L();
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Remove schedule
-	// First check the plugin UID of removed schedule
-	CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-	CleanupStack::PushL( prog );
-	iDb->GetScheduleByDbIdentifierL( dbIdentifier, prog );
-	pluginUid = prog->PluginUid( );
-	// Now remove it from DB
-	iDb->RemoveScheduleL( dbIdentifier );	
-	RescheduleByPluginL( pluginUid );
-	
-	// Use completition callback to remove those controllers that aren't needed anymore
-	if( !iCompletitionBreaker->IsActive() )
-        {            
-        iCompletitionBreaker->Start(TCallBack( CompletitionCallback, this ));
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL(
-            "CCseSchedulerServerEngine::ScheduleCompletedSuccesfully - Breaker already active");
-        }	
-	
-	CleanupStack::PopAndDestroy( prog );
-	aMessage.Complete( KErrNone );	
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::RemoveScheduleL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetScheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetScheduleL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetScheduleL");
-	TUint32 dbIdentifier( 0 );
-	TBuf8<4> idBuff;
-	
-	idBuff.FillZ();
-	
-	// Read db identifier from aMessage
-	TInt err( aMessage.Read( 0, idBuff ) );
-		
-	if ( err == KErrNone )
-		{
-		// Create new db identifier to be passed to client
-		CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-		CleanupStack::PushL( prog );
-
-		RDesReadStream readStream;
-		CleanupClosePushL( readStream );
-		readStream.Open( idBuff );
-		dbIdentifier = readStream.ReadUint32L();
-		CleanupStack::PopAndDestroy( &readStream );
-		
-		// Get schedule
-		iDb->GetScheduleByDbIdentifierL( dbIdentifier, prog );
-		
-		TInt length( prog->ExternalizeLength() );
-		
-		// Externalize schedule to stream format
-		HBufC8* retBuff = HBufC8::NewL( length );
-		CleanupStack::PushL( retBuff );
-		TPtr8 retPtr( retBuff->Des() );
-		RDesWriteStream writeStream;
-		CleanupClosePushL( writeStream );
-		writeStream.Open( retPtr );
-		prog->ExternalizeL( writeStream );
-		writeStream.CommitL();
-		CleanupStack::PopAndDestroy( &writeStream );
-		
-		User::LeaveIfError( aMessage.Write( 1, retPtr ) );
-		CleanupStack::PopAndDestroy( retBuff );
-		CleanupStack::PopAndDestroy( prog );
-		}
-	
-	aMessage.Complete( err );
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerServerEngine::RemoveScheduleL, err=%d", err);
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetScheduleLengthL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetScheduleLengthL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetScheduleLengthL");
-	TUint32 dbIdentifier( 0 );
-	TBuf8<4> idBuff;
-	TBuf8<4> lenBuff;
-	TInt length( 0 );
-	CCseScheduledProgram* schedule = CCseScheduledProgram::NewL();
-	CleanupStack::PushL( schedule );
-	idBuff.FillZ();
-	
-	// Read db identifier from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	dbIdentifier = readStream.ReadUint32L();
-	CleanupStack::PopAndDestroy( &readStream );
-	
-	// Get schedule
-	iDb->GetScheduleByDbIdentifierL( dbIdentifier, schedule );
-	
-	// Get schedule length
-	length = schedule->ExternalizeLength();
-	
-	lenBuff.FillZ();
-	
-	// Write length in stream so we can pass it to client
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( lenBuff );
-    writeStream.WriteInt32L( length );
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    User::LeaveIfError( aMessage.Write( 1, lenBuff ) );
-    
-    CleanupStack::PopAndDestroy( schedule );
-	
-	aMessage.Complete( KErrNone );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetScheduleLengthL");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetScheduleLengthL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetScheduleArrayLengthByAppUidL( 
-											const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetScheduleArrayLengthByAppUidL");
-	TInt32 appUid( 0 );
-	TBuf8<4> idBuff;
-	TBuf8<4> lenBuff;
-	TInt length( 0 );
-	idBuff.FillZ();
-	
-	// Read application uid from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	appUid = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-
-    // Get schedules from database
-	RPointerArray<CCseScheduledProgram> progArray;
-	CleanupResetAndDestroyPushL( progArray );
-	iDb->GetApplicationSchedulesL( appUid, progArray );
-	
-	// Calculate total length
-	// Number of items in array
-	length = length + 4; // Size of TInt32
-	// Data from array
-	for ( TInt i = 0 ; i < progArray.Count(); i++ )
-		{
-		length = length + progArray[i]->ExternalizeLength();
-		}
-	CleanupStack::PopAndDestroy( &progArray ); // closes progArray
-	
-	lenBuff.FillZ();
-	
-	// Change length value to stream so that we can send it back to client.
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( lenBuff );
-    writeStream.WriteInt32L( length );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    User::LeaveIfError( aMessage.Write( 1, lenBuff ) );
-    
-  	aMessage.Complete( KErrNone );	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetScheduleArrayLengthByAppUidL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetSchedulesByAppUidL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetSchedulesByAppUidL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetSchedulesByAppUidL");
-	TInt32 appUid( 0 );
-	TBuf8<4> idBuff;
-	idBuff.FillZ();
-	TInt32 numberOfElems( 0 );
-	TInt length( 0 );
-	
-	// Read application UID from aMessage
-	TInt err( aMessage.Read( 0, idBuff ) );
-		
-	if ( err == KErrNone )
-		{
-		RPointerArray<CCseScheduledProgram> progArray;
-		CleanupResetAndDestroyPushL( progArray );
-		RDesReadStream readStream;
-		CleanupClosePushL( readStream );
-		readStream.Open( idBuff );
-		appUid = readStream.ReadInt32L();
-		CleanupStack::PopAndDestroy( &readStream );
-		
-		// Get schedules from database
-		iDb->GetApplicationSchedulesL( appUid, progArray );
-		
-		// Calculate total length
-		// Number of items in array
-		length = length + 4; // Size of TInt32
-		// Data from array
-		for ( TInt i = 0 ; i < progArray.Count(); i++ )
-			{		
-			length += progArray[i]->ExternalizeLength();
-			}
-		
-		// Allocate write stream
-		HBufC8* retBuff = HBufC8::NewL( length );
-		CleanupStack::PushL( retBuff );
-		TPtr8 retPtr( retBuff->Des() );
-		RDesWriteStream writeStream;
-		CleanupClosePushL( writeStream );
-		writeStream.Open( retPtr );
-		
-		// Fill stream
-		// Write number elems
-		numberOfElems = progArray.Count();
-		writeStream.WriteInt32L( numberOfElems );		
-		// Add elems one by one
-		for ( TInt i = 0; i < progArray.Count(); i++ )
-			{
-			progArray[i]->ExternalizeL( writeStream );
-			}
-		writeStream.CommitL();
-		
-		CleanupStack::PopAndDestroy( &writeStream );
-		
-		User::LeaveIfError( aMessage.Write( 1, retPtr ) );	
-		
-		CleanupStack::PopAndDestroy( retBuff );
-		CleanupStack::PopAndDestroy( &progArray );
-		}
-
-	aMessage.Complete( err );
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetSchedulesByAppUidL", err);
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetSchedulesL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetSchedulesL( const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetSchedulesL");
-	aMessage.Complete( KErrNotSupported );
-	}
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetOverlappingSchedulesLengthL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetOverlappingSchedulesLengthL( 
-											const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetOverlappingSchedulesLengthL");
-	TInt32 scheduleType( 0 );
-	TBuf8<20> idBuff;
-	TBuf8<sizeof( TUint32 )> retBuf; // contains length
-	
-	TUint32 length( 0 );
-	
-	idBuff.FillZ();
-	
-	// Read schedule type from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	scheduleType = readStream.ReadInt32L();
-
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-	
-	// Read start time from the aMessage
-    lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    TInt64 time( 0 );
-    time = (TInt64) lower;    
-    TInt64 longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 startTime = time;  
-        
-	// Read end time from the aMessage
-	lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    time = (TInt64) lower;    
-    longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 endTime = time;  
-
-	CleanupStack::PopAndDestroy( &readStream );
-
-	RPointerArray<CCseScheduledProgram> schedules;
-	CleanupResetAndDestroyPushL( schedules );
-	
-	// Get overlapping schedules
-	iDb->GetOverlappingSchedulesL( scheduleType, startTime, endTime, schedules );
-	
-	// Count length one by one
-	for ( TInt i = 0; i < schedules.Count(); i++ )
-		{
-		length += schedules[i]->ExternalizeLength();
-		}
-	
-	CleanupStack::PopAndDestroy( &schedules );	
-
-	retBuf.FillZ();
-	
-	
-	// Write length to stream so we can pass it to client
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( retBuf );
-    writeStream.WriteInt32L( length );
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    User::LeaveIfError( aMessage.Write( 1, retBuf ) );
-
-	aMessage.Complete( KErrNone );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetOverlappingSchedulesLengthL");
-	}
-
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetOverlappingSchedulesL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetOverlappingSchedulesL( 
-											const RMessage2& aMessage )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetOverlappingSchedulesL");
-	TInt32 scheduleType( 0 );
-	TBuf8<20> idBuff;
-	
-	idBuff.FillZ();
-	
-	// Read schedule type from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	scheduleType = readStream.ReadInt32L();
-
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-	
-	// Read start time from aMessage
-    lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    TInt64 time( 0 );
-    time = (TInt64) lower;    
-    TInt64 longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 startTime = time;  
-        
-	//Read end time from aMessage
-	lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    time = (TInt64) lower;    
-    longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 endTime = time;  
-
-	CleanupStack::PopAndDestroy( &readStream );
-
-	RPointerArray<CCseScheduledProgram> schedules;
-	CleanupResetAndDestroyPushL( schedules );
-	
-	// Get overlapping schedules from database
-	iDb->GetOverlappingSchedulesL( scheduleType, startTime, endTime, schedules );
-	
-	TUint32 length( 0 );
-
-	length += sizeof( TInt32 ); // item count added to buffer first
-	
-	// Length of the schedules needed for transfer stream
-	for ( TInt i = 0; i < schedules.Count(); i++ )
-		{
-		length += schedules[i]->ExternalizeLength();
-		}
-	
-	HBufC8* retBuf = HBufC8::NewLC( length );
-	TPtr8 retBufPtr( retBuf->Des() );
-
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( retBufPtr );
-	// write item count to buffer
-    writeStream.WriteInt32L( schedules.Count() );
-	
-	// write all items to buffer
-	for ( TInt j = 0; j < schedules.Count(); j++ )
-		{
-		schedules[j]->ExternalizeL( writeStream );
-		}
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-
-	User::LeaveIfError( aMessage.Write( 1, retBufPtr ) );
-
-    CleanupStack::PopAndDestroy( retBuf );
-	CleanupStack::PopAndDestroy( &schedules );	
-
-	aMessage.Complete( KErrNone );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetOverlappingSchedulesL");
-	}
-
-
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::RescheduleL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::RescheduleL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::Reschedule");
-			
-	RArray<TInt32> uidArray;
-	
-	iDb->GetPluginsL( uidArray );
-	
-	if( uidArray.Count() > 0 )
-	    {
-	    for(TInt i = 0; i < uidArray.Count(); i++)
-	        {
-	        TTime runTime( iDb->GetNextScheduleTimeByPluginL( uidArray[i] ) );
-	        
-	        // Search for existing plugin controller for this schedule
-	        RPointerArray<CCseScheduledProgram> schedules;
-	        CleanupResetAndDestroyPushL( schedules ); 	        
-	        iDb->GetSchedulesByTimeAndPluginL( runTime, uidArray[i], schedules );
-	        
-	        if( schedules.Count() > 0 )
-	            {	        
-    	        TBool controllerFound( EFalse );
-    	        
-    	        // Plugin controller might existCheck if the plugin controller already exists.
-    	        for( TInt ii = 0; ii < iPluginControllerArray.Count(); ii++ )
-    	            {
-    	            if( schedules[0]->PluginUid() == iPluginControllerArray[ii]->PluginUid() )
-    	                {
-    	                iPluginControllerArray[ii]->SetSchedulesL( schedules );
-    	                controllerFound = ETrue;
-    	                break;	                
-    	                }	                
-    	            }
-    	        
-    	        // It didn't so we create new one
-    	        if( controllerFound == EFalse )
-    	            {                            
-                    if( schedules[0]->PluginType() == CCseScheduledProgram::ECseUniPlugin )
-                        {
-                        CSELOGSTRING_HIGH_LEVEL(
-                            "CCseSchedulerServerEngine::Reschedule: Create new uniplugin controller");
-                        // Create new PluginController
-                        iPluginControllerArray.AppendL( CCseSchedulerUniPluginController::NewL( *this, schedules[0]->PluginUid() ) );
-                        // Add schedules to just created controller
-                        iPluginControllerArray[iPluginControllerArray.Count()-1]->SetSchedulesL(schedules);
-                        }
-                    else if ( schedules[0]->PluginType() == CCseScheduledProgram::ECseMultiPlugin )
-                        {
-                        CSELOGSTRING_HIGH_LEVEL(
-                        "CCseSchedulerServerEngine::Reschedule: Create new multiplugin controller");
-                        // Create new PluginController
-                        iPluginControllerArray.AppendL( CCseSchedulerMultiPluginController::NewL( *this, schedules[0]->PluginUid() ) );
-                        // Add schedules to just created controller
-                        iPluginControllerArray[iPluginControllerArray.Count()-1]->SetSchedulesL(schedules);
-                        }
-                    else
-                        {
-                        // WTF?!?!
-                        CSELOGSTRING_HIGH_LEVEL(
-                            "CCseSchedulerServerEngine::Reschedule: Plugin something completely different");
-                        }
-    	            }
-	            }
-	        // Delete schedule array.
-	        CleanupStack::PopAndDestroy( &schedules );
-	        }
-	    }
-	    
-	uidArray.Reset();
-	uidArray.Close();
-	
-    // Stop server if we dont have any clients and there is no more
-	// reason for us to live (no schedules active).
-	iServer.StopServer();
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::Reschedule out");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::IsSchedulerActive()
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerServerEngine::IsSchedulerActive() const
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::IsSchedulerActive");
-	
-	TBool ret(EFalse);
-	
-	if( iPluginControllerArray.Count() > 0 )
-        {
-        ret = ETrue;
-        }
-	
-    CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerServerEngine::IsSchedulerActive: %d", ret);
-	return ret;
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::Close()
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::Close()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::IsSchedulerActive");
-	
-    while( AccessCount() >= 1 )
-        {
-        Dec();
-        }
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::IsSchedulerActive");
-	}
-
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetScheduleArrayLengthByPluginUidL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetScheduleArrayLengthByPluginUidL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetScheduleArrayLengthByPluginUidL");
-	TInt32 pluginUid( 0 );
-	TBuf8<4> idBuff;
-	TBuf8<4> lenBuff;
-	TInt length( 0 );
-	idBuff.FillZ();
-	
-	// Read application uid from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	pluginUid = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-
-    // Get schedules from database
-	RPointerArray<CCseScheduledProgram> progArray;
-	CleanupResetAndDestroyPushL( progArray );	
-	iDb->GetSchedulesByPluginL( pluginUid, progArray);
-	
-	// Calculate total length
-	// Number of items in array
-	length = length + 4; // Size of TInt32
-	// Data from array
-	for ( TInt i = 0 ; i < progArray.Count(); i++ )
-		{
-		length = length + progArray[i]->ExternalizeLength();
-		}
-	CleanupStack::PopAndDestroy( &progArray ); // closes progArray
-	
-	lenBuff.FillZ();
-	
-	// Change length value to stream so that we can send it back to client.
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( lenBuff );
-    writeStream.WriteInt32L( length );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    User::LeaveIfError( aMessage.Write( 1, lenBuff ) );
-    
-  	aMessage.Complete( KErrNone );	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetScheduleArrayLengthByPluginUidL");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetSchedulesByPluginUidL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetSchedulesByPluginUidL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetSchedulesByPluginUidL");
-	TInt32 pluginUid( 0 );
-	TBuf8<4> idBuff;
-	idBuff.FillZ();
-	TInt32 numberOfElems( 0 );
-	TInt length( 0 );
-	
-	// Read application UID from aMessage
-	TInt err( aMessage.Read( 0, idBuff ) );
-		
-	if ( err == KErrNone )
-		{
-		RPointerArray<CCseScheduledProgram> progArray;
-		CleanupResetAndDestroyPushL( progArray );
-		RDesReadStream readStream;
-		CleanupClosePushL( readStream );
-		readStream.Open( idBuff );
-		pluginUid = readStream.ReadInt32L();
-		CleanupStack::PopAndDestroy( &readStream );
-		
-		// Get schedules from database
-		iDb->GetSchedulesByPluginL( pluginUid, progArray );
-		
-		// Calculate total length
-		// Number of items in array
-		length = length + 4; // Size of TInt32
-		// Data from array
-		for ( TInt i = 0 ; i < progArray.Count(); i++ )
-			{		
-			length += progArray[i]->ExternalizeLength();
-			}
-		
-		// Allocate write stream
-		HBufC8* retBuff = HBufC8::NewL( length );
-		CleanupStack::PushL( retBuff );
-		TPtr8 retPtr( retBuff->Des() );
-		RDesWriteStream writeStream;
-		CleanupClosePushL( writeStream );
-		writeStream.Open( retPtr );
-		
-		// Fill stream
-		// Write number elems
-		numberOfElems = progArray.Count();
-		writeStream.WriteInt32L( numberOfElems );		
-		// Add elems one by one
-		for ( TInt i = 0; i < progArray.Count(); i++ )
-			{
-			progArray[i]->ExternalizeL( writeStream );
-			}
-		writeStream.CommitL();
-		
-		CleanupStack::PopAndDestroy( &writeStream );
-		
-		User::LeaveIfError( aMessage.Write( 1, retPtr ) );	
-		
-		CleanupStack::PopAndDestroy( retBuff );
-		CleanupStack::PopAndDestroy( &progArray );
-		}
-
-	aMessage.Complete( err );
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetSchedulesByPluginUidL", err);
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetScheduleArrayLengthByTypeL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetScheduleArrayLengthByTypeL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetScheduleArrayLengthByTypeL");
-	TInt32 type( 0 );
-	TBuf8<4> idBuff;
-	TBuf8<4> lenBuff;
-	TInt length( 0 );
-	idBuff.FillZ();
-	
-	// Read application uid from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-	type = readStream.ReadInt32L();
-	CleanupStack::PopAndDestroy( &readStream );
-
-    // Get schedules from database
-	RPointerArray<CCseScheduledProgram> progArray;
-	CleanupResetAndDestroyPushL( progArray );	
-	iDb->GetSchedulesByTypeL( type, progArray);
-	
-	// Calculate total length
-	// Number of items in array
-	length = length + 4; // Size of TInt32
-	// Data from array
-	for ( TInt i = 0 ; i < progArray.Count(); i++ )
-		{
-		length = length + progArray[i]->ExternalizeLength();
-		}
-	CleanupStack::PopAndDestroy( &progArray ); // closes progArray
-	
-	lenBuff.FillZ();
-	
-	// Change length value to stream so that we can send it back to client.
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( lenBuff );
-    writeStream.WriteInt32L( length );
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    User::LeaveIfError( aMessage.Write( 1, lenBuff ) );
-    
-  	aMessage.Complete( KErrNone );	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetScheduleArrayLengthByTypeL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetSchedulesByTypeL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetSchedulesByTypeL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetSchedulesByTypeL");
-	TInt32 type( 0 );
-	TBuf8<4> idBuff;
-	idBuff.FillZ();
-	TInt32 numberOfElems( 0 );
-	TInt length( 0 );
-	
-	// Read application UID from aMessage
-	TInt err( aMessage.Read( 0, idBuff ) );
-		
-	if ( err == KErrNone )
-		{
-		RPointerArray<CCseScheduledProgram> progArray;
-		CleanupResetAndDestroyPushL( progArray );
-		RDesReadStream readStream;
-		CleanupClosePushL( readStream );
-		readStream.Open( idBuff );
-		type = readStream.ReadInt32L();
-		CleanupStack::PopAndDestroy( &readStream );
-		
-		// Get schedules from database
-		iDb->GetSchedulesByTypeL( type, progArray );
-		
-		// Calculate total length
-		// Number of items in array
-		length = length + 4; // Size of TInt32
-		// Data from array
-		for ( TInt i = 0 ; i < progArray.Count(); i++ )
-			{		
-			length += progArray[i]->ExternalizeLength();
-			}
-		
-		// Allocate write stream
-		HBufC8* retBuff = HBufC8::NewL( length );
-		CleanupStack::PushL( retBuff );
-		TPtr8 retPtr( retBuff->Des() );
-		RDesWriteStream writeStream;
-		CleanupClosePushL( writeStream );
-		writeStream.Open( retPtr );
-		
-		// Fill stream
-		// Write number elems
-		numberOfElems = progArray.Count();
-		writeStream.WriteInt32L( numberOfElems );		
-		// Add elems one by one
-		for ( TInt i = 0; i < progArray.Count(); i++ )
-			{
-			progArray[i]->ExternalizeL( writeStream );
-			}
-		writeStream.CommitL();
-		
-		CleanupStack::PopAndDestroy( &writeStream );
-		
-		User::LeaveIfError( aMessage.Write( 1, retPtr ) );	
-		
-		CleanupStack::PopAndDestroy( retBuff );
-		CleanupStack::PopAndDestroy( &progArray );
-		}
-
-	aMessage.Complete( err );
-	CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetSchedulesByTypeL", err);
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetScheduleArrayLengthByTimeframeL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetScheduleArrayLengthByTimeframeL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetScheduleArrayLengthByTimeframeL");	
-	TBuf8<20> idBuff;
-	TBuf8<sizeof( TUint32 )> retBuf; // contains length
-	
-	TUint32 length( 0 );
-	
-	idBuff.FillZ();
-	
-	// Read schedule type from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-	
-	// Read start time from the aMessage
-    lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    TInt64 time( 0 );
-    time = (TInt64) lower;    
-    TInt64 longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 beginning = time;  
-        
-	// Read end time from the aMessage
-	lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    time = (TInt64) lower;    
-    longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 end = time;  
-
-	CleanupStack::PopAndDestroy( &readStream );
-
-	RPointerArray<CCseScheduledProgram> schedules;
-	CleanupResetAndDestroyPushL( schedules );
-	
-	// Get overlapping schedules
-	iDb->GetSchedulesByTimeframeL( beginning, end, schedules );
-	
-	// Count length one by one
-	for ( TInt i = 0; i < schedules.Count(); i++ )
-		{
-		length += schedules[i]->ExternalizeLength();
-		}
-	
-	CleanupStack::PopAndDestroy( &schedules );	
-
-	retBuf.FillZ();
-	
-	
-	// Write length to stream so we can pass it to client
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( retBuf );
-    writeStream.WriteInt32L( length );
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-    
-    User::LeaveIfError( aMessage.Write( 1, retBuf ) );
-
-	aMessage.Complete( KErrNone );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetScheduleArrayLengthByTimeframeL");	
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::GetSchedulesByTimeframeL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::GetSchedulesByTimeframeL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::GetSchedulesByTimeframeL");
-	TBuf8<20> idBuff;
-	
-	idBuff.FillZ();
-	
-	// Read schedule type from aMessage
-	User::LeaveIfError( aMessage.Read( 0, idBuff ) );
-	
-	RDesReadStream readStream;
-	CleanupClosePushL( readStream );
-	readStream.Open( idBuff );
-
-	TUint32 lower( 0 );
-	TUint32 upper( 0 );
-	
-	// Read start time from aMessage
-    lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    TInt64 time( 0 );
-    time = (TInt64) lower;    
-    TInt64 longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 beginning = time;  
-        
-	//Read end time from aMessage
-	lower = readStream.ReadUint32L();
-    upper = readStream.ReadUint32L();
-    time = (TInt64) lower;    
-    longUpper = (TInt64) upper;
-    longUpper = longUpper << 32;
-    longUpper &= (0xFFFFFFFF00000000ULL);    
-    time |= longUpper;
-    TInt64 end = time;  
-
-	CleanupStack::PopAndDestroy( &readStream );
-
-	RPointerArray<CCseScheduledProgram> schedules;
-	CleanupResetAndDestroyPushL( schedules );
-	
-	// Get overlapping schedules from database
-	iDb->GetSchedulesByTimeframeL( beginning, end, schedules );
-	
-	TUint32 length( 0 );
-
-	length += sizeof( TInt32 ); // item count added to buffer first
-	
-	// Length of the schedules needed for transfer stream
-	for ( TInt i = 0; i < schedules.Count(); i++ )
-		{
-		length += schedules[i]->ExternalizeLength();
-		}
-	
-	HBufC8* retBuf = HBufC8::NewLC( length );
-	TPtr8 retBufPtr( retBuf->Des() );
-
-	RDesWriteStream writeStream;
-	CleanupClosePushL( writeStream );
-	writeStream.Open( retBufPtr );
-	// write item count to buffer
-    writeStream.WriteInt32L( schedules.Count() );
-	
-	// write all items to buffer
-	for ( TInt j = 0; j < schedules.Count(); j++ )
-		{
-		schedules[j]->ExternalizeL( writeStream );
-		}
-	writeStream.CommitL();
-    CleanupStack::PopAndDestroy( &writeStream );
-
-	User::LeaveIfError( aMessage.Write( 1, retBufPtr ) );
-
-    CleanupStack::PopAndDestroy( retBuf );
-	CleanupStack::PopAndDestroy( &schedules );	
-
-	aMessage.Complete( KErrNone );
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::GetSchedulesByTimeframeL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::ScheduleCompletedSuccesfullyL()
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::ScheduleCompletedSuccesfullyL( TUint32 aDbIdentifier )
-	{		
-	CSELOGSTRING2_HIGH_LEVEL(
-	    ">>>CCseSchedulerServerEngine::ScheduleCompletedSuccesfully: aDbIdentifier: %d",
-	    aDbIdentifier);
-	    
-    TInt32 pluginUid( 0 );    
-    
-    // First get the plugin UID of removed schedule
-	CCseScheduledProgram* prog = CCseScheduledProgram::NewL() ;
-	CleanupStack::PushL( prog );
-	iDb->GetScheduleByDbIdentifierL( aDbIdentifier, prog );
-	pluginUid = prog->PluginUid( );		
-	CleanupStack::PopAndDestroy( prog );
-
-    // Remove completed schedule from DB
-    TRAPD( err, iDb->RemoveScheduleL( aDbIdentifier ) );
-    if ( err != KErrNone )
-    	{
-    	CSELOGSTRING2_HIGH_LEVEL(
-    	    "CCseSchedulerServerEngine::ScheduleCompletedSuccesfully - iDb->RemoveScheduleL() LEAVED: %d",
-    	     err);
-    	}
-
-    // Reschedule completed plugin    	
-    if( pluginUid != 0 )
-        {
-        // We have plugin Uid, reschedule that controller
-        RescheduleByPluginL( pluginUid );
-        }
-    else
-        {
-        // No plugin uid found, reschedule all.
-        RescheduleL();
-        }
-
-    if( !iCompletitionBreaker->IsActive() )
-        {            
-        iCompletitionBreaker->Start(TCallBack( CompletitionCallback, this ));
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL(
-            "CCseSchedulerServerEngine::ScheduleCompletedSuccesfully - Breaker already active");
-        }
-   
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::ScheduleCompletedSuccesfully");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::ScheduleCompletedWithError()
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::ScheduleCompletedWithErrorL( 
-    TUint32 aDbIdentifier,
-    TUint32 aErrorCode )
-    {	
-	CSELOGSTRING3_HIGH_LEVEL(
-	    ">>>CCseSchedulerServerEngine::ScheduleCompletedWithError: aDbIdentifier: %d, aError %d",
-	    aDbIdentifier,
-	    aErrorCode);
-	TInt32 pluginUid( 0 );
-	    
-    // First get the plugin UID of removed schedule
-	CCseScheduledProgram* prog = CCseScheduledProgram::NewL();
-	CleanupStack::PushL( prog );
-	iDb->GetScheduleByDbIdentifierL( aDbIdentifier, prog );
-	pluginUid = prog->PluginUid( );		
-	CleanupStack::PopAndDestroy( prog );	
- 
-	// Something strange happened while executing schedule. Remove it from database.	
-	TRAPD( err, iDb->RemoveScheduleL( aDbIdentifier ) );
-	if ( err != KErrNone )
-		{
-		CSELOGSTRING2_HIGH_LEVEL(
-		    ">>>CCseSchedulerServerEngine::ScheduleCompletedWithError: iDb->RemoveScheduleL Leaved: %d",
-		    err);
-		}
-
-	// Reschedule completed plugin    	
-    if( pluginUid == 0 )
-        {
-        // We have plugin Uid, reschedule that controller
-        RescheduleByPluginL( pluginUid );
-        }
-    else
-        {
-        // No plugin uid found, reschedule all.
-        RescheduleL();
-        }
-
-#if CSE_LOGGING_METHOD == 0 
-    ( void )aErrorCode;
-#endif
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::ScheduleCompletedWithError");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::IncreaseScheduleRunCount( )
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::IncreaseScheduleRunCountL( TUint32 aDbIdentifier )
-	{	
-	CSELOGSTRING2_HIGH_LEVEL(
-	    ">>>CCseSchedulerServerEngine::IncreaseScheduleRunCountL: aDbIdentifier: %d",
-	    aDbIdentifier );
- 
-    TRAPD( err, iDb->IncreaseRunCountL( aDbIdentifier ) );
-    
-    if (err != KErrNone )
-        {
-        CSELOGSTRING2_HIGH_LEVEL(
-            "CCseSchedulerServerEngine::IncreaseScheduleRunCount - IncreaseRunCount failed: %d. Removing from DB", err);
-        
-        // IncreaseRunCount leaved. It is crucial for us that IncreaseRunCount passes.
-        // We use it to prevent scheduling engine to run certain malicious software.
-        iDb->RemoveScheduleL( aDbIdentifier );
-        }
-            
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::IncreaseScheduleRunCountL");
-	}
-	    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::IsAllowedToRun( )
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerServerEngine::IsAllowedToRun( TUint32 aDbIdentifier )
-	{	
-	CSELOGSTRING2_HIGH_LEVEL(
-	    ">>>CCseSchedulerServerEngine::IsAllowedToRun: aDbIdentifier: %d",
-	    aDbIdentifier );
- 
-    TBool ret( EFalse );
-    TInt32 runCount( 0 );
- 
-    TRAPD( err, runCount = iDb->GetRunCountL( aDbIdentifier ) );
-    
-    if ( err == KErrNone && runCount < 3 )
-        {
-        // Set true if check went ok and there is only less than three tries to run schedule        
-        ret = ETrue;
-        }
-                
-	CSELOGSTRING2_HIGH_LEVEL(
-	    "<<<CCseSchedulerServerEngine::IsAllowedToRun: %d", ret);
-	return ret;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::ScheduleNotValid( )
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::ScheduleNotValid( TUint32 aDbIdentifier )
-	{	
-	CSELOGSTRING2_HIGH_LEVEL(
-	    ">>>CCseSchedulerServerEngine::ScheduleNotValid: aDbIdentifier: %d",
-	    aDbIdentifier );
-
-    TRAP_IGNORE( iDb->RemoveScheduleL( aDbIdentifier ) );    
-
-	CSELOGSTRING_HIGH_LEVEL(
-	    "<<<CCseSchedulerServerEngine::ScheduleNotValid");	
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::CompletitionCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServerEngine::CompletitionCallback( TAny* aPtr )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::CompletitionCallback");
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::CompletitionCallback");
-	return static_cast<CCseSchedulerServerEngine*>( aPtr )->HandleCompletitionCallback();
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::HandleCompletitionCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServerEngine::HandleCompletitionCallback() 
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::HandleCompletitionCallback ");
-	    
-    // Reschedule has been made to relevant plugin controllers.
-    // Go through controllers and remove obsolote ones
-    for( TInt i = 0; i < iPluginControllerArray.Count(); i++ )
-        {
-        // Do cleanup on controller
-        iPluginControllerArray[i]->DoCleanUp( );
-        
-        if( iPluginControllerArray[i]->IsObsolete() )
-            {
-            // Delete it and remove from controller array
-            delete iPluginControllerArray[i];
-            iPluginControllerArray.Remove(i);            
-            }
-        }
-        
-    iServer.StopServer();        
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::HandleCompletitionCallback ");
-	return EFalse;
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::RequestReschedule
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::RequestReschedule( ) 
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>RequestReschedule::HandleCompletitionCallback ");
-
-    TRAP_IGNORE( RescheduleL() );
-
-	CSELOGSTRING_HIGH_LEVEL("<<<RequestReschedule::HandleCompletitionCallback ");	
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::RescheduleByPluginL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::RescheduleByPluginL( TInt32 aPluginUid )
-	{
-	CSELOGSTRING2_HIGH_LEVEL(
-	    ">>>CCseSchedulerServerEngine::RescheduleByPluginL - Plugin Uid: %d", aPluginUid);
-
-    TTime runTime( iDb->GetNextScheduleTimeByPluginL( aPluginUid ) );
-    TBool controllerFound( EFalse );
-    
-    // Search for existing plugin controller for this schedule
-    RPointerArray<CCseScheduledProgram> schedules;
-    CleanupResetAndDestroyPushL( schedules );
-    iDb->GetSchedulesByTimeAndPluginL( runTime, aPluginUid, schedules );
-    
-    // Search plugin controller that needs rescheduling
-    for( TInt i = 0; i < iPluginControllerArray.Count(); i++ )
-        {
-        if( aPluginUid == iPluginControllerArray[i]->PluginUid() )
-            {
-            if( schedules.Count() > 0 )
-                {                    
-                iPluginControllerArray[i]->SetSchedulesL( schedules );
-                }
-            else
-                {
-                 // Remove controller if controller found but
-                 // there are no schedules for it
-                
-                // Check if controller can be removed right away or should it be done
-                // after callstack breaker
-                if( iPluginControllerArray[i]->IsControllerActive() )
-                    {
-                    CSELOGSTRING_HIGH_LEVEL(
-                        "CCseSchedulerServerEngine::RescheduleByPluginL - Plugin found but no schedules, set controller to be removed");
-                    iPluginControllerArray[i]->SetToBeCleared( ETrue );
-                    iCompletitionBreaker->Start(TCallBack( CleanerCallback, this ));
-                    }
-                else
-                    {
-                    CSELOGSTRING_HIGH_LEVEL(
-                        "CCseSchedulerServerEngine::RescheduleByPluginL - Plugin found but no schedules, remove controller");
-                    delete iPluginControllerArray[i];
-                    iPluginControllerArray.Remove( i );
-                    }
-                }
-                
-            controllerFound = ETrue;
-            break;
-            }        
-        }
-        
-    if( controllerFound == EFalse )
-        {
-        // Create new controller if schedules found
-        if( schedules.Count() > 0 )
-            {                    
-            if( schedules[0]->PluginType() == CCseScheduledProgram::ECseUniPlugin )
-                {
-                CSELOGSTRING_HIGH_LEVEL(
-                    "CCseSchedulerServerEngine::RescheduleByPluginL: Create new uniplugin controller");
-                // Create new PluginController
-                iPluginControllerArray.AppendL( CCseSchedulerUniPluginController::NewL( *this, schedules[0]->PluginUid() ) );
-                // Add schedules to just created controller
-                iPluginControllerArray[iPluginControllerArray.Count()-1]->SetSchedulesL(schedules);
-                }
-            else if ( schedules[0]->PluginType() == CCseScheduledProgram::ECseMultiPlugin )
-                {
-                CSELOGSTRING_HIGH_LEVEL(
-                "CCseSchedulerServerEngine::RescheduleByPluginL: Create new multiplugin controller");
-                // Create new PluginController
-                iPluginControllerArray.AppendL( CCseSchedulerMultiPluginController::NewL( *this, schedules[0]->PluginUid() ) );
-                // Add schedules to just created controller
-                iPluginControllerArray[iPluginControllerArray.Count()-1]->SetSchedulesL(schedules);
-                }
-            else
-                {
-                // WTF?!?!
-                CSELOGSTRING_HIGH_LEVEL(
-                    "CCseSchedulerServerEngine::RescheduleByPluginL: Plugin something completely different");
-                }
-            }
-        }    
-        
-    // Delete schedule array.
-    CleanupStack::PopAndDestroy( &schedules );
-    
-    // Stop server if we dont have any clients and there is no more
-	// reason for us to live (no schedules active).
-	iServer.StopServer();
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::RescheduleByPluginL out");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::ClearingDone()
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerEngine::ClearingDone()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::ClearingDone");
-
-    // Use completition callback to remove those controllers that aren't needed anymore
-	if( !iCompletitionBreaker->IsActive() )
-        {            
-        iCompletitionBreaker->Start(TCallBack( CompletitionCallback, this ));
-        }
-    else
-        {
-        CSELOGSTRING_HIGH_LEVEL(
-            "CCseSchedulerServerEngine::ClearingDone - Breaker already active");
-        }	
-        
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::ClearingDone");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::CleanerCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServerEngine::CleanerCallback( TAny* aPtr )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::CleanerCallback");
-	static_cast<CCseSchedulerServerEngine*>( aPtr )->HandleCleanerCallback();
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::CleanerCallback");
-	return EFalse;
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerEngine::HandleCompletitionCallback
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServerEngine::HandleCleanerCallback() 
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerEngine::HandleCleanerCallback ");
-	
-    // go through plugins and clear
-    for( TInt i = iPluginControllerArray.Count(); i > 0 ; i--)
-        {
-        if( iPluginControllerArray[i-1]->IsToBeCleared() )
-            {
-            // If ClearControllerL -call leaves it means that we couldn't signal
-            // plugin to take himself down. In such cases we leak memory, but we
-            // still need to keep going so we do not screw all the rest schedules.
-            TRAP_IGNORE( iPluginControllerArray[i-1]->ClearControllerL());
-            delete iPluginControllerArray[i-1];
-            iPluginControllerArray.Remove(i-1);            
-            }
-        }
-
-    iServer.StopServer();    
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerEngine::HandleCleanerCallback ");
-	return EFalse;
-	}
-
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerServerSession.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Implementation of Scheduler server's*
-*/
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerServerSession.h"         // Header file for this class
-#include "CCseSchedulerServer.h"                // Common methods for server
-#include "CCseSchedulerServerEngine.h"          // Intelligence aka engine of server
-#include "CseSchedulerServer.pan"               // Server panic codes
-#include <ipvideo/CseSchedulerClientServerCommon.h>     // Common defines for client and server
-#include "CseDebug.h"                           // Debug macros
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::CCseSchedulerSession()
-// C++ constructor
-// -----------------------------------------------------------------------------
-//
-
-CCseSchedulerServerSession::CCseSchedulerServerSession() : CSession2(),
-    iResourceCount( 0 )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::CCseSchedulerServerSession");
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::CCseSchedulerServerSession");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::NewL()
-// Two-phased constructor. 
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServerSession* CCseSchedulerServerSession::NewL( CCseSchedulerServer* aServer )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::NewL");
-    
-    CCseSchedulerServerSession* self = new ( ELeave ) CCseSchedulerServerSession();
-    CleanupStack::PushL( self );
-    self->ConstructL( aServer );
-    CleanupStack::Pop( self );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::ConstructL()
-// second-phase C++ constructor
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerSession::ConstructL( CCseSchedulerServer* aServer )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::ConstructL");
-    
-	if ( aServer )
-		{
-		aServer->Inc();	
-		}
-
-    // Create new object index
-    iObjects = CObjectIx::NewL();
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::ConstructL");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::~CCseSchedulerSession()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerServerSession::~CCseSchedulerServerSession()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::~CCseSchedulerServerSession");
-    
-    delete iObjects;
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::~CCseSchedulerServerSession");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::ServiceL()
-// 
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerSession::ServiceL( const RMessage2& aMessage )
-    {    
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::ServiceL");
-    
-    switch ( aMessage.Function() )
-        {
-        case ECseServCreateSubSession:
-        case ECseServCloseSubSession:
-        case ECseServCloseSession:    
-            {
-            // "Common messages"
-            TRAPD( err, DispatchMessageL( aMessage ) );
-            aMessage.Complete( err );
-            }
-            break;
-
-        default:
-            {
-            // Ok, but must be subsession relative
-            CCseSchedulerServerEngine* engine = 
-				(CCseSchedulerServerEngine*)iObjects->At( aMessage.Int3() );
-            if ( !engine )
-                {    
-                aMessage.Complete( KErrBadHandle );
-                PanicClient( ECsePanicBadSubSessionHandle );
-                }
-            else
-                {
-                // this is the normal route, 
-                // all engine commands go this way
-                TRAPD( error, engine->GeneralServiceL( aMessage ) );
-				if ( error != KErrNone )
-					{
-					CSELOGSTRING2_HIGH_LEVEL("CCseSchedulerServerSession::ServiceL - engine->GeneralServiceL() LEAVED: %d", error);
-					aMessage.Complete( error );
-					}
-                }
-            }
-            break;
-        }
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::ServiceL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerSession::DispatchMessageL()
-// 
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerSession::DispatchMessageL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::DispatchMessageL");
-    
-    // Check for session-relative requests
-    switch ( aMessage.Function() )
-        {
-        case ECseServCreateSubSession:
-            NewObjectL( aMessage );
-            break;
-
-        case ECseServCloseSubSession:
-            DeleteObject( aMessage.Int3() );
-            break;
-        
-        case ECseServCloseSession:
-            Server()->Dec();
-            break;
-        
-        default:
-            break;
-        }
-        
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::DispatchMessageL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerSession::NewObjectL()
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerSession::NewObjectL( const RMessage2& aMessage )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::NewObjectL");
-    
-    CObject* obj = Server()->GetEngineObjectL();
-    TInt handle( iObjects->AddL( obj ) );
-    // Write the handle to client
-    TPckg<TInt> handlePckg( handle );
-    TRAPD( err, aMessage.WriteL( 3, handlePckg ) );
-    
-    if ( err )
-        {
-        PanicClient( ECsePanicBadRequest );
-        return;
-        }
-        
-    // Notch up another resource
-    iResourceCount++;
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::NewObjectL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::DeleteObject()
-// 
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerSession::DeleteObject( TUint aHandle )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::DeleteObject");
-    
-    // Panic if bad handle
-    CCseSchedulerServerEngine* engine = ( CCseSchedulerServerEngine* )iObjects->At( aHandle );
-    if ( !engine )
-        {
-        PanicClient( ECsePanicBadSubSessionHandle ); 
-        }
-        
-    iResourceCount--;
-    // Deletes engine
-    iObjects->Remove( aHandle );
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::DeleteObject");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerServerSession::CountResources()
-//
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerServerSession::CountResources()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::CountResources");
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerServerSession::CountResources");
-    return iResourceCount;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::PanicClient()
-// 
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerServerSession::PanicClient( TCseSchedulerServPanic aPanic ) const
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerServerSession::PanicClient");
-    
-    _LIT( KTxtSessionPanic, "SchedulerSession" );
-    CSELOGSTRING2_HIGH_LEVEL("CCseSchedulerServerSession::PanicClient - panic code: %d", aPanic);
-    User::Panic( KTxtSessionPanic, aPanic );
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerSession::PanicClient()
-// 
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//    
-CCseSchedulerServer* CCseSchedulerServerSession::Server()
-    {
-    return reinterpret_cast< CCseSchedulerServer* > ( 
-                   const_cast< CServer2* > ( CSession2::Server( ) ) );
-    }
-//  End of File
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerThreadPacket.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Timer for the notifier*
-*/
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerThreadPacket.h"
-#include <ipvideo/CCseScheduledProgram.h>   // Represent one schedule in database
-#include <e32std.h>
-#include "CseDebug.h"               // Debug macros
-
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::CCseSchedulerThreadPacket()
-//
-// ---------------------------------------------------------------------------
-CCseSchedulerThreadPacket::CCseSchedulerThreadPacket( ) :
-                           iResultCode( KErrGeneral )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::CCseSchedulerThreadPacket");
-			
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerLandLord::CCseSchedulerLandLord");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::~CCseSchedulerThreadPacket()
-//
-// ---------------------------------------------------------------------------	
-CCseSchedulerThreadPacket::~CCseSchedulerThreadPacket()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::~CCseSchedulerThreadPacket");
-
-    delete iSchedule;
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::~CCseSchedulerThreadPacket");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::NewL()
-//
-// ---------------------------------------------------------------------------	
-CCseSchedulerThreadPacket* CCseSchedulerThreadPacket::NewL()
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::NewL");
-	
-	// Symbian C++ constructor
-	CCseSchedulerThreadPacket* self = new ( ELeave ) CCseSchedulerThreadPacket();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::NewL");
-    return self;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::ConstructL()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerThreadPacket::ConstructL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::ConstructL");	
-
-  
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::ConstructL");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::SetScheduleL()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerThreadPacket::SetScheduleL( CCseScheduledProgram& aData )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::SetSchedule");
-
-    delete iSchedule;
-    iSchedule = NULL;
-    iSchedule = CCseScheduledProgram::NewL( aData );
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::SetSchedule");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::SetResultCode()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerThreadPacket::SetResultCode( TInt32 aResultCode )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::SetResultCode");
-
-    iResultCode = aResultCode;
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::SetResultCode");
-	}	
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::Schedule()
-//
-// ---------------------------------------------------------------------------		
-CCseScheduledProgram* CCseSchedulerThreadPacket::Schedule( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::Schedule");
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::Schedule");
-
-    return iSchedule;	
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::ResultCode()
-//
-// ---------------------------------------------------------------------------		
-TInt32 CCseSchedulerThreadPacket::ResultCode( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::ResultCode");
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::ResultCode");
-    return iResultCode;	
-	}    
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::ShutdownSemaphore()
-//
-// ---------------------------------------------------------------------------		
-RSemaphore& CCseSchedulerThreadPacket::ShutdownSemaphore( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::ShutdownSemaphore");
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::ShutdownSemaphore");
-    return iShutdownSemaphore;	
-	}   
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::ShutdownCompleteSemaphore()
-//
-// ---------------------------------------------------------------------------		
-RSemaphore& CCseSchedulerThreadPacket::ShutdownCompleteSemaphore( )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>ShutdownCompleteSemaphore::ShutdownCompleteSemaphore");
-    CSELOGSTRING_HIGH_LEVEL("<<<ShutdownCompleteSemaphore::ShutdownCompleteSemaphore");
-    return iShutdownCompleteSemaphore;	
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::ShutdownSemaphore()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerThreadPacket::SetShutdownSemaphore( RSemaphore& aSemaphore )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerThreadPacket::SetShutdownSemaphore");
-	iShutdownSemaphore = aSemaphore;
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerThreadPacket::SetShutdownSemaphore");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerThreadPacket::ShutdownCompleteSemaphore()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerThreadPacket::SetShutdownCompleteSemaphore( RSemaphore& aSemaphore )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>ShutdownCompleteSemaphore::SetShutdownCompleteSemaphore");
-    iShutdownCompleteSemaphore = aSemaphore;
-    CSELOGSTRING_HIGH_LEVEL("<<<ShutdownCompleteSemaphore::SetShutdownCompleteSemaphore");    
-	}
-// End of file
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerTimer.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Timer for the notifier*
-*/
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerTimer.h"         // Header file for this class
-#include "MCseSchedulerTimerObserver.h" // Observer for informing engine
-#include <e32const.h>
-#include <e32cmn.h>
-#include <e32base.h>
-#include "CseDebug.h"               // Debug macros
-
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::CCseSchedulerTimer()
-//
-// ---------------------------------------------------------------------------
-CCseSchedulerTimer::CCseSchedulerTimer( MCseSchedulerTimerObserver* aObserver ) : CTimer( CActive::EPriorityStandard )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerTimer::CCseSchedulerTimer");
-	
-	// C++ default constructor
-	iObserver = aObserver;
-		
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::CCseSchedulerTimer");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::~CCseSchedulerTimer()
-//
-// ---------------------------------------------------------------------------	
-CCseSchedulerTimer::~CCseSchedulerTimer()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerTimer::~CCseSchedulerTimer");
-	Cancel();
-	iObserver = NULL;
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::~CCseSchedulerTimer");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::NewL()
-//
-// ---------------------------------------------------------------------------	
-CCseSchedulerTimer* CCseSchedulerTimer::NewL( 
-	MCseSchedulerTimerObserver* aObserver )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerTimer::NewL");
-	
-	// Symbian C++ constructor
-	CCseSchedulerTimer* self = new ( ELeave ) CCseSchedulerTimer(aObserver);
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::NewL");
-    return self;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::ConstructL()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerTimer::ConstructL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerTimer::ConstructL");	
-	
-	CTimer::ConstructL();
-    CActiveScheduler::Add( this );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::ConstructL");
-	}
-			
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::SetTimer()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerTimer::SetTimer( const TTime& aTime )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerTimer::SetTimer");
-	
-	// Just cancel existing and start new one
-	Cancel();	
-	AtUTC( aTime );
-
-#ifdef _DEBUG
-	TBuf<100> startTimeBuf;
-	_LIT( KDateTimeFormat,"CCseSchedulerTimer::SetTimer (UTC): %1%*D/%2%*M/%3%*Y %H:%T:%S.%C#" ); 
-	TRAP_IGNORE( aTime.FormatL( startTimeBuf, KDateTimeFormat ) );
-    CSELOGTEXT_HIGH_LEVEL( startTimeBuf );
-#endif // _DEBUG
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::SetTimer");
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::DoCancel()
-//
-// ---------------------------------------------------------------------------
-void CCseSchedulerTimer::DoCancel()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerTimer::DoCancel");
-	
-	CTimer::DoCancel();
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::DoCancel");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::RunL()
-//
-// ---------------------------------------------------------------------------		
-void CCseSchedulerTimer::RunL()
-	{
-	CSELOGSTRING2_HIGH_LEVEL(">>>CCseSchedulerTimer::RunL, iStatus: %d", iStatus.Int());
-	
-	// Timer has fired. If everything went fine just kick the observer
-	if ( iStatus.Int() == KErrNone )
-		{		
-	    iObserver->RunPluginsL();
-		}
-	else
-		{
-		// Something went propably wrong, let the observer error handler decide what.
-		iObserver->TimerErrorL( iStatus.Int() );
-		}
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerTimer::RunL");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerTimer::RunError
-// From CActive, called when RunL leaves.
-// -----------------------------------------------------------------------------
-//
-TInt CCseSchedulerTimer::RunError( 
-    TInt aError )
-    {
-	  CSELOGSTRING2_HIGH_LEVEL(">>>CCseSchedulerServerSession::RunError: aError = %d", aError );	
-    // ATM there isn't leaving code in RunL so we just cancel timer if it is active.    
-    Cancel();
-
-#if CSE_LOGGING_METHOD == 0 
-    ( void )aError;
-#endif
-
-    // Return KErrNone to avoid crash.
-	  return KErrNone;
-    }
-
-// End of file
--- a/videoscheduler/SchedulerServer/src/CCseSchedulerUniPluginController.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Base class for uni plugin controllers*
-*/
-
-
-
-
-
-// INCLUDE FILES
-#include "CCseSchedulerUniPluginController.h"
-#include "CseDebug.h"                           // Debug macros
-#include "CCseSchedulerPluginStarter.h"
-#include "CCseSchedulerLandLord.h"
-#include <ipvideo/CCseScheduledProgram.h>
-#include "CCseSchedulerTimer.h"
-#include "CCseSchedulerServerEngine.h"
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None.
-
-// CONSTANTS
-// None
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::CCseSchedulerUniPluginController
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerUniPluginController::CCseSchedulerUniPluginController (
-                                        CCseSchedulerServerEngine& aEngine,
-                                        TInt32 aPluginUid ) :
-                                        CCseSchedulerPluginControllerBase( aEngine, aPluginUid ),                                        
-                                        iLandLord( NULL ),
-                                        iIsLandLordWorking( EFalse )
-    {
-    CSELOGSTRING_HIGH_LEVEL(
-        ">>>CCseSchedulerUniPluginController::CCseSchedulerUniPluginController");
-        
-    CSELOGSTRING_HIGH_LEVEL(
-        "<<<CCseSchedulerUniPluginController::CCseSchedulerUniPluginController");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerUniPluginController* CCseSchedulerUniPluginController::NewL(
-                                        CCseSchedulerServerEngine& aEngine,
-                                        TInt32 aPluginUid )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::NewL");
-    
-    CCseSchedulerUniPluginController* self =
-            new( ELeave ) CCseSchedulerUniPluginController( aEngine, aPluginUid );
-    CleanupStack::PushL( self );
-    self->ConstructL( );
-    CleanupStack::Pop( self );
-    
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::NewL");
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::ConstructL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ConstructL");
-    
-    CCseSchedulerPluginControllerBase::ConstructL();
-       
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::ConstructL");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::~CCseSchedulerUniPluginController
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CCseSchedulerUniPluginController::~CCseSchedulerUniPluginController()
-    {
-    CSELOGSTRING_HIGH_LEVEL(
-        ">>>CCseSchedulerUniPluginController::~CCseSchedulerUniPluginController");
-    delete iLandLord;
-    iLandLord = NULL;
-    CSELOGSTRING_HIGH_LEVEL(
-        "<<<CCseSchedulerUniPluginController::~CCseSchedulerUniPluginController");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::RunPluginsL
-// 
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::RunPluginsL()
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::RunPluginsL");
-
-    // Is there something to be run?!?
-    if(iScheduleArray.Count() >0 )
-        {
-        // Check if there is security reasons for this schedule why this
-        // schedule shouldn't be run
-        if( iEngine.IsAllowedToRun( iScheduleArray[0]->DbIdentifier() ) )
-            {
-            // Check if LandLord is still working. If he is, we just fall through
-            // because schedule will be kicked when current plugin completes
-            if( iIsLandLordWorking == EFalse )
-                {                    
-                // When we come here in UniPluginController it means that there isn't any
-                // threads running on LandLord side. Scrap the old if it exists and create new one.
-                if ( iLandLord )
-                    {
-                    delete iLandLord;
-                    iLandLord = NULL;
-                    }
-                
-                iLandLord = CCseSchedulerLandLord::NewL( this );
-                
-                iLandLord->SetScheduleL( *iScheduleArray[0] );
-                
-                iEngine.IncreaseScheduleRunCountL( iScheduleArray[0]->DbIdentifier() );
-                
-                iIsLandLordWorking = ETrue;
-                
-                iLandLord->RunPluginL();
-                }
-            }
-        else
-            {
-            // Schedule cannot be run anymore due to security reasons
-            // Signal engine to remove schedule from DB
-            iEngine.ScheduleNotValid( iScheduleArray[0]->DbIdentifier() );
-            
-            // Remove schedule own list
-            delete iScheduleArray[0];
-            iScheduleArray.Remove( 0 );
-            
-            // Call ourselves again.
-            RunPluginsL();
-            }            
-        }
-    else
-        {
-        // No schedules...!?!? REEEEESCHEDULE!!!
-        iEngine.RequestReschedule();
-        }
-
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::RunPluginsL");
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::SetSchedulesL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::SetSchedulesL(
-                                            RPointerArray<CCseScheduledProgram>& aScheduleArray )
-    {
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::SetSchedules");
-
-    //  The aScheduleArray parameter contains schedules which are either before
-    //  or at the same time as the existing ones in the iScheduleArray.
-    //  Just destroy the old ones and replace with new ones.
-    //  Also cancel the timer because the schedule to run may be different
-
-    iScheduleArray.ResetAndDestroy();
-    iTimer->Cancel();
-
-	// Go through all given schedules and copy them our array
-	for( TInt i = 0; i < aScheduleArray.Count(); i++)
-	    {
-        CCseScheduledProgram* schedule =
-                CCseScheduledProgram::NewL(*aScheduleArray[i] );
-        CleanupStack::PushL( schedule );
-
-	    iScheduleArray.AppendL( schedule );
-
-	    CleanupStack::Pop( schedule );
-	    }
-
-    //  If we have schedules, set the timer
-    if (iScheduleArray.Count() > 0  && !iIsLandLordWorking)
-        {
-        //  All the schedules have same time
-        iTimer->SetTimer( iScheduleArray[0]->StartTime() );
-        }
-
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::SetSchedules");
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::ScheduledEventCompleted
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::ScheduleCompletedL( const TUint32 aDbIdentifier,
-                                                           TInt aCompletitionCode )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ScheduleCompletedL");
-    
-    if ( aCompletitionCode == KErrNone )
-        {
-        ScheduleCompletedSuccesfullyL( aDbIdentifier );
-        }
-    else
-        {        
-        HandleScheduleErrorL( aDbIdentifier, aCompletitionCode );
-        }    
-     
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::ScheduleCompletedL");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::ScheduleCompletedSuccesfullyL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier )
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ScheduleCompletedSuccesfullyL");
-	
-	// Remove completed schedule from list
-    for ( TInt i = iScheduleArray.Count(); i > 0; i--)
-        {
-        if( iScheduleArray[i-1]->DbIdentifier() == aDbIdentifier )
-            {
-            delete iScheduleArray[i-1];
-            iScheduleArray.Remove( i-1 );                
-            }
-        }
-
-    // After all this LandLord has finished everything. He may rest now    
-    iIsLandLordWorking = EFalse;            
-        
-    // Notify engine about completition.
-    iEngine.ScheduleCompletedSuccesfullyL( aDbIdentifier );
-    
-    // If there is still schedule(s), set timer for it
-    if( iScheduleArray.Count() > 0 )
-        {
-        iTimer->SetTimer( iScheduleArray[0]->StartTime() );
-        }    
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::ScheduleCompletedSuccesfullyL");	
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::HandleScheduleErrorL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::HandleScheduleErrorL( const TUint32 aDbIdentifier,
-                                                            TUint32 aCompletitionCode )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::HandleScheduleErrorL");
-	
-    // Remove completed schedule from list
-    for ( TInt i = iScheduleArray.Count(); i > 0; i--)
-        {
-        if( iScheduleArray[i-1]->DbIdentifier() == aDbIdentifier )
-            {
-            delete iScheduleArray[i-1];
-            iScheduleArray.Remove( i-1 );                
-            }
-        }
-
-    // After all this LandLord has finished everything. He may rest now    
-    iIsLandLordWorking = EFalse;            
-	
-	// Here we could try to handle plugin errors. Problem is that scheduler doesn't
-	// know anything about schedule it is running and so there cannot be tailored
-	// error handling for each plugin. In the end, we just complete schedule
-	// to engine with error code (ends up removing schedule from DB).
-	iEngine.ScheduleCompletedWithErrorL( aDbIdentifier, aCompletitionCode );
-	
-	// If there is still schedule(s), set timer for it
-    if( iScheduleArray.Count() > 0 )
-        {
-        iTimer->SetTimer( iScheduleArray[0]->StartTime() );
-        }
-
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::HandleScheduleErrorL");
-	}
-	
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::TimerErrorL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::TimerErrorL( const TInt32 aError )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::TimerErrorL");
-	
-	if ( aError == KErrAbort )
-		{
-		 // System time changed. Make sanity check and start timer again.
-		CSELOGSTRING_HIGH_LEVEL(
-		    ">>>CCseSchedulerUniPluginController::TimerErrorL, system time has changed");
-		if ( iScheduleArray.Count() > 0 )
-			{
-			TTime now;
-			now.UniversalTime();
-			// Time still in the future
-			if ( now < iScheduleArray[0]->StartTime() )
-				{
-				iTimer->SetTimer( iScheduleArray[0]->StartTime() );
-				}
-			else
-				{
-				// If schedule is in the past let the "normal" route decide when
-				// it is he's her time to be run
-				RunPluginsL();
-				}
-			}
-		return; 
-		}
-
-	if ( aError == KErrUnderflow )
-		{
-		 // Scheduled time is in the past, pass it to notifier. It should decide what to do
-		CSELOGSTRING_HIGH_LEVEL(
-		    ">>>CCseSchedulerServerEngine::TimerErrorL, scheduled time is in the past");
-		RunPluginsL();
-		return;
-		}
-			
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::TimerErrorL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::ClearController
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSchedulerUniPluginController::ClearControllerL( )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::ClearControllerL");	
-
-    iLandLord->ClearL();
-        
-    iScheduleArray.ResetAndDestroy();
-        
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::ClearControllerL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSchedulerUniPluginController::ClearController
-//
-// -----------------------------------------------------------------------------
-//
-TBool CCseSchedulerUniPluginController::IsControllerActive( )
-    {
-    CSELOGSTRING_HIGH_LEVEL(">>>CCseSchedulerUniPluginController::IsControllerActive");
-    
-    CSELOGSTRING2_HIGH_LEVEL("<<<CCseSchedulerUniPluginController::IsControllerActive: %d",
-                            iIsLandLordWorking);
-    
-    return iIsLandLordWorking;
-    }
-
-// End of file.
--- a/videoscheduler/SchedulerServer/src/CCseSemaphoreController.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Observer for plugin thread if shutdown is signalled.*
-*/
-
-
-
-// INCLUDE FILES
-#include "CCseSemaphoreController.h"
-#include "MCseSemaphoreSignalObserver.h"
-#include "CseDebug.h"               // Debug macros
-
-
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES  
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-static TUint KCSeSemaphorePollingInterval = 5000;
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::CCseSemaphoreController()
-//
-// ---------------------------------------------------------------------------
-CCseSemaphoreController::CCseSemaphoreController( RSemaphore& aSemaphore,
-                                                  MCseSemaphoreSignalObserver& aObserver )
-                            : CTimer( EPriorityNormal ),
-                              iSemaphore( aSemaphore ),
-                              iObserver( aObserver ),
-                              iInterval( KCSeSemaphorePollingInterval )
-                              
-                            
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSemaphoreController::CCseSemaphoreController");
-	
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSemaphoreController::CCseSemaphoreController");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::~CCseSemaphoreController()
-//
-// ---------------------------------------------------------------------------	
-CCseSemaphoreController::~CCseSemaphoreController()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSemaphoreController::~CCseSemaphoreController");
-	
-	Cancel();
-		
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSemaphoreController::~CCseSemaphoreController");
-	}
-
-// ---------------------------------------------------------------------------
-// CCseSchedulerTimer::NewL()
-//
-// ---------------------------------------------------------------------------	
-CCseSemaphoreController* CCseSemaphoreController::NewL( RSemaphore& aSemaphore,
-                                                        MCseSemaphoreSignalObserver& aObserver )
-	{	
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSemaphoreController::NewL");
-	
-	// Symbian C++ constructor
-	CCseSemaphoreController* self = new ( ELeave ) CCseSemaphoreController( aSemaphore,
-	                                                                        aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-	CSELOGSTRING_HIGH_LEVEL("<<<CCseSemaphoreController::NewL");
-    return self;
-	}
-	
-// ---------------------------------------------------------------------------
-// CCseSemaphoreController::ConstructL()
-//
-// ---------------------------------------------------------------------------
-void CCseSemaphoreController::ConstructL()
-	{
-	CSELOGSTRING_HIGH_LEVEL(">>>CCseSemaphoreController::ConstructL");	
-	    
-    CTimer::ConstructL();
-    CActiveScheduler::Add( this );
-       
-    CSELOGSTRING_HIGH_LEVEL("<<<CCseSemaphoreController::ConstructL");
-	}
-
-// -----------------------------------------------------------------------------
-// CCseSemaphoreController::Start
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSemaphoreController::Start( )
-    {                    
-    Cancel();
-
-    After( TTimeIntervalMicroSeconds32( iInterval ) );    
-    }
-    
-// -----------------------------------------------------------------------------
-// CCseSemaphoreController::Stop
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSemaphoreController::Stop( )
-    {
-    Cancel();
-    }    
-
-// -----------------------------------------------------------------------------
-// CCseSemaphoreController::SetInterval
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSemaphoreController::SetInterval( TUint aInterval )
-    {    
-    iInterval = aInterval;
-    }
-
-// -----------------------------------------------------------------------------
-// CCseSemaphoreController::RunL
-//
-// -----------------------------------------------------------------------------
-//
-void CCseSemaphoreController::RunL( )
-    {
-     // Check if shutdown is signalled
-	if( KErrNone == iSemaphore.Wait( 1 ) )
-	    {    	        
-	    CSELOGSTRING_HIGH_LEVEL("CCseSemaphoreController::RunL - Semaphore signalled, inform observer");
-	    // Shutdown signalled, start taking down the plugin	    
-	    iObserver.SemaphoreSignalled();
-	    Cancel();
-	    }    
-    else
-        {
-        // If not, start again.
-        Start();
-        }
-    }
-
-
-
-// End of file
--- a/videoscheduler/group/bld.inf	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2004-2005 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: 
-*
-*/
-
-
-
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-#include <platform_paths.hrh>
-
-#include "../SchedulerClient/group/bld.inf"
-#include "../SchedulerServer/group/bld.inf"
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-
--- a/videoscheduler/inc/CseDebug.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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 CSEDEBUG_H
-#define CSEDEBUG_H
-
-#include <flogger.h>
-
-
-
-// Define logging level here
-
-// Minimum log output
-#define CSE_HIGH_LEVEL_TRACES
-
-#define CSE_MIDDLE_LEVEL_TRACES
-
-// Maximum log output
-#define CSE_LOW_LEVEL_TRACES
-
-
-
-
-/*
------------------------------------------------------------------------------
-
-	LOGGING MACROs
-
-	USE THESE MACROS IN YOUR CODE
-
-	Usage:
-	
-	Example: CSELOGSTRING_HIGH_LEVEL ("Test");
-	Example: CSELOGSTRING2_HIGH_LEVEL ("Test %d", aValue);
-	Example: CSELOGSTRING3_HIGH_LEVEL ("Test %d %d", aValue1, aValue2);
-	Example: CSELOGSTRING4_HIGH_LEVEL ("Test %d %d %d", aValue1, aValue2, aValue3);
-
-	Example: CSE_LOG_STR_DESC_HIGH_LEVEL (own_desc);
-	Example: CSE_LOG_STR_DESC2_HIGH_LEVEL (own_desc, aValue));
-	Example: CSE_LOG_STR_DESC3_HIGH_LEVEL (own_desc, aValue, aValue2);
-	Example: CSE_LOG_STR_DESC4_HIGH_LEVEL (own_desc, aValue, aValue2, aValue3);
-
------------------------------------------------------------------------------
-*/
-
-
-
-#ifdef CSE_HIGH_LEVEL_TRACES
-
-#define CSELOGTEXT_HIGH_LEVEL(AAAA)                     CSE_LOGTEXT(AAAA)
-#define CSELOGSTRING_HIGH_LEVEL(AAAA) 	                CSE_LOGSTRING(AAAA) 
-#define CSELOGSTRING2_HIGH_LEVEL(AAAA,BBBB) 	        CSE_LOGSTRING2(AAAA,BBBB) 
-#define CSELOGSTRING3_HIGH_LEVEL(AAAA,BBBB,CCCC)        CSE_LOGSTRING3(AAAA,BBBB,CCCC) 
-#define CSELOGSTRING4_HIGH_LEVEL(AAAA,BBBB,CCCC,DDDD)   CSE_LOGSTRING4(AAAA,BBBB,CCCC,DDDD) 
-
-#define CSE_LOG_STR_DESC_HIGH_LEVEL(AAAA) 	                CSE_LOG_STR_DESC(AAAA) 
-#define CSE_LOG_STR_DESC2_HIGH_LEVEL(AAAA,BBBB) 	        CSE_LOG_STR_DESC2(AAAA,BBBB) 
-#define CSE_LOG_STR_DESC3_HIGH_LEVEL(AAAA,BBBB,CCCC)        CSE_LOG_STR_DESC3(AAAA,BBBB,CCCC) 
-#define CSE_LOG_STR_DESC4_HIGH_LEVEL(AAAA,BBBB,CCCC,DDDD)   CSE_LOG_STR_DESC4(AAAA,BBBB,CCCC,DDDD) 
-
-#else
-
-#define CSELOGTEXT_HIGH_LEVEL(AAAA)
-#define CSELOGSTRING_HIGH_LEVEL(AAAA)
-#define CSELOGSTRING2_HIGH_LEVEL(AAAA,BBBB)
-#define CSELOGSTRING3_HIGH_LEVEL(AAAA,BBBB,CCCC)
-#define CSELOGSTRING4_HIGH_LEVEL(AAAA,BBBB,CCCC,DDDD)
-
-#define CSE_LOG_STR_DESC_HIGH_LEVEL(AAAA)
-#define CSE_LOG_STR_DESC2_HIGH_LEVEL(AAAA,BBBB)
-#define CSE_LOG_STR_DESC3_HIGH_LEVEL(AAAA,BBBB,CCCC)
-#define CSE_LOG_STR_DESC4_HIGH_LEVEL(AAAA,BBBB,CCCC,DDDD)
-
-#endif
-
-
-#ifdef CSE_MIDDLE_LEVEL_TRACES
-#define CSELOGSTRING_MIDDLE_LEVEL(AAAA)                 CSE_LOGSTRING(AAAA)
-#define CSELOGSTRING2_MIDDLE_LEVEL(AAAA,BBBB)           CSE_LOGSTRING2(AAAA,BBBB)
-#define CSELOGSTRING3_MIDDLE_LEVEL(AAAA,BBBB,CCCC)      CSE_LOGSTRING3(AAAA,BBBB,CCCC)
-#define CSELOGSTRING4_MIDDLE_LEVEL(AAAA,BBBB,CCCC,DDDD) CSE_LOGSTRING4(AAAA,BBBB,CCCC,DDDD)
-
-#define CSE_LOG_STR_DESC_MIDDLE_LEVEL(AAAA) 	            CSE_LOG_STR_DESC(AAAA) 
-#define CSE_LOG_STR_DESC2_MIDDLE_LEVEL(AAAA,BBBB) 	        CSE_LOG_STR_DESC2(AAAA,BBBB) 
-#define CSE_LOG_STR_DESC3_MIDDLE_LEVEL(AAAA,BBBB,CCCC)      CSE_LOG_STR_DESC3(AAAA,BBBB,CCCC) 
-#define CSE_LOG_STR_DESC4_MIDDLE_LEVEL(AAAA,BBBB,CCCC,DDDD) CSE_LOG_STR_DESC4(AAAA,BBBB,CCCC,DDDD) 
-
-#else
-
-#define CSELOGSTRING_MIDDLE_LEVEL(AAAA)
-#define CSELOGSTRING2_MIDDLE_LEVEL(AAAA,BBBB)
-#define CSELOGSTRING3_MIDDLE_LEVEL(AAAA,BBBB,CCCC)
-#define CSELOGSTRING4_MIDDLE_LEVEL(AAAA,BBBB,CCCC,DDDD)
-
-#define CSE_LOG_STR_DESC_MIDDLE_LEVEL(AAAA)
-#define CSE_LOG_STR_DESC2_MIDDLE_LEVEL(AAAA,BBBB)
-#define CSE_LOG_STR_DESC3_MIDDLE_LEVEL(AAAA,BBBB,CCCC)
-#define CSE_LOG_STR_DESC4_MIDDLE_LEVEL(AAAA,BBBB,CCCC,DDDD)
-
-#endif
-	    
-
-#ifdef CSE_LOW_LEVEL_TRACES
-
-#define CSELOGTEXT_LOW_LEVEL(AAAA)                      CSE_LOGTEXT(AAAA)
-#define CSELOGSTRING_LOW_LEVEL(AAAA)                    CSE_LOGSTRING(AAAA)
-#define CSELOGSTRING2_LOW_LEVEL(AAAA,BBBB)              CSE_LOGSTRING2(AAAA,BBBB)
-#define CSELOGSTRING3_LOW_LEVEL(AAAA,BBBB,CCCC)         CSE_LOGSTRING3(AAAA,BBBB,CCCC)
-#define CSELOGSTRING4_LOW_LEVEL(AAAA,BBBB,CCCC,DDDD)    CSE_LOGSTRING4(AAAA,BBBB,CCCC,DDDD)
-
-#define CSE_LOG_STR_DESC_LOW_LEVEL(AAAA) 	                CSE_LOG_STR_DESC(AAAA) 
-#define CSE_LOG_STR_DESC2_LOW_LEVEL(AAAA,BBBB) 	            CSE_LOG_STR_DESC2(AAAA,BBBB) 
-#define CSE_LOG_STR_DESC3_LOW_LEVEL(AAAA,BBBB,CCCC)         CSE_LOG_STR_DESC3(AAAA,BBBB,CCCC) 
-#define CSE_LOG_STR_DESC4_LOW_LEVEL(AAAA,BBBB,CCCC,DDDD)    CSE_LOG_STR_DESC4(AAAA,BBBB,CCCC,DDDD) 
-
-#else
-
-#define CSELOGTEXT_LOW_LEVEL(AAAA)
-#define CSELOGSTRING_LOW_LEVEL(AAAA)
-#define CSELOGSTRING2_LOW_LEVEL(AAAA,BBBB)
-#define CSELOGSTRING3_LOW_LEVEL(AAAA,BBBB,CCCC)
-#define CSELOGSTRING4_LOW_LEVEL(AAAA,BBBB,CCCC,DDDD)
-
-#define CSE_LOG_STR_DESC_LOW_LEVEL(AAAA)
-#define CSE_LOG_STR_DESC2_LOW_LEVEL(AAAA,BBBB)
-#define CSE_LOG_STR_DESC3_LOW_LEVEL(AAAA,BBBB,CCCC)
-#define CSE_LOG_STR_DESC4_LOW_LEVEL(AAAA,BBBB,CCCC,DDDD)
-
-#endif
-
-
-
-/* 
------------------------------------------------------------------------------
-
-	LOG SELECTION
-
------------------------------------------------------------------------------
-*/
-
-// 0 = No logging, 
-// 1 = Flogger, 
-// 2 = RDebug
-
-
-#ifndef _DEBUG
-
-// UREL BUILD:
-#define CSE_LOGGING_METHOD  0   // No logging in UREL builds
-
-#else // urel
-
-
-
-#ifdef __WINSCW__
-
-// WINSCW BUILD:
-#define CSE_LOGGING_METHOD  2  // RDebug is default with emulator
-
-#else
-
-// ARMV5 BUILD:
-#define CSE_LOGGING_METHOD  1  // Flogger is default with target device
-
-#endif
-                                  
-                                 
-
-#endif // _DEBUG
-
-
-
-
-/* 
------------------------------------------------------------------------------
-
-	LOG SETTINGS
-
------------------------------------------------------------------------------
-*/
-
-#if CSE_LOGGING_METHOD == 1      // Flogger
-
-#include <flogger.h>
-_LIT(KCSELogFolder,"CSE");
-_LIT(KCSELogFile,"CSELOG.TXT");
-
-#elif CSE_LOGGING_METHOD == 2    // RDebug
-
-#include <e32svr.h>
-
-#endif
-
-
-
-
-
-#if CSE_LOGGING_METHOD == 1      // Flogger
-
-
-#define CSE_LOGTEXT(AAA)                        RFileLogger::Write(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend, AAA)
-
-#define CSE_LOG_STR_DESC(AAA)                   RFileLogger::Write(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend, AAA)
-#define CSE_LOG_STR_DESC2(AAA,BBB)         do { RFileLogger::WriteFormat(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(AAA()),BBB); } while (0)
-#define CSE_LOG_STR_DESC3(AAA,BBB,CCC)     do { RFileLogger::WriteFormat(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(AAA()),BBB,CCC); } while (0)
-#define CSE_LOG_STR_DESC4(AAA,BBB,CCC,DDD) do { RFileLogger::WriteFormat(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(AAA()),BBB,CCC,DDD); } while (0)
-
-#define CSE_LOGSTRING(AAA)                 do { _LIT(tempCSELogDes,AAA); RFileLogger::Write(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,tempCSELogDes()); } while (0)
-#define CSE_LOGSTRING2(AAA,BBB)            do { _LIT(tempCSELogDes,AAA); RFileLogger::WriteFormat(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempCSELogDes()),BBB); } while (0)
-#define CSE_LOGSTRING3(AAA,BBB,CCC)        do { _LIT(tempCSELogDes,AAA); RFileLogger::WriteFormat(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempCSELogDes()),BBB,CCC); } while (0)
-#define CSE_LOGSTRING4(AAA,BBB,CCC,DDD)    do { _LIT(tempCSELogDes,AAA); RFileLogger::WriteFormat(KCSELogFolder(),KCSELogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempCSELogDes()),BBB,CCC,DDD); } while (0)
-
-// Time stamp
-_LIT(KCseLogTimeFormatString, "CSE TIMESTAMP: %H:%T:%S:%*C3");
-#define CSE_LOGSTRING_TIMESTAMP { \
-                                TTime logTime; \
-                                logTime.HomeTime(); \
-                                TBuf<256> logBuffer; \
-                                logTime.FormatL(logBuffer, KCseLogTimeFormatString); \
-                                RFileLogger::Write(KCSELogFolder(), KCSELogFile(), EFileLoggingModeAppend, logBuffer); \
-                                }
-
-// Memory stamp
-_LIT(KCseLogMemoryStampString, "CSE MEMORYSTAMP: %d KB");
-#define CSE_LOGSTRING_MEMORYSTAMP { \
-                                  User::CompressAllHeaps(); \
-                                  TMemoryInfoV1Buf logMemory; \
-                                  UserHal::MemoryInfo(logMemory); \
-                                  TInt logMemoryInt = (TInt)(logMemory().iFreeRamInBytes); \
-                                  TBuf<256> logMemoryStr; \
-                                  logMemoryStr.Format(KCseLogMemoryStampString, (logMemoryInt / 1024) ); \
-                                  RFileLogger::Write(KCSELogFolder(), KCSELogFile(), EFileLoggingModeAppend, logMemoryStr); \
-                                  }
-
-
-#elif CSE_LOGGING_METHOD == 2    // RDebug
-
-
-#define CSE_LOGTEXT(AAA)                    RDebug::Print(AAA)
-
-#define CSE_LOG_STR_DESC(AAA)               RDebug::Print(AAA)
-#define CSE_LOG_STR_DESC2(AAA,BBB)          do {  RDebug::Print(AAA, BBB); }            while (0)
-#define CSE_LOG_STR_DESC3(AAA,BBB,CCC)      do {  RDebug::Print(AAA, BBB, CCC); }       while (0)
-#define CSE_LOG_STR_DESC4(AAA,BBB,CCC,DDD)  do {  RDebug::Print(AAA, BBB, CCC, DDD); }  while (0)
-
-#define CSE_LOGSTRING(AAA)                  do { _LIT(tempCSELogDes,AAA); RDebug::Print(tempCSELogDes); }                   while (0)
-#define CSE_LOGSTRING2(AAA,BBB)             do { _LIT(tempCSELogDes,AAA); RDebug::Print(tempCSELogDes, BBB); }              while (0)
-#define CSE_LOGSTRING3(AAA,BBB,CCC)         do { _LIT(tempCSELogDes,AAA); RDebug::Print(tempCSELogDes, BBB, CCC); }         while (0)
-#define CSE_LOGSTRING4(AAA,BBB,CCC,DDD)     do { _LIT(tempCSELogDes,AAA); RDebug::Print(tempCSELogDes, BBB, CCC, DDD); }    while (0)
-
-// Time stamp
-_LIT(KCseLogTimeFormatString, "CSE TIMESTAMP: %H:%T:%S:%*C3");
-#define CSE_LOGSTRING_TIMESTAMP { \
-                                TTime logTime; \
-                                logTime.HomeTime(); \
-                                TBuf<256> logBuffer; \
-                                logTime.FormatL(logBuffer, KCseLogTimeFormatString); \
-                                RDebug::Print(logBuffer); \
-                                }
-
-// Memory stamp
-_LIT(KCseLogMemoryStampString, "CSE MEMORYSTAMP: %d KB");
-#define CSE_LOGSTRING_MEMORYSTAMP { \
-                                  User::CompressAllHeaps(); \
-                                  TMemoryInfoV1Buf logMemory; \
-                                  UserHal::MemoryInfo(logMemory); \
-                                  TInt logMemoryInt = (TInt)(logMemory().iFreeRamInBytes); \
-                                  TBuf<256> logMemoryStr; \
-                                  logMemoryStr.Format(KCseLogMemoryStampString, (logMemoryInt / 1024) ); \
-                                  RDebug::Print(logMemoryStr); \
-                                  }
-
-
-#else	// TF_LOGGING_METHOD == 0 or invalid
-
-
-#define CSE_LOGSTRING(AAA)              
-#define CSE_LOGSTRING2(AAA,BBB)         
-#define CSE_LOGSTRING3(AAA,BBB,CCC)     
-#define CSE_LOGSTRING4(AAA,BBB,CCC,DDD) 
-
-#define CSE_LOGTEXT(AAA)                
-
-#define CSE_LOG_STR_DESC(AAA)              
-#define CSE_LOG_STR_DESC2(AAA,BBB)         
-#define CSE_LOG_STR_DESC3(AAA,BBB,CCC)     
-#define CSE_LOG_STR_DESC4(AAA,BBB,CCC,DDD) 
-
-#define CSE_LOGSTRING_TIMESTAMP
-#define CSE_LOGSTRING_MEMORYSTAMP
-
-
-#endif  // TF_LOGGING_METHOD
-
-
-
-
-
-
-
-#endif // CSEDEBUG_H
-
-// End of File
--- a/videoutils.pro	Wed Aug 18 10:48:22 2010 +0300
+++ b/videoutils.pro	Thu Sep 02 21:31:50 2010 +0300
@@ -18,5 +18,4 @@
 CONFIG += ordered
 symbian: {
 BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"videoutils_plat/videoplayer_constants_api/group/bld.inf\""
-BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"videoutils_plat/videoscheduler_api/group/bld.inf\""
 }
--- a/videoutils_plat/videoscheduler_api/group/bld.inf	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2004-2005 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: 
-*
-*/
-
-
-
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-// SchedulerClient
-../inc/ipvideo/CseEngineUids.h                   MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/CseEngineUids.h )
-../inc/ipvideo/CCseSchedulerAPI.h                MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/CCseSchedulerAPI.h )
-../inc/ipvideo/RCseSchedulerClient.h             MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/RCseSchedulerClient.h )
-../inc/ipvideo/RCseSchedulerService.h            MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/RCseSchedulerService.h )
-../inc/ipvideo/RCseSchedulerServiceBase.h        MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/RCseSchedulerServiceBase.h )
-../inc/ipvideo/CCseScheduledProgram.h            MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/CCseScheduledProgram.h )
-../inc/ipvideo/CseSchedulerClientServerCommon.h  MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/CseSchedulerClientServerCommon.h )
-
-// SchedulerServer
-../inc/ipvideo/CCseSchedulerPluginIF.h           MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/CCseSchedulerPluginIF.h )
-../inc/ipvideo/CCseSchedulerPluginIF.inl         MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/CCseSchedulerPluginIF.inl )
-../inc/ipvideo/MCseScheduleObserver.h            MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/MCseScheduleObserver.h )
-../inc/ipvideo/MCsePluginObserver.h              MW_LAYER_PLATFORM_EXPORT_PATH( ipvideo/MCsePluginObserver.h )
-
-
-PRJ_MMPFILES
-PRJ_TESTMMPFILES
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/CCseScheduledProgram.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    This class contains data for scheduled programs.*
-*/
-
-
-#ifndef __CCSESCHEDULEDPROGRAM_H__
-#define __CCSESCHEDULEDPROGRAM_H__
-
-#include <e32def.h>
-#include <e32base.h>
-#include <s32strm.h>
-
-// CONSTANTS
-const TInt KCseNameMaxLength = 255;  // Based on SymbianDB column max length
-
-/**
-* Scheduled program data.
-*/
-class CCseScheduledProgram : public CBase
-	{
-	public: // Constructors and destructors
-    	/**
-        * Two-phased constructor.
-        */            
-		IMPORT_C static CCseScheduledProgram* NewL();
-		
-		/**
-        * Two-phased copy constructor.
-        */
-		IMPORT_C static CCseScheduledProgram* NewL( CCseScheduledProgram& aProg );
-		
-		/**
-        * Destructor.
-        * @return None.
-        */
-		IMPORT_C virtual ~CCseScheduledProgram();
-		
-		
-		// Enums
-		// Schedule type
-        enum TCseScheduleType
-            {
-            ECseReminder = 0,
-            ECseRecording,
-            ECseProgramGuideUpdate,
-            ECseScheduleDownload,
-            ECseOther
-            };
-        
-        // Plugin type:	   
-	    enum TCsePluginType
-            {
-            // Only one of this kind of plugin can be running at same time
-            ECseUniPlugin = 1,
-            // Several of this kind of plugin can be running same time
-            ECseMultiPlugin            
-            };
-    public: // New methods
-        /**
-        * Externalizes class content to stream.
-        * @param aStream Writestream where to write content
-        * @return None.
-        */
-		IMPORT_C void ExternalizeL( RWriteStream& aStream );
-		
-		/**
-        * Internalizes class content from stream.
-        * @param aStream Readstream from where to read content
-        * @return None.
-        */ 
-		IMPORT_C void InternalizeL( RReadStream& aStream );
-		
-		/**
-        * Calculates externalization length.
-        * @return Length of the stream needed when class is externalized.
-        */
-		IMPORT_C TInt ExternalizeLength();
-		
-	public:	// Setters
-	
-	    /**
-        * Sets new plugin type for schedule.
-        * EUniPlugin for plugins that can have only one running at a given time.
-        * EMultiPlugin for plugins that can have several running at a given time
-        * @param aPluginType New plugin type
-        */
-		IMPORT_C void SetPluginType( TInt32 aPluginType );		
-		
-		/**
-        * Sets new schedule name.
-        * @param aName New name of the schedule
-        */
-		IMPORT_C void SetName( const TDesC8& aName );		
-		
-		/**
-        * Sets new schedule start time.
-        * @param aStartTime New start time of the schedule
-        */
-		IMPORT_C void SetStartTime( const TTime& aStartTime );
-		
-		/**
-        * Sets new schedule end time.
-        * @param aEndTime New end time of the schedule
-        */
-		IMPORT_C void SetEndTime( const TTime& aEndTime );		
-		
-		/**
-        * Sets new application uid for schedule.
-        * @param aAppUid New application uid of the schedule
-        */
-		IMPORT_C void SetAppUid( const TInt32 aAppUid );
-		
-		/**
-        * Sets new plugin uid for schedule
-        * @param aPluginUid New plugin uid of the schedule
-        */
-		IMPORT_C void SetPluginUid( const TInt32 aPluginUid );
-		
-		/**
-        * Sets new application data for schedule
-        * @param aAppData New application data of the schedule
-        */
-		IMPORT_C void SetApplicationDataL( const TDesC8& aAppData );
-		
-		/**
-        * Sets new database identifier for the schedule. Note that this should only
-        * be set by Common Scheduling Engine, not the application using it.
-        * @param aDbIdentifier New database identifier of the schedule
-        */
-		IMPORT_C void SetDbIdentifier( const TUint32 aDbIdentifier );
-				
-		/**
-        * Sets new schedule for the schedule.
-        * @param aScheduleType New schedule type of the schedule
-        */
-		IMPORT_C void SetScheduleType( const TInt32 aScheduleType );
-
-		// Getters
-		/**
-        * Get the type of scheduler plugin
-        * EUniPlugin for plugins that can have only one running at a given time.
-        * EMultiPlugin for plugins that can have several running at a given time
-        * @return Schedule plugin type.
-        */
-		IMPORT_C TInt32 PluginType() const;
-		
-		/**
-        * Get the name of the schedule.
-        * @return Schedule name.
-        */
-		IMPORT_C TPtrC8 Name() const;
-		
-		/**
-        * Gets the start time of the schedule.
-        * @return Start time.
-        */
-		IMPORT_C TTime& StartTime();
-		
-		/**
-        * Gets the end time of the schedule.
-        * @return End time.
-        */
-		IMPORT_C TTime& EndTime();		
-		
-		/**
-        * Gets the application uid of the schedule
-        * @return Application uid.
-        */
-		IMPORT_C TInt32 AppUid() const;
-		
-		/**
-        * Gets the plugin uid of the schedule.
-        * @return Plugin uid.
-        */
-		IMPORT_C TInt32 PluginUid() const;
-		
-		/**
-        * Gets the application data of the schedule.
-        * @return Application data.
-        */
-		IMPORT_C TPtrC8 ApplicationData();
-		
-		/**
-        * Gets the database identifier of the schedule.
-        * @return Database identifier
-        */
-		IMPORT_C TUint32 DbIdentifier() const;
-				
-		/**
-        * Gets the schedule type of the schedule.
-        * @return Schedule type
-        */
-		IMPORT_C TInt32 ScheduleType() const;
-
-        /**
-        * Dumps content of schedule to debug trace
-        * @return   None
-        */
-        IMPORT_C void DebugDump() const;
-	
-	protected: // Constructors
-		/**
-		*	Default constructor
-		*/
-		EXPORT_C CCseScheduledProgram();
-		
-		/**
-        * Symbian 2nd phase constructor can leave.
-        */
-		void ConstructL();
-
-	protected: // Data			
-		/**
-		* Name
-		* Name of the scheduled program, e.g. name of the TV program.		
-		*/
-		TBuf8<KCseNameMaxLength>	iName;
-
-		/**
-		* Start time
-		* Start time when the scheduled program is run (passed to plugin which is defined here).
-		*/
-		TTime					iStartTime;	
-
-		/**
-		* End time
-		* End time for schedules that take longer time to complete, for example recording of the TV program.
-		* If schedule is "instant" (e.g. just notification to user) start time and end time should be the same.
-		*/
-		TTime					iEndTime;
-		
-		/**
-		* Application UID
-		* This is the application uid of the program that has added this schedule. Can be used to retrieve
-		* all schedules of certain application.
-		*/
-		TInt32					iAppUid;
-
-		/**
-		* Plugin UID
-		* UID of the plugin where this scheduled program is passed when the time is right.
-		*/
-		TInt32					iPluginUid;
-		
-		/**
-		* Application Data
-		* Application specific data for the plugin. Common scheduling Engine has no knowledge what
-		* this data contains.
-		*/
-		HBufC8*					iAppData;
-		
-		/**
-		* DB identifier
-		* Used to separate schedules from each other in database. Should be only added by Common
-		* scheduling engine, not by application using it.
-		*/
-		TUint32					iDbIdentifier;
-		
-		/**
-		* Schedule type
-		* Type of this schedule, e.g. reminder, recording...
-		*/		
-		TInt32                  iScheduleType;
-		
-		/**
-		* Schedule plugin type
-		* Type of the plugin where this schedule will be run
-		*/		
-		TInt32                  iPluginType;
-	};
-	
-#endif //__CCSESCHEDULEDPROGRAM_H__
-
-// End of file
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/CCseSchedulerAPI.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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 _CCSESCHEDULERAPI_H
-#define _CCSESCHEDULERAPI_H
-
-// INCLUDES
-#include <e32base.h>
-#include <ipvideo/RCseSchedulerClient.h>    // Client common methods (server start up etc)
-#include <ipvideo/RCseSchedulerService.h>   // Client common methods (open, close etc)
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None.
-
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-class CCseScheduledProgram;
-
-// CLASS DECLARATION    
-/**
-*  General client api that manages service functionality.
-*
-*  @lib CseSchedulerClient.lib
-*/
-class CCseSchedulerApi : public CBase                          
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * Two-phased constructor.
-        */
-        IMPORT_C static CCseSchedulerApi* NewL();
-
-        /**
-        * Destructor.
-        * @return None.
-        */
-        IMPORT_C virtual ~CCseSchedulerApi();
-
-    private: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        */
-        CCseSchedulerApi();
-
-        /**
-        * Symbian 2nd phase constructor can leave.
-        */
-        void ConstructL();
-        
-    public: // New methods
-    	/**
-        * Adds given schedule to Common Scheduling Engine database. After the call is
-        * completed, the parameter contains the DB identifier of the schedule.
-        * @param    aData   Schedule to be added to database.
-        * @return   Generic symbian error code.
-        */
-        IMPORT_C TInt AddSchedule( CCseScheduledProgram& aData ) const;
-        
-        /**
-        * Removes schedule from database.
-        * @param    aDbIdentifier   Database identifier of the schedule to be removed.
-        * @return   Generic symbian error code.
-        */
-        IMPORT_C TInt RemoveSchedule( const TUint32 aDbIdentifier ) const;
-        
-        /**
-        * Gets schedule from database.
-        * @param    aDbIdentifier   Database identifier of the schedule that is wanted
-        *                           from the database
-        * @param    aProg           Pointer where this scheduled program is get.
-        * @return   Generic symbian error codes.
-        */
-        IMPORT_C TInt GetSchedule( const TUint32 aDbIdentifier,
-        						   CCseScheduledProgram* aProg ) const;
-
-		/**
-		* Get list of scheduled events from the scheduling engine based on given UID.
-		* @param    aAppUid     Application UID.
-		* @param    aArray      On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/
-		IMPORT_C TInt GetSchedulesByAppUid( const TInt32 aAppUid, 
-						RPointerArray<CCseScheduledProgram>& aArray ) const;
-
-		/**
-		* Get overlapping schedule (if any) from the scheduling engine.
-		* Uses schedule type, start and end times to find overalapping 
-		* schedules from the Commone Scheduling Engine database.
-		* @param    aProgram        Schedule to used for finding overlapping schedules.
-		* @param    aResultArray    On return, contains array of overlapping 
-		* 		                    schedules, empty if none found.
-		* @return Generic symbian error code.
-		*/
-		IMPORT_C TInt GetOverlappingSchedules( CCseScheduledProgram& aProgram, 
-		                                       RPointerArray<CCseScheduledProgram>& aResultArray );
-		
-		/**
-		* Get list of scheduled events from the scheduling engine based on given UID.
-		* @param    aPluginUid     Plugin UID.
-		* @param    aArray      On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/                                       
-		IMPORT_C TInt GetSchedulesByPluginUid( const TInt32 aPluginUid,
-                                      RPointerArray<CCseScheduledProgram>& aArray ) const;
-
-        /**
-		* Get list of scheduled events from the scheduling engine based on given schedule type.
-		* @param    aScheduleType   Schedule type.
-		* @param    aArray          On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/                                      
-		IMPORT_C TInt GetSchedulesByType( const TInt32 aScheduleType, 
-                                 RPointerArray<CCseScheduledProgram>& aArray ) const;
-
-        /**
-		* Get list of scheduled events from the scheduling engine between given timeframe.
-		* @param    aBeginning  Beginning of the time frame
-		* @param    aEnd        End of the time frame
-		* @return   Generic symbian error code.
-		*/                                                                               
-		IMPORT_C TInt GetSchedulesByTime( const TTime& aBeginning,
-                                 const TTime& aEnd,
-                                 RPointerArray<CCseScheduledProgram>& aArray ) const;
-                                         
-
-    private: // Data
-        /**
-        * Scheduler engine - Client
-        */
-        RCseSchedulerClient iClient;
-        
-        /**
-        * Scheduler engine - Service
-        */
-        RCseSchedulerService iService;
-    };
-
-#endif //_CCSESCHEDULERAPI_H
-
-// End of file
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/CCseSchedulerPluginIF.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Common interface for scheduler plugins.*
-*/
-
-
-
-
-#ifndef CCSESCHEDULERPLUGINIF_H
-#define CCSESCHEDULERPLUGINIF_H
-
-#include <e32std.h>
-#include <e32base.h>
-class CCseScheduledProgram;
-class MCsePluginObserver;
-
-class CCseSchedulerPluginIF : public CBase
-    {
-public:
-    /**
-    * Construction method.
-    * @param    aUid    Ecom implementation uid of the used plugin.
-    * @return   None
-    */
-    static CCseSchedulerPluginIF* NewL( const TUid& aUid );
-
-    /**
-    * Runs given task in plugin.
-    * @param    aProg       Schedule to be run in plugin.
-    * @param    aObserver   Pointer back to scheduling engine. Called
-    *                       when schedule is completed or error occurs.
-    * @return   None
-    */	
-	virtual void RunTaskL( CCseScheduledProgram& aProg,
-						   MCsePluginObserver* aObserver ) = 0;	
-	
-    /**
-    * Return the ECom implementation uid of this plugin.
-    * @return ECom implementation uid.
-    */
-    TUid ImplementationUid() const;
-    
-    /**
-    * Destructor
-    */    
-    virtual ~CCseSchedulerPluginIF();
-    
-protected:    
-    /**
-    * Instance identifier key. When instance of an
-    * implementation is created by ECOM framework, the
-    * framework will assign UID for it. The UID is used in
-    * destructor to notify framework that this instance is
-    * being destroyed and resources can be released.
-    */    
-    TUid iDtorIDKey;
-
-    /**
-    * Ecom implementation uid
-    */
-    TUid iImplementationUid;
-    };
-
-
-
-#include <ecom/ecom.h>
-#include <ipvideo/CCseSchedulerPluginIF.inl>
-
-#endif //CCSESCHEDULERPLUGINIF_H
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/CCseSchedulerPluginIF.inl	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    CSE inlines.*
-*/
-
-
-
-#ifndef CIPTVSCHEDULERPLUGIN_INL
-#define CIPTVSCHEDULERPLUGIN_INL
-
-// INLINES
-
-/**
-* Contructor
-*/
-inline CCseSchedulerPluginIF* CCseSchedulerPluginIF::NewL( const TUid& aUid  )
-    {
-    TAny* ext = REComSession::CreateImplementationL( aUid, _FOFF( CCseSchedulerPluginIF, iDtorIDKey ));
-
-    CCseSchedulerPluginIF* result = reinterpret_cast< CCseSchedulerPluginIF* >( ext );
-    result->iImplementationUid = aUid;  // set the plugin's implementation uid
-    
-    return result;
-    }
-
-
-/**
-* Destructor
-*/
-inline CCseSchedulerPluginIF::~CCseSchedulerPluginIF()
-    {
-    // Inform the ECOM framework that this specific instance of the
-    // interface has been destroyed.
-    REComSession::DestroyedImplementation( iDtorIDKey );
-    }
-/**
-* ImplementationUid
-*/
-inline TUid CCseSchedulerPluginIF::ImplementationUid() const 
-    { 
-    return iImplementationUid; 
-    }
-
-#endif
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/CseEngineUids.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Common scheduling engine UIDs*
-*/
-
-
-
-
-
-const TUint CSE_SCHEDULER_SERVER_UID = 0x10281F20
-const TUint CSE_SCHEDULER_CLIENT_UID = 0x10281F1F
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/CseSchedulerClientServerCommon.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    scheduling engine client/server common header.*
-*/
-
-
-
-
-
-#ifndef __CSESCHEDULERCLIENTSERVERCOMMON_H__
-#define __CSESCHEDULERCLIENTSERVERCOMMON_H__
-
-// INCLUDE FILES
-#include <e32base.h>
-
-// CONSTANTS
-_LIT( KCseSchedulerServerName,             "CseSchedulerEngineServer" ); // Server name
-_LIT( KCseSchedulerServerSemaphoreName, "CseSchedulerServerSemaphore" );
-_LIT( KCseSchedulerServerFileName,           "CseSchedulerServer.exe" );
-
-
-// The server version. A version must be specified when
-// creating a session with the server.
-const TUint KCseServMajorVersionNumber=0;
-const TUint KCseServMinorVersionNumber=1;
-const TUint KCseServBuildVersionNumber=1;
-
-
-// Enum for different server requests
-typedef enum
-	{
-	ECseRequestBase = 0,
-	ECseAddSchedule,
-	ECseRemoveSchedule,
-	ECseGetSchedules,
-	ECseGetSchedule,
-	ECseGetScheduleLength,
-	ECseGetSchedulesByAppUid,
-	ECseGetScheduleArrayLengthByAppUid,
-	ECseServCreateSubSession,
-	ECseServCloseSubSession,
-	ECseServCloseSession,
-	ECseGetOverlappingSchedulesLength,
-	ECseGetOverlappingSchedules,
-	ECseGetScheduleArrayLengthByPluginUid,
-	ECseGetSchedulesByPluginUid,
-	ECseGetScheduleArrayLengthByType,
-	ECseGetSchedulesByType,
-	ECseGetScheduleArrayLengthByTimeframe,
-	ECseGetSchedulesByTimeframe,
-	ECseRequestLast
-	} MCseSchedulerServerRequests;
-
-// Enum for different server responses	
-typedef enum
-	{
-	ECseNoSubsessionHandle = 0x100,
-	} MCseSchedulerRetValues;
-
-
-#endif // __CSESCHEDULERCLIENTSERVERCOMMON_H__
-
-// End of file
\ No newline at end of file
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/MCsePluginObserver.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Observer to inform common scheduling engine when plugin is*
-*/
-
-
-
-
-#ifndef __MCSEPLUGINOBSERVER_H__
-#define __MCSEPLUGINOBSERVER_H__
-
-// CLASS DECLARATION
-/**
-* MCsePluginObserver
-* This class specifies the function to be called when a plugin
-* cause error or completes.
-*/
-class MCsePluginObserver
-    {
-    public: // New functions                
-        /**
-        * Called when plugin is finihed progressing        
-        * @param    aCompletionCode Completion code of plugin. KErrNone
-        *                           if everything went alright.        
-        */
-        virtual void PluginCompleted( TInt aCompletionCode ) = 0;        
-    };
-
-#endif // __MCSEPLUGINOBSERVER_H__
-
-// End of File
\ No newline at end of file
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/MCseScheduleObserver.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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 __MCSESCHEDULEOBSERVER_H__
-#define __MCSESCHEDULEOBSERVER_H__
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-/**
-* MCseScheduleObserver
-* This class specifies the function to be called when a scheduler
-* cause error or completes.
-*/
-class MCseScheduleObserver
-    {
-    public: // New functions                
-        /**
-        * Called when schedule is finished prosessing-
-		* @param aDbIdentifier   DbIdentifier of scheduled program that just
-		*                        has been processed.
-		* @param aCompletionCode Completion code of schedule. KErrNone
-        *                        if everything went alright.
-        */
-        virtual void ScheduleCompletedL( const TUint32 aDbIdentifier,
-                                         TInt aCompletionCode ) = 0;
-    };
-
-#endif // __MCSESCHEDULEOBSERVER_H__
-
-// End of File
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/RCseSchedulerClient.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Interface for Cse Scheduler engine Client class*
-*/
-
-
-
-
-
-#ifndef _RCSESCHEDULERCLIENT_H
-#define _RCSESCHEDULERCLIENT_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None.
-
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-// None.
-
-// CLASS DECLARATION
-
-/**
-*  This is the client-side interface through which communication 
-*  with the server is channeled.
-*
-*  @lib CseSchedulerClient.dll
-*/
-class RCseSchedulerClient : public RSessionBase
-    {
-    public: // Constructors and destructor
-
-        /**
-        * C++ default constructor.
-        * @return None
-        */
-        RCseSchedulerClient();
-
-        /**
-        * Destructor.
-        * @return None.
-        */
-        virtual ~RCseSchedulerClient();
-
-    public: // New functions
-
-        /**
-        * Connect to the  server.
-        * @return KErrNone if successful, otherwise another of the system-wide 
-        *         error codes.
-        */
-        TInt Connect();
-
-        /**
-        * Close the session.
-        * @return None
-        */
-        void Close();
-
-        /**
-        * Version
-        * @return version number
-        */
-        TVersion Version() const;
-
-    private: // Data
-
-    };
-
-#endif // _RCSESCHEDULERCLIENT_H
-
-// End of File
-
-
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/RCseSchedulerService.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Interface for CseScheduler Client's Service class*
-*/
-
-
-
-#ifndef __RCSESCHEDULERSERVICE_H__
-#define __RCSESCHEDULERSERVICE_H__
-
-// INCLUDES
-#include <ipvideo/RCseSchedulerServiceBase.h>   // Client common methods (open, close etc)
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None.
-
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-class CCseScheduledProgram;
-
-// CLASS DECLARATION    
-/**
-*  General client api that manages service functionality.
-*
-*  @lib CseSchedulerClient.lib
-*/
-class RCseSchedulerService : public RCseSchedulerServiceBase
-    {
-    public: // Constructors and destructor
-        
-        /**
-        * Constructor.
-        * @return None.
-        */
-        RCseSchedulerService();
-
-        /**
-        * Destructor.
-        * @return None.
-        */
-        virtual ~RCseSchedulerService();
-    
-    public: // New methods
-    	/**
-        * Adds given schedule to Common Scheduling Engine database. After the call is
-        * completed, the parameter contains the DB identifier of the schedule.
-        * @param    aData   Schedule to be added to database.        
-        */
-        void AddScheduleL( CCseScheduledProgram& aData ) const;
-        
-        /**
-        * Removes schedule from database.
-        * @param    aDbIdentifier  Database identifier of the schedule to be removed.
-        * @return Generic symbian error code.
-        */
-        void RemoveScheduleL( const TUint32 aDbIdentifier ) const;
-        
-        /**
-        * Gets schedule from database.
-        * @param    aDbIdentifier   Database identifier of the schedule that is wanted
-        *                           from the database
-        * @param    aProg           Pointer where this scheduled program is get.
-        * @return   Generic symbian error codes.
-        */
-        void GetScheduleL( const TUint32 aDbIdentifier,
-        				  CCseScheduledProgram* aProg ) const;
-
-		/**
-		* Get list of scheduled events from the scheduling engine based on given UID.
-		* @param    aAppUid     Application UID.
-		* @param    aArray      On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/
-		void GetSchedulesL( const TInt32 aAppUid, 
-							RPointerArray<CCseScheduledProgram>& aArray ) const;
-
-		/**
-		* Get overlapping schedule (if any) from the scheduling engine.
-		* Uses schedule type, start and end times to find overalapping 
-		* schedules from the Commone Scheduling Engine database.
-		* @param    aProgram        Schedule to used for finding overlapping schedules.
-		* @param    aResultArray    On return, contains array of overlapping 
-		* 		                    schedules, empty if none found.
-		* @return Generic symbian error code.
-		*/
-		void GetOverlappingSchedulesL( CCseScheduledProgram& aProgram, 
-					RPointerArray<CCseScheduledProgram>& aResultArray );
-		
-		/**
-		* Get list of scheduled events from the scheduling engine based on given plugin UID.
-		* @param    aPluginUid     Plugin UID.
-		* @param    aArray      On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/			
-		void GetSchedulesByPluginUidL( const TInt32 aPluginUid, 
-					                   RPointerArray<CCseScheduledProgram>& aArray ) const;
-        
-        /**
-		* Get list of scheduled events from the scheduling engine based on given schedule type.
-		* @param    aType       Schedule type.
-		* @param    aArray      On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/			
-        void GetSchedulesByTypeL( const TInt32 aType, 
-			                      RPointerArray<CCseScheduledProgram>& aArray ) const;
-        
-        /**
-		* Get list of scheduled events from the scheduling engine between given timeframe.
-		* @param    aBeginning  Beginning of the timeframe.
-		* @param    aEnd        End of the timeframe.
-		* @param    aArray      On return contains items from the database.
-		* @return   Generic symbian error code.
-		*/						                    
-        void GetSchedulesByTimeL( const TTime& aBegining, 
-                                  const TTime& aEnd,
-			                      RPointerArray<CCseScheduledProgram>& aArray ) const;
-    };
-
-#endif //__RCSESCHEDULERSERVICE_H__
-
-// End of File
-
--- a/videoutils_plat/videoscheduler_api/inc/ipvideo/RCseSchedulerServiceBase.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of 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:    Interface for Cse Scheduler engine Client's ServiceBase class.*
-*/
-
-
-
-
-
-#ifndef __RCSESCHEDULERSERVICEBASE_H
-#define __RCSESCHEDULERSERVICEBASE_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None.
-
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-class RCseSchedulerClient;
-
-// CLASS DECLARATION
-
-/**
-*  Base class for services. This represents a client-side sub-session 
-*  and has a corresponding sub-session object on the server-side.
-*
-*  @lib CseSchedulerClient.dll
-*/
-class RCseSchedulerServiceBase : public RSubSessionBase
-    {
-    public:
-        /**
-        * C++ default constructor.
-        */
-        RCseSchedulerServiceBase();
-
-        /**
-        * Destructor.
-        * @return None.
-        */
-        virtual ~RCseSchedulerServiceBase();
-        
-        /**
-        * Open server.
-        * @param aServer 
-        * @return KErrNone if successful, otherwise one of the system-wide error codes.
-        */
-        TInt Open( RCseSchedulerClient& aClient );
-
-        /**
-        * Close server.
-        * @return None
-        */
-        void Close();
-
-        /**
-        * Uses user panic to panic client.
-        * @param aFault Panic reason.
-        * @return None.
-        */
-        void PanicClient( TInt aFault ) const;
-
-        /**
-        * Sessionhandle
-        */
-        inline RCseSchedulerClient& SessionHandle() const { return *iClient; }
-
-    private:
-
-        /**
-        * Pointer to client. Own.
-        */
-        RCseSchedulerClient* iClient; 
-
-    };
-
-#endif // __RCSESCHEDULERSERVICEBASE_H
-
-// End of File
-
-
--- a/videoutils_plat/videoscheduler_api/tsrc/Bmarm/videoscheduler_apitestU.DEF	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- a/videoutils_plat/videoscheduler_api/tsrc/Bwins/videoscheduler_apitestU.DEF	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- a/videoutils_plat/videoscheduler_api/tsrc/EABI/videoscheduler_apitestU.def	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/videoutils_plat/videoscheduler_api/tsrc/conf/atsconf.txt	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-;Run \vado\videoplayer\tsrc\testing\tools\genATSdrop.pl from 
-;the tsrc folder to create ATS3 drop.
-[DROP]
-NAME VaDo - videoutils_plat - videoscheduler_api
-DEVICE INSERT_DEVICE
-FLASH INSERT_FLASH_IMAGE
-FLASH INSERT_FLASH_IMAGE
-FLASH INSERT_FLASH_IMAGE
-SIS \VideoApp_Domain\videoplayer\videoplayerapp\mpxvideoplayer\sis\VideoPlayer.sisx
-PKG group\videoscheduler_apitest.pkg
-INI init\TestFramework.ini 200
-EMAIL INSERT_EMAIL
-RUN
-[ENDDROP]
--- a/videoutils_plat/videoscheduler_api/tsrc/conf/videoscheduler_apitest.cfg	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-#***********************************************************************************
-#
-# STIF test script file for testing videoscheduler.
-#
-#***********************************************************************************
-
-[Test]
-title ET00101 Program_NewL
-create videoscheduler_apitest test
-test Program_NewL
-delete test
-[Endtest]
-
-[Test]
-title ET00102 Program_NewLFromProgram
-create videoscheduler_apitest test
-test Program_NewL
-test Program_NewLFromProgram
-delete test
-[Endtest]
-
-[Test]
-title ET00103 Program_Externalize
-create videoscheduler_apitest test
-test Program_NewL
-test Program_Externalize
-delete test
-[Endtest]
-
-[Test]
-title ET00104 Program_ExternalizeLength
-create videoscheduler_apitest test
-test Program_NewL
-test Program_ExternalizeLength
-delete test
-[Endtest]
-
-[Test]
-title ET00105 Program_Internalize
-create videoscheduler_apitest test
-test Program_NewL
-test Program_Externalize
-test Program_Internalize
-delete test
-[Endtest]
-
-[Test]
-title ET00106 Program_PluginType
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetPluginType 1
-test Program_PluginType 1
-delete test
-[Endtest]
-
-[Test]
-title ET00107 Program_Name
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetName "Ohojelma"
-test Program_Name "Ohojelma"
-delete test
-[Endtest]
-
-[Test]
-title ET00108 Program_StartTime
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetStartTime "20090217:142100.000000"
-test Program_StartTime "20090217:142100.000000"
-delete test
-[Endtest]
-
-[Test]
-title ET00109 Program_EndTime
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetEndTime "20090217:142100.000000"
-test Program_EndTime "20090217:142100.000000"
-delete test
-[Endtest]
-
-[Test]
-title ET00110 Program_AppUid
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetAppUid 666
-test Program_AppUid 666
-delete test
-[Endtest]
-
-[Test]
-title ET00111 Program_PluginUid
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetPluginUid 666
-test Program_PluginUid 666
-delete test
-[Endtest]
-
-[Test]
-title ET00112 Program_ApplicationData
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetApplicationData "Chuck Norris would never give up his whipped cream"
-test Program_ApplicationData "Chuck Norris would never give up his whipped cream"
-delete test
-[Endtest]
-
-[Test]
-title ET00113 Program_DbIdentifier
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetDbIdentifier 666
-test Program_DbIdentifier 666
-delete test
-[Endtest]
-
-[Test]
-title ET00114 Program_ScheduleType Reminder
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetScheduleType 0
-test Program_ScheduleType 0
-delete test
-[Endtest]
-
-[Test]
-title ET00115 Program_ScheduleType Recording
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetScheduleType 1
-test Program_ScheduleType 1
-delete test
-[Endtest]
-
-[Test]
-title ET00116 Program_ScheduleType EPG Update
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetScheduleType 2
-test Program_ScheduleType 2
-delete test
-[Endtest]
-
-[Test]
-title ET00117 Program_ScheduleType Scheduled download
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetScheduleType 3
-test Program_ScheduleType 3
-delete test
-[Endtest]
-
-[Test]
-title ET00118 Program_ScheduleType Other
-create videoscheduler_apitest test
-test Program_NewL
-test Program_SetScheduleType 4
-test Program_ScheduleType 4
-delete test
-[Endtest]
-
-[Test]
-title ET00119 Program_DebugDump
-create videoscheduler_apitest test
-test Program_NewL
-test Program_DebugDump
-delete test
-[Endtest]
-
-[Test]
-title ET00120 API_NewL
-create videoscheduler_apitest test
-test API_NewL 0
-delete test
-[Endtest]
-
-[Test]
-title ET00121 API_AddSchedule
-create videoscheduler_apitest test
-test API_NewL
-test API_AddSchedule
-delete test
-[Endtest]
-
-[Test]
-title ET00122 API_RemoveSchedule
-create videoscheduler_apitest test
-test API_NewL
-test Program_SetToFuture 20 30
-test API_AddSchedule
-test API_RemoveSchedule
-delete test
-[Endtest]
-
-[Test]
-title ET00123 API_GetSchedule
-create videoscheduler_apitest test
-test API_NewL
-test Program_SetToFuture 20 30
-test API_AddSchedule
-test API_GetSchedule
-test RemoveAllSchedules
-delete test
-[Endtest]
-
-[Test]
-title ET00124 API_GetSchedulesByAppUid
-create videoscheduler_apitest test
-test API_NewL
-test Program_SetAppUid 666
-test Program_SetToFuture 20 30
-test API_AddSchedule
-pause 1000
-test API_GetSchedulesByAppUid 666 1
-test Program_AppUid 666
-test RemoveAllSchedules
-delete test
-[Endtest]
-
-[Test]
-title ET00125 API_GetOverlappingSchedules
-create videoscheduler_apitest test
-test API_NewL
-test Program_NewL
-test Program_SetToFuture 30 60
-test API_AddSchedule
-test Program_NewL
-test Program_SetToFuture 30 60
-test API_AddSchedule
-test Program_NewL
-test Program_SetToFuture 30 60
-test API_AddSchedule
-test API_GetOverlappingSchedules 3
-test RemoveAllSchedules
-pause 2000
-test API_GetOverlappingSchedules 0
-delete test
-[Endtest]
-
-[Test]
-title ET00126 API_GetSchedulesByPluginUid
-create videoscheduler_apitest test
-test API_NewL
-test Program_NewL
-test Program_SetToFuture 20 30
-test Program_SetPluginUid 666
-test API_AddSchedule
-test API_GetSchedulesByPluginUid 666 1
-test Program_PluginUid 666
-test RemoveAllSchedules
-delete test
-[Endtest]
-
-[Test]
-title ET00127 API_GetSchedulesByType
-create videoscheduler_apitest test
-test API_NewL
-test Program_NewL
-test Program_SetToFuture 20 30
-test Program_SetScheduleType 0
-test API_AddSchedule
-test API_GetSchedulesByType 0 1
-test Program_ScheduleType 0
-test RemoveAllSchedules
-delete test
-[Endtest]
-
-[Test]
-title ET00128 API_GetSchedulesByTime
-create videoscheduler_apitest test
-test API_NewL
-test Program_NewL
-test Program_SetToFuture 20 30
-test API_AddSchedule
-test API_GetSchedulesByTime 1 100 1
-test RemoveAllSchedules
-delete test
-[Endtest]
-
-[Test]
-title ET00129 Schedule reminder, wait for launch
-create videoscheduler_apitest test
-test API_NewL
-test Program_NewL
-test Program_SetScheduleType 0
-test Program_SetToFuture 10 20
-test API_AddSchedule
-test API_GetSchedule
-pause 25000
-allownextresult -20
-test API_GetSchedule
-delete test
-[Endtest]
\ No newline at end of file
--- a/videoutils_plat/videoscheduler_api/tsrc/custom/postrun_custom.xml	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-<step name="Fetch Test module Report" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\*"/>
-       </params>
-</step>
-<step name="Fetch Fusion logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="c:\logs\Fusion\*"/>
-       </params>
-</step>
-<step name="Fetch Livetv logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="c:\logs\Livetv\*"/>
-       </params>
-</step>
-<step name="Fetch IPTV logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="c:\logs\iptv\*"/>
-       </params>
-</step>
-<step name="Fetch verify files" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="c:\testing\data\verifynew\*"/>
-       </params>
-</step>
-<step name="Fetch TestScripter logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\TestScripter\*"/>
-       </params>
-</step>
-<step name="Fetch Testengine logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\Testengine\*"/>
-       </params>
-</step>
-<step name="Fetch Testserver logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\Testserver\*"/>
-       </params>
-</step>
--- a/videoutils_plat/videoscheduler_api/tsrc/custom/prerun_custom.xml	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<step name="Create log directory for testmodule" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework"/>
-    	</params>
-</step>
-<step name="Create log directory for fusion" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\Fusion"/>
-    	</params>
-</step>
-<step name="Create log directory for livetv" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\Livetv"/>
-    	</params>
-</step>
-<step name="Create log directory for iptv" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\iptv"/>
-    	</params>
-</step>
-<step name="Create directory for verify files" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\testing\data\verifyzip"/>
-    	</params>
-</step>
-<step name="Create directory for verify files" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\testing\data\verifynew"/>
-    	</params>
-</step>
-<step name="Create directory for TestScripter logs" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework\TestScripter"/>
-    	</params>
-</step>
-<step name="Create directory for Testengine logs" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework\Testengine"/>
-    	</params>
-</step>
-<step name="Create directory for Testserver logs" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework\Testserver"/>
-    	</params>
-</step>
--- a/videoutils_plat/videoscheduler_api/tsrc/group/bld.inf	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2004-2005 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: 
-*
-*/
-
-
-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
-../conf/videoscheduler_apitest.cfg /epoc32/data/z/system/data/videoscheduler_apitest.cfg
-../conf/videoscheduler_apitest.cfg /epoc32/winscw/c/testframework/videoscheduler_apitest.cfg
-
-PRJ_EXPORTS
-
-PRJ_TESTMMPFILES
-videoscheduler_apitest.mmp
-
-PRJ_MMPFILES
-
-//  End of File
--- a/videoutils_plat/videoscheduler_api/tsrc/group/videoscheduler_apitest.mmp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2004-2005 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 <platform_paths.hrh>
-
-TARGET          videoscheduler_apitest.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         videoscheduler_apitest.def
-
-USERINCLUDE     ../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH      ../src
-
-SOURCE          videoscheduler_apitest.cpp
-SOURCE          videoscheduler_apitestblocks.cpp
-
-//RESOURCE        resource_file
-//RESOURCE        resource_file2
-
-LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         stiftestengine.lib
-LIBRARY         CseSchedulerClient.lib  // Common Scheduling Engine client
-LIBRARY         estor.lib
-LIBRARY         flogger.lib
-
-LANG            SC
-
-// Other possible keywords:
-
-// DEFFILE ?filename
-// AIF ?filename
-
-// End of File
--- a/videoutils_plat/videoscheduler_api/tsrc/group/videoscheduler_apitest.pkg	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-;
-; 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 video scheduler API STIF tests;
-
-; Languages
-&EN
-
-; Provide value for uid
-#{"videoscheduler_apitest"},(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/videoscheduler_apitest.dll" - "!:/Sys/Bin/videoscheduler_apitest.dll"
-"../conf/videoscheduler_apitest.cfg"                    - "C:/TestFramework/videoscheduler_apitest.cfg"
-"../init/TestFramework.ini"                             - "C:/TestFramework/TestFramework.ini"
-
-; Embedded SIS 
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
--- a/videoutils_plat/videoscheduler_api/tsrc/inc/vcxtestlog.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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: 
-*
-*/
-
-
-#ifndef VCXTESTLOG_H
-#define VCXTESTLOG_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32svr.h>
-
-//#define FILE_LOGGING_IN_UREL_BUILD 1
-
-// MACROS
-#ifdef _DEBUG
-
-// SELECT LOG TYPE FROM HERE
-// 0 = RDebug
-// 1 = file logging
-// 2 = no logging
-#ifdef __WINSCW__
-    #define LOGTYPE 0
-#else
-    #define LOGTYPE 1
-#endif __WINSCW__
-
-#if LOGTYPE == 0
-      
-    #define VCXLOGLO1(s)               RDebug::Print(_L(#s))
-    #define VCXLOGLO2(s, a)            RDebug::Print(_L(#s), a)
-    #define VCXLOGLO3(s, a, b)         RDebug::Print(_L(#s), a, b)
-    #define VCXLOGLO4(s, a, b, c)      RDebug::Print(_L(#s), a, b, c)
-    #define VCXLOGLO5(s, a, b, c, d)   RDebug::Print(_L(#s), a, b, c, d)
-
-#endif
-
-#if LOGTYPE == 1
-    
-    #include <flogger.h>
-    
-_LIT(KIPTVLogFolder2,"Fusion");
-_LIT(KIPTVLogFile2,"Fusion.txt");
-    
-    #define VCXLOGLO1(AAA)                  do { _LIT(tempIPTVLogDes,AAA); RFileLogger::Write(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,tempIPTVLogDes()); } while ( EFalse )
-    #define VCXLOGLO2(AAA,BBB)              do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB); } while ( EFalse )
-    #define VCXLOGLO3(AAA,BBB,CCC)          do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB,CCC); } while ( EFalse )
-    #define VCXLOGLO4(AAA,BBB,CCC,DDD)      do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB,CCC,DDD); } while ( EFalse )
-    #define VCXLOGLO5(AAA,BBB,CCC,DDD,EEE)  do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB,CCC,DDD,EEE); } while ( EFalse )
-    
-#endif
-
-#if LOGTYPE == 2
-   
-    #define VCXLOGLO1(s)               
-    #define VCXLOGLO2(s, a)           
-    #define VCXLOGLO3(s, a, b)       
-    #define VCXLOGLO4(s, a, b, c)     
-    #define VCXLOGLO5(s, a, b, c, d)
-
-#endif
-
-#else // _DEBUG
-
-    #ifdef FILE_LOGGING_IN_UREL_BUILD
-    
-    #include <flogger.h>
-    
-    _LIT(KIPTVLogFolder2,"Fusion");
-    _LIT(KIPTVLogFile2,"Fusion.txt");
-    
-    #define VCXLOGLO1(AAA)                  do { _LIT(tempIPTVLogDes,AAA); RFileLogger::Write(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,tempIPTVLogDes()); } while ( EFalse )
-    #define VCXLOGLO2(AAA,BBB)              do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB); } while ( EFalse )
-    #define VCXLOGLO3(AAA,BBB,CCC)          do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB,CCC); } while ( EFalse )
-    #define VCXLOGLO4(AAA,BBB,CCC,DDD)      do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB,CCC,DDD); } while ( EFalse )
-    #define VCXLOGLO5(AAA,BBB,CCC,DDD,EEE)  do { _LIT(tempIPTVLogDes,AAA); RFileLogger::WriteFormat(KIPTVLogFolder2(),KIPTVLogFile2(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempIPTVLogDes()),BBB,CCC,DDD,EEE); } while ( EFalse )
-
-    #else // FILE_LOGGING_IN_UREL_BUILD
-
-    #define VCXLOGLO1(s)
-    #define VCXLOGLO2(s, a)
-    #define VCXLOGLO3(s, a, b)
-    #define VCXLOGLO4(s, a, b, c)
-    #define VCXLOGLO5(s, a, b, c, d)
-  
-    #endif // FILE_LOGGING_IN_UREL_BUILD
-
-#endif // _DEBUG
-
-
-#endif  // VCXTESTLOG_H
-
-// End of File
--- a/videoutils_plat/videoscheduler_api/tsrc/inc/videoscheduler_apitest.h	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,496 +0,0 @@
-/*
-* Copyright (c) 2002 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:   ?Description*
-*/
-
-
-
-
-#ifndef VIDEOSCHEDULER_APITEST_H
-#define VIDEOSCHEDULER_APITEST_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( KVideoScheduler_ApiTestLogPath, "\\logs\\testframework\\VideoScheduler_ApiTest\\" );
-// Log file
-_LIT( KVideoScheduler_ApiTestLogFile, "VideoScheduler_ApiTest.txt" );
-_LIT( KVideoScheduler_ApiTestLogFileWithTitle, "VideoScheduler_ApiTest_[%S].txt" );
-
-_LIT( KTestModuleName, "VideoScheduler_ApiTest" );
-_LIT( KLogLocation, "In %S" );
-
-// FUNCTION PROTOTYPES
-//?type ?function_name(?arg_list);
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-class CVideoScheduler_ApiTest;
-class CCseScheduledProgram;
-class CCseSchedulerApi;
-
-// DATA TYPES
-//enum ?declaration
-//typedef ?declaration
-//extern ?data_type;
-
-// CLASS DECLARATION
-
-/**
-*  CVideoScheduler_ApiTest test class for STIF Test Framework TestScripter.
-*  ?other_description_lines
-*
-*  @lib ?library
-*  @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CVideoScheduler_ApiTest) : public CScriptBase
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CVideoScheduler_ApiTest* NewL( CTestModuleIf& aTestModuleIf );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CVideoScheduler_ApiTest();
-
-    public: // New functions
-
-        /**
-        * ?member_description.
-        * @since ?Series60_version
-        * @param ?arg1 ?description
-        * @return ?description
-        */
-        //?type ?member_function( ?type ?arg1 );
-        
-        /**
-         * CompareProgramsL 
-         * @since ?Series60_version
-         * @param aProgram1
-         * @param aProgram2 
-         * @return Symbian OS error code.
-         */
-        TInt ComparePrograms( CCseScheduledProgram& aProgram1, CCseScheduledProgram& aProgram2 );
-
-        /**
-        * LogMethod
-        * @since ?Series60_version
-        * @param aMethod Name of the method where this function is called
-        * @return Nothing
-        */        
-        void LogMethod( TPtrC aMethod );
-
-    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.
-        */
-        CVideoScheduler_ApiTest( 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.
-        *
-        * Methods starting with API_ test CCseSchedulerAPI class.
-        *
-        * Methods starting with Program_ test CCseScheduledProgram class. Test class has member
-        * instance of this class and it's used when CCseSchedulerAPI methods need the program data.
-        *
-        * Default app uid for programs is 0x020202, all these will be removed 
-        * when API_NewL is called without parameter 0. 
-        */
-
-        /**
-        * API_NewL test method.
-        * Creates also CCseScheduledProgram if parameter is not 0.  
-        * 
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_NewL( CStifItemParser& aItem );
-        
-        /**
-        * API_AddSchedule test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_AddScheduleL( CStifItemParser& aItem );
-
-        /**
-        * API_RemoveSchedule test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_RemoveScheduleL( CStifItemParser& aItem );
-
-        /**
-        * API_RemoveSchedule test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt RemoveAllSchedulesL( CStifItemParser& aItem );
-        
-        /**
-        * API_GetSchedule test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_GetScheduleL( CStifItemParser& aItem );
-
-        /**
-        * API_GetSchedulesByAppUid test method.
-        * First schedule is copied to member variable.
-        * 
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_GetSchedulesByAppUidL( CStifItemParser& aItem );
-
-        /**
-        * API_GetOverlappingSchedules test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_GetOverlappingSchedulesL( CStifItemParser& aItem );
-
-        /**
-        * API_GetSchedulesByPluginUidL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_GetSchedulesByPluginUidL( CStifItemParser& aItem );
-        
-        /**
-        * API_GetSchedulesByTypeL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_GetSchedulesByTypeL( CStifItemParser& aItem );
-        
-        /**
-        * API_GetSchedulesByTimeL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt API_GetSchedulesByTimeL( CStifItemParser& aItem );
-        
-        /**
-        * Program_NewL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_NewL( CStifItemParser& aItem );
-
-        /**
-        * Program_NewLFromProgramL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_NewLFromProgramL( CStifItemParser& aItem );
-        
-        /**
-        * Program_ExternalizeL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_ExternalizeLL( CStifItemParser& aItem );
-
-        /**
-        * Program_InternalizeL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_InternalizeLL( CStifItemParser& aItem );
-
-        /**
-        * Program_ExternalizeLength test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_ExternalizeLengthL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetPluginType test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetPluginTypeL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetName test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetNameL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetStartTime test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetStartTimeL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetEndTime test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetEndTimeL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetAppUid test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetAppUidL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetPluginUid test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetPluginUidL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetApplicationDataL test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetApplicationDataLL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetDbIdentifier test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetDbIdentifierL( CStifItemParser& aItem );
-
-        /**
-        * Program_SetScheduleType test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetScheduleTypeL( CStifItemParser& aItem );
-
-        /**
-        * Program_PluginType test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_PluginTypeL( CStifItemParser& aItem );
-
-        /**
-        * Program_Name test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_NameL( CStifItemParser& aItem );
-
-        /**
-        * Program_StartTime test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_StartTimeL( CStifItemParser& aItem );
-
-        /**
-        * Program_EndTime test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_EndTimeL( CStifItemParser& aItem );
-
-        /**
-        * Program_EndTime test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_SetToFutureL( CStifItemParser& aItem );
-        
-        /**
-        * Program_AppUid test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_AppUidL( CStifItemParser& aItem );
-
-        /**
-        * Program_PluginUid test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_PluginUidL( CStifItemParser& aItem );
-
-        /**
-        * Program_ApplicationData test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_ApplicationDataL( CStifItemParser& aItem );
-
-        /**
-        * Program_DbIdentifier test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_DbIdentifierL( CStifItemParser& aItem );
-
-        /**
-        * Program_ScheduleType test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_ScheduleTypeL( CStifItemParser& aItem );
-
-        /**
-        * Program_DebugDump test method.
-        * @since ?Series60_version
-        * @param aItem Script line containing parameters.
-        * @return Symbian OS error code.
-        */
-        virtual TInt Program_DebugDumpL( 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;
-
-        CCseSchedulerApi* iApi;
-        CCseScheduledProgram* iProgram;
-        HBufC8* iExternalizeBuff;
-        RArray<TUint32> iAddedProgramIds;
-    };
-
-#endif      // VIDEOSCHEDULER_APITEST_H
-
-// End of File
--- a/videoutils_plat/videoscheduler_api/tsrc/init/TestFramework.ini	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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\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.
-#
-#	- 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/videoutils_plat/videoscheduler_api/tsrc/src/videoscheduler_apitest.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
-* Copyright (c) 2002 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:   ?Description*
-*/
-
-
-
-
-// INCLUDE FILES
-#include <Stiftestinterface.h>
-#include "videoscheduler_apitest.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 ===============================
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::CVideoScheduler_ApiTest
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CVideoScheduler_ApiTest::CVideoScheduler_ApiTest(
-    CTestModuleIf& aTestModuleIf ):
-        CScriptBase( aTestModuleIf )
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CVideoScheduler_ApiTest::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(KVideoScheduler_ApiTestLogFileWithTitle, &title);
-        }
-    else
-        {
-        logFileName.Copy(KVideoScheduler_ApiTestLogFile);
-        }
-
-    iLog = CStifLogger::NewL( KVideoScheduler_ApiTestLogPath,
-                          logFileName,
-                          CStifLogger::ETxt,
-                          CStifLogger::EFile,
-                          EFalse );
-
-    SendTestClassVersion();
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CVideoScheduler_ApiTest* CVideoScheduler_ApiTest::NewL(
-    CTestModuleIf& aTestModuleIf )
-    {
-    CVideoScheduler_ApiTest* self = new (ELeave) CVideoScheduler_ApiTest( aTestModuleIf );
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-
-    }
-
-// Destructor
-CVideoScheduler_ApiTest::~CVideoScheduler_ApiTest()
-    {
-
-    // Delete resources allocated from test methods
-    Delete();
-
-    // Delete logger
-    delete iLog;
-
-    }
-
-//-----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::SendTestClassVersion
-// Method used to send version of test class
-//-----------------------------------------------------------------------------
-//
-void CVideoScheduler_ApiTest::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("VideoScheduler_ApiTest.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* ) CVideoScheduler_ApiTest::NewL( aTestModuleIf );
-
-    }
-
-
-//  End of File
--- a/videoutils_plat/videoscheduler_api/tsrc/src/videoscheduler_apitestblocks.cpp	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1162 +0,0 @@
-/*
-* Copyright (c) 2002 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:   ?Description*
-*/
-
-
-
-
-// [INCLUDE FILES] - do not remove
-#include <e32svr.h>
-#include <StifParser.h>
-#include <Stiftestinterface.h>
-#include "videoscheduler_apitest.h"
-#include <S32MEM.H>
-
-#include <ipvideo/CCseSchedulerAPI.h>
-#include <ipvideo/CCseScheduledProgram.h>
-
-#include "vcxtestlog.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 ===============================
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void CVideoScheduler_ApiTest::Delete()
-    {
-    if( iApi )
-        {
-        for( TInt i=0; i<iAddedProgramIds.Count(); i++ )
-            {
-            iApi->RemoveSchedule( iAddedProgramIds[i] );
-            }
-        }
-    
-    delete iApi;
-    iApi = NULL;
-    
-    delete iProgram;
-    iProgram = NULL;
-    
-    delete iExternalizeBuff;
-    iExternalizeBuff = NULL;
-    
-    iAddedProgramIds.Close();
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::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( "API_NewL", CVideoScheduler_ApiTest::API_NewL ),
-        ENTRY( "API_AddSchedule", CVideoScheduler_ApiTest::API_AddScheduleL ),
-        ENTRY( "API_RemoveSchedule", CVideoScheduler_ApiTest::API_RemoveScheduleL ),
-        ENTRY( "RemoveAllSchedules", CVideoScheduler_ApiTest::RemoveAllSchedulesL ),
-        ENTRY( "API_GetSchedule", CVideoScheduler_ApiTest::API_GetScheduleL ),
-        ENTRY( "API_GetSchedulesByAppUid", CVideoScheduler_ApiTest::API_GetSchedulesByAppUidL ),
-        ENTRY( "API_GetOverlappingSchedules", CVideoScheduler_ApiTest::API_GetOverlappingSchedulesL ),
-        ENTRY( "API_GetSchedulesByPluginUid", CVideoScheduler_ApiTest::API_GetSchedulesByPluginUidL ),
-        ENTRY( "API_GetSchedulesByType", CVideoScheduler_ApiTest::API_GetSchedulesByTypeL ),
-        ENTRY( "API_GetSchedulesByTime", CVideoScheduler_ApiTest::API_GetSchedulesByTimeL ),
-
-        ENTRY( "Program_NewL", CVideoScheduler_ApiTest::Program_NewL ),
-        ENTRY( "Program_NewLFromProgram", CVideoScheduler_ApiTest::Program_NewLFromProgramL ),
-        ENTRY( "Program_Externalize", CVideoScheduler_ApiTest::Program_ExternalizeLL ),
-        ENTRY( "Program_Internalize", CVideoScheduler_ApiTest::Program_InternalizeLL ),
-        ENTRY( "Program_ExternalizeLength", CVideoScheduler_ApiTest::Program_ExternalizeLengthL ),
-        ENTRY( "Program_SetPluginType", CVideoScheduler_ApiTest::Program_SetPluginTypeL ),
-        ENTRY( "Program_SetName", CVideoScheduler_ApiTest::Program_SetNameL ),
-        ENTRY( "Program_SetStartTime", CVideoScheduler_ApiTest::Program_SetStartTimeL ),
-        ENTRY( "Program_SetEndTime", CVideoScheduler_ApiTest::Program_SetEndTimeL ),
-        ENTRY( "Program_SetAppUid", CVideoScheduler_ApiTest::Program_SetAppUidL ),
-        ENTRY( "Program_SetPluginUid", CVideoScheduler_ApiTest::Program_SetPluginUidL ),
-        ENTRY( "Program_SetApplicationData", CVideoScheduler_ApiTest::Program_SetApplicationDataLL ),
-        ENTRY( "Program_SetDbIdentifier", CVideoScheduler_ApiTest::Program_SetDbIdentifierL ),
-        ENTRY( "Program_SetScheduleType", CVideoScheduler_ApiTest::Program_SetScheduleTypeL ),
-        ENTRY( "Program_PluginType", CVideoScheduler_ApiTest::Program_PluginTypeL ),
-        ENTRY( "Program_Name", CVideoScheduler_ApiTest::Program_NameL ),
-        ENTRY( "Program_StartTime", CVideoScheduler_ApiTest::Program_StartTimeL ),
-        ENTRY( "Program_EndTime", CVideoScheduler_ApiTest::Program_EndTimeL ),
-        ENTRY( "Program_AppUid", CVideoScheduler_ApiTest::Program_AppUidL ),
-        ENTRY( "Program_PluginUid", CVideoScheduler_ApiTest::Program_PluginUidL ),
-        ENTRY( "Program_ApplicationData", CVideoScheduler_ApiTest::Program_ApplicationDataL ),
-        ENTRY( "Program_DbIdentifier", CVideoScheduler_ApiTest::Program_DbIdentifierL ),
-        ENTRY( "Program_ScheduleType", CVideoScheduler_ApiTest::Program_ScheduleTypeL ),
-        ENTRY( "Program_DebugDump", CVideoScheduler_ApiTest::Program_DebugDumpL ),
-
-        ENTRY( "Program_SetToFuture", CVideoScheduler_ApiTest::Program_SetToFutureL ),
-        // [test cases entries] - Do not remove
-
-        };
-
-    const TInt count = sizeof( KFunctions ) /
-                        sizeof( TStifFunctionInfo );
-
-    return RunInternalL( KFunctions, count, aItem );
-
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::LogMethod
-// Generate log from current method
-// -----------------------------------------------------------------------------
-//
-void CVideoScheduler_ApiTest::LogMethod( TPtrC aMethod )
-    {
-    // Print to UI
-    TBuf< 64 > buffer;
-    buffer.Format( KLogLocation, &aMethod );
-    TestModuleIf().Printf( 0, KTestModuleName, buffer );
-    // Print to log file
-    iLog->Log( buffer );
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_NewL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_NewL( CStifItemParser& aItem )
-    {
-    LogMethod(_L("API_NewL"));
-
-    TInt err( KErrNone );
-    
-    iApi = CCseSchedulerApi::NewL();
-    
-    TInt createProgram( 1 );
-    if( aItem.GetNextInt( createProgram ) != KErrNone )
-        {
-        createProgram = 1;
-        }
-    
-    if( createProgram == 1 )
-        {
-        iProgram = CCseScheduledProgram::NewL();
-
-        RPointerArray<CCseScheduledProgram> programs;    
-        err = iApi->GetSchedulesByAppUid( 0x020202, programs );
-        if( err == KErrNone )
-            {
-            for( TInt i=0; i < programs.Count(); i++ )
-                {
-                iApi->RemoveSchedule( programs[i]->DbIdentifier() );
-                }
-            }
-        programs.ResetAndDestroy();
-        }
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_AddScheduleL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_AddScheduleL( CStifItemParser& /*aItem*/ )
-    {
-    LogMethod(_L("API_AddSchedule"));
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_AddScheduleL ------>");
-    
-    TInt err( KErrNone );
-
-    err = iApi->AddSchedule( *iProgram );
-    VCXLOGLO2("CVideoScheduler_ApiTest::API_AddScheduleL: DBID after: %d", iProgram->DbIdentifier() );
-    iAddedProgramIds.Append( iProgram->DbIdentifier() );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_RemoveScheduleL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_RemoveScheduleL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_RemoveScheduleL ------>");
-    LogMethod(_L("API_RemoveScheduleL"));
-
-    TInt err( KErrNone );
-    
-    VCXLOGLO2("CVideoScheduler_ApiTest::API_RemoveScheduleL: DBID: %d", iProgram->DbIdentifier() );
-    
-    TUint32 id = iProgram->DbIdentifier();
-    err = iApi->RemoveSchedule( id );
-    
-    for( TInt i=0; i<iAddedProgramIds.Count(); i++ )
-        {
-        if( iAddedProgramIds[i] == id )
-            {
-            iAddedProgramIds.Remove( i );
-            break;
-            }
-        }    
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::RemoveAllSchedulesL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::RemoveAllSchedulesL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::RemoveAllSchedulesL ------>");
-    LogMethod(_L("RemoveAllSchedulesL"));
-
-    TInt err( KErrNone );
-    
-    while( iAddedProgramIds.Count() )
-        {
-        VCXLOGLO2("CVideoScheduler_ApiTest::RemoveAllSchedulesL -- remove ID %d", iAddedProgramIds[0]);
-        err = iApi->RemoveSchedule( iAddedProgramIds[0] );
-
-        iAddedProgramIds.Remove( 0 );
-        
-        if( err != KErrNone )
-            {
-            VCXLOGLO2("CVideoScheduler_ApiTest::RemoveAllSchedulesL -- Failed: %d", err);
-            }
-        }
-    
-    VCXLOGLO2("CVideoScheduler_ApiTest::RemoveAllSchedulesL <------ %d", err);
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_GetScheduleL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_GetScheduleL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_GetScheduleL ------>");
-    LogMethod(_L("API_GetScheduleL"));
-
-    TInt err( KErrNone );
-
-    CCseScheduledProgram* program = CCseScheduledProgram::NewL();
-    CleanupStack::PushL( program );
-    
-    err = iApi->GetSchedule( iProgram->DbIdentifier(), program );
-    
-    if( err == KErrNone )
-        {
-        if( !program )
-            {
-            VCXLOGLO1("CVideoScheduler_ApiTest::API_GetScheduleL: Error, program is NULL.");
-            err = KErrCorrupt;
-            }
-        else
-            {
-            err = ComparePrograms( *program, *iProgram );
-            }
-        }
-    
-    CleanupStack::PopAndDestroy( program );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_GetSchedulesByAppUidL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_GetSchedulesByAppUidL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_GetSchedulesByAppUidL ------>");
-    LogMethod(_L("API_GetSchedulesByAppUidL"));
-
-    TInt err( KErrNone );
-    
-    TInt appUid( 0 );
-    User::LeaveIfError( aItem.GetNextInt( appUid ) );
-    
-    TInt expectedCount(0);
-    User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
-
-    RPointerArray<CCseScheduledProgram> programs;    
-    
-    err = iApi->GetSchedulesByAppUid( appUid, programs );
-
-    if( err == KErrNone )
-        {
-        if( programs.Count() != expectedCount )
-            {
-            err = KErrCorrupt;
-            }
-        else 
-        if( programs.Count() > 0 )
-            {
-            delete iProgram;
-            iProgram = NULL;
-            
-            iProgram = programs[0];
-            programs.Remove( 0 );
-            }
-        }
-
-    programs.ResetAndDestroy();
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_GetOverlappingSchedulesL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_GetOverlappingSchedulesL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_GetOverlappingSchedulesL ------>");
-    LogMethod(_L("API_GetOverlappingSchedulesL"));
-
-    TInt err( KErrNone );
-
-    TInt expectedCount(0);
-    User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
-    
-    RPointerArray<CCseScheduledProgram> programs;
-    
-    err = iApi->GetOverlappingSchedules( *iProgram, programs );
-
-    if( err == KErrNone )
-        {
-        if( programs.Count() != expectedCount )
-            {
-            err = KErrCorrupt;
-            }
-        else 
-        if( programs.Count() > 0 )
-            {
-            delete iProgram;
-            iProgram = NULL;
-            
-            iProgram = programs[0];
-            programs.Remove( 0 );
-            }
-        }
-    
-    programs.ResetAndDestroy();
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_GetSchedulesByPluginUidL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_GetSchedulesByPluginUidL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_GetSchedulesByPluginUidL ------>");
-    LogMethod(_L("API_GetSchedulesByPluginUidL"));
-
-    TInt err( KErrNone );
-
-    TInt pluginUid( 0 );
-    User::LeaveIfError( aItem.GetNextInt( pluginUid ) ); 
-    
-    TInt expectedCount(0);
-    User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
-    
-    RPointerArray<CCseScheduledProgram> programs;
-    
-    err = iApi->GetSchedulesByPluginUid( pluginUid, programs );
-
-    if( err == KErrNone )
-        {
-        if( programs.Count() != expectedCount )
-            {
-            err = KErrCorrupt;
-            }
-        else 
-        if( programs.Count() > 0 )
-            {
-            delete iProgram;
-            iProgram = NULL;
-            
-            iProgram = programs[0];
-            programs.Remove( 0 );
-            }
-        }    
-    
-    programs.ResetAndDestroy();
-    
-    return err;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_GetSchedulesByTypeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_GetSchedulesByTypeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_GetSchedulesByTypeL ------>");
-    LogMethod(_L("API_GetSchedulesByTypeL"));
-
-    TInt err( KErrNone );
-
-    TInt type(0);
-    User::LeaveIfError( aItem.GetNextInt( type ) );
-
-    TInt expectedCount(0);
-    User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
-    
-    RPointerArray<CCseScheduledProgram> programs;
-    
-    err = iApi->GetSchedulesByType( type, programs );
-
-    if( err == KErrNone )
-        {
-        VCXLOGLO2("CVideoScheduler_ApiTest::API_GetSchedulesByTypeL count:    %d", programs.Count());
-        VCXLOGLO2("CVideoScheduler_ApiTest::API_GetSchedulesByTypeL expected: %d", expectedCount);
-        if( programs.Count() != expectedCount )
-            {
-            err = KErrCorrupt;
-            }
-        else 
-        if( programs.Count() > 0 )
-            {
-            delete iProgram;
-            iProgram = NULL;
-            
-            iProgram = programs[0];
-            programs.Remove( 0 );
-            }        
-        }
-    
-    programs.ResetAndDestroy();
-    
-    return err;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::API_GetSchedulesByTimeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::API_GetSchedulesByTimeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_GetSchedulesByTimeL ------>");
-    LogMethod(_L("API_GetSchedulesByTimeL"));
-
-    TInt err( KErrNone );
-    TInt intervalStart( 0 );
-    TInt intervalEnd( 0 );
-    
-    User::LeaveIfError( aItem.GetNextInt( intervalStart ) );
-    User::LeaveIfError( aItem.GetNextInt( intervalEnd ) );
-    
-    TTime startTime( 0 );
-    TTime endTime( 0 );
-    
-    startTime.UniversalTime();
-    endTime.UniversalTime();
-    
-    startTime += TTimeIntervalSeconds( intervalStart );
-    endTime += TTimeIntervalSeconds( intervalEnd );
-    
-    TInt expectedCount(0);
-    User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
-    
-    RPointerArray<CCseScheduledProgram> programs;
-    
-    err = iApi->GetSchedulesByTime( startTime, endTime, programs );
-
-    if( err == KErrNone )
-        {
-        if( programs.Count() != expectedCount )
-            {
-            err = KErrCorrupt;
-            }
-        else 
-        if( programs.Count() > 0 )
-            {
-            delete iProgram;
-            iProgram = NULL;
-            
-            iProgram = programs[0];
-            programs.Remove( 0 );
-            }  
-        }    
-    
-    programs.ResetAndDestroy();
-    
-    return err;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_NewL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_NewL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_NewL ------>");
-    LogMethod(_L("Program_NewL"));
-
-    TInt err( KErrNone );
-    
-    iProgram = CCseScheduledProgram::NewL();
-    iProgram->SetAppUid( 0x020202 );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_NewLFromProgramL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_NewLFromProgramL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_NewLFromProgramL ------>");
-    LogMethod(_L("Program_NewLFromProgramL"));
-
-    TInt err( KErrNone );
-    
-    CCseScheduledProgram* program = iProgram;
-    iProgram = NULL;
-    
-    CleanupStack::PushL( program );
-    iProgram = CCseScheduledProgram::NewL( *program );    
-    CleanupStack::PopAndDestroy( program );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_ExternalizeLL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_ExternalizeLL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_ExternalizeLL ------>");
-    LogMethod(_L("Program_ExternalizeLL"));
-
-    TInt err( KErrNone );
-    
-    TUint32 dataSize = iProgram->ExternalizeLength();
-    
-    delete iExternalizeBuff;
-    iExternalizeBuff = NULL;
-    iExternalizeBuff = HBufC8::NewL( dataSize );
-    TPtr8 buffPtr( iExternalizeBuff->Des() );
-    
-    RDesWriteStream stream;
-    stream.Open( buffPtr );
-    iProgram->ExternalizeL( stream );
-    stream.CommitL();
-    stream.Close();
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_InternalizeLL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_InternalizeLL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_InternalizeLL ------>");
-    LogMethod(_L("Program_InternalizeLL"));
-
-    TInt err( KErrNone );
-    
-    CCseScheduledProgram* program = CCseScheduledProgram::NewL();
-    CleanupStack::PushL( program );
-    
-    RDesReadStream stream;
-    TPtr8 buffPtr( iExternalizeBuff->Des() );
-    stream.Open( buffPtr );
-    program->InternalizeL( stream );
-    stream.Close();
-    
-    err = ComparePrograms( *program, *iProgram );
-    
-    CleanupStack::PopAndDestroy( program );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_ExternalizeLengthL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_ExternalizeLengthL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_ExternalizeLengthL ------>");
-    LogMethod(_L("Program_ExternalizeLengthL"));
-
-    TInt err( KErrNone );
-    
-    iProgram->ExternalizeLength();
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetPluginTypeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetPluginTypeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetPluginTypeL ------>");
-    LogMethod(_L("Program_SetPluginTypeL"));
-
-    TInt err( KErrNone );
-    
-    TInt pluginType;
-    User::LeaveIfError( aItem.GetNextInt( pluginType ) );
-    
-    iProgram->SetPluginType( pluginType );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetNameL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetNameL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetNameL ------>");
-    LogMethod(_L("Program_SetNameL"));
-
-    TInt err( KErrNone );
-    
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC name;
-    User::LeaveIfError( aItem.GetNextString( name ) );
-    
-    TBuf8<1024> name8;
-    name8.Copy( name );
-    
-    iProgram->SetName( name8 );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetStartTimeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetStartTimeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetStartTimeL ------>");
-    LogMethod(_L("Program_SetStartTimeL"));
-
-    TInt err( KErrNone );
-    
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC dayString;
-    User::LeaveIfError( aItem.GetNextString( dayString ) );
-
-    TTime time( dayString );
-    
-    iProgram->SetStartTime( time );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetEndTimeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetEndTimeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetEndTimeL ------>");
-    LogMethod(_L("Program_SetEndTimeL"));
-
-    TInt err( KErrNone );
-    
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC dayString;
-    User::LeaveIfError( aItem.GetNextString( dayString ) );
-
-    TTime time( dayString );
-    
-    iProgram->SetEndTime( time );    
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetAppUidL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetAppUidL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetAppUidL ------>");
-    LogMethod(_L("Program_SetAppUidL"));
-
-    TInt err( KErrNone );
-    
-    TInt uid( 0 );
-    User::LeaveIfError( aItem.GetNextInt( uid ) );
-    
-    iProgram->SetAppUid( uid );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetPluginUidL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetPluginUidL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetPluginUidL ------>");
-    LogMethod(_L("Program_SetPluginUidL"));
-
-    TInt err( KErrNone );
-    
-    TInt uid( 0 );
-    User::LeaveIfError( aItem.GetNextInt( uid ) );
-    
-    iProgram->SetPluginUid( uid );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetApplicationDataLL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetApplicationDataLL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetApplicationDataLL ------>");
-    LogMethod(_L("Program_SetApplicationDataLL"));
-
-    TInt err( KErrNone );
-    
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC data;
-    User::LeaveIfError( aItem.GetNextString( data ) );
-    
-    TBuf8<1024> data8;
-    data8.Copy( data );
-    
-    iProgram->SetApplicationDataL( data8 );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetDbIdentifierL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetDbIdentifierL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetDbIdentifierL ------>");
-    LogMethod(_L("Program_SetDbIdentifierL"));
-
-    TInt err( KErrNone );
-    
-    TInt id;
-    User::LeaveIfError( aItem.GetNextInt( id ) );
-    
-    iProgram->SetDbIdentifier( id );
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetScheduleTypeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetScheduleTypeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetScheduleTypeL ------>");
-    LogMethod(_L("Program_SetScheduleTypeL"));
-
-    TInt err( KErrNone );
-
-    TInt type;
-    User::LeaveIfError( aItem.GetNextInt( type ) );
-    
-    iProgram->SetScheduleType( type );
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_PluginTypeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_PluginTypeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_PluginTypeL ------>");
-    LogMethod(_L("Program_PluginTypeL"));
-
-    TInt err( KErrNone );
-    
-    TInt pluginType;
-    TInt expectedPluginType;
-    User::LeaveIfError( aItem.GetNextInt( expectedPluginType ) );
-    
-    pluginType = iProgram->PluginType();
-    
-    if( pluginType != expectedPluginType )
-        {
-        err = KErrCorrupt;
-        }
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_NameL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_NameL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_NameL ------>");
-    LogMethod(_L("Program_NameL"));
-
-    TInt err( KErrNone );
-    
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-
-    TPtrC expectedName;
-    User::LeaveIfError( aItem.GetNextString( expectedName ) );
-    
-    const TPtrC8 name8 = iProgram->Name(); 
-    
-    TBuf<1024> name;
-    name.Copy( name8 );
-    
-    if( name != expectedName )
-        {
-        err = KErrCorrupt;
-        }
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_StartTimeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_StartTimeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_StartTimeL ------>");
-    LogMethod(_L("Program_StartTimeL"));
-
-    TInt err( KErrNone );
-
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC dayString;
-    User::LeaveIfError( aItem.GetNextString( dayString ) );
-
-    TTime expectedTime( dayString );
-    
-    TTime time = iProgram->StartTime();
-    
-    if( time != expectedTime )
-        {
-        err = KErrCorrupt;
-        }
-        
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_EndTimeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_EndTimeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_EndTimeL ------>");
-    LogMethod(_L("Program_EndTimeL"));
-
-    TInt err( KErrNone );
-    
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC dayString;
-    User::LeaveIfError( aItem.GetNextString( dayString ) );
-
-    TTime expectedTime( dayString );
-    
-    TTime time = iProgram->EndTime();
-    
-    if( time != expectedTime )
-        {
-        err = KErrCorrupt;
-        }
-    
-    return err;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_SetToFutureL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_SetToFutureL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_SetToFutureL ------>");
-    LogMethod(_L("Program_SetToFutureL"));
-
-    TInt err( KErrNone );
-    TInt intervalStart( 0 );
-    TInt intervalEnd( 0 );
-    
-    User::LeaveIfError( aItem.GetNextInt( intervalStart ) );
-    User::LeaveIfError( aItem.GetNextInt( intervalEnd ) );
-    
-    TTime startTime( 0 );
-    TTime endTime( 0 );
-    
-    startTime.UniversalTime();
-    endTime.UniversalTime();
-    
-    startTime += TTimeIntervalSeconds( intervalStart );
-    endTime += TTimeIntervalSeconds( intervalEnd );
-    
-    iProgram->SetStartTime( startTime );
-    iProgram->SetEndTime( endTime );
-    
-    VCXLOGLO3("CVideoScheduler_ApiTest::Program_SetToFutureL -- start %d end %d", startTime, endTime);
-
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_AppUidL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_AppUidL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_AppUidL ------>");
-    LogMethod(_L("Program_AppUidL"));
-
-    TInt err( KErrNone );
-
-    TInt expectedUid;
-    User::LeaveIfError( aItem.GetNextInt( expectedUid ) );    
-    
-    TInt32 uid = iProgram->AppUid();
-    
-    if( uid != expectedUid )
-        {
-        err = KErrCorrupt;
-        }
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_PluginUidL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_PluginUidL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_PluginUidL ------>");
-    LogMethod(_L("Program_PluginUidL"));
-
-    TInt err( KErrNone );
-
-    TInt expectedUid;
-    User::LeaveIfError( aItem.GetNextInt( expectedUid ) );    
-    
-    TInt32 uid = iProgram->PluginUid();
-    
-    if( uid != expectedUid )
-        {
-        err = KErrCorrupt;
-        }
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_ApplicationDataL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_ApplicationDataL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_ApplicationDataL ------>");
-    LogMethod(_L("Program_ApplicationDataL"));
-
-    TInt err( KErrNone );
-
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    
-    TPtrC expectedData;
-    User::LeaveIfError( aItem.GetNextString( expectedData ) );
-    
-    const TPtrC8 data8 = iProgram->ApplicationData();
-    
-    TBuf<1024> data;
-    data.Copy( data8 );
-    
-    if( data != expectedData )
-        {
-        err = KErrCorrupt;
-        }
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_DbIdentifierL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_DbIdentifierL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_DbIdentifierL ------>");
-    LogMethod(_L("Program_DbIdentifierL"));
-
-    TInt err( KErrNone );
-    
-    TInt expectedId;
-    User::LeaveIfError( aItem.GetNextInt( expectedId ) );    
-   
-    TUint32 id = iProgram->DbIdentifier();
-   
-    if( id != expectedId )
-        {
-        err = KErrCorrupt;
-        }
-   
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_ScheduleTypeL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_ScheduleTypeL( CStifItemParser& aItem )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::API_AddScheduleL ------>");
-    LogMethod(_L("Program_ScheduleTypeL"));
-
-    TInt err( KErrNone );
-
-    TInt expectedType;
-    User::LeaveIfError( aItem.GetNextInt( expectedType ) );    
-   
-    TInt32 type = iProgram->ScheduleType();
-   
-    if( type != expectedType )
-        {
-        err = KErrCorrupt;
-        }
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::Program_DebugDumpL
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::Program_DebugDumpL( CStifItemParser& /*aItem*/ )
-    {
-    VCXLOGLO1("CVideoScheduler_ApiTest::Program_DebugDumpL ------>");
-    LogMethod(_L("Program_DebugDumpL"));
-
-    TInt err( KErrNone );
-
-    iProgram->DebugDump();
-    
-    return err;
-    }
-
-// -----------------------------------------------------------------------------
-// CVideoScheduler_ApiTest::ComparePrograms
-// -----------------------------------------------------------------------------
-//
-TInt CVideoScheduler_ApiTest::ComparePrograms( CCseScheduledProgram& aProgram1, CCseScheduledProgram& aProgram2 )
-    {
-    TInt err( KErrNone );
-    
-    if( aProgram1.DbIdentifier() != aProgram2.DbIdentifier() )
-        {
-        VCXLOGLO3("CVideoScheduler_ApiTest::ComparePrograms: Error, db identifiers differ: %d vs. %d.", aProgram1.DbIdentifier(), aProgram2.DbIdentifier() );
-        err = KErrCorrupt;
-        }
-
-    return err;
-    }
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-// None
-
-//  [End of File] - Do not remove
--- a/videoutils_plat/videoscheduler_api/videoscheduler_api.metaxml	Wed Aug 18 10:48:22 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" ?>
-<api id="2bbecbc42e04c522a1ed2abb6a71e504" dataversion="1.0">
-<name>Video Scheduler API</name>
-<description>Video Scheduler API provides an interface for creating scheduled events (for example, timed TV recording).</description>
-<type>C++</type>
-<subsystem>videoserviceutils</subsystem>
-<libs><lib name="CseSchedulerClient.lib"/>
-</libs>
-<release category="domain" sinceversion="5.1"/>
-<attributes>
-<htmldocprovided>no</htmldocprovided>
-<adaptation>no</adaptation>
-</attributes>
-</api>