|
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: Positioning settings engine private class header. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef POSSUPLSETTINGSENGINEPRIVATE_H |
|
19 #define POSSUPLSETTINGSENGINEPRIVATE_H |
|
20 |
|
21 #include "possuplsettingscommon.h" |
|
22 #include <QList> |
|
23 #include <epos_msuplsettingsobserver.h> |
|
24 |
|
25 class CServerParams; |
|
26 class CSuplSettings; |
|
27 |
|
28 //Constants |
|
29 const int KMaxHSLPAddrLen = 256; |
|
30 const int KMaxIAPLen = 256; |
|
31 /** |
|
32 * The class defines the interface for receiving SUPL settings |
|
33 * change event. |
|
34 */ |
|
35 class PosSuplSettingsChangeObserver |
|
36 { |
|
37 public: |
|
38 virtual void handleSuplSettingsChange( MSuplSettingsObserver::TSuplSettingsEventType aEvent,int aSlpId) = 0; |
|
39 }; |
|
40 |
|
41 |
|
42 /** |
|
43 * The class defines the interface for listing,enabling\disabling and deleting |
|
44 * SLP servers. |
|
45 */ |
|
46 class PosSuplSettingsEnginePrivate : public MSuplSettingsObserver |
|
47 { |
|
48 public: |
|
49 /** |
|
50 * Default constructor |
|
51 */ |
|
52 PosSuplSettingsEnginePrivate(); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~PosSuplSettingsEnginePrivate(); |
|
58 |
|
59 /** |
|
60 * Returns properties of all servers from SUPL settings storage.. |
|
61 * @[OUT] paramValues Array of retrieved server entries |
|
62 * - KErrNone if SUPL settings are retrieved successfully. |
|
63 * - KErrNotFound if the settings does not have any server entry |
|
64 */ |
|
65 int GetServerList( QList<PosServerParams>& aParamValues ); |
|
66 |
|
67 /** |
|
68 * This method is used to change parameter which indicates whether server |
|
69 * can be used for SUPL session or not. |
|
70 * |
|
71 * @param [IN] slpId SLP ID for which the parameter needs to be changed |
|
72 * @param [IN] enableFlag Flag to indicate whether server can be enabled or not |
|
73 * @return one of the following error codes: |
|
74 * - KErrNone if SUPL settings are changed successfully. |
|
75 * - KErrArgument if the SLP ID passed is not valid |
|
76 * - KErrGeneral if changing SUPL settings has failed |
|
77 */ |
|
78 int SetServerStatus( int aSlpId, |
|
79 bool aEnableFlg |
|
80 ); |
|
81 |
|
82 |
|
83 /** |
|
84 * This method is deletes server entry from SUPL settings storage. |
|
85 * |
|
86 * @param [IN] slpId Server identity for which the entery needs to be deleted from the SUPL settings storage |
|
87 * |
|
88 * @return one of the following error codes: |
|
89 * - KErrNone if entry is deleted successfully |
|
90 * - KErrNotFound if the specified server identity does not exists in settings storage |
|
91 * - KErrGeneral if changing SUPL settings has failed |
|
92 * |
|
93 */ |
|
94 int RemoveServer( int aSlpId); |
|
95 |
|
96 /** |
|
97 * Returns list all servers from SUPL settings storage that can be deleted.Operator configured servers will be omitted from |
|
98 * this list. |
|
99 * @[OUT] paramValues Array of retrieved server entries |
|
100 * - KErrNone if SUPL settings are retrieved successfully. |
|
101 * - KErrNotFound if the list does not have any server entry |
|
102 */ |
|
103 int GetRemovableServerList( QList<PosServerParams>& aParamValues ); |
|
104 |
|
105 /* @param [IN] observer The observing object. |
|
106 * @return one of the following values |
|
107 * - KErrNone if setting observer is successful |
|
108 * - KErrAlreadyExists if observer is already set |
|
109 * |
|
110 */ |
|
111 int SetObserver( PosSuplSettingsChangeObserver* aObserver ); |
|
112 |
|
113 |
|
114 public: |
|
115 void HandleSuplSettingsChangeL( TSuplSettingsEventType aEvent,TInt aSlpId ); |
|
116 void HandleSuplTriggerStatusChangeL( CSuplSettings::TSuplTriggerStatus aSuplTriggerStatus ); |
|
117 |
|
118 |
|
119 private: //Data members |
|
120 |
|
121 /** |
|
122 * Reference to position technology change observer. |
|
123 * Does not own |
|
124 */ |
|
125 PosSuplSettingsChangeObserver* mPosSuplSettingsObserver; |
|
126 |
|
127 /** |
|
128 * Pointer to Supl settings object |
|
129 * Owns |
|
130 */ |
|
131 CSuplSettings* mSuplSettings; |
|
132 |
|
133 /** |
|
134 * Pointer to Supl Server List |
|
135 * Owns |
|
136 */ |
|
137 RPointerArray<CServerParams> mServerList; |
|
138 }; |
|
139 |
|
140 |
|
141 |
|
142 #endif /* POSSUPLSETTINGSENGINEPRIVATE_H */ |