|
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: This is the engine header for SUPL Positioning Settings plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef POSSUPLSETTINGS_ENGINE_H |
|
19 #define POSSUPLSETTINGS_ENGINE_H |
|
20 |
|
21 |
|
22 //User Includes |
|
23 #include "possuplsettingsengineprivate.h" |
|
24 #include "possuplsettingscommon.h" |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <QObject> |
|
28 #include <qstringlist.h> |
|
29 #include <epos_csuplsettingparams.h> |
|
30 |
|
31 //Forward Declarations |
|
32 class PosSuplSettingsEnginePrivate; |
|
33 class MSuplSettingsObserver; |
|
34 |
|
35 class PosSuplSettingsEngine : public QObject, public PosSuplSettingsChangeObserver |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 PosSuplSettingsEngine(); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 ~PosSuplSettingsEngine(); |
|
50 |
|
51 /** |
|
52 * This method Lists all the Server that are present for Positioning. |
|
53 * @param [out] - aServerList. Contains the servers that are present. |
|
54 * @returns - KErrNone if successful |
|
55 * - KErrNotfound is no servers are present |
|
56 */ |
|
57 |
|
58 int suplServerList(QList<PosServerParams>& serverList); |
|
59 |
|
60 /** |
|
61 * This method Lists all the Server that are present for Positioning. |
|
62 * @param [out] - aServerList. Contains the servers that are present. |
|
63 * @returns - KErrNone if successful |
|
64 * - KErrNotfound is no servers are present |
|
65 */ |
|
66 |
|
67 int deletableServerList(QList<PosServerParams>& serverList); |
|
68 |
|
69 |
|
70 /** |
|
71 * This method enables/disables the server in use for postioning. |
|
72 * If the server is disabled, it will not be used for positioning unless enabled. |
|
73 * @param [in] - aServerIndex. The server index which has to be enabled/disabled. |
|
74 * @param [in] - aValue. true/false. |
|
75 * @returns - KErrNone if enabling/disabling is successful |
|
76 * - KErrArgument if the SLP ID passed is not valid/out of bounds |
|
77 * - KErrGeneral if changing SUPL settings has failed |
|
78 */ |
|
79 int enableServer(int aServerIndex, bool aValue); |
|
80 |
|
81 /** |
|
82 * This method is used to delete the server. |
|
83 * @param [in] - aServerIndex. The server index which has to be deleted. |
|
84 * @returns - KErrNone if the deletion is successful |
|
85 * - KErrNotFound if the server at the index in missing/out of bounds. |
|
86 * - KErrPermissionDenied if the sever cannot be deleted |
|
87 * - KErrGeneral is other cases |
|
88 */ |
|
89 int deleteServer(int aServerIndex); |
|
90 |
|
91 |
|
92 public: |
|
93 |
|
94 /** |
|
95 * Inherited from PosSuplSettingsChangeObserver |
|
96 */ |
|
97 void handleSuplSettingsChange( MSuplSettingsObserver::TSuplSettingsEventType event,int slpId); |
|
98 signals: |
|
99 /** |
|
100 * This signal is emitted when the server is deleted/added. |
|
101 */ |
|
102 void serverListUpdated(); |
|
103 |
|
104 private: |
|
105 /** |
|
106 * pointer to private implementation class |
|
107 */ |
|
108 Q_DECLARE_PRIVATE_D(d_ptr, PosSuplSettingsEngine) |
|
109 PosSuplSettingsEnginePrivate * d_ptr; |
|
110 }; |
|
111 #endif // POSSUPLSETTINGS_ENGINE_H |