|
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 Engine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_LBTSTRATEGYENGINE_H |
|
21 #define C_LBTSTRATEGYENGINE_H |
|
22 |
|
23 #include <etelmm.h> |
|
24 #include "lbtstrategy.h" |
|
25 #include "lbttriggerview.h" |
|
26 #include "lbttriggerchangeobserver.h" |
|
27 #include "lbtcoordinatesupervisor.h" |
|
28 #include "lbtcellsupervisor.h" |
|
29 |
|
30 class MLbtStrategyEngineObsrvr; |
|
31 class CLbtCellChangeHandler; |
|
32 |
|
33 /** |
|
34 * CLbtStrategyEngine is responsible for supervising triggers in the system. |
|
35 * The instance of CLbtStrategyEngine acquires the terminal's location |
|
36 * information using the instance of CLbtLocationRequestor and supervises |
|
37 * triggers. It notifies location triggering server logic component when |
|
38 * triggers are fired. |
|
39 * |
|
40 * @since S60 v4.0 |
|
41 */ |
|
42 NONSHARABLE_CLASS( CLbtStrategyEngine ) : public MLbtContainerChangeEventObserver, |
|
43 public MLbtTriggerViewObserver |
|
44 |
|
45 { |
|
46 public: // Methods |
|
47 |
|
48 /** |
|
49 * Factory function that instantiates an object of CLbtStrategyEngine |
|
50 * |
|
51 * @param aConstructionParameters - |
|
52 */ |
|
53 static CLbtStrategyEngine* NewL( TAny* aConstructionParameters, |
|
54 MLbtStrategyEngineObsrvr* aObserver ); |
|
55 |
|
56 /** |
|
57 * Destructor |
|
58 */ |
|
59 ~CLbtStrategyEngine(); |
|
60 |
|
61 public: |
|
62 |
|
63 /** |
|
64 * Called by CLbtStrategy to issue request to start supervision |
|
65 */ |
|
66 void StartSupervision(); |
|
67 |
|
68 /** |
|
69 * Called by CLbtStrategy to issue request to stop the supervision process |
|
70 */ |
|
71 void StopSupervision(); |
|
72 |
|
73 /** |
|
74 * Called by CLbtStrategy when settings related to trigger supervision |
|
75 * changes |
|
76 */ |
|
77 void SettingsChanged(); |
|
78 |
|
79 public: // from interface class MTriggerViewObserver |
|
80 |
|
81 /** |
|
82 * From MTriggerViewObserver |
|
83 * Called by CLbtTriggerView when the view is refreshed after a new |
|
84 * position fix is provided or after trigger modifications are |
|
85 * notified by the Container |
|
86 */ |
|
87 virtual void OperationComplete( |
|
88 MLbtTriggerViewObserver::TOperation aOperation ); |
|
89 |
|
90 public: // from interface class MLbtContainerChangeEventObserver |
|
91 |
|
92 /** |
|
93 * From MLbtContainerChangeEventObserver |
|
94 * Called by Location Triggering Container when trigger(s) is / are |
|
95 * modified or created |
|
96 * |
|
97 * @param aTriggerIds - ID(s) of the trigger(s) that was/were created or |
|
98 * modified |
|
99 */ |
|
100 virtual void TriggerStoreChanged( RArray<TLbtTriggerId>& aTriggerIds, |
|
101 TLbtTriggerEventMask aEventMask, |
|
102 TLbtContainerChangedAreaType aAreaType, |
|
103 RArray<TUid>& aManagerUids ); |
|
104 |
|
105 |
|
106 private: |
|
107 void ConstructL( TAny* aConstructionParameters, |
|
108 MLbtStrategyEngineObsrvr* aObserver ); |
|
109 |
|
110 CLbtStrategyEngine(); |
|
111 |
|
112 /** |
|
113 * Initialises Etel. |
|
114 */ |
|
115 void InitialiseEtelL(); |
|
116 |
|
117 private: |
|
118 |
|
119 CLbtTriggerView* iView; |
|
120 |
|
121 CLbtCoOrdinateSupervisor* iCoOrdinateSupervisor; |
|
122 |
|
123 CLbtCellSupervisor* iCellSupervisor; |
|
124 |
|
125 TBool iSupervisionInitiated; |
|
126 |
|
127 TBool iViewInitialised; |
|
128 |
|
129 MLbtContainerChangeEventObserver::TLbtContainerChangedAreaType iChangedAreaType; |
|
130 |
|
131 RTelServer iTelServer; |
|
132 |
|
133 RMobilePhone iMPhone; |
|
134 |
|
135 CLbtCellChangeHandler* iCellChangeHandler; |
|
136 }; |
|
137 |
|
138 #endif // C_LBTSTRATEGYENGINE_H |