|
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 BTGPSNORMALGPSINITIALISER_H |
|
22 #define BTGPSNORMALGPSINITIALISER_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 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * This class defines object that intialise normal BT GPS device. |
|
44 * This is a self destructive class |
|
45 * |
|
46 */ |
|
47 class CBTGPSNormalGpsInitialiser: public CBase |
|
48 { |
|
49 public: |
|
50 |
|
51 /** |
|
52 * Two-phase construction. |
|
53 * @param aConnectManager Reference to connect manager |
|
54 * @param aOwner Refernce to owner pointer. The owner pointer will be |
|
55 * nullified when the object is destructed. |
|
56 */ |
|
57 static CBTGPSNormalGpsInitialiser * NewL( |
|
58 CBTGPSConnectManager& aConnectManager, |
|
59 CBTGPSNormalGpsInitialiser*& aOwner); |
|
60 |
|
61 /** |
|
62 * Two-phase non-leave construction. |
|
63 */ |
|
64 static CBTGPSNormalGpsInitialiser * New( |
|
65 CBTGPSConnectManager& aConnectManager, |
|
66 CBTGPSNormalGpsInitialiser*& aOwner); |
|
67 |
|
68 /** |
|
69 * Destructor |
|
70 */ |
|
71 virtual ~CBTGPSNormalGpsInitialiser(); |
|
72 |
|
73 private: |
|
74 |
|
75 /** |
|
76 * Second phase of the construction |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 /** |
|
81 * Private constructor |
|
82 * @param aId Timer id. |
|
83 * @param aListener The timer event listener. |
|
84 */ |
|
85 CBTGPSNormalGpsInitialiser( |
|
86 CBTGPSConnectManager& aConnectManager, |
|
87 CBTGPSNormalGpsInitialiser*& aOwner); |
|
88 |
|
89 /** |
|
90 * Timer callback |
|
91 */ |
|
92 void TimerTick(); |
|
93 |
|
94 /** |
|
95 * Static timer callback |
|
96 */ |
|
97 static TInt TimerCallback(TAny* aAny); |
|
98 |
|
99 private: |
|
100 //Connect Manager |
|
101 CBTGPSConnectManager& iConnectManager; |
|
102 |
|
103 //Owner |
|
104 CBTGPSNormalGpsInitialiser*& iOwner; |
|
105 |
|
106 //Timer |
|
107 CPeriodic* iTimer; |
|
108 |
|
109 //Init step |
|
110 TInt iStep; |
|
111 |
|
112 //Message counter |
|
113 TInt iCount; |
|
114 |
|
115 }; |
|
116 #endif |
|
117 // End of File |
|
118 |