|
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 #ifndef C_LBTSTRATEGY_H |
|
21 #define C_LBTSTRATEGY_H |
|
22 |
|
23 |
|
24 #include "lbtstrategybase.h" |
|
25 #include "lbtstrategyengineobserver.h" |
|
26 |
|
27 |
|
28 class CLbtStrategyEngine; |
|
29 |
|
30 |
|
31 /** |
|
32 * CLbtStrategy is an ECom plugin that implements CLbtStrategyBase class. This |
|
33 * class defines a containment for a single instance of CLBtStrategyEngine that |
|
34 * is responsible for supervising triggers in the system. Notifications from |
|
35 * CLbtStrategyEngine about firing of triggers, status of trigger supervision |
|
36 * is received and forwarded to location triggering server logic. |
|
37 * |
|
38 * @since S60 v4.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CLbtStrategy ) : public CLbtStrategyBase, |
|
41 public MLbtStrategyEngineObsrvr |
|
42 |
|
43 { |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Factory function that instantiates an object of CLbtStrategy |
|
49 * |
|
50 * @param aConstructionParameters - |
|
51 */ |
|
52 static CLbtStrategy* NewL( TAny* aConstructionParameters ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~CLbtStrategy(); |
|
58 |
|
59 public: // from base class CLbtStrategyBase |
|
60 |
|
61 /** |
|
62 * From CLbtStrategyBase |
|
63 * Called by Location Triggering Server Logic to issue request to |
|
64 * start supervision |
|
65 */ |
|
66 virtual void StartSupervision(); |
|
67 |
|
68 /** |
|
69 * From CLbtStrategyBase |
|
70 * Called by Location Triggering Server Logic to issue request to |
|
71 * stop the supervision process. |
|
72 */ |
|
73 virtual void StopSupervision(); |
|
74 |
|
75 /** |
|
76 * From CLbtStrategyBase |
|
77 * Called by Location Triggering Server Logic when settings related to |
|
78 * trigger supervision changes |
|
79 */ |
|
80 virtual void TriggeringSupervisionSettingsChanged(); |
|
81 |
|
82 public: // from observer class MLbtStrategyEngineObsrvr |
|
83 |
|
84 /** |
|
85 * From MLbtStrategyEngineObsrvr |
|
86 * Called by Strategy Engine to report trigger fire events |
|
87 */ |
|
88 void TriggerFired(CLbtGeoAreaBase::TGeoAreaType aAreaType,TLbtTriggerId aId, const TPositionInfo& aPosInfo ); |
|
89 |
|
90 /** |
|
91 * From MLbtStrategyEngineObsrvr |
|
92 * Called by Strategy Engine to report triggering supervision status |
|
93 */ |
|
94 void ReportTriggeringSupervisionStatus( |
|
95 const TLbtStrategySupervisionDynamicInfo& aDynInfo ); |
|
96 |
|
97 /** |
|
98 * From MLbtStrategyEngineObsrvr |
|
99 * Called by Strategy Engine to retrieve triggering settings information |
|
100 */ |
|
101 void RetrieveTriggeringSettings( |
|
102 TLbtStrategyTriggeringSupervisionSettings& aSettings ); |
|
103 |
|
104 private: |
|
105 |
|
106 /** |
|
107 * 2nd phase constuctor for instantiating member variables |
|
108 * |
|
109 * @param aConstructionParameters - |
|
110 */ |
|
111 void ConstructL( TAny* aConstructionParameters ); |
|
112 |
|
113 /** |
|
114 * Default constructor |
|
115 */ |
|
116 CLbtStrategy(); |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * Ownership of the handle to Strategy Engine is maintained in the |
|
122 * instance of this class |
|
123 */ |
|
124 CLbtStrategyEngine* iStrategyEngine; |
|
125 |
|
126 }; |
|
127 |
|
128 #endif |