|
1 /* |
|
2 * Copyright (c) 2006, 2007 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: Class definition of Location Acquisition Strategy |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "lbtstrategy.h" |
|
21 #include "lbtstrategyengine.h" |
|
22 |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CLbtStrategy::NewL |
|
28 // |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CLbtStrategy* CLbtStrategy::NewL( TAny* aConstructionParameters ) |
|
32 { |
|
33 CLbtStrategy* self = new ( ELeave ) CLbtStrategy(); |
|
34 CleanupStack::PushL( self ); |
|
35 self->ConstructL( aConstructionParameters ); |
|
36 CleanupStack::Pop(); |
|
37 return self; |
|
38 } |
|
39 |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CLbtStrategy::~CLbtStrategy |
|
43 // |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 CLbtStrategy::~CLbtStrategy() |
|
47 { |
|
48 delete iStrategyEngine; |
|
49 } |
|
50 |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CLbtStrategy::StartSupervision |
|
54 // |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 void CLbtStrategy::StartSupervision() |
|
58 { |
|
59 iStrategyEngine->StartSupervision(); |
|
60 } |
|
61 |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CLbtStrategy::StopSupervision |
|
65 // |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 void CLbtStrategy::StopSupervision() |
|
69 { |
|
70 iStrategyEngine->StopSupervision(); |
|
71 } |
|
72 |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CLbtStrategy::TriggeringSupervisionSettingsChanged |
|
76 // |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 void CLbtStrategy::TriggeringSupervisionSettingsChanged() |
|
80 { |
|
81 iStrategyEngine->SettingsChanged(); |
|
82 } |
|
83 |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CLbtStrategy::TriggerFired |
|
87 // |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 void CLbtStrategy::TriggerFired( CLbtGeoAreaBase::TGeoAreaType aAreaType,TLbtTriggerId aId, |
|
91 const TPositionInfo& aPosInfo ) |
|
92 { |
|
93 TRAP_IGNORE( TriggerFiredL(aAreaType,aId, aPosInfo ) ); |
|
94 } |
|
95 |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // CLbtStrategy::ReportTriggeringSupervisionStatus |
|
99 // |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CLbtStrategy::ReportTriggeringSupervisionStatus( |
|
103 const TLbtStrategySupervisionDynamicInfo& aDynInfo ) |
|
104 { |
|
105 SetTriggeringSupervisionDynamicInfo( aDynInfo ); |
|
106 } |
|
107 |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CLbtStrategy::RetrieveTriggeringSettings |
|
111 // |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 void CLbtStrategy::RetrieveTriggeringSettings( |
|
115 TLbtStrategyTriggeringSupervisionSettings& aSettings ) |
|
116 { |
|
117 GetTriggeringSupervisionSettings( aSettings ); |
|
118 } |
|
119 |
|
120 |
|
121 // ----------------------------------------------------------------------------- |
|
122 // CLbtStrategy::ConstructL |
|
123 // |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 void CLbtStrategy::ConstructL( TAny* aConstructionParameters ) |
|
127 { |
|
128 BaseConstructL( aConstructionParameters ); |
|
129 iStrategyEngine = CLbtStrategyEngine::NewL( aConstructionParameters, this ); |
|
130 } |
|
131 |
|
132 |
|
133 // ----------------------------------------------------------------------------- |
|
134 // CLbtStrategy::CLbtStrategy |
|
135 // |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 CLbtStrategy::CLbtStrategy() : |
|
139 CLbtStrategyBase() |
|
140 { |
|
141 } |