|
1 /* |
|
2 * Copyright (c) 2010 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: Declaration of the Positioning Methods private engine class |
|
15 * used to get the list of available Psy & to manipulate |
|
16 * the state of the Psy by using the location framework apis. |
|
17 * |
|
18 * |
|
19 */ |
|
20 |
|
21 #ifndef POSPSYSETTINGSENGINEPRIVATE_H |
|
22 #define POSPSYSETTINGSENGINEPRIVATE_H |
|
23 |
|
24 #include "pospsysettingscommon.h" |
|
25 |
|
26 #include <qlist.h> |
|
27 #include <qstring.h> |
|
28 #include <EPos_MPosModulesObserver.h> |
|
29 |
|
30 /** |
|
31 * The class defines the interface for receiving position |
|
32 * technology change event.The class interested in position |
|
33 * technology change should inherit from this class. |
|
34 */ |
|
35 class PositionTechnologyChangeObserver |
|
36 { |
|
37 public: |
|
38 virtual void handlePositionTechnologyChange() = 0; |
|
39 }; |
|
40 |
|
41 |
|
42 // Forward declarations |
|
43 class CPosModules; |
|
44 class PosPsySettingsEngine; |
|
45 |
|
46 class PosPsySettingsEnginePrivate : public MPosModulesObserver |
|
47 { |
|
48 public: |
|
49 /** |
|
50 * Constructor |
|
51 */ |
|
52 PosPsySettingsEnginePrivate( PositionTechnologyChangeObserver& |
|
53 posTechChangeObserver); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 */ |
|
58 |
|
59 ~PosPsySettingsEnginePrivate(); |
|
60 |
|
61 /** |
|
62 * This method lists all the PSY that are available |
|
63 * @param[out] psyList - Contains the list of psys that are available |
|
64 * @return - KErrNone - if successfully finds any Psy |
|
65 * KErrNotFound - if no Psy available. |
|
66 */ |
|
67 int listPsys( QList<PosPsyInfo>& psyList ); |
|
68 |
|
69 /** |
|
70 * This method is used to change the state of the Psy based on the user's |
|
71 * action of either enabling/disabling the Psy. |
|
72 * @param[in] psyModuleId - the uid of the Psy whose state is to be changed. |
|
73 * @param[in] psyState - The value of state to which the Psy has to be changed. |
|
74 */ |
|
75 |
|
76 int changePsyState( TUid psyModuleId, PosPsyState psyState ); |
|
77 |
|
78 public: // from MPosModulesObserver |
|
79 virtual void HandleSettingsChangeL( TPosModulesEvent aEvent ); |
|
80 |
|
81 private: |
|
82 /** |
|
83 * This method uses the location framework apis to get the list of available psy |
|
84 */ |
|
85 void listPsysL(); |
|
86 /** |
|
87 * This method uses the location framework apis to manipulate the state of the Psy |
|
88 */ |
|
89 void changePsyStateL( TUid psyModuleId, PosPsyState psyState ); |
|
90 private : |
|
91 /** |
|
92 * Pointer to CPosModules |
|
93 * Owns |
|
94 */ |
|
95 CPosModules* mPosModules; |
|
96 |
|
97 /** |
|
98 * Contains list of PSY info |
|
99 * Own |
|
100 */ |
|
101 RArray<PosPsyInfo> mPsyInfoList; |
|
102 /** |
|
103 * Reference to position technology change observer. |
|
104 */ |
|
105 PositionTechnologyChangeObserver& mPosTechChangeObserver; |
|
106 /* |
|
107 * POinter to the name of the psy |
|
108 * ToDo: Should be removed |
|
109 */ |
|
110 QList<QString*> mNameList; |
|
111 |
|
112 friend class PosPsySettingsEngine; |
|
113 }; |
|
114 |
|
115 #endif /* POSPSYSETTINGSENGINEPRIVATE_H */ |