javaextensions/sensor/src.s60/csensorproperties.cpp
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Accelerometer sensor implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "csensorproperties.h"
       
    20 #include "logger.h"
       
    21 
       
    22 const TPtrC SensorProperties::GetPropertyString(const TNameKey* aKey, TInt aValue)
       
    23 {
       
    24     JELOG2(ESensor);
       
    25     for (TInt i = 0 ;  aKey[ i ].iName != NULL; i++)
       
    26     {
       
    27         if (aKey[ i ].iKey == aValue)
       
    28         {
       
    29             const TPtrC name = aKey[ i ].iName;
       
    30             return name;
       
    31         }
       
    32     }
       
    33     return KNullDesC();
       
    34 }