datasourcemodules/locationapesuplpsy/inc/suplpsygenericinfouser.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2005 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:  SUPL PSY position requestor header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SUPLPSYGENERICINFOUSER_H
       
    21 #define SUPLPSYGENERICINFOUSER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <lbs.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  This class is helper class for SUPL PSY to handle HPositionGenericInfo.
       
    32 *  
       
    33 *  @lib nlaapesuplpsy.dll
       
    34 *  @since S60 3.1
       
    35 */
       
    36 class SuplPsyGenericInfoUser
       
    37     {
       
    38     public:
       
    39         /**
       
    40         * Return the number of fields that SUPL PSY supports
       
    41         * @return Number of the filelds that SUPL PSY supports
       
    42         */
       
    43         static TInt SupportedFieldsCount();
       
    44 
       
    45         /**
       
    46         * Return the supported field id
       
    47         * @param aIndex The index in the array
       
    48         * @return The field Id
       
    49         */
       
    50         static TInt SupportedFieldAt( TInt aIndex );
       
    51 
       
    52         /**
       
    53         * Copy HPositionGenericInfo
       
    54         * @param aSrc The source HPositionGenericInfo
       
    55         * @param aDes The destination of HPositionGenericInfo
       
    56         */
       
    57         static TInt CopyHGenericInfo( 
       
    58             const HPositionGenericInfo& aSrc,
       
    59             HPositionGenericInfo& aDes );
       
    60             
       
    61     private:
       
    62         /**
       
    63         * Copy field value from one HPositionGenericInfo to another
       
    64         */
       
    65         static TInt CopyField( 
       
    66             const HPositionGenericInfo& aSrc,
       
    67             HPositionGenericInfo& aDes,
       
    68             TInt aFieldId );
       
    69 
       
    70         /**
       
    71         * Get field data type
       
    72         */
       
    73         static TInt FieldDataType( 
       
    74             TInt aFieldId, 
       
    75             TInt& aFieldDataType, 
       
    76             TBool& aIsList );
       
    77 
       
    78         /**
       
    79         * Copy data by type
       
    80         */
       
    81         static TInt CopyDataByType( 
       
    82             const HPositionGenericInfo& aSrc,
       
    83             HPositionGenericInfo& aDes,
       
    84             TInt aFieldId,
       
    85             TInt aDataType );
       
    86             
       
    87         /**
       
    88         * Copy data template function
       
    89         */
       
    90         template < class T > static TInt CopyData( 
       
    91             const HPositionGenericInfo& aSrc,
       
    92             HPositionGenericInfo& aDes,
       
    93             TInt aFieldId );
       
    94 
       
    95     };
       
    96 
       
    97 #endif      // SUPLPSYGENERICINFOUSER_H   
       
    98             
       
    99 // End of File