os/ossrv/lowlevellibsandfws/pluginfw/Framework/LoadManagerTest/LoadManagerTransitions.inl
Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // The definition of the transition classes on the CLoadManager class
18 // ______________________________________________________________________________
20 inline CLoadManager_UnitTestContext::CLoadManager_UnitTestContext(CDataLogger& aDataLogger,
21 MStateAccessor& aStateAccessor,
22 MTransitionObserver& aObserver)
23 : CUnitTestContext(aDataLogger, aStateAccessor, aObserver)
28 inline CLoadManager_UnitTestContext::~CLoadManager_UnitTestContext()
34 // ______________________________________________________________________________
36 _LIT(KLoadManagerNewLTransition,"CLoadManager_NewL_Transition");
38 inline CLoadManager_NewL_Transition::CLoadManager_NewL_Transition(CUnitTestContext& aUTContext,
39 TTransitionValidator& aValidator)
40 : CTransitionType(KLoadManagerNewLTransition, aUTContext, aValidator)
45 inline void CLoadManager_NewL_Transition::TransitMethodL()
47 Context().iLoadManager = CLoadManager::NewL();
50 inline CLoadManager_UnitTestContext& CLoadManager_NewL_Transition::Context() const
52 return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
55 // ______________________________________________________________________________
57 _LIT(KLoadManagerDtorTransition,"CLoadManager_Dtor_Transition");
59 inline CLoadManager_Dtor_Transition::CLoadManager_Dtor_Transition(CUnitTestContext& aUTContext,
60 TTransitionValidator& aValidator)
61 : CTransition(KLoadManagerDtorTransition, aUTContext, aValidator)
66 inline void CLoadManager_Dtor_Transition::TransitMethodL()
68 delete Context().iLoadManager;
69 Context().iLoadManager = NULL;
72 inline CLoadManager_UnitTestContext& CLoadManager_Dtor_Transition::Context() const
74 return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
77 // ______________________________________________________________________________
79 _LIT(KLoadManagerInstantiationMethodLTransition,"CLoadManager_InstantiationMethodL_Transition");
81 inline CLoadManager_InstantiationMethodL_Transition::CLoadManager_InstantiationMethodL_Transition(CUnitTestContext& aUTContext,
82 TTransitionValidator& aValidator)
83 : CTransition(KLoadManagerInstantiationMethodLTransition, aUTContext, aValidator)
88 inline void CLoadManager_InstantiationMethodL_Transition::TransitMethodL()
90 _LIT(KLoadManagerInstantiationMethodLTransitMethod, "CLoadManager::InstantiationMethodL transition");
91 Context().DataLogger().LogInformation(KLoadManagerInstantiationMethodLTransitMethod);
92 Context().iLoadMethod = Context().iLoadManager->InstantiationMethodL(Context().iUniqueImplementationUid,
96 inline CLoadManager_UnitTestContext& CLoadManager_InstantiationMethodL_Transition::Context() const
98 return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
101 // ______________________________________________________________________________
103 _LIT(KLoadManagerDestroyedThisTransition,"CLoadManager_DestroyedThis_Transition");
105 inline CLoadManager_DestroyedThis_Transition::CLoadManager_DestroyedThis_Transition(CUnitTestContext& aUTContext,
106 TTransitionValidator& aValidator)
107 : CTransition(KLoadManagerDestroyedThisTransition, aUTContext, aValidator)
112 inline void CLoadManager_DestroyedThis_Transition::TransitMethodL()
114 _LIT(KLoadManagerDestroyedThisTransitMethod, "CLoadManager::DestroyedThis transition");
115 Context().DataLogger().LogInformation(KLoadManagerDestroyedThisTransitMethod);
116 Context().iLoadManager->DestroyedThis(Context().iUniqueImplementationUid);
119 inline CLoadManager_UnitTestContext& CLoadManager_DestroyedThis_Transition::Context() const
121 return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
124 // ______________________________________________________________________________
126 _LIT(KLoadManagerDestroyCreateTransition,"CLoadManager_DestroyCreate_Transition");
128 inline CLoadManager_DestroyCreate_Transition::CLoadManager_DestroyCreate_Transition(CUnitTestContext& aUTContext,
129 TTransitionValidator& aValidator)
130 : CTransition(KLoadManagerDestroyCreateTransition, aUTContext, aValidator)
135 inline void CLoadManager_DestroyCreate_Transition::TransitMethodL()
137 _LIT(KLoadManagerDestroyCreateTransitMethod, "CLoadManager_DestroyCreate_Transition");
138 Context().DataLogger().LogInformation(KLoadManagerDestroyCreateTransitMethod);
139 Context().iLoadManager->DestroyedThis(Context().iUniqueImplementationUid);
140 Context().iLoadMethod = Context().iLoadManager->InstantiationMethodL(Context().iUniqueImplementationUid,
141 Context().iDllEntry);
145 inline CLoadManager_UnitTestContext& CLoadManager_DestroyCreate_Transition::Context() const
147 return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);