datasourcemodules/bluetoothgpspositioningmodule/btgpspsy/inc/Utils/BTGPSConstantsManager.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2005-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 
       
    19 
       
    20 
       
    21 #ifndef BTGPSCONSTANTSMANAGER_H
       
    22 #define BTGPSCONSTANTSMANAGER_H
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <f32file.h>
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class RResourceFile;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  Manager class for global defined contants. This class read all
       
    44 *  the pre-defined constants from resource file on construction.
       
    45 *  
       
    46 */
       
    47 class CBTGPSConstantsManager: public CBase
       
    48     {
       
    49     public: 
       
    50 
       
    51         /**
       
    52         * Two-phase construction.
       
    53         */
       
    54         static CBTGPSConstantsManager * NewL();
       
    55 
       
    56         /**
       
    57         * Destructor
       
    58         */
       
    59         virtual ~CBTGPSConstantsManager();
       
    60 
       
    61     private:
       
    62 
       
    63         /**
       
    64         * Second phase of the construction
       
    65         */
       
    66         void ConstructL();
       
    67 
       
    68         /**
       
    69         * Private constructor
       
    70         * @param aId Timer id.
       
    71         * @param aListener The timer event listener.
       
    72         */
       
    73         CBTGPSConstantsManager();
       
    74 
       
    75         /**
       
    76         * Get localisable resource name
       
    77         * This function leaves if no localisable resource is found
       
    78         */
       
    79         TFileName* GetLocalisableResourceNameL(RFs& aFs);
       
    80         
       
    81         /**
       
    82         * Get TInt from Central Repositary
       
    83         */
       
    84         void GetIntL();
       
    85             
       
    86         /**
       
    87         * Get text from resource
       
    88         */
       
    89         HBufC* GetTextL(
       
    90             RResourceFile& aResourceFile, 
       
    91             TInt aId);
       
    92         
       
    93         /**
       
    94         * Check Range
       
    95         */
       
    96         template<class T> void CheckRangeL(
       
    97             T aValue, 
       
    98             T aMin, 
       
    99             T aMax);
       
   100         
       
   101     public:
       
   102         ///Send delay
       
   103         TInt iSendDelay;
       
   104 
       
   105         ///The user equivalent range error used in GPS data 
       
   106         ///error calculations in meters
       
   107         TReal iUserEquivalentRangeError; 
       
   108         
       
   109         ///The number of test NMEA sentences needed to receive during the 
       
   110         ///iTimeIntervalForDeviceTypeDetect of time.
       
   111         TInt iNumberOfTestNmeaSentences;
       
   112         
       
   113         ///Delay between the sending of initialisation messages
       
   114         TInt iDelayBetweenGpsInitMessages;
       
   115 
       
   116         ///The number of messages to repeately send to
       
   117         ///the GPS in initialisation to set it to full power mode
       
   118         TInt iNumberOfSetFullPowerMessage;
       
   119 
       
   120         ///Delay for waiting PNOK compatible BT GPS response PNOK polling message
       
   121         TInt iDelayForPNokGpsDetect;
       
   122         
       
   123         ///Inactive delay
       
   124         TInt iInactivityDelay; 
       
   125         
       
   126         ///Utilise power saving mode
       
   127         TInt iUtilisePowerSaving;
       
   128         
       
   129         ///Satellite Information(GSV sentences) life time
       
   130         TInt iSatelliteInfoLifeTime;
       
   131         
       
   132         ///Size of NMEA data buffer
       
   133         TInt iNmeaBufferSize;
       
   134 
       
   135 		///The text for battery low dialog
       
   136 		HBufC*   iBatteryLowDialogText;
       
   137 		
       
   138 		///The text for battery full dialog
       
   139 		HBufC*   iBatteryFullDialogText;
       
   140 		
       
   141 		///The text for ext. antenna connected dialog
       
   142 		HBufC*   iExtAntennaConnectedDialogText;
       
   143 		
       
   144 		///The text for ext. antenna disconnected dialog     
       
   145 		HBufC*   iExtAntennaDisconnectedDialogText;
       
   146 		
       
   147 		///The text for ext. antenna connected dialog
       
   148 		HBufC*   iExtPowerConnectedDialogText;
       
   149 		
       
   150 		///The text for ext. antenna disconnected dialog
       
   151 		HBufC*   iExtPowerDisconnectedDialogText;
       
   152 		       
       
   153     };
       
   154 #endif
       
   155 // End of File
       
   156