1 /* |
|
2 * Copyright (c) 2003 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: implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "sipprofile.h" |
|
22 #include "sip.h" |
|
23 #include "sipprofileregistrybase.h" |
|
24 #include "sipprofileregistryobserver.h" |
|
25 #include "sipprofileregistry.h" |
|
26 #include "sipprofileregistryobserver.h" |
|
27 #include "sipmanagedprofile.h" |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CSIPProfileRegistryBase::~CSIPProfileRegistryBase |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 EXPORT_C CSIPProfileRegistryBase::~CSIPProfileRegistryBase() |
|
36 { |
|
37 |
|
38 |
|
39 //iProfiles.ResetAndDestroy(); |
|
40 //iProfiles.Close(); |
|
41 |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CSIPProfileRegistryBase::ProfilesL |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 EXPORT_C void CSIPProfileRegistryBase::ProfilesL( |
|
49 RPointerArray<CSIPProfile>& aProfiles) |
|
50 { |
|
51 // stubs |
|
52 CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this; |
|
53 CSIPProfile* profile = CSIPProfile::NewLC(reg); |
|
54 |
|
55 aProfiles.AppendL ( profile ); |
|
56 |
|
57 CleanupStack::Pop( profile ); |
|
58 |
|
59 |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CSIPProfileRegistryBase::ProfilesL |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 EXPORT_C void CSIPProfileRegistryBase::ProfilesL( |
|
67 const TSIPProfileTypeInfo& /*aType*/, |
|
68 RPointerArray<CSIPProfile>& aProfiles) |
|
69 { |
|
70 // stubs |
|
71 CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this; |
|
72 |
|
73 CSIPProfile* profile = CSIPProfile::NewLC( reg ); |
|
74 aProfiles.AppendL ( profile ); |
|
75 |
|
76 CleanupStack::Pop( profile ); |
|
77 |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CSIPProfileRegistryBase::ProfilesL |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C void CSIPProfileRegistryBase::ProfilesL( |
|
85 const TDesC8& /*aAOR*/, |
|
86 RPointerArray<CSIPProfile>& aProfiles) |
|
87 { |
|
88 // stubs |
|
89 ProfilesL( aProfiles ); |
|
90 } |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // CSIPProfileRegistryBase::ProfilesCommonL |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 void CSIPProfileRegistryBase::ProfilesCommonL( |
|
97 RPointerArray<CSIPProfile>& /*aProfiles*/, |
|
98 CSIPConcreteProfileHolder* /*aHolder */) |
|
99 { |
|
100 User::Leave( KErrNotSupported ); |
|
101 } |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // CSIPProfileRegistryBase::ProfileL |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 EXPORT_C CSIPProfile* CSIPProfileRegistryBase::ProfileL(TUint32 /*aId*/) |
|
108 { |
|
109 return NewInstanceL(); |
|
110 } |
|
111 |
|
112 |
|
113 // |
|
114 // ----------------------------------------------------------------------------- |
|
115 // CSIPProfileRegistryBase::DefaultProfileL |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 EXPORT_C CSIPProfile* CSIPProfileRegistryBase::DefaultProfileL() |
|
119 { |
|
120 CSIPProfile* defaultProfile = NewInstanceL(); |
|
121 defaultProfile->iIsDefaultProfile = ETrue; |
|
122 return defaultProfile; |
|
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // CSIPProfileRegistryBase::SupportedProfileTypesL |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 EXPORT_C void CSIPProfileRegistryBase::SupportedProfileTypesL( |
|
130 RArray<TSIPProfileTypeInfo>& /*aSupportedProfileTypes*/ ) |
|
131 { |
|
132 User::Leave( KErrNotSupported ); |
|
133 } |
|
134 |
|
135 // ----------------------------------------------------------------------------- |
|
136 // CSIPProfileRegistryBase::LastRegistrationError |
|
137 // ----------------------------------------------------------------------------- |
|
138 // |
|
139 EXPORT_C TInt CSIPProfileRegistryBase::LastRegistrationError( |
|
140 const CSIPProfile& /*aProfile*/) const |
|
141 { |
|
142 return KErrNone; |
|
143 } |
|
144 |
|
145 // ----------------------------------------------------------------------------- |
|
146 // CSIPProfileRegistryBase::CSIPProfileRegistryBase |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 CSIPProfileRegistryBase::CSIPProfileRegistryBase( |
|
150 MSIPProfileRegistryObserver& aObserver): |
|
151 iObserver(aObserver) |
|
152 { |
|
153 |
|
154 } |
|
155 |
|
156 // ----------------------------------------------------------------------------- |
|
157 // CSIPProfileRegistryBase::ProfileDeleted |
|
158 // ----------------------------------------------------------------------------- |
|
159 // |
|
160 void CSIPProfileRegistryBase::ProfileDeleted(CSIPProfile& /*aProfile*/) |
|
161 { |
|
162 } |
|
163 |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CSIPProfileRegistryBase::EnableProfileL |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 void CSIPProfileRegistryBase::EnableProfileL( |
|
169 CSIPProfile& /*aProfile*/) |
|
170 { |
|
171 User::Leave( KErrNotSupported ); |
|
172 } |
|
173 |
|
174 // ----------------------------------------------------------------------------- |
|
175 // CSIPProfileRegistryBase::DisableProfileL |
|
176 // ----------------------------------------------------------------------------- |
|
177 // |
|
178 void CSIPProfileRegistryBase::DisableProfileL(CSIPProfile& /*aProfile*/) |
|
179 { |
|
180 User::Leave( KErrNotSupported ); |
|
181 } |
|
182 |
|
183 // ----------------------------------------------------------------------------- |
|
184 // CSIPProfileRegistryBase::UsageL |
|
185 // ----------------------------------------------------------------------------- |
|
186 // |
|
187 TInt CSIPProfileRegistryBase::UsageL(const CSIPProfile& /*aProfile*/) const |
|
188 { |
|
189 User::Leave( KErrNotSupported ); |
|
190 return KErrNone; |
|
191 } |
|
192 |
|
193 // ----------------------------------------------------------------------------- |
|
194 // CSIPProfileRegistryBase::AddProfileL |
|
195 // ----------------------------------------------------------------------------- |
|
196 // |
|
197 void CSIPProfileRegistryBase::AddProfileL(CSIPProfile& /*aProfile*/) |
|
198 { |
|
199 User::Leave( KErrNotSupported ); |
|
200 } |
|
201 |
|
202 // ----------------------------------------------------------------------------- |
|
203 // CSIPProfileRegistryBase::UpdateProfileL |
|
204 // ----------------------------------------------------------------------------- |
|
205 // |
|
206 void CSIPProfileRegistryBase::UpdateProfileL(CSIPProfile& /*aProfile*/) |
|
207 { |
|
208 User::Leave( KErrNotSupported ); |
|
209 } |
|
210 |
|
211 // ----------------------------------------------------------------------------- |
|
212 // CSIPProfileRegistryBase::RemoveProfileL |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 void CSIPProfileRegistryBase::RemoveProfileL(CSIPProfile& /*aProfile*/) |
|
216 { |
|
217 User::Leave( KErrNotSupported ); |
|
218 } |
|
219 |
|
220 // ----------------------------------------------------------------------------- |
|
221 // CSIPProfileRegistryBase::IsDefaultProfileL |
|
222 // ----------------------------------------------------------------------------- |
|
223 // |
|
224 TBool CSIPProfileRegistryBase::IsDefaultProfileL(const CSIPProfile& /*aProfile*/) |
|
225 { |
|
226 User::Leave( KErrNotSupported ); |
|
227 return ETrue; |
|
228 } |
|
229 |
|
230 // ----------------------------------------------------------------------------- |
|
231 // CSIPProfileRegistryBase::RegistrationStatusChangedL |
|
232 // ----------------------------------------------------------------------------- |
|
233 // |
|
234 void CSIPProfileRegistryBase::NegotiatedSecurityMechanismL( |
|
235 CSIPConcreteProfile& /*aProfile*/) |
|
236 { |
|
237 User::Leave( KErrNotSupported ); |
|
238 } |
|
239 |
|
240 // ----------------------------------------------------------------------------- |
|
241 // CSIPProfileRegistryBase::RegisteredAORsL |
|
242 // ----------------------------------------------------------------------------- |
|
243 // |
|
244 void CSIPProfileRegistryBase::RegisteredAORsL(CSIPConcreteProfile& /*aProfile*/) |
|
245 { |
|
246 User::Leave( KErrNotSupported ); |
|
247 } |
|
248 |
|
249 // ----------------------------------------------------------------------------- |
|
250 // CSIPProfileRegistryBase::SIPProfileL |
|
251 // ----------------------------------------------------------------------------- |
|
252 // |
|
253 CSIPProfile* CSIPProfileRegistryBase::SIPProfileL(TUint32 aId, TInt /*aSize*/) |
|
254 { |
|
255 __ASSERT_ALWAYS (aId > 1, User::Leave (KErrArgument)); |
|
256 return NULL; |
|
257 } |
|
258 |
|
259 // ----------------------------------------------------------------------------- |
|
260 // CSIPProfileRegistryBase::StoreProfileL |
|
261 // ----------------------------------------------------------------------------- |
|
262 // |
|
263 void CSIPProfileRegistryBase::StoreProfileL(CSIPProfileCleanupItem* /*aCleanupItem*/) |
|
264 { |
|
265 User::Leave( KErrNotSupported ); |
|
266 } |
|
267 |
|
268 // ----------------------------------------------------------------------------- |
|
269 // CSIPProfileRegistryBase::StoreProfileL |
|
270 // ----------------------------------------------------------------------------- |
|
271 // |
|
272 void CSIPProfileRegistryBase::StoreArrayL( |
|
273 RPointerArray<CSIPConcreteProfile>& /*aProfiles*/, |
|
274 RPointerArray<CSIPProfile>& /*aRetProfiles*/) |
|
275 { |
|
276 User::Leave( KErrNotSupported ); |
|
277 } |
|
278 |
|
279 // ----------------------------------------------------------------------------- |
|
280 // CSIPProfileRegistryBase::ProfileItemL |
|
281 // ----------------------------------------------------------------------------- |
|
282 // |
|
283 /* |
|
284 CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemL(TUint aProfileId ) |
|
285 { |
|
286 User::Leave( KErrNotSupported ); |
|
287 return NULL; |
|
288 } |
|
289 */ |
|
290 |
|
291 // ----------------------------------------------------------------------------- |
|
292 // CSIPProfileRegistryBase::ProfileIndex |
|
293 // ----------------------------------------------------------------------------- |
|
294 // |
|
295 TInt CSIPProfileRegistryBase::ProfileIndex (TUint /*profileId*/) |
|
296 { |
|
297 return 0; |
|
298 } |
|
299 |
|
300 // ----------------------------------------------------------------------------- |
|
301 // CSIPProfileRegistryBase::ProfileItemByIndex |
|
302 // ----------------------------------------------------------------------------- |
|
303 // |
|
304 CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemByIndex(TUint /*aIndex*/) |
|
305 { |
|
306 return NULL; |
|
307 } |
|
308 |
|
309 |
|
310 // ----------------------------------------------------------------------------- |
|
311 // CSIPProfileRegistryBase::RegistrationStatusChangedL |
|
312 // ----------------------------------------------------------------------------- |
|
313 // |
|
314 void CSIPProfileRegistryBase::RegistrationStatusChangedL(TUint32 /*aProfileId*/, |
|
315 TInt /*aStatus*/, |
|
316 TUint32 /*aStatusId*/) |
|
317 { |
|
318 User::Leave( KErrNotSupported ); |
|
319 } |
|
320 |
|
321 // ----------------------------------------------------------------------------- |
|
322 // CSIPProfileRegistryBase::UpdatedL |
|
323 // ----------------------------------------------------------------------------- |
|
324 // |
|
325 void CSIPProfileRegistryBase::UpdatedL(TUint32 /*aProfileId*/, TUint /*aSize*/) |
|
326 { |
|
327 User::Leave( KErrNotSupported ); |
|
328 } |
|
329 |
|
330 // ----------------------------------------------------------------------------- |
|
331 // CSIPProfileRegistryBase::AddedL |
|
332 // ----------------------------------------------------------------------------- |
|
333 // |
|
334 void CSIPProfileRegistryBase::AddedL(TUint32 /*aProfileId*/) |
|
335 { |
|
336 User::Leave( KErrNotSupported ); |
|
337 } |
|
338 |
|
339 // ----------------------------------------------------------------------------- |
|
340 // CSIPProfileRegistryBase::RemovedL |
|
341 // ----------------------------------------------------------------------------- |
|
342 // |
|
343 void CSIPProfileRegistryBase::RemovedL(TUint32 /*aProfileId*/) |
|
344 { |
|
345 User::Leave( KErrNotSupported ); |
|
346 } |
|
347 |
|
348 // ----------------------------------------------------------------------------- |
|
349 // CSIPProfileRegistryBase::ErrorOccurredL |
|
350 // ----------------------------------------------------------------------------- |
|
351 // |
|
352 void CSIPProfileRegistryBase::ErrorOccurredL(TUint32 /*aProfileId*/, |
|
353 TInt /*aStatus*/, |
|
354 TInt /*aError*/ ) |
|
355 { |
|
356 User::Leave( KErrNotSupported ); |
|
357 } |
|
358 |
|
359 // ----------------------------------------------------------------------------- |
|
360 // CSIPProfileRegistryBase::BaseConstructL |
|
361 // ----------------------------------------------------------------------------- |
|
362 // |
|
363 void CSIPProfileRegistryBase::BaseConstructL() |
|
364 { |
|
365 |
|
366 } |
|
367 |
|
368 // ----------------------------------------------------------------------------- |
|
369 // CSIPProfileRegistryBase::CrashRevert |
|
370 // ----------------------------------------------------------------------------- |
|
371 // |
|
372 void CSIPProfileRegistryBase::CrashRevert (TAny* /*aItem*/) |
|
373 { |
|
374 } |
|
375 |
|
376 // ----------------------------------------------------------------------------- |
|
377 // CSIPProfileRegistryBase::LocalCrashRevert |
|
378 // ----------------------------------------------------------------------------- |
|
379 // |
|
380 void CSIPProfileRegistryBase::LocalCrashRevert (TAny* /*aItem*/) |
|
381 { |
|
382 } |
|
383 |
|