1 /* |
|
2 * Copyright (c) 2008 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 handling Service Provider Settings |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_VIMPUSTENGINESERVICETABLEFETCHER_H |
|
20 #define C_VIMPUSTENGINESERVICETABLEFETCHER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32const.h> |
|
25 #include "tvimpstenums.h" |
|
26 #include <spdefinitions.h> |
|
27 #include "cvimpstengine.h" |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CSPSettings; |
|
32 class CVIMPSTEngineServiceState; |
|
33 class MVIMPSTEngine; |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * |
|
38 * This class implements the use of Service Provider Settings |
|
39 * |
|
40 * @lib vimpstengine.lib |
|
41 * @since S60 5.0 |
|
42 */ |
|
43 NONSHARABLE_CLASS( CVIMPSTEngineServiceTableFetcher ) : public CBase |
|
44 |
|
45 { |
|
46 //for testcases. |
|
47 friend class T_VIMPSTEngineServiceTableFetcher; |
|
48 |
|
49 public: // Constructor and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * |
|
54 * @return Ptr to CVIMPSTEngineServiceTableFetcher |
|
55 */ |
|
56 static CVIMPSTEngineServiceTableFetcher* NewL(); // from the service ui factory class implemented from xsp factory |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 * |
|
61 * @return Ptr to CVIMPSTEngineServiceTableFetcher |
|
62 */ |
|
63 static CVIMPSTEngineServiceTableFetcher* NewLC(); |
|
64 |
|
65 /** |
|
66 * Standard C++ destructor |
|
67 */ |
|
68 ~CVIMPSTEngineServiceTableFetcher(); |
|
69 |
|
70 /** |
|
71 * Gets Service Ids to array |
|
72 * |
|
73 * @since S60 5.0 |
|
74 * @param aServiceIds array for service ids |
|
75 * @return None |
|
76 */ |
|
77 void GetMasterServiceIdsL( |
|
78 RArray<TUint32>& aServiceIds ); |
|
79 |
|
80 |
|
81 /** |
|
82 * Gets brand id |
|
83 * |
|
84 * @since S60 5.0 |
|
85 * @param aServiceId service id |
|
86 * @param aBrandId brand id |
|
87 * @return None |
|
88 */ |
|
89 void GetBrandIdL( TUint32 aServiceId, TDes8& aBrandId ); |
|
90 |
|
91 |
|
92 /** |
|
93 * Returns property brand version |
|
94 * |
|
95 * @since S60 5.0 |
|
96 * @param aServiceId, service id |
|
97 * @return TInt, brand version |
|
98 */ |
|
99 TInt PropertyBrandVersionL( |
|
100 TUint32 aServiceId ); |
|
101 |
|
102 /** |
|
103 * Returns property brand language. |
|
104 * |
|
105 * @since S60 5.0 |
|
106 * @param aServiceId, service id |
|
107 * @return TLanguage, brand language |
|
108 */ |
|
109 TLanguage PropertyBrandLanguageL( |
|
110 TUint32 aServiceId ); |
|
111 |
|
112 |
|
113 |
|
114 /** |
|
115 * Gets contact store id by service id |
|
116 * |
|
117 * @since S60 5.0 |
|
118 * @param aServiceId, service id |
|
119 * @param aContactStoreId, service store id is copied to this parameter |
|
120 * caller should allocate memory for this parameter |
|
121 * @return None |
|
122 */ |
|
123 void GetContactStoreIdL( |
|
124 TUint32 aServiceId, TDes& aContactStoreId ); |
|
125 |
|
126 /** |
|
127 * Gets the name of the service |
|
128 * |
|
129 * @since S60 5.0 |
|
130 * @param aServiceId, service id |
|
131 * @param aServiceName, service name is copied to this parameter |
|
132 * caller should allocate memory for this parameter |
|
133 * @return None |
|
134 */ |
|
135 void GetServiceNameL( |
|
136 TUint32 aServiceId, TDes& aServiceName ); |
|
137 |
|
138 |
|
139 /** |
|
140 * Finds a given property and returns the |
|
141 * |
|
142 * @since S60 5.0 |
|
143 * @param aServiceId, service id |
|
144 * @param TServicePropertyName, Property Name defined in SPSettings |
|
145 * @return error - KErrNone if Property is found, else appropriate error |
|
146 */ |
|
147 TInt FindPropertyL( TUint32 aServiceId, |
|
148 TServicePropertyName aPropertyName ); |
|
149 |
|
150 /** |
|
151 * Returns ximp adapter uid. |
|
152 * |
|
153 * @since S60 5.0 |
|
154 * @param aServiceId, service id |
|
155 * @return TInt, uid of XIMP Adaptation |
|
156 */ |
|
157 TInt XimpAdapterUidL( TUint32 aServiceId ); |
|
158 |
|
159 /** |
|
160 * Returns presence authorization request status |
|
161 * ( auto accept or always ask) ie. how to handle |
|
162 * incoming presence authorization requests. |
|
163 * |
|
164 * @since S60 5.0 |
|
165 * @param aServiceId service id |
|
166 * @return TVIMPSTPresenceRequestStatus, presence request status |
|
167 */ |
|
168 TVIMPSTEnums::TVIMPSTPresenceRequestStatus |
|
169 PresenceRequestStatusL( TUint32 aServiceId ); |
|
170 |
|
171 |
|
172 /** |
|
173 * Handles notify change from SPS |
|
174 * |
|
175 * @since S60 5.0 |
|
176 * @param aServiceId, service id |
|
177 * @param aNewService - New Service (Not shown in the Tab) |
|
178 * @param aEngine - engine instance for aServiceId. |
|
179 * @return None |
|
180 */ |
|
181 void DoHandleNotifyChangeL( TServiceId aServiceId, TBool aNewService ,MVIMPSTEngine* aEngine); |
|
182 |
|
183 |
|
184 /** |
|
185 * Gets deafault Domain Name by service id |
|
186 * |
|
187 * @since S60 5.0 |
|
188 * @param aServiceId, service id |
|
189 * @param aDefaultDomainName, domain name is copied to this parameter |
|
190 * caller should allocate memory for this parameter |
|
191 * @return None |
|
192 */ |
|
193 void GetDefaultDomainNameL( TUint32 aServiceId, TDes& aDefaultDomainName ); |
|
194 |
|
195 |
|
196 private: // Implementation |
|
197 |
|
198 /** |
|
199 * Standard C++ constructor |
|
200 */ |
|
201 CVIMPSTEngineServiceTableFetcher(); |
|
202 |
|
203 /** |
|
204 * Performs the 2nd phase of construction. |
|
205 */ |
|
206 void ConstructL(); |
|
207 |
|
208 /** |
|
209 * Returns contact view uid for service identified by |
|
210 * aServiceId. |
|
211 * |
|
212 * @since S60 5.0 |
|
213 * @param aServiceId, service identifier |
|
214 * @return Tuint32, contact view uid as int |
|
215 */ |
|
216 TUint32 ContactViewUidL( TUint32 aServiceId ); |
|
217 |
|
218 |
|
219 /** |
|
220 * Compresses view ids in sps. Gets all voip services |
|
221 * and writes view to each one of them starting from |
|
222 * base id. |
|
223 * |
|
224 * @since S60 5.0 |
|
225 * @param aServiceId, service identifier |
|
226 * @return TBool, ETrue if aServiceId was new service |
|
227 */ |
|
228 TBool CompressViewIdsL( TServiceId aServiceId = 0 ); |
|
229 |
|
230 /** |
|
231 * Writes view id to service table |
|
232 * |
|
233 * @since S60 5.0 |
|
234 * @param aServiceId service id |
|
235 * @param aViewId view id |
|
236 * @return None |
|
237 */ |
|
238 void WriteTabViewIdToServiceTableL( |
|
239 TUint32 aServiceId, TUint aViewId ); |
|
240 |
|
241 /** |
|
242 * Kills phonebook |
|
243 * |
|
244 * @since S60 5.0 |
|
245 * @return None |
|
246 */ |
|
247 void ShutDownPhonebookL(); |
|
248 |
|
249 |
|
250 private: // Data |
|
251 |
|
252 // Own: service provider settings |
|
253 CSPSettings* iSettings; |
|
254 |
|
255 //bool flag keep track of if data base need to be deleted. |
|
256 TBool iDeleteDataBase; |
|
257 |
|
258 |
|
259 }; |
|
260 |
|
261 #endif // C_VIMPUICONTACTSEXTENSIONSPSHANDLER_H |
|
262 |
|
263 // End of file |
|