datasourcemodules/bluetoothgpspositioningmodule/btgpspsy/inc/Init/BTGPSNokGpsInitialiser.h
changeset 36 b47902b73a93
parent 0 9cfd9a3ee49c
equal deleted inserted replaced
35:a2efdd544abf 36:b47902b73a93
       
     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 BTGPSNOKGPSINITIALISER_H
       
    22 #define BTGPSNOKGPSINITIALISER_H
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include <e32base.h> 
       
    27 #include "BTGPSMessageListener.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION  PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CBTGPSConnectManager;
       
    39 class CBTGPSSettingManager;
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 /**
       
    44 *  This class defines object that initialise BT GPS device that support Nokia proprietary 
       
    45 *  feature. This is a self destruction class.
       
    46 *  
       
    47 */
       
    48 class CBTGPSNokGpsInitialiser: public CBase, private MBTGPSMessageListener
       
    49     {
       
    50     public: 
       
    51 
       
    52         /**
       
    53         * Two-phase construction.
       
    54 		* @param aConnectManager Reference to connect manager
       
    55 		* @param aSettingManager Reference to setting manager
       
    56 		* @param aOwner Reference to owner pointer. The owner pointer will be nullified
       
    57 		*               when this object is destructed.
       
    58         */
       
    59         static CBTGPSNokGpsInitialiser * NewL(
       
    60             CBTGPSConnectManager& aConnectManager,
       
    61             CBTGPSSettingManager& aSettingManager,
       
    62             CBTGPSNokGpsInitialiser*& aOwner);
       
    63 
       
    64         /**
       
    65         * Two-phase construction. Same as NewL function, unless it won't leave.
       
    66         * @return NULL If the object can't be constructed.
       
    67         */
       
    68         static CBTGPSNokGpsInitialiser * New(
       
    69             CBTGPSConnectManager& aConnectManager,
       
    70             CBTGPSSettingManager& aSettingManager,
       
    71             CBTGPSNokGpsInitialiser*& aOwner);
       
    72 
       
    73         /**
       
    74         * Destructor
       
    75         */
       
    76         virtual ~CBTGPSNokGpsInitialiser();
       
    77     
       
    78     private:
       
    79         /**
       
    80         * From MBTGPSMessageListener
       
    81         */
       
    82         virtual void HandleMessage(const TBTGPSNmeaParser& aParser);
       
    83            
       
    84     private:
       
    85 
       
    86         /**
       
    87         * Second phase of the construction
       
    88         */
       
    89         void ConstructL();
       
    90 
       
    91         /**
       
    92         * Private constructor
       
    93         */
       
    94         CBTGPSNokGpsInitialiser(
       
    95             CBTGPSConnectManager& aConnectManager,
       
    96             CBTGPSSettingManager& aSettingManager,
       
    97             CBTGPSNokGpsInitialiser*& aOwner);
       
    98             
       
    99     private:
       
   100         //Connect Manager
       
   101         CBTGPSConnectManager& iConnectManager;
       
   102         
       
   103         //Setting manager
       
   104         CBTGPSSettingManager& iSettingManager;
       
   105         
       
   106         //The owner pointer
       
   107         CBTGPSNokGpsInitialiser*& iOwner;
       
   108         
       
   109         //Init step
       
   110         TInt iStep;
       
   111 
       
   112     };
       
   113 #endif
       
   114 // End of File
       
   115