os/ossrv/lowlevellibsandfws/pluginfw/Framework/ResolverTest/ResolverTransitions.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
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 CResolver test transition class implementations
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include "ResolverStateAccessor.h"
sl@0
    19
sl@0
    20
// ______________________________________________________________________________
sl@0
    21
//
sl@0
    22
_LIT(KDefaultResolverNewLTransition,"CDefaultResolver_NewL_Transition");
sl@0
    23
sl@0
    24
inline CDefaultResolver_NewL_Transition::CDefaultResolver_NewL_Transition(CUnitTestContext& aUTContext,
sl@0
    25
													TTransitionValidator& aValidator)
sl@0
    26
: CTransitionType(KDefaultResolverNewLTransition, aUTContext, aValidator)
sl@0
    27
	{
sl@0
    28
	// Do nothing here.
sl@0
    29
	}
sl@0
    30
sl@0
    31
inline void CDefaultResolver_NewL_Transition::TransitMethodL()
sl@0
    32
	{
sl@0
    33
	_LIT(KDefaultResolverNewLTransitMethod, "CDefaultResolver::NewL transition");
sl@0
    34
	Context().DataLogger().LogInformation(KDefaultResolverNewLTransitMethod);
sl@0
    35
sl@0
    36
	Context().iDefaultResolver = CDefaultResolver::NewL(*Context().iRegistry);
sl@0
    37
	}
sl@0
    38
sl@0
    39
inline CDefaultResolver_UnitTestContext& CDefaultResolver_NewL_Transition::Context() const
sl@0
    40
	{
sl@0
    41
	return REINTERPRET_CAST(CDefaultResolver_UnitTestContext&,iUTContext);
sl@0
    42
	}
sl@0
    43
sl@0
    44
// ______________________________________________________________________________
sl@0
    45
//
sl@0
    46
_LIT(KDefaultResolverDtorTransition,"CDefaultResolver_Dtor_Transition");
sl@0
    47
sl@0
    48
inline CDefaultResolver_Dtor_Transition::CDefaultResolver_Dtor_Transition(CUnitTestContext& aUTContext,
sl@0
    49
													TTransitionValidator& aValidator)
sl@0
    50
: CTransition(KDefaultResolverDtorTransition, aUTContext, aValidator)
sl@0
    51
	{
sl@0
    52
	// Do nothing here.
sl@0
    53
	}
sl@0
    54
sl@0
    55
inline void CDefaultResolver_Dtor_Transition::TransitMethodL()
sl@0
    56
	{
sl@0
    57
	_LIT(KDefaultResolverDtorTransitMethod, "CDefaultResolver::Dtor transition");
sl@0
    58
	Context().DataLogger().LogInformation(KDefaultResolverDtorTransitMethod);
sl@0
    59
sl@0
    60
	delete Context().iDefaultResolver;
sl@0
    61
	Context().iDefaultResolver = 0;
sl@0
    62
	}
sl@0
    63
sl@0
    64
inline CDefaultResolver_UnitTestContext& CDefaultResolver_Dtor_Transition::Context() const
sl@0
    65
	{
sl@0
    66
	return REINTERPRET_CAST(CDefaultResolver_UnitTestContext&,iUTContext);
sl@0
    67
	}
sl@0
    68
sl@0
    69
// ______________________________________________________________________________
sl@0
    70
//
sl@0
    71
_LIT(KDefaultResolverIdentifyImplementationLTransition,"CDefaultResolver_IdentifyImplementationL_Transition");
sl@0
    72
sl@0
    73
inline CDefaultResolver_IdentifyImplementationL_Transition::CDefaultResolver_IdentifyImplementationL_Transition(CUnitTestContext& aUTContext,
sl@0
    74
													TTransitionValidator& aValidator)
sl@0
    75
: CTransitionType(KDefaultResolverIdentifyImplementationLTransition, aUTContext, aValidator)
sl@0
    76
	{
sl@0
    77
	// Do nothing here.
sl@0
    78
	}
sl@0
    79
sl@0
    80
inline void CDefaultResolver_IdentifyImplementationL_Transition::TransitMethodL()
sl@0
    81
	{
sl@0
    82
	_LIT(KDefaultResolverIdentifyImplementationLTransitMethod, "CDefaultResolver::IdentifyImplementationL transition");
sl@0
    83
	Context().DataLogger().LogInformation(KDefaultResolverIdentifyImplementationLTransitMethod);
sl@0
    84
sl@0
    85
	Context().iResolvedImpUid = 
sl@0
    86
		Context().iDefaultResolver->IdentifyImplementationL(Context().iInterfaceUid,
sl@0
    87
															Context().iAdditionalParameters);
sl@0
    88
	}
sl@0
    89
sl@0
    90
inline CDefaultResolver_UnitTestContext& CDefaultResolver_IdentifyImplementationL_Transition::Context() const
sl@0
    91
	{
sl@0
    92
	return REINTERPRET_CAST(CDefaultResolver_UnitTestContext&,iUTContext);
sl@0
    93
	}
sl@0
    94
sl@0
    95
// ______________________________________________________________________________
sl@0
    96
//
sl@0
    97
_LIT(KDefaultResolverListAllLTransition,"CDefaultResolver_ListAllL_Transition");
sl@0
    98
sl@0
    99
inline CDefaultResolver_ListAllL_Transition::CDefaultResolver_ListAllL_Transition(CUnitTestContext& aUTContext,
sl@0
   100
													TTransitionValidator& aValidator)
sl@0
   101
: CTransitionType(KDefaultResolverListAllLTransition, aUTContext, aValidator)
sl@0
   102
	{
sl@0
   103
	// Do nothing here.
sl@0
   104
	}
sl@0
   105
sl@0
   106
inline void CDefaultResolver_ListAllL_Transition::TransitMethodL()
sl@0
   107
	{
sl@0
   108
	_LIT(KDefaultResolverListAllLTransitMethod, "CDefaultResolver::ListAllL transition");
sl@0
   109
	Context().DataLogger().LogInformation(KDefaultResolverListAllLTransitMethod);
sl@0
   110
sl@0
   111
	Context().iDefaultResolver->ListAllL(Context().iInterfaceUid,
sl@0
   112
										 Context().iAdditionalParameters);
sl@0
   113
	}
sl@0
   114
sl@0
   115
inline CDefaultResolver_UnitTestContext& CDefaultResolver_ListAllL_Transition::Context() const
sl@0
   116
	{
sl@0
   117
	return REINTERPRET_CAST(CDefaultResolver_UnitTestContext&,iUTContext);
sl@0
   118
	}
sl@0
   119
sl@0
   120
// ______________________________________________________________________________
sl@0
   121
//
sl@0
   122
_LIT(KDefaultResolverMatchTransition,"CDefaultResolver_Match_Transition");
sl@0
   123
sl@0
   124
inline CDefaultResolver_Match_Transition::CDefaultResolver_Match_Transition(CUnitTestContext& aUTContext,
sl@0
   125
													TTransitionValidator& aValidator)
sl@0
   126
: CTransition(KDefaultResolverMatchTransition, aUTContext, aValidator)
sl@0
   127
	{
sl@0
   128
	// Do nothing here.
sl@0
   129
	}
sl@0
   130
sl@0
   131
inline void CDefaultResolver_Match_Transition::TransitMethodL()
sl@0
   132
	{
sl@0
   133
	_LIT(KDefaultResolverMatchTransitMethod, "CDefaultResolver::Match transition");
sl@0
   134
	Context().DataLogger().LogInformation(KDefaultResolverMatchTransitMethod);
sl@0
   135
sl@0
   136
	TDefaultResolver_StateAccessor& accessor = 
sl@0
   137
		REINTERPRET_CAST(TDefaultResolver_StateAccessor&, Context().StateAccessor());
sl@0
   138
	Context().iMatchResult = accessor.Match(*Context().iDefaultResolver, 
sl@0
   139
											*Context().iImplementationType,
sl@0
   140
											*Context().iMatchType,
sl@0
   141
											 Context().iUseWildcards);
sl@0
   142
	}
sl@0
   143
sl@0
   144
inline CDefaultResolver_UnitTestContext& CDefaultResolver_Match_Transition::Context() const
sl@0
   145
	{
sl@0
   146
	return REINTERPRET_CAST(CDefaultResolver_UnitTestContext&,iUTContext);
sl@0
   147
	}
sl@0
   148
sl@0
   149
// ______________________________________________________________________________
sl@0
   150
//
sl@0
   151
_LIT(KDefaultResolverResolveTransition,"CDefaultResolver_Resolve_Transition");
sl@0
   152
sl@0
   153
inline CDefaultResolver_Resolve_Transition::CDefaultResolver_Resolve_Transition(CUnitTestContext& aUTContext,
sl@0
   154
													TTransitionValidator& aValidator)
sl@0
   155
: CTransition(KDefaultResolverResolveTransition, aUTContext, aValidator)
sl@0
   156
	{
sl@0
   157
	// Do nothing here.
sl@0
   158
	}
sl@0
   159
sl@0
   160
inline void CDefaultResolver_Resolve_Transition::TransitMethodL()
sl@0
   161
	{
sl@0
   162
	_LIT(KDefaultResolverResolveTransitMethod, "CDefaultResolver::Resolve transition");
sl@0
   163
	Context().DataLogger().LogInformation(KDefaultResolverResolveTransitMethod);
sl@0
   164
sl@0
   165
	TDefaultResolver_StateAccessor& accessor = 
sl@0
   166
		REINTERPRET_CAST(TDefaultResolver_StateAccessor&, Context().StateAccessor());
sl@0
   167
	accessor.Resolve(*Context().iDefaultResolver, 
sl@0
   168
					  Context().iImplementationData, 
sl@0
   169
					  Context().iAdditionalParameters);
sl@0
   170
	}
sl@0
   171
sl@0
   172
inline CDefaultResolver_UnitTestContext& CDefaultResolver_Resolve_Transition::Context() const
sl@0
   173
	{
sl@0
   174
	return REINTERPRET_CAST(CDefaultResolver_UnitTestContext&,iUTContext);
sl@0
   175
	}
sl@0
   176
sl@0
   177
// ______________________________________________________________________________
sl@0
   178
//
sl@0
   179
inline CDefaultResolver_UnitTestContext::CDefaultResolver_UnitTestContext(CDataLogger& aDataLogger,
sl@0
   180
												MStateAccessor& aStateAccessor,
sl@0
   181
												MTransitionObserver& aObserver)
sl@0
   182
: CUnitTestContext(aDataLogger, aStateAccessor, aObserver)
sl@0
   183
	{
sl@0
   184
	//Do nothing
sl@0
   185
	}
sl@0
   186
sl@0
   187
inline CDefaultResolver_UnitTestContext::~CDefaultResolver_UnitTestContext()
sl@0
   188
	{
sl@0
   189
	iFs.Close();
sl@0
   190
sl@0
   191
	iImplementationData.Reset();
sl@0
   192
sl@0
   193
	delete iDefaultResolver;
sl@0
   194
	delete iRegistry;
sl@0
   195
	delete iImplementationType;
sl@0
   196
	delete iMatchType;
sl@0
   197
	}
sl@0
   198