|
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 engine class |
|
15 * used to get the list of available Psy & to manipulate |
|
16 * the state of the Psy. |
|
17 * |
|
18 * |
|
19 */ |
|
20 |
|
21 #ifndef POSPSYSETTINGSENGINE_H |
|
22 #define POSPSYSETTINGSENGINE_H |
|
23 |
|
24 #include "pospsysettingsengineprivate.h" |
|
25 |
|
26 #include <QObject> |
|
27 #include <qglobal.h> |
|
28 |
|
29 class PosPsySettingsEngine : public QObject, |
|
30 public PositionTechnologyChangeObserver |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 /** |
|
36 * Constructor |
|
37 */ |
|
38 PosPsySettingsEngine(); |
|
39 |
|
40 /** |
|
41 * Destructor |
|
42 */ |
|
43 |
|
44 ~PosPsySettingsEngine(); |
|
45 |
|
46 /** |
|
47 * This method lists all the PSY that are available |
|
48 * @param[out] psyList - Contains the list of psys that are available |
|
49 * @return - KErrNone - if successfully finds any Psy |
|
50 * KErrNotFound - if no Psy available. |
|
51 */ |
|
52 int listPsys(QList<PosPsyInfo>& psyList); |
|
53 |
|
54 /** |
|
55 * This method is used to change the state of the Psy based on the user's |
|
56 * action of either enabling/disabling the Psy. |
|
57 * @param[in] psyModuleId - the uid of the Psy whose state is to be changed. |
|
58 * @param[in] psyState - The value of state to which the Psy has to be changed. |
|
59 */ |
|
60 |
|
61 int changePsyState(TUid psyModuleId, PosPsyState psyState); |
|
62 |
|
63 public: // from PositionTechnologyChangeObserver |
|
64 void handlePositionTechnologyChange(); |
|
65 |
|
66 private: |
|
67 signals: |
|
68 /** |
|
69 * This signal is emitted when there is change in PSY wrt to |
|
70 * its availabilty, state etc.. |
|
71 */ |
|
72 void PSYChange(); |
|
73 private: |
|
74 Q_DECLARE_PRIVATE_D(d_ptr, PosPsySettingsEngine) |
|
75 private: |
|
76 /** |
|
77 * POinter to the PosPsySettingsEnginePrivate |
|
78 * Owns |
|
79 */ |
|
80 PosPsySettingsEnginePrivate* d_ptr; |
|
81 }; |
|
82 |
|
83 #endif /* POSPSYSETTINGSENGINE_H */ |