mapnavproviderrefapp/inc/mnrputils.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  MnrpUtils class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MNRP_UTILS_H
       
    20 #define MNRP_UTILS_H
       
    21 
       
    22 const TInt KMaxCoordStrSize = 15;
       
    23 
       
    24 class MnrpUtils
       
    25     {
       
    26     public:
       
    27     
       
    28         /** Converts given coordinate into a string 
       
    29          *  \param aCoord coordinate
       
    30          *  \param aStr target string of KMaxCoordStrSize length (at least)
       
    31          *  \param aFull if EFalse, will omit higher parts if they are 0,
       
    32          *               if ETrue, outputs degrees, minutes, seconds and milliseconds
       
    33          *  \param aMillis whether milliseconds should be included or not
       
    34          */
       
    35         IMPORT_C static void CoordinateToString( 
       
    36             TReal aCoord, 
       
    37             TDes& aStr, 
       
    38             TBool aFull = EFalse,
       
    39             TBool aMillis = EFalse );
       
    40             
       
    41         /** Converts given distance value to a string with units
       
    42          *  \param aDistance distance in meters 
       
    43          *  \param aStr target string
       
    44          */
       
    45         IMPORT_C static void DistanceToString( TReal aDistance, TDes& aStr );
       
    46 
       
    47         /** Converts given angle value to a string
       
    48          *  \param aAngle angle in degrees (angle form North Pole) 
       
    49          *  \param aStr target string
       
    50          */
       
    51         IMPORT_C static void AngleToString( TReal aAngle, TDes& aStr );
       
    52 
       
    53         /** Converts given speed value to a string with units
       
    54          *  \param aSpeed speed in meters per second
       
    55          *  \param aStr target string
       
    56          */
       
    57         IMPORT_C static void SpeedToString( TReal aSpeed, TDes& aStr );
       
    58 
       
    59         /** Replaces unprintable characters in a string with spaces
       
    60          *  \param aStr string to work with
       
    61          *  \return pointer to new string buffer with ownership
       
    62          */
       
    63         IMPORT_C static HBufC* PrintableStringLC( const TDesC& aStr );
       
    64     };
       
    65 
       
    66 #endif // MNRP_UTILS_H
       
    67