os/ossrv/lowlevellibsandfws/pluginfw/Framework/LoadManagerTest/LoadManagerTransitions.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// The definition of the transition classes on the CLoadManager class
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
// ______________________________________________________________________________
sl@0
    19
//
sl@0
    20
inline CLoadManager_UnitTestContext::CLoadManager_UnitTestContext(CDataLogger& aDataLogger,
sl@0
    21
												MStateAccessor& aStateAccessor,
sl@0
    22
												MTransitionObserver& aObserver)
sl@0
    23
: CUnitTestContext(aDataLogger, aStateAccessor, aObserver)
sl@0
    24
	{
sl@0
    25
	//Do nothing
sl@0
    26
	}
sl@0
    27
sl@0
    28
inline CLoadManager_UnitTestContext::~CLoadManager_UnitTestContext()
sl@0
    29
	{
sl@0
    30
	delete iLoadManager;
sl@0
    31
	delete iRegistryData;
sl@0
    32
	}
sl@0
    33
sl@0
    34
// ______________________________________________________________________________
sl@0
    35
//
sl@0
    36
_LIT(KLoadManagerNewLTransition,"CLoadManager_NewL_Transition");
sl@0
    37
sl@0
    38
inline CLoadManager_NewL_Transition::CLoadManager_NewL_Transition(CUnitTestContext& aUTContext,
sl@0
    39
													TTransitionValidator& aValidator)
sl@0
    40
: CTransitionType(KLoadManagerNewLTransition, aUTContext, aValidator)
sl@0
    41
	{
sl@0
    42
	// Do nothing here.
sl@0
    43
	}
sl@0
    44
sl@0
    45
inline void CLoadManager_NewL_Transition::TransitMethodL()
sl@0
    46
	{
sl@0
    47
	Context().iLoadManager = CLoadManager::NewL();
sl@0
    48
	}
sl@0
    49
sl@0
    50
inline CLoadManager_UnitTestContext& CLoadManager_NewL_Transition::Context() const
sl@0
    51
	{
sl@0
    52
	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
sl@0
    53
	}
sl@0
    54
sl@0
    55
// ______________________________________________________________________________
sl@0
    56
//
sl@0
    57
_LIT(KLoadManagerDtorTransition,"CLoadManager_Dtor_Transition");
sl@0
    58
sl@0
    59
inline CLoadManager_Dtor_Transition::CLoadManager_Dtor_Transition(CUnitTestContext& aUTContext,
sl@0
    60
													TTransitionValidator& aValidator)
sl@0
    61
: CTransition(KLoadManagerDtorTransition, aUTContext, aValidator)
sl@0
    62
	{
sl@0
    63
	// Do nothing here.
sl@0
    64
	}
sl@0
    65
sl@0
    66
inline void CLoadManager_Dtor_Transition::TransitMethodL()
sl@0
    67
	{
sl@0
    68
	delete Context().iLoadManager;
sl@0
    69
	Context().iLoadManager = NULL;
sl@0
    70
	}
sl@0
    71
sl@0
    72
inline CLoadManager_UnitTestContext& CLoadManager_Dtor_Transition::Context() const
sl@0
    73
	{
sl@0
    74
	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
sl@0
    75
	}
sl@0
    76
sl@0
    77
// ______________________________________________________________________________
sl@0
    78
//
sl@0
    79
_LIT(KLoadManagerInstantiationMethodLTransition,"CLoadManager_InstantiationMethodL_Transition");
sl@0
    80
sl@0
    81
inline CLoadManager_InstantiationMethodL_Transition::CLoadManager_InstantiationMethodL_Transition(CUnitTestContext& aUTContext,
sl@0
    82
													TTransitionValidator& aValidator)
sl@0
    83
: CTransition(KLoadManagerInstantiationMethodLTransition, aUTContext, aValidator)
sl@0
    84
	{
sl@0
    85
	// Do nothing here.
sl@0
    86
	}
sl@0
    87
sl@0
    88
inline void CLoadManager_InstantiationMethodL_Transition::TransitMethodL()
sl@0
    89
	{
sl@0
    90
	_LIT(KLoadManagerInstantiationMethodLTransitMethod, "CLoadManager::InstantiationMethodL transition");
sl@0
    91
	Context().DataLogger().LogInformation(KLoadManagerInstantiationMethodLTransitMethod);
sl@0
    92
	Context().iLoadMethod = Context().iLoadManager->InstantiationMethodL(Context().iUniqueImplementationUid,
sl@0
    93
 																		 Context().iDllEntry);
sl@0
    94
	}
sl@0
    95
sl@0
    96
inline CLoadManager_UnitTestContext& CLoadManager_InstantiationMethodL_Transition::Context() const
sl@0
    97
	{
sl@0
    98
	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
sl@0
    99
	}
sl@0
   100
sl@0
   101
// ______________________________________________________________________________
sl@0
   102
//
sl@0
   103
_LIT(KLoadManagerDestroyedThisTransition,"CLoadManager_DestroyedThis_Transition");
sl@0
   104
sl@0
   105
inline CLoadManager_DestroyedThis_Transition::CLoadManager_DestroyedThis_Transition(CUnitTestContext& aUTContext,
sl@0
   106
													TTransitionValidator& aValidator)
sl@0
   107
: CTransition(KLoadManagerDestroyedThisTransition, aUTContext, aValidator)
sl@0
   108
	{
sl@0
   109
	// Do nothing here.
sl@0
   110
	}
sl@0
   111
sl@0
   112
inline void CLoadManager_DestroyedThis_Transition::TransitMethodL()
sl@0
   113
	{
sl@0
   114
	_LIT(KLoadManagerDestroyedThisTransitMethod, "CLoadManager::DestroyedThis transition");
sl@0
   115
	Context().DataLogger().LogInformation(KLoadManagerDestroyedThisTransitMethod);
sl@0
   116
	Context().iLoadManager->DestroyedThis(Context().iUniqueImplementationUid);
sl@0
   117
	}
sl@0
   118
sl@0
   119
inline CLoadManager_UnitTestContext& CLoadManager_DestroyedThis_Transition::Context() const
sl@0
   120
	{
sl@0
   121
	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
sl@0
   122
	}
sl@0
   123
sl@0
   124
// ______________________________________________________________________________
sl@0
   125
//
sl@0
   126
_LIT(KLoadManagerDestroyCreateTransition,"CLoadManager_DestroyCreate_Transition");
sl@0
   127
sl@0
   128
inline CLoadManager_DestroyCreate_Transition::CLoadManager_DestroyCreate_Transition(CUnitTestContext& aUTContext,
sl@0
   129
													TTransitionValidator& aValidator)
sl@0
   130
: CTransition(KLoadManagerDestroyCreateTransition, aUTContext, aValidator)
sl@0
   131
	{
sl@0
   132
	// Do nothing here.
sl@0
   133
	}
sl@0
   134
sl@0
   135
inline void CLoadManager_DestroyCreate_Transition::TransitMethodL()
sl@0
   136
	{
sl@0
   137
	_LIT(KLoadManagerDestroyCreateTransitMethod, "CLoadManager_DestroyCreate_Transition");
sl@0
   138
	Context().DataLogger().LogInformation(KLoadManagerDestroyCreateTransitMethod);
sl@0
   139
	Context().iLoadManager->DestroyedThis(Context().iUniqueImplementationUid);
sl@0
   140
	Context().iLoadMethod = Context().iLoadManager->InstantiationMethodL(Context().iUniqueImplementationUid,
sl@0
   141
 																		 Context().iDllEntry);
sl@0
   142
sl@0
   143
	}
sl@0
   144
sl@0
   145
inline CLoadManager_UnitTestContext& CLoadManager_DestroyCreate_Transition::Context() const
sl@0
   146
	{
sl@0
   147
	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
sl@0
   148
	}
sl@0
   149