mds_plat/metadata_engine_api/tsrc/src/MdETestScripterBlocks.cpp
changeset 60 79f826a55db2
equal deleted inserted replaced
58:fe894bb075c2 60:79f826a55db2
       
     1 /*
       
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 // [INCLUDE FILES] - do not remove
       
    19 #include <e32svr.h>
       
    20 #include <mdeobject.h>
       
    21 #include <mdeobjectdef.h>
       
    22 #include <mdesession.h>
       
    23 #include <mdeconstants.h>
       
    24 #include <StifParser.h>
       
    25 #include <Stiftestinterface.h>
       
    26 #include <StifTestEventInterface.h>
       
    27 #include "MdETestScripter.h"
       
    28 #include "MdETestScripterAO.h"
       
    29 
       
    30 // ============================= LOCAL FUNCTIONS ===============================
       
    31 
       
    32 // ============================ MEMBER FUNCTIONS ===============================
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CMdETestScripter::Delete
       
    36 // Delete here all resources allocated and opened from test methods. 
       
    37 // Called from destructor. 
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 void CMdETestScripter::Delete() 
       
    41     {
       
    42     iObjectDefArray.Reset();
       
    43     iRelationDefArray.Reset();
       
    44     iEventDefArray.Reset();
       
    45     
       
    46     iLogicConditionArray.Reset();
       
    47     iRelationConditionArray.Reset();
       
    48     iNotificationRelationArray.Reset();
       
    49 
       
    50 	RArray<TItemId> objectIds;
       
    51 	RArray<TItemId> resultObjectIds;
       
    52 	RArray<TItemId> eventIds;
       
    53 	RArray<TItemId> resultEventIds;
       
    54 	RArray<TItemId> relationIds;
       
    55 	RArray<TItemId> resultRelationIds;
       
    56 	
       
    57 	TInt count = iObjectArray.Count();
       
    58 	for (TInt i = 0; i < count; i++)
       
    59 		{
       
    60 		objectIds.Append(iObjectArray[i]->Id());	
       
    61 		}
       
    62 		
       
    63 	count = iEventArray.Count();
       
    64 	for (TInt i = 0; i < count; i++)
       
    65 		{
       
    66 		eventIds.Append(iEventArray[i]->Id());	
       
    67 		}
       
    68 		
       
    69 	count = iRelationArray.Count();
       
    70 	for (TInt i = 0; i < count; i++)
       
    71 		{
       
    72 		relationIds.Append(iRelationArray[i]->Id());	
       
    73 		}			
       
    74 	
       
    75 	if (objectIds.Count())
       
    76 		{
       
    77 		TRAP_IGNORE( iMdeSession->RemoveObjectsL( objectIds, resultObjectIds) );	
       
    78 		}
       
    79 
       
    80     iObjectArray.ResetAndDestroy();
       
    81     
       
    82 	if (eventIds.Count())
       
    83 		{    
       
    84 		TRAP_IGNORE( iMdeSession->RemoveEventsL( eventIds, resultEventIds) );
       
    85 		}
       
    86     iEventArray.ResetAndDestroy();
       
    87         
       
    88 	if (relationIds.Count())
       
    89 		{          
       
    90 		TRAP_IGNORE( iMdeSession->RemoveRelationsL( relationIds, resultRelationIds) );
       
    91 		}
       
    92     iRelationArray.ResetAndDestroy();
       
    93     
       
    94     TInt allRemoved = ETrue;
       
    95 	count = iObjectArray.Count();
       
    96 	for (TInt i = 0; i < count; i++)
       
    97 		{
       
    98 		if (resultObjectIds[i] == KNoId)
       
    99 			{
       
   100 			allRemoved = EFalse;
       
   101 			break;	
       
   102 			}			
       
   103 		}
       
   104 	if (!allRemoved)
       
   105 		{
       
   106 		iLog->Log(_L( "All objects not removed from DB!!"));
       
   107 		}
       
   108 
       
   109     allRemoved = ETrue;		
       
   110 	count = iEventArray.Count();
       
   111 	for (TInt i = 0; i < count; i++)
       
   112 		{
       
   113 		if (resultEventIds[i] == KNoId)
       
   114 			{
       
   115 			allRemoved = EFalse;
       
   116 			break;	
       
   117 			}		
       
   118 		}
       
   119 	if (!allRemoved)
       
   120 		{
       
   121 		iLog->Log(_L( "All events not removed from DB!!"));
       
   122 		}
       
   123     iEventArray.ResetAndDestroy();
       
   124 		
       
   125     allRemoved = ETrue;		
       
   126 	count = iRelationArray.Count();
       
   127 	for (TInt i = 0; i < count; i++)
       
   128 		{
       
   129 		if (resultRelationIds[i] == KNoId)
       
   130 			{
       
   131 			allRemoved = EFalse;
       
   132 			break;	
       
   133 			}		
       
   134 		}
       
   135 	if (!allRemoved)
       
   136 		{
       
   137 		iLog->Log(_L( "All relations not removed from DB!!"));
       
   138 		}
       
   139 				
       
   140 	objectIds.Close();
       
   141 	resultObjectIds.Close();
       
   142 	eventIds.Close();
       
   143 	resultEventIds.Close();
       
   144 	relationIds.Close();
       
   145 	resultRelationIds.Close();
       
   146 
       
   147 	iPropertyDefArray.Reset();
       
   148 
       
   149     delete iObjectDefNameArray;
       
   150     delete iRelationDefNameArray;
       
   151 	delete iEventDefNameArray;
       
   152 	delete iPropertyDefNameArray;
       
   153 	delete iNamespaceDefNameArray;
       
   154 	
       
   155 	delete iObjectNameArray;	
       
   156     delete iRelationNameArray;
       
   157     delete iEventNameArray;
       
   158     
       
   159     delete iPropertyNameArray;
       
   160     
       
   161 	delete iLogicConditionNameArray;
       
   162 	delete iRelationConditionNameArray;
       
   163 	delete iObjectConditionNameArray;
       
   164 	
       
   165 	delete iPropertyConditionNameArray;
       
   166 	delete iEventConditionNameArray;	
       
   167 
       
   168 	delete iQuery;
       
   169     delete iMdeSession;
       
   170     iMdeSession = NULL;
       
   171     delete iAsyncHandler;
       
   172     iAsyncHandler = NULL;
       
   173     iMdEDataBuf.Close();
       
   174     iItemArray.Close();//Do not need call destroy because it does not own its pointers
       
   175     }
       
   176 
       
   177 // -----------------------------------------------------------------------------
       
   178 // CMdETestScripter::RunMethodL
       
   179 // Run specified method. Contains also table of test mothods and their names.
       
   180 // -----------------------------------------------------------------------------
       
   181 //
       
   182 TInt CMdETestScripter::RunMethodL( CStifItemParser& aItem ) 
       
   183     {
       
   184     static TStifFunctionInfo const KFunctions[] =
       
   185         {  
       
   186         // Observer add/remove methods
       
   187         ENTRY( "AddSchemaObserverL", CMdETestScripter::AddSchemaObserverL ),
       
   188         ENTRY( "RemoveSchemaObserverL", CMdETestScripter::RemoveSchemaObserverL ),
       
   189         ENTRY( "AddObjectObserverL", CMdETestScripter::AddObjectObserverL ),
       
   190         ENTRY( "RemoveObjectObserverL", CMdETestScripter::RemoveObjectObserverL ),
       
   191         ENTRY( "AddObjectObserverWithUriL", CMdETestScripter::AddObjectObserverWithUriL ),
       
   192         ENTRY( "RemoveObjectObserverWithUriL", CMdETestScripter::RemoveObjectObserverWithUriL ),
       
   193         ENTRY( "AddObjectPresentObserverL", CMdETestScripter::AddObjectPresentObserverL ),
       
   194         ENTRY( "RemoveObjectPresentObserverL", CMdETestScripter::RemoveObjectPresentObserverL ),
       
   195         ENTRY( "AddRelationObserverL", CMdETestScripter::AddRelationObserverL ),
       
   196         ENTRY( "RemoveRelationObserverL", CMdETestScripter::RemoveRelationObserverL ),
       
   197         ENTRY( "AddRelationItemObserverL", CMdETestScripter::AddRelationItemObserverL ),
       
   198         ENTRY( "RemoveRelationItemObserverL", CMdETestScripter::RemoveRelationItemObserverL ),
       
   199         ENTRY( "AddRelationPresentObserverL", CMdETestScripter::AddRelationPresentObserverL ),
       
   200         ENTRY( "RemoveRelationPresentObserverL", CMdETestScripter::RemoveRelationPresentObserverL ),
       
   201         ENTRY( "AddEventObserverL", CMdETestScripter::AddEventObserverL ),
       
   202         ENTRY( "RemoveEventObserverL", CMdETestScripter::RemoveEventObserverL ),
       
   203 
       
   204         // Notification resulated test primitives
       
   205         ENTRY( "VerifyTItemIdsL", CMdETestScripter::VerifyTItemIdsL ),
       
   206         ENTRY( "VerifyMdERelationsL", CMdETestScripter::VerifyMdERelationsL ),
       
   207         ENTRY( "VerifyObserverNotificationTypeL", CMdETestScripter::VerifyObserverNotificationTypeL ),
       
   208 
       
   209         // Metadata/schema/namespace test primitives.
       
   210         ENTRY( "ObjectDefCountL", CMdETestScripter::ObjectDefCountL ),
       
   211         ENTRY( "ObjectDefL", CMdETestScripter::ObjectDefL ),
       
   212         ENTRY( "GetObjectDefL", CMdETestScripter::GetObjectDefL ),
       
   213         ENTRY( "RelationDefCountL", CMdETestScripter::RelationDefCountL ),
       
   214         ENTRY( "RelationDefL", CMdETestScripter::RelationDefL ),
       
   215         ENTRY( "GetRelationDefL", CMdETestScripter::GetRelationDefL ),
       
   216         ENTRY( "EventDefCountL", CMdETestScripter::EventDefCountL ),
       
   217         ENTRY( "EventDefL", CMdETestScripter::EventDefL ),
       
   218         ENTRY( "GetEventDefL", CMdETestScripter::GetEventDefL ),
       
   219 
       
   220         ENTRY( "ExportMetadataL", CMdETestScripter::ExportMetadataL ),
       
   221         ENTRY( "ImportMetadataL", CMdETestScripter::ImportMetadataL ),
       
   222         ENTRY( "ImportSchemaL", CMdETestScripter::ImportSchemaL ),
       
   223         ENTRY( "NamespaceDefCountL", CMdETestScripter::NamespaceDefCountL ),
       
   224         ENTRY( "NamespaceDefL", CMdETestScripter::NamespaceDefL ),
       
   225         ENTRY( "GetNamespaceDefL", CMdETestScripter::GetNamespaceDefL ),
       
   226         ENTRY( "GetDefaultNamespaceDefL", CMdETestScripter::GetDefaultNamespaceDefL ),
       
   227         ENTRY( "ResetNamespaceDefArray", CMdETestScripter::ResetNamespaceDefArray ),
       
   228         ENTRY( "LoadSchemaL", CMdETestScripter::LoadSchemaL ),
       
   229         ENTRY( "EngineSessionL", CMdETestScripter::EngineSessionL ),
       
   230         ENTRY( "GetSchemaVersionL", CMdETestScripter::GetSchemaVersionL ),
       
   231         ENTRY( "SetObjectToPresentByGuidL", CMdETestScripter::SetObjectToPresentByGuidL ),
       
   232 
       
   233         // Item / InstanceItem test primitives.
       
   234         ENTRY( "BelongsToSessionL", CMdETestScripter::BelongsToSessionL ),
       
   235         ENTRY( "SessionL", CMdETestScripter::SessionL ),
       
   236         ENTRY( "InDatabaseL", CMdETestScripter::InDatabaseL ),
       
   237         ENTRY( "AddItemsL", CMdETestScripter::AddItemsL ),
       
   238         ENTRY( "UpdateItemsL", CMdETestScripter::UpdateItemsL ),
       
   239 
       
   240         // Definition test primitives.
       
   241         ENTRY( "AddRelationDefL", CMdETestScripter::AddRelationDefL ),
       
   242         ENTRY( "AddEventDefL", CMdETestScripter::AddEventDefL ),
       
   243         ENTRY( "PropertyDefCountL", CMdETestScripter::PropertyDefCountL ),
       
   244         ENTRY( "PropertyDefL", CMdETestScripter::PropertyDefL ),
       
   245         ENTRY( "GetPropertyDefL", CMdETestScripter::GetPropertyDefL ),
       
   246         ENTRY( "MandatoryL", CMdETestScripter::MandatoryL ),
       
   247         ENTRY( "MinInt32ValueL", CMdETestScripter::MinInt32ValueL ),
       
   248         ENTRY( "MaxInt32ValueL", CMdETestScripter::MaxInt32ValueL ),
       
   249         ENTRY( "MinUint32ValueL", CMdETestScripter::MinUint32ValueL ),
       
   250         ENTRY( "MaxUint32ValueL", CMdETestScripter::MaxUint32ValueL ),
       
   251         ENTRY( "MinInt64ValueL", CMdETestScripter::MinInt64ValueL ),
       
   252         ENTRY( "MaxInt64ValueL", CMdETestScripter::MaxInt64ValueL ),
       
   253         ENTRY( "MinRealValueL", CMdETestScripter::MinRealValueL ),
       
   254         ENTRY( "MaxRealValueL", CMdETestScripter::MaxRealValueL ),
       
   255         ENTRY( "MinTimeValueL", CMdETestScripter::MinTimeValueL ),
       
   256         ENTRY( "MaxTimeValueL", CMdETestScripter::MaxTimeValueL ),
       
   257         ENTRY( "MinTextLengthL", CMdETestScripter::MinTextLengthL ),
       
   258         ENTRY( "MaxTextLengthL", CMdETestScripter::MaxTextLengthL ),
       
   259         ENTRY( "CompareL", CMdETestScripter::CompareL ),
       
   260         ENTRY( "ParentL", CMdETestScripter::ParentL ),
       
   261         ENTRY( "NameL", CMdETestScripter::NameL ),
       
   262         ENTRY( "ReadOnlyL", CMdETestScripter::ReadOnlyL ),
       
   263         ENTRY( "DefL", CMdETestScripter::DefL ),
       
   264 
       
   265         // Object test primitives.
       
   266         ENTRY( "SetDefL", CMdETestScripter::SetDefL ),
       
   267         ENTRY( "UriL", CMdETestScripter::UriL ),
       
   268         ENTRY( "SetUriL", CMdETestScripter::SetUriL ),
       
   269         ENTRY( "ConfidentialL", CMdETestScripter::ConfidentialL ),
       
   270         ENTRY( "SetConfidentialL", CMdETestScripter::SetConfidentialL ),
       
   271         ENTRY( "PlaceholderL", CMdETestScripter::PlaceholderL ),
       
   272         ENTRY( "SetPlaceholderL", CMdETestScripter::SetPlaceholderL ),
       
   273         ENTRY( "MediaIdL", CMdETestScripter::MediaIdL ),
       
   274         ENTRY( "SetMediaIdL", CMdETestScripter::SetMediaIdL ),
       
   275         ENTRY( "UsageCountL", CMdETestScripter::UsageCountL ),
       
   276         ENTRY( "GuidL", CMdETestScripter::GuidL ),
       
   277         ENTRY( "SetGuidL", CMdETestScripter::SetGuidL ),
       
   278         ENTRY( "OpenForModificationsL", CMdETestScripter::OpenForModificationsL ),
       
   279         ENTRY( "NewObjectL", CMdETestScripter::NewObjectL ),
       
   280         ENTRY( "AddObjectL", CMdETestScripter::AddObjectL ),
       
   281         ENTRY( "AddObjectsL", CMdETestScripter::AddObjectsL ),
       
   282         ENTRY( "GetObjectL", CMdETestScripter::GetObjectL ),
       
   283         ENTRY( "GetFullObjectL", CMdETestScripter::GetFullObjectL ),
       
   284         ENTRY( "CheckObjectL", CMdETestScripter::CheckObjectL ),
       
   285         ENTRY( "RemoveObjectL", CMdETestScripter::RemoveObjectL ),
       
   286         ENTRY( "RemoveObjectsL", CMdETestScripter::RemoveObjectsL ),
       
   287         ENTRY( "RemoveAllObjectsL", CMdETestScripter::RemoveAllObjectsL ),
       
   288         ENTRY( "OpenObjectL", CMdETestScripter::OpenObjectL ),
       
   289         ENTRY( "OpenFullObjectL", CMdETestScripter::OpenFullObjectL ),
       
   290         ENTRY( "CommitObjectL", CMdETestScripter::CommitObjectL ),
       
   291         ENTRY( "CommitObjectsL", CMdETestScripter::CommitObjectsL ),
       
   292         ENTRY( "CancelObjectL", CMdETestScripter::CancelObjectL ),
       
   293 
       
   294         ENTRY( "PropertyL", CMdETestScripter::PropertyL ),
       
   295         ENTRY( "PropertyCountL", CMdETestScripter::PropertyCountL ),
       
   296         ENTRY( "AddBoolPropertyL", CMdETestScripter::AddBoolPropertyL ),
       
   297         ENTRY( "AddInt8PropertyL", CMdETestScripter::AddInt8PropertyL ),
       
   298         ENTRY( "AddUint8PropertyL", CMdETestScripter::AddUint8PropertyL ),
       
   299         ENTRY( "AddInt16PropertyL", CMdETestScripter::AddInt16PropertyL ),
       
   300         ENTRY( "AddUint16PropertyL", CMdETestScripter::AddUint16PropertyL ),
       
   301         ENTRY( "AddInt32PropertyL", CMdETestScripter::AddInt32PropertyL ),
       
   302         ENTRY( "AddUint32PropertyL", CMdETestScripter::AddUint32PropertyL ),
       
   303         ENTRY( "AddInt64PropertyL", CMdETestScripter::AddInt64PropertyL ),
       
   304         ENTRY( "AddReal32PropertyL", CMdETestScripter::AddReal32PropertyL ),
       
   305         ENTRY( "AddReal64PropertyL", CMdETestScripter::AddReal64PropertyL ),
       
   306         ENTRY( "AddTextPropertyL", CMdETestScripter::AddTextPropertyL ),
       
   307         ENTRY( "AddTimePropertyL", CMdETestScripter::AddTimePropertyL ),
       
   308 
       
   309         // Property test primitives.
       
   310         ENTRY( "ObjectL", CMdETestScripter::ObjectL ),
       
   311         ENTRY( "BoolValueL", CMdETestScripter::BoolValueL ),
       
   312         ENTRY( "Int8ValueL", CMdETestScripter::Int8ValueL ),
       
   313         ENTRY( "Uint8ValueL", CMdETestScripter::Uint8ValueL ),
       
   314         ENTRY( "Int16ValueL", CMdETestScripter::Int16ValueL ),
       
   315         ENTRY( "Uint16ValueL", CMdETestScripter::Uint16ValueL ),
       
   316         ENTRY( "Int32ValueL", CMdETestScripter::Int32ValueL ),
       
   317         ENTRY( "Uint32ValueL", CMdETestScripter::Uint32ValueL ),
       
   318         ENTRY( "Int64ValueL", CMdETestScripter::Int64ValueL ),
       
   319         ENTRY( "Real32ValueL", CMdETestScripter::Real32ValueL ),
       
   320         ENTRY( "Real64ValueL", CMdETestScripter::Real64ValueL ),
       
   321         ENTRY( "TimeValueL", CMdETestScripter::TimeValueL ),
       
   322         ENTRY( "TextValueL", CMdETestScripter::TextValueL ),
       
   323         ENTRY( "SetBoolValueL", CMdETestScripter::SetBoolValueL ),
       
   324         ENTRY( "SetInt8ValueL", CMdETestScripter::SetInt8ValueL ),
       
   325         ENTRY( "SetUint8ValueL", CMdETestScripter::SetUint8ValueL ),
       
   326         ENTRY( "SetInt16ValueL", CMdETestScripter::SetInt16ValueL ),
       
   327         ENTRY( "SetUint16ValueL", CMdETestScripter::SetUint16ValueL ),
       
   328         ENTRY( "SetInt32ValueL", CMdETestScripter::SetInt32ValueL ),
       
   329         ENTRY( "SetUint32ValueL", CMdETestScripter::SetUint32ValueL ),
       
   330         ENTRY( "SetInt64ValueL", CMdETestScripter::SetInt64ValueL ),
       
   331         ENTRY( "SetReal32ValueL", CMdETestScripter::SetReal32ValueL ),
       
   332         ENTRY( "SetReal64ValueL", CMdETestScripter::SetReal64ValueL ),
       
   333         ENTRY( "SetTimeValueL", CMdETestScripter::SetTimeValueL ),
       
   334         ENTRY( "SetTextValueL", CMdETestScripter::SetTextValueL ),
       
   335         ENTRY( "RemovePropertyL", CMdETestScripter::RemovePropertyL ),
       
   336         ENTRY( "MovePropertiesL", CMdETestScripter::MovePropertiesL ),
       
   337 
       
   338         // Free text test primitives.
       
   339         ENTRY( "FreeTextCountL", CMdETestScripter::FreeTextCountL ),
       
   340         ENTRY( "FreeTextL", CMdETestScripter::FreeTextL ),
       
   341         ENTRY( "FreeTextIndexL", CMdETestScripter::FreeTextIndexL ),
       
   342         ENTRY( "AddFreeTextL", CMdETestScripter::AddFreeTextL ),
       
   343         ENTRY( "RemoveFreeTextL", CMdETestScripter::RemoveFreeTextL ),
       
   344 
       
   345         // Relation test primitives.
       
   346         ENTRY( "NewRelationL", CMdETestScripter::NewRelationL ),
       
   347         ENTRY( "AddRelationL", CMdETestScripter::AddRelationL ),
       
   348         ENTRY( "LeftObjectIdL", CMdETestScripter::LeftObjectIdL ),
       
   349         ENTRY( "RightObjectIdL", CMdETestScripter::RightObjectIdL ),
       
   350         ENTRY( "ParameterL", CMdETestScripter::ParameterL ),
       
   351         ENTRY( "SetParameterL", CMdETestScripter::SetParameterL ),
       
   352         ENTRY( "SetLeftObjectIdL", CMdETestScripter::SetLeftObjectIdL ),
       
   353         ENTRY( "SetRightObjectIdL", CMdETestScripter::SetRightObjectIdL ),
       
   354         ENTRY( "LastModifiedDateL", CMdETestScripter::LastModifiedDateL ),
       
   355         ENTRY( "SetLastModifiedDateL", CMdETestScripter::SetLastModifiedDateL ),
       
   356         ENTRY( "GetRelationL", CMdETestScripter::GetRelationL ),
       
   357         ENTRY( "UpdateRelationL", CMdETestScripter::UpdateRelationL ),
       
   358         ENTRY( "RemoveRelationL", CMdETestScripter::RemoveRelationL ),
       
   359         ENTRY( "RemoveRelationsL", CMdETestScripter::RemoveRelationsL ),
       
   360 
       
   361         // Event test primitives.
       
   362         ENTRY( "NewEventL", CMdETestScripter::NewEventL ),
       
   363         ENTRY( "AddEventL", CMdETestScripter::AddEventL ),
       
   364         ENTRY( "ObjectIdL", CMdETestScripter::ObjectIdL ),
       
   365         ENTRY( "TimeL", CMdETestScripter::TimeL ),
       
   366         ENTRY( "SourceL", CMdETestScripter::SourceL ),
       
   367         ENTRY( "ParticipantL", CMdETestScripter::ParticipantL ),
       
   368         ENTRY( "GetEventL", CMdETestScripter::GetEventL ),
       
   369         ENTRY( "RemoveEventL", CMdETestScripter::RemoveEventL ),
       
   370         ENTRY( "RemoveEventsL", CMdETestScripter::RemoveEventsL ),
       
   371         ENTRY( "NewObjectQueryL", CMdETestScripter::NewObjectQueryL ),
       
   372         ENTRY( "NewRelationQueryL", CMdETestScripter::NewRelationQueryL ),
       
   373         ENTRY( "NewEventQueryL", CMdETestScripter::NewEventQueryL ),
       
   374                 
       
   375         ENTRY( "QueryObjectL", CMdETestScripter::QueryObjectL ),
       
   376         ENTRY( "QueryRelationL", CMdETestScripter::QueryRelationL ),
       
   377         ENTRY( "QueryEventL", CMdETestScripter::QueryEventL ),
       
   378         ENTRY( "AddPropertyFilterL", CMdETestScripter::AddPropertyFilterL ),
       
   379         ENTRY( "AppendOrderRuleL", CMdETestScripter::AppendOrderRuleL ),
       
   380         ENTRY( "NewLogicConditionL", CMdETestScripter::NewLogicConditionL ),
       
   381         ENTRY( "AddLogicConditionL", CMdETestScripter::AddLogicConditionL ),
       
   382         ENTRY( "AddObjectConditionL", CMdETestScripter::AddObjectConditionL ),
       
   383         ENTRY( "AddPropertyConditionL", CMdETestScripter::AddPropertyConditionL ),
       
   384         ENTRY( "AddRelationConditionL", CMdETestScripter::AddRelationConditionL ),
       
   385         ENTRY( "AddEventConditionL", CMdETestScripter::AddEventConditionL ),
       
   386         ENTRY( "FindL", CMdETestScripter::FindL ),
       
   387         ENTRY( "SetObjectQueryResultL", CMdETestScripter::SetObjectQueryResultL ),
       
   388         ENTRY( "SetEventQueryResultL", CMdETestScripter::SetEventQueryResultL ),
       
   389         ENTRY( "SetRelationQueryResultL", CMdETestScripter::SetRelationQueryResultL ),
       
   390         ENTRY( "RightL", CMdETestScripter::RightL ),
       
   391         ENTRY( "LeftL", CMdETestScripter::LeftL ),
       
   392         ENTRY( "SetOperatorL", CMdETestScripter::SetOperatorL ), 
       
   393         ENTRY( "SetNegateL", CMdETestScripter::SetNegateL ),
       
   394         ENTRY( "ObjectConditionsL", CMdETestScripter::ObjectConditionsL ),     
       
   395         ENTRY( "TestPopulateDbL", CMdETestScripter::TestPopulateDbL )
       
   396         
       
   397         // [test cases entries] - Do not remove
       
   398         };
       
   399 
       
   400     const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
       
   401 
       
   402     return RunInternalL( KFunctions, count, aItem );
       
   403     }
       
   404 
       
   405 // -----------------------------------------------------------------------------
       
   406 // CHarvesterPluginTestScripter::HandleObjectNotification
       
   407 // -----------------------------------------------------------------------------
       
   408 //
       
   409 void CMdETestScripter::HandleObjectNotification( CMdESession& aSession, 
       
   410     TObserverNotificationType aType,
       
   411     const RArray<TItemId>& aObjectIdArray )
       
   412     {
       
   413     iLog->Log(_L( "HandleObjectNotification" ));
       
   414     
       
   415     iNotificationSession = &aSession;
       
   416     iNotificationType = aType;
       
   417     for ( TInt i = 0; i < aObjectIdArray.Count(); ++i )
       
   418         {
       
   419         iNotificationItemIdArray.Append( aObjectIdArray[ i ] );
       
   420         }
       
   421 
       
   422     Signal();
       
   423     }
       
   424 
       
   425 // -----------------------------------------------------------------------------
       
   426 // CHarvesterPluginTestScripter::HandleUriObjectNotification
       
   427 // -----------------------------------------------------------------------------
       
   428 //
       
   429 void CMdETestScripter::HandleUriObjectNotification( CMdESession& aSession, 
       
   430     TObserverNotificationType aType,
       
   431     const RArray<TItemId>& aObjectIdArray,
       
   432     const RPointerArray<HBufC>& /* aObjectUriArray */ )
       
   433     {
       
   434     iLog->Log(_L( "HandleUriObjectNotification" ));
       
   435     
       
   436     iNotificationSession = &aSession;
       
   437     iNotificationType = aType;
       
   438     for ( TInt i = 0; i < aObjectIdArray.Count(); ++i )
       
   439         {
       
   440         iNotificationItemIdArray.Append( aObjectIdArray[ i ] );
       
   441         }
       
   442 
       
   443     Signal();
       
   444     }
       
   445 
       
   446 // -----------------------------------------------------------------------------
       
   447 // CHarvesterPluginTestScripter::HandleObjectPresentNotification
       
   448 // -----------------------------------------------------------------------------
       
   449 //
       
   450 void CMdETestScripter::HandleObjectPresentNotification( CMdESession& /* aSession */, 
       
   451     TBool /* aPresent */, const RArray<TItemId>& /* aObjectIdArray */ )
       
   452     {
       
   453 
       
   454     }
       
   455 
       
   456 // -----------------------------------------------------------------------------
       
   457 // CHarvesterPluginTestScripter::HandleSessionOpened
       
   458 // -----------------------------------------------------------------------------
       
   459 //
       
   460 void CMdETestScripter::HandleSessionOpened( CMdESession& /* aSession */, TInt aError )
       
   461     {
       
   462     iLog->Log(_L( "HandleSessionOpened, aError == %d"), aError );
       
   463     
       
   464     Signal();
       
   465 
       
   466     iError = aError;
       
   467     }
       
   468 
       
   469 // -----------------------------------------------------------------------------
       
   470 // CHarvesterPluginTestScripter::HandleSessionError
       
   471 // -----------------------------------------------------------------------------
       
   472 //
       
   473 void CMdETestScripter::HandleSessionError( CMdESession& /*aSession*/, TInt aError )
       
   474     {
       
   475     iLog->Log(_L( "HandleSessionError, aError == %d"), aError );
       
   476 
       
   477     iError = aError;
       
   478     }
       
   479 
       
   480 // -----------------------------------------------------------------------------
       
   481 // CHarvesterPluginTestScripter::HandleSchemaModified
       
   482 // -----------------------------------------------------------------------------
       
   483 //
       
   484 void CMdETestScripter::HandleSchemaModified()
       
   485     {
       
   486     iLog->Log(_L( "HandleSchemaModified" ));
       
   487 
       
   488     TEventIf event( TEventIf::ESetEvent, TName( KMdESchemaModified ) );
       
   489     TestModuleIf().Event( event );
       
   490 
       
   491     Signal();// This can be removed after modify all related cases.
       
   492     }
       
   493 
       
   494 // -----------------------------------------------------------------------------
       
   495 // CHarvesterPluginTestScripter::HandleRelationNotification
       
   496 // -----------------------------------------------------------------------------
       
   497 //
       
   498 void CMdETestScripter::HandleRelationNotification( CMdESession& aSession, 
       
   499     TObserverNotificationType aType,
       
   500     const RArray<TItemId>& aRelationIdArray )
       
   501     {
       
   502     iLog->Log(_L( "HandleRelationNotification" ));
       
   503     
       
   504     iNotificationSession = &aSession;
       
   505     iNotificationType = aType;
       
   506     for ( TInt i = 0; i < aRelationIdArray.Count(); ++i )
       
   507         {
       
   508         iNotificationItemIdArray.Append( aRelationIdArray[ i ] );
       
   509         }
       
   510 
       
   511     Signal();
       
   512     }
       
   513 
       
   514 // -----------------------------------------------------------------------------
       
   515 // CHarvesterPluginTestScripter::HandleRelationItemNotification
       
   516 // -----------------------------------------------------------------------------
       
   517 //
       
   518 void CMdETestScripter::HandleRelationItemNotification(CMdESession& aSession, 
       
   519     TObserverNotificationType aType,
       
   520     const RArray<TMdERelation>& aRelationArray )
       
   521     {
       
   522     iLog->Log(_L( "HandleRelationItemNotification" ));
       
   523 
       
   524     iNotificationSession = &aSession;
       
   525     iNotificationType = aType;
       
   526     for ( TInt i = 0; i < aRelationArray.Count(); ++i )
       
   527         {
       
   528         iNotificationRelationArray.Append( aRelationArray[ i ] );
       
   529         }
       
   530 
       
   531     Signal();
       
   532     }
       
   533 
       
   534 // -----------------------------------------------------------------------------
       
   535 // CHarvesterPluginTestScripter::HandleRelationPresentNotification
       
   536 // -----------------------------------------------------------------------------
       
   537 //
       
   538 void CMdETestScripter::HandleRelationPresentNotification(CMdESession& /* aSession */,
       
   539     TBool /* aPresent */,
       
   540     const RArray<TItemId>& /* aRelationIdArray */ )
       
   541     {
       
   542 
       
   543     }
       
   544 
       
   545 // -----------------------------------------------------------------------------
       
   546 // CHarvesterPluginTestScripter::HandleEventNotification
       
   547 // -----------------------------------------------------------------------------
       
   548 //
       
   549 void CMdETestScripter::HandleEventNotification( CMdESession& aSession, 
       
   550     TObserverNotificationType aType,
       
   551     const RArray<TItemId>& aEventIdArray )
       
   552     {
       
   553     iLog->Log(_L( "HandleEventNotification" ));
       
   554     
       
   555     iNotificationSession = &aSession;
       
   556     iNotificationType = aType;
       
   557     for ( TInt i = 0; i < aEventIdArray.Count(); ++i )
       
   558         {
       
   559         iNotificationItemIdArray.Append( aEventIdArray[ i ] );
       
   560         }
       
   561 
       
   562     Signal();
       
   563     }
       
   564 
       
   565 // -----------------------------------------------------------------------------
       
   566 // CMdETestScripter::GetInstanceItemByArrayIndexL
       
   567 // -----------------------------------------------------------------------------
       
   568 //
       
   569 CMdEInstanceItem* CMdETestScripter::GetInstanceItemByArrayIndexL(
       
   570     const TInt aMode, CStifItemParser& aItem )
       
   571     {
       
   572     CMdEInstanceItem* ret = NULL;
       
   573 
       
   574     if ( aMode == EObject )
       
   575         {
       
   576         ret = SanitizeArrayIndexL( iObjectArray, *iObjectNameArray, aItem );
       
   577         TL( ret->InstanceType() == EMdETypeObject )
       
   578         }
       
   579     else if ( aMode == ERelation )
       
   580         {
       
   581         ret = SanitizeArrayIndexL( iRelationArray, *iRelationNameArray, aItem );
       
   582         TL( ret->InstanceType() == EMdETypeRelation )
       
   583         }
       
   584     else if ( aMode == EEvent )
       
   585         {
       
   586         ret = SanitizeArrayIndexL( iEventArray, *iEventNameArray, aItem );
       
   587         TL( ret->InstanceType() == EMdETypeEvent )
       
   588         }
       
   589     else if ( aMode == EProperty )
       
   590         {
       
   591         ret = SanitizeArrayIndexL( iPropertyArray, *iPropertyNameArray, aItem );
       
   592         TL( ret->InstanceType() == EMdETypeProperty )
       
   593         }
       
   594     else
       
   595         {
       
   596     	User::Leave( KErrArgument );
       
   597         }
       
   598 
       
   599     return ret;
       
   600     }
       
   601 
       
   602 // -----------------------------------------------------------------------------
       
   603 // CMdETestScripter::CheckTMdEObjectL
       
   604 // -----------------------------------------------------------------------------
       
   605 //
       
   606 void CMdETestScripter::CheckTMdEObjectL( const TMdEObject& aTObject, const CMdEObject& aObject )
       
   607     {
       
   608     TL( aObject.Id() == aTObject.Id());
       
   609     TL( aObject.Def().Compare( aTObject.DefL()) == 0 );
       
   610     TL( aObject.Confidential() == aTObject.Confidential());
       
   611     TL( aObject.Placeholder() == aTObject.Placeholder());
       
   612     }
       
   613 
       
   614 // -----------------------------------------------------------------------------
       
   615 // CMdETestScripter::CheckTMdERelationL
       
   616 // -----------------------------------------------------------------------------
       
   617 //
       
   618 void CMdETestScripter::CheckTMdERelationL( const TMdERelation& aTRelation, const CMdERelation& aRelation )
       
   619     {
       
   620     TL( aRelation.Id() == aTRelation.Id());
       
   621     TL( aRelation.Def().Compare( aTRelation.DefL()) == 0 );
       
   622     TL( aRelation.LeftObjectId() == aTRelation.LeftObjectId())
       
   623     TL( aRelation.RightObjectId() == aTRelation.RightObjectId()) 
       
   624     }
       
   625 
       
   626 // -----------------------------------------------------------------------------
       
   627 // CMdETestScripter::CheckTMdEObjectArrayL
       
   628 // -----------------------------------------------------------------------------
       
   629 //
       
   630 void CMdETestScripter::CheckTMdEObjectArrayL(
       
   631     const RArray<TMdEObject>& aTObjects, const TInt aIndex, const TInt aCount )
       
   632     {
       
   633     TL( aTObjects.Count() == aCount );
       
   634 
       
   635     for ( TInt i = 0; i < aTObjects.Count(); ++i )
       
   636         {
       
   637         const CMdEObject* object = NULL;
       
   638         TInt j;
       
   639 
       
   640         for ( j = 0; aIndex + j < iObjectArray.Count(); ++j )
       
   641             {
       
   642             if ( iObjectArray[ aIndex + j ]->Id() == aTObjects[ i ].Id())
       
   643                 {
       
   644                 object = iObjectArray[ aIndex + j ];
       
   645 
       
   646                 CheckTMdEObjectL( aTObjects[ i ], *object );
       
   647                 break;
       
   648                 }
       
   649             }
       
   650         TL( object );
       
   651         }
       
   652     }
       
   653 
       
   654 // -----------------------------------------------------------------------------
       
   655 // CMdETestScripter::CheckTMdERelationArrayL
       
   656 // -----------------------------------------------------------------------------
       
   657 //
       
   658 void CMdETestScripter::CheckTMdERelationArrayL(
       
   659     const RArray<TMdERelation>& aTRelations, const TInt aIndex, const TInt aCount )
       
   660     {
       
   661     TL( aTRelations.Count() == aCount );
       
   662 
       
   663     for ( TInt i = 0; i < aTRelations.Count(); ++i )
       
   664         {
       
   665         const CMdERelation* relation = NULL;
       
   666         TInt j;
       
   667 
       
   668         for ( j = 0; aIndex + j < iRelationArray.Count(); ++j )
       
   669             {
       
   670             if ( iRelationArray[ aIndex + j ]->Id() == aTRelations[ i ].Id())
       
   671                 {
       
   672                 relation = iRelationArray[ aIndex + j ];
       
   673 
       
   674                 CheckTMdERelationL( aTRelations[ i ], *relation );
       
   675                 break;
       
   676                 }
       
   677             }
       
   678         TL( relation );
       
   679         }
       
   680     }
       
   681 
       
   682 // -----------------------------------------------------------------------------
       
   683 // CMdETestScripter::CheckTItemIdArrayL
       
   684 // -----------------------------------------------------------------------------
       
   685 //
       
   686 template <class T> void CMdETestScripter::CheckTItemIdArrayL(
       
   687     const RArray<TItemId>& aTItemIds, const RPointerArray<T>& aArray,
       
   688     const TInt aIndex, const TInt aCount )
       
   689     {
       
   690     TL( aTItemIds.Count() == aCount );
       
   691 
       
   692     for ( TInt i = 0; i < aTItemIds.Count(); ++i )
       
   693         {
       
   694         const T* t = NULL;
       
   695         TInt j;
       
   696 
       
   697         for ( j = 0; aIndex + j < aArray.Count(); ++j )
       
   698             {
       
   699             if ( aArray[ aIndex + j ]->Id() == aTItemIds[ i ] )
       
   700                 {
       
   701                 t = aArray[ aIndex + j ];
       
   702 
       
   703                 break;
       
   704                 }
       
   705             }
       
   706         TL( t );
       
   707         }
       
   708     }
       
   709 
       
   710 // -----------------------------------------------------------------------------
       
   711 // CMdETestScripter::CheckAsyncResultArrayL
       
   712 // -----------------------------------------------------------------------------
       
   713 //
       
   714 TInt CMdETestScripter::CheckAsyncResultArrayL( TEventIf aEvent )
       
   715     {
       
   716     TInt err = KErrNone;
       
   717     if ( 0 == aEvent.Name().Compare( KMdEItemsAsyncAdd ) 
       
   718         || 0 == aEvent.Name().Compare( KMdEItemsAsyncUpdate ) )
       
   719         {
       
   720         //Check result item ids count of iMdEDataBuf
       
   721         //Update ids of iItemArray( iObjectArray, iRelationArray, iEventsArray ) to clear temp test data in delete() later.
       
   722         err = iMdeSession->DeserializeItemsL( iMdEDataBuf, iItemArray );
       
   723         }
       
   724     else if ( 0 == aEvent.Name().Compare( KMdEObjectsAsyncRemoved )
       
   725         || 0 == aEvent.Name().Compare( KMdEEventsAsyncRemoved )
       
   726         || 0 == aEvent.Name().Compare( KMdERelationsAsyncRemoved ) )
       
   727         {
       
   728         RArray<TItemId> objectIds, eventIds, relationIds;
       
   729         err = iMdeSession->DeserializeIdsL( iMdEDataBuf, &objectIds, &eventIds, &relationIds );
       
   730         
       
   731         //Check result item ids count of iMdEDataBuf
       
   732         if ( 0 == aEvent.Name().Compare( KMdEObjectsAsyncRemoved ) )
       
   733             {
       
   734             TL( objectIds.Count() == iItemCount );
       
   735             }
       
   736         else if ( 0 == aEvent.Name().Compare( KMdEEventsAsyncRemoved ) )
       
   737             {
       
   738             TL( eventIds.Count() == iItemCount );
       
   739             }
       
   740         else if ( 0 == aEvent.Name().Compare( KMdERelationsAsyncRemoved ) )
       
   741             {
       
   742             TL( relationIds.Count() == iItemCount );
       
   743             }
       
   744         objectIds.Close();
       
   745         eventIds.Close();
       
   746         relationIds.Close();
       
   747         }
       
   748     iItemCount = 0;
       
   749     iItemArray.Reset();
       
   750     iMdEDataBuf.Close();//Clean mde buffer
       
   751     return err;
       
   752     }
       
   753 
       
   754 // -----------------------------------------------------------------------------
       
   755 // CMdETestScripter::FormInstanceItemArrayL
       
   756 // -----------------------------------------------------------------------------
       
   757 //
       
   758 void CMdETestScripter::FormInstanceItemArrayL(
       
   759     CStifItemParser& aItem, RPointerArray<CMdEInstanceItem>& aItemArray ) const
       
   760     {
       
   761     TInt mode2;
       
   762     TInt index;
       
   763     TInt count;
       
   764 
       
   765     User::LeaveIfError( aItem.GetNextInt( mode2 ));
       
   766     User::LeaveIfError( aItem.GetNextInt( index ));
       
   767     User::LeaveIfError( aItem.GetNextInt( count ));
       
   768 
       
   769     for ( TInt i = 0; i < count; ++i )
       
   770         {
       
   771         if ( mode2 == EObject )
       
   772             {
       
   773             aItemArray.Append( iObjectArray[ index + i ] );
       
   774             }
       
   775         else if ( mode2 == ERelation )
       
   776             {
       
   777             aItemArray.Append( iRelationArray[ index + i ] );
       
   778             }
       
   779         else if ( mode2 == EEvent )
       
   780             {
       
   781             aItemArray.Append( iEventArray[ index + i ] );
       
   782             }
       
   783         else if ( mode2 == EProperty )
       
   784             {
       
   785             aItemArray.Append( iPropertyArray[ index + i ] );
       
   786             }
       
   787         }
       
   788     }
       
   789 
       
   790 // -----------------------------------------------------------------------------
       
   791 // CMdETestScripter::SanitizeArrayIndexL
       
   792 // -----------------------------------------------------------------------------
       
   793 //
       
   794 template <class T> T* CMdETestScripter::SanitizeArrayIndexL(
       
   795     RPointerArray<T>& aArray, const CDesCArrayFlat& aNameArray, 
       
   796     CStifItemParser& aItem )
       
   797     {
       
   798     __ASSERT_ALWAYS( aArray.Count() == aNameArray.Count(),
       
   799                      User::Panic( KMdETestScripter, KErrGeneral ));
       
   800 
       
   801     TPtrC nameOrIndex;
       
   802     User::LeaveIfError( aItem.GetNextString( nameOrIndex ));
       
   803 	TLex lex( nameOrIndex );
       
   804 	TInt index;
       
   805 	TInt err = lex.Val( index );
       
   806 	if ( err == KErrGeneral )
       
   807 		{ // string is name identifier
       
   808 		for ( TInt nameIndex = 0; nameIndex < aNameArray.Count(); nameIndex++)
       
   809 			{
       
   810 			if ( nameOrIndex.Compare( aNameArray[ nameIndex ] ) == 0 )
       
   811 				{
       
   812 				return aArray[ nameIndex ];	
       
   813 				}
       
   814 			}
       
   815 		User::Leave( KErrNotFound );
       
   816 		return NULL; // suppress compile warning
       
   817 		}
       
   818 	else
       
   819 		{
       
   820 		if ( index == KLast )
       
   821     		{
       
   822     		index = aArray.Count() - 1;
       
   823     		}
       
   824 
       
   825 		TL( aArray.Count() > index );
       
   826 		return aArray[ index ];
       
   827 		}		
       
   828     }
       
   829 
       
   830 // ========================== TEMPLATE METHOD INSTANTIATIONS ===================
       
   831 
       
   832 // -----------------------------------------------------------------------------
       
   833 // CMdETestScripter::SanitizeArrayIndexL
       
   834 // -----------------------------------------------------------------------------
       
   835 //
       
   836 template CMdEObjectDef* CMdETestScripter::SanitizeArrayIndexL(
       
   837     RPointerArray<CMdEObjectDef>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   838 template CMdERelationDef* CMdETestScripter::SanitizeArrayIndexL(
       
   839     RPointerArray<CMdERelationDef>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   840 template CMdEEventDef* CMdETestScripter::SanitizeArrayIndexL(
       
   841     RPointerArray<CMdEEventDef>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   842 template CMdEPropertyDef* CMdETestScripter::SanitizeArrayIndexL(
       
   843     RPointerArray<CMdEPropertyDef>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   844 template CMdENamespaceDef* CMdETestScripter::SanitizeArrayIndexL(
       
   845     RPointerArray<CMdENamespaceDef>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   846 template CMdEObject* CMdETestScripter::SanitizeArrayIndexL(
       
   847     RPointerArray<CMdEObject>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   848 template CMdERelation* CMdETestScripter::SanitizeArrayIndexL(
       
   849     RPointerArray<CMdERelation>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   850 template CMdEEvent* CMdETestScripter::SanitizeArrayIndexL(
       
   851     RPointerArray<CMdEEvent>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   852 template CMdEProperty* CMdETestScripter::SanitizeArrayIndexL(
       
   853     RPointerArray<CMdEProperty>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   854 template CMdERelationCondition* CMdETestScripter::SanitizeArrayIndexL(
       
   855     RPointerArray<CMdERelationCondition>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   856 template CMdELogicCondition* CMdETestScripter::SanitizeArrayIndexL(
       
   857     RPointerArray<CMdELogicCondition>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   858 template CMdEPropertyCondition* CMdETestScripter::SanitizeArrayIndexL(
       
   859     RPointerArray<CMdEPropertyCondition>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   860 template CMdEEventCondition* CMdETestScripter::SanitizeArrayIndexL(
       
   861     RPointerArray<CMdEEventCondition>& aArray, const CDesCArrayFlat& aNameArray, CStifItemParser& aItem );
       
   862 
       
   863 // -----------------------------------------------------------------------------
       
   864 // CMdETestScripter::CheckTItemIdArrayL
       
   865 // -----------------------------------------------------------------------------
       
   866 //
       
   867 template void CMdETestScripter::CheckTItemIdArrayL(
       
   868     const RArray<TItemId>& aTItemIds, const RPointerArray<CMdEObject>& aArray,
       
   869     const TInt aIndex, const TInt aCount );
       
   870 template void CMdETestScripter::CheckTItemIdArrayL(
       
   871     const RArray<TItemId>& aTItemIds, const RPointerArray<CMdEEvent>& aArray,
       
   872     const TInt aIndex, const TInt aCount );
       
   873 template void CMdETestScripter::CheckTItemIdArrayL(
       
   874     const RArray<TItemId>& aTItemIds, const RPointerArray<CMdERelation>& aArray,
       
   875     const TInt aIndex, const TInt aCount );
       
   876 
       
   877 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   878 // None
       
   879 
       
   880 //  [End of File] - Do not remove