common/tools/ats/smoketest/email/mobilitytestframework/src/tmobilitytestpropertymapaccess.cpp
changeset 719 d5603c08781b
child 872 17498133d9ad
equal deleted inserted replaced
718:b18be44be852 719:d5603c08781b
       
     1 // Copyright (c) 2007-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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "tmobilitytestpropertymapaccess.h"
       
    17 #include "mobilitytestpropertymap.h"
       
    18 
       
    19 EXPORT_C const TMsgTestPropertyMapEntry* TMobilityTestPropertyMapAccess::Get(TDesC* aName)
       
    20 	{
       
    21 	TInt i=0;
       
    22 
       
    23 	while (propertyMapList[i].value != 0xffffffff)
       
    24 		{
       
    25 		TBufC8<80> buf8((const unsigned char*)(propertyMapList[i].name));
       
    26 
       
    27 		TBuf<80> buf;
       
    28 		buf.Copy(buf8);
       
    29 
       
    30 		if (aName->CompareF(buf) == 0)
       
    31 			{
       
    32 			return &propertyMapList[i];
       
    33 			}
       
    34 
       
    35 		++i;
       
    36 		}
       
    37 
       
    38 	return NULL;
       
    39 	}
       
    40 
       
    41 EXPORT_C const TMsgTestPropertyMapEntry* TMobilityTestPropertyMapAccess::Get(TInt aValue)
       
    42 	{
       
    43 	TInt i=0;
       
    44 
       
    45 	while (propertyMapList[i].value != 0xFFFFFFFF)
       
    46 		{
       
    47 		if (propertyMapList[i].value == aValue)
       
    48 			{
       
    49 			return &propertyMapList[i];
       
    50 			}
       
    51 		
       
    52 		++i;
       
    53 		}
       
    54 
       
    55 	return NULL;
       
    56 	}