sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // The implementation of the transition classes for the CRegistryData tests. sl@0: // sl@0: // sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataNewLTransition,"CRegistryData_NewL_Transition"); sl@0: sl@0: inline CRegistryData_NewL_Transition::CRegistryData_NewL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KRegistryDataNewLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_NewL_Transition::TransitMethodL() sl@0: { sl@0: Context().iRegistryData = CRegistryData::NewL(Context().iFs); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_NewL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataDtorTransition,"CRegistryData_Dtor_Transition"); sl@0: sl@0: inline CRegistryData_Dtor_Transition::CRegistryData_Dtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KRegistryDataDtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_Dtor_Transition::TransitMethodL() sl@0: { sl@0: delete Context().iRegistryData; sl@0: Context().iRegistryData = NULL; sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_Dtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataAddDllDataLTransition,"CRegistryData_AddDllDataL_Transition"); sl@0: sl@0: inline CRegistryData_AddDllDataL_Transition::CRegistryData_AddDllDataL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataAddDllDataLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_AddDllDataL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataAddDllDataLTransitMethod, "CRegistryData::AddDllDataL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataAddDllDataLTransitMethod); sl@0: Context().iRegistryData->AddDllDataL(Context().iDriveUnit, sl@0: Context().iFoundDriveIndex, sl@0: Context().iDllData); sl@0: sl@0: Context().iDllData = NULL; sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_AddDllDataL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataGetImplementationInformationLTransition,"CRegistryData_GetImplementationInformationL_Transition"); sl@0: sl@0: inline CRegistryData_GetImplementationInformationL_Transition::CRegistryData_GetImplementationInformationL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataGetImplementationInformationLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_GetImplementationInformationL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataGetImplementationInformationLTransitMethod, "CRegistryData::GetImplementationInformationL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataGetImplementationInformationLTransitMethod); sl@0: Context().iImplementationRef = &(Context().iRegistryData->GetImplementationDataL(Context().iImplementationUid)); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_GetImplementationInformationL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataIsRegisteredWithDateLTransition,"CRegistryData_IsRegisteredWithDateL_Transition"); sl@0: sl@0: inline CRegistryData_IsRegisteredWithDateL_Transition::CRegistryData_IsRegisteredWithDateL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataIsRegisteredWithDateLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_IsRegisteredWithDateL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataIsRegisteredWithDateLTransitMethod, "CRegistryData::IsRegisteredWithDateL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataIsRegisteredWithDateLTransitMethod); sl@0: Context().iRegistryData->IsRegisteredWithDateL(Context().iDriveUnit, sl@0: Context().iDllEntry[2], sl@0: Context().iDllEntry.iModified, sl@0: Context().iUpdate, sl@0: Context().iFoundDriveIndex); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_IsRegisteredWithDateL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataListImplementationsLTransition,"CRegistryData_ListImplementationsL_Transition"); sl@0: sl@0: inline CRegistryData_ListImplementationsL_Transition::CRegistryData_ListImplementationsL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataListImplementationsLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_ListImplementationsL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataListImplementationsLTransitMethod, "CRegistryData::ListImplementationsL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataListImplementationsLTransitMethod); sl@0: Context().iUidList = &Context().iRegistryData->ListImplementationsL(Context().iInterfaceUid); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_ListImplementationsL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataSetEnabledStateTransition,"CRegistryData_SetEnabledState_Transition"); sl@0: sl@0: inline CRegistryData_SetEnabledState_Transition::CRegistryData_SetEnabledState_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataSetEnabledStateTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_SetEnabledState_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataSetEnabledStateTransitMethod, "CRegistryData::SetEnabledState transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataSetEnabledStateTransitMethod); sl@0: Context().iMethodCompletionStatus = Context().iRegistryData->SetEnabledState(Context().iImplementationUid, Context().iEnabledState); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_SetEnabledState_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataPersistNowLTransition,"CRegistryData_PersistNowL_Transition"); sl@0: sl@0: inline CRegistryData_PersistNowL_Transition::CRegistryData_PersistNowL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataPersistNowLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_PersistNowL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataPersistNowLTransitMethod, "CRegistryData::PersistNowL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataPersistNowLTransitMethod); sl@0: Context().iRegistryData->PersistNowL(); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_PersistNowL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataTemporaryUninstallLTransition,"CRegistryData_TemporaryUninstallL_Transition"); sl@0: sl@0: inline CRegistryData_TemporaryUninstallL_Transition::CRegistryData_TemporaryUninstallL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataTemporaryUninstallLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_TemporaryUninstallL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataTemporaryUninstallLTransitMethod, "CRegistryData::TemporaryUninstallL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataTemporaryUninstallLTransitMethod); sl@0: Context().iRegistryData->TemporaryUninstallL(Context().iDriveUnit); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_TemporaryUninstallL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataUndoTemporaryUninstallLTransition,"CRegistryData_UndoTemporaryUninstallL_Transition"); sl@0: sl@0: inline CRegistryData_UndoTemporaryUninstallL_Transition::CRegistryData_UndoTemporaryUninstallL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataUndoTemporaryUninstallLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_UndoTemporaryUninstallL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataUndoTemporaryUninstallLTransitMethod, "CRegistryData::UndoTemporaryUninstallL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataUndoTemporaryUninstallLTransitMethod); sl@0: Context().iRegistryData->UndoTemporaryUninstallL(Context().iDriveUnit); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_UndoTemporaryUninstallL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataUpdateDllDataLTransition,"CRegistryData_UpdateDllDataL_Transition"); sl@0: sl@0: inline CRegistryData_UpdateDllDataL_Transition::CRegistryData_UpdateDllDataL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataUpdateDllDataLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_UpdateDllDataL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataUpdateDllDataLTransitMethod, "CRegistryData::UpdateDllDataL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataUpdateDllDataLTransitMethod); sl@0: Context().iRegistryData->UpdateDllDataL(Context().iFoundDriveIndex, Context().iNewDllData); sl@0: sl@0: Context().iNewDllData = NULL; sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_UpdateDllDataL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataBuildIndexesLTransition,"CRegistryData_BuildIndexesL_Transition"); sl@0: sl@0: inline CRegistryData_BuildIndexesL_Transition::CRegistryData_BuildIndexesL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataBuildIndexesLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_BuildIndexesL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataBuildIndexesLTransitMethod, "CRegistryData::BuildIndexesL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataBuildIndexesLTransitMethod); sl@0: TRegistryData_StateAccessor& accessor = sl@0: REINTERPRET_CAST(TRegistryData_StateAccessor&, Context().StateAccessor()); sl@0: accessor.BuildIndexesL(*Context().iRegistryData); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_BuildIndexesL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataIndexedFindTransition,"CRegistryData_IndexedFind_Transition"); sl@0: sl@0: inline CRegistryData_IndexedFind_Transition::CRegistryData_IndexedFind_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataIndexedFindTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_IndexedFind_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataIndexedFindTransitMethod, "CRegistryData::IndexedFind transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataIndexedFindTransitMethod); sl@0: TRegistryData_StateAccessor& accessor = sl@0: REINTERPRET_CAST(TRegistryData_StateAccessor&, Context().StateAccessor()); sl@0: accessor.IndexedFind(*Context().iRegistryData, Context().iImplementationUid); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_IndexedFind_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataRestoreLTransition,"CRegistryData_RestoreL_Transition"); sl@0: sl@0: inline CRegistryData_RestoreL_Transition::CRegistryData_RestoreL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataRestoreLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_RestoreL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataRestoreLTransitMethod, "CRegistryData::RestoreL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataRestoreLTransitMethod); sl@0: TRegistryData_StateAccessor& accessor = sl@0: REINTERPRET_CAST(TRegistryData_StateAccessor&, Context().StateAccessor()); sl@0: accessor.RestoreL(*Context().iRegistryData, Context().iReadStream); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_RestoreL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataStoreLTransition,"CRegistryData_StoreL_Transition"); sl@0: sl@0: inline CRegistryData_StoreL_Transition::CRegistryData_StoreL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataStoreLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_StoreL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataStoreLTransitMethod, "CRegistryData::StoreL transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataStoreLTransitMethod); sl@0: TRegistryData_StateAccessor& accessor = sl@0: REINTERPRET_CAST(TRegistryData_StateAccessor&, Context().StateAccessor()); sl@0: accessor.StoreL(*Context().iRegistryData, Context().iWriteStream); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_StoreL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataMatchOnUidTransition,"CRegistryData_MatchOnUid_Transition"); sl@0: sl@0: inline CRegistryData_MatchOnUid_Transition::CRegistryData_MatchOnUid_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRegistryDataMatchOnUidTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_MatchOnUid_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataMatchOnUidTransitMethod, "CRegistryData::MatchOnUid transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataMatchOnUidTransitMethod); sl@0: TRegistryData_StateAccessor& accessor = sl@0: REINTERPRET_CAST(TRegistryData_StateAccessor&, Context().StateAccessor()); sl@0: accessor.MatchOnUid(); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_MatchOnUid_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRegistryDataDiscoveriesBeginningTransition,"CRegistryData_DiscoveriesBeginning_Transition"); sl@0: sl@0: inline CRegistryData_DiscoveriesBeginning_Transition::CRegistryData_DiscoveriesBeginning_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KRegistryDataDiscoveriesBeginningTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CRegistryData_DiscoveriesBeginning_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRegistryDataDiscoveriesBeginningTransitMethod, "CRegistryData::DiscoveriesBeginning transition"); sl@0: Context().DataLogger().LogInformation(KRegistryDataDiscoveriesBeginningTransitMethod); sl@0: sl@0: Context().iRegistryData->DiscoveriesBeginning(); sl@0: } sl@0: sl@0: inline CRegistryData_UnitTestContext& CRegistryData_DiscoveriesBeginning_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CRegistryData_UnitTestContext&,iUTContext); sl@0: } sl@0: