|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include <lbscommon.h> |
|
20 #include <lbspositioninfo.h> |
|
21 #include <f32file.h> |
|
22 |
|
23 #include "epos_defaultproxycommon.h" |
|
24 #include "EPos_CPosDefaultPositioner.h" |
|
25 #include "EPos_CPosRequestController.h" |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ======================= |
|
28 |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // |
|
32 CPosDefaultPositioner::CPosDefaultPositioner() |
|
33 { |
|
34 } |
|
35 |
|
36 // EPOC default constructor can leave. |
|
37 void CPosDefaultPositioner::ConstructL(TAny* aConstructionParameters) |
|
38 { |
|
39 TRACESTRING( "CPosDefaultPositioner::ConstructL start... " ) |
|
40 |
|
41 CProxyPositioner::BaseConstructL(aConstructionParameters); |
|
42 iRequestController = CPosRequestController::NewL( |
|
43 *this, |
|
44 ModuleSettingsManager(), |
|
45 ModuleStatusManager() ); |
|
46 |
|
47 TRACESTRING( "CPosDefaultPositioner::ConstructL end " ) |
|
48 } |
|
49 |
|
50 // Two-phased constructor. |
|
51 CPosDefaultPositioner* CPosDefaultPositioner::NewL(TAny* aConstructionParameters) |
|
52 { |
|
53 CPosDefaultPositioner* self = new (ELeave) CPosDefaultPositioner; |
|
54 CleanupStack::PushL(self); |
|
55 self->ConstructL(aConstructionParameters); |
|
56 CleanupStack::Pop(self); |
|
57 return self; |
|
58 } |
|
59 |
|
60 // Destructor |
|
61 CPosDefaultPositioner::~CPosDefaultPositioner() |
|
62 { |
|
63 delete iRequestController; |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------- |
|
67 // CPosDefaultPositioner::NotifyPositionUpdate |
|
68 // --------------------------------------------------------- |
|
69 // |
|
70 void CPosDefaultPositioner::NotifyPositionUpdate( |
|
71 TPositionInfoBase& aPosInfo, |
|
72 TRequestStatus& aStatus) |
|
73 { |
|
74 iRequestController->NotifyPositionUpdate(aPosInfo, aStatus); |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------- |
|
78 // CPosDefaultPositioner::CancelNotifyPositionUpdate(TInt aError) |
|
79 // --------------------------------------------------------- |
|
80 // |
|
81 void CPosDefaultPositioner::CancelNotifyPositionUpdate(TInt aError) |
|
82 { |
|
83 iRequestController->CancelNotifyPositionUpdate(aError); |
|
84 } |
|
85 |
|
86 // --------------------------------------------------------- |
|
87 // CPosDefaultPositioner::CancelNotifyPositionUpdate |
|
88 // --------------------------------------------------------- |
|
89 // |
|
90 void CPosDefaultPositioner::CancelNotifyPositionUpdate() |
|
91 { |
|
92 iRequestController->CancelNotifyPositionUpdate(); |
|
93 } |
|
94 |
|
95 // --------------------------------------------------------- |
|
96 // CPosDefaultPositioner::TrackingOverridden |
|
97 // --------------------------------------------------------- |
|
98 // |
|
99 TBool CPosDefaultPositioner::TrackingOverridden() const |
|
100 { |
|
101 return ETrue; |
|
102 } |
|
103 |
|
104 // --------------------------------------------------------- |
|
105 // CPosDefaultPositioner::StartTrackingL |
|
106 // --------------------------------------------------------- |
|
107 // |
|
108 void CPosDefaultPositioner::StartTrackingL( |
|
109 const TTimeIntervalMicroSeconds& aInterval) |
|
110 { |
|
111 iRequestController->StartTracking(aInterval); |
|
112 |
|
113 iTrackingInterval = aInterval; |
|
114 } |
|
115 |
|
116 // --------------------------------------------------------- |
|
117 // CPosDefaultPositioner::StopTracking |
|
118 // --------------------------------------------------------- |
|
119 // |
|
120 void CPosDefaultPositioner::StopTracking() |
|
121 { |
|
122 iRequestController->StopTracking(); |
|
123 |
|
124 iTrackingInterval = TTimeIntervalMicroSeconds(0); |
|
125 } |
|
126 |
|
127 // --------------------------------------------------------- |
|
128 // CPosDefaultPositioner::TrackingInterval |
|
129 // --------------------------------------------------------- |
|
130 // |
|
131 TTimeIntervalMicroSeconds CPosDefaultPositioner::TrackingInterval() const |
|
132 { |
|
133 return iTrackingInterval; |
|
134 } |
|
135 |
|
136 // End of File |