|
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 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "sip.h" |
|
24 #include "sipprofileregistrybase.h" |
|
25 #include "sipprofileregistryobserver.h" |
|
26 #include "sipprofileregistry.h" |
|
27 #include "sipprofileregistryobserver.h" |
|
28 #include "sipmanagedprofile.h" |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CSIPProfileRegistryBase::~CSIPProfileRegistryBase |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 EXPORT_C CSIPProfileRegistryBase::~CSIPProfileRegistryBase() |
|
37 { |
|
38 |
|
39 |
|
40 iProfiles.ResetAndDestroy(); |
|
41 iProfiles.Close(); |
|
42 |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CSIPProfileRegistryBase::ProfilesL |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 EXPORT_C void CSIPProfileRegistryBase::ProfilesL( |
|
50 RPointerArray<CSIPProfile>& aProfiles) |
|
51 { |
|
52 // stubs |
|
53 CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this; |
|
54 CSIPProfile* profile = CSIPProfile::NewLC(reg); |
|
55 |
|
56 aProfiles.AppendL ( profile ); |
|
57 |
|
58 CleanupStack::Pop( profile ); |
|
59 |
|
60 |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CSIPProfileRegistryBase::ProfilesL |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 EXPORT_C void CSIPProfileRegistryBase::ProfilesL( |
|
68 const TSIPProfileTypeInfo& /*aType*/, |
|
69 RPointerArray<CSIPProfile>& aProfiles) |
|
70 { |
|
71 // stubs |
|
72 CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this; |
|
73 |
|
74 CSIPProfile* profile = CSIPProfile::NewLC( reg ); |
|
75 aProfiles.AppendL ( profile ); |
|
76 |
|
77 CleanupStack::Pop( profile ); |
|
78 |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CSIPProfileRegistryBase::ProfilesL |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 EXPORT_C void CSIPProfileRegistryBase::ProfilesL( |
|
86 const TDesC8& /*aAOR*/, |
|
87 RPointerArray<CSIPProfile>& aProfiles) |
|
88 { |
|
89 // stubs |
|
90 ProfilesL( aProfiles ); |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CSIPProfileRegistryBase::ProfilesCommonL |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 void CSIPProfileRegistryBase::ProfilesCommonL( |
|
98 RPointerArray<CSIPProfile>& /*aProfiles*/, |
|
99 CSIPConcreteProfileHolder* /*aHolder */) |
|
100 { |
|
101 User::Leave( KErrNotSupported ); |
|
102 } |
|
103 |
|
104 // ----------------------------------------------------------------------------- |
|
105 // CSIPProfileRegistryBase::ProfileL |
|
106 // ----------------------------------------------------------------------------- |
|
107 // |
|
108 EXPORT_C CSIPProfile* CSIPProfileRegistryBase::ProfileL(TUint32 aId) |
|
109 { |
|
110 return SIPProfileL(aId); |
|
111 } |
|
112 |
|
113 |
|
114 // |
|
115 // ----------------------------------------------------------------------------- |
|
116 // CSIPProfileRegistryBase::DefaultProfileL |
|
117 // ----------------------------------------------------------------------------- |
|
118 // |
|
119 EXPORT_C CSIPProfile* CSIPProfileRegistryBase::DefaultProfileL() |
|
120 { |
|
121 User::Leave( KErrNotSupported ); |
|
122 return NULL; |
|
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 CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemL(TUint /*aProfileId*/ ) |
|
284 { |
|
285 User::Leave( KErrNotSupported ); |
|
286 return NULL; |
|
287 } |
|
288 |
|
289 // ----------------------------------------------------------------------------- |
|
290 // CSIPProfileRegistryBase::ProfileIndex |
|
291 // ----------------------------------------------------------------------------- |
|
292 // |
|
293 TInt CSIPProfileRegistryBase::ProfileIndex (TUint /*profileId*/) |
|
294 { |
|
295 return 0; |
|
296 } |
|
297 |
|
298 // ----------------------------------------------------------------------------- |
|
299 // CSIPProfileRegistryBase::ProfileItemByIndex |
|
300 // ----------------------------------------------------------------------------- |
|
301 // |
|
302 CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemByIndex(TUint /*aIndex*/) |
|
303 { |
|
304 return NULL; |
|
305 } |
|
306 |
|
307 |
|
308 // ----------------------------------------------------------------------------- |
|
309 // CSIPProfileRegistryBase::RegistrationStatusChangedL |
|
310 // ----------------------------------------------------------------------------- |
|
311 // |
|
312 void CSIPProfileRegistryBase::RegistrationStatusChangedL(TUint32 /*aProfileId*/, |
|
313 TInt /*aStatus*/, |
|
314 TUint32 /*aStatusId*/) |
|
315 { |
|
316 User::Leave( KErrNotSupported ); |
|
317 } |
|
318 |
|
319 // ----------------------------------------------------------------------------- |
|
320 // CSIPProfileRegistryBase::UpdatedL |
|
321 // ----------------------------------------------------------------------------- |
|
322 // |
|
323 void CSIPProfileRegistryBase::UpdatedL(TUint32 /*aProfileId*/, TUint /*aSize*/) |
|
324 { |
|
325 User::Leave( KErrNotSupported ); |
|
326 } |
|
327 |
|
328 // ----------------------------------------------------------------------------- |
|
329 // CSIPProfileRegistryBase::AddedL |
|
330 // ----------------------------------------------------------------------------- |
|
331 // |
|
332 void CSIPProfileRegistryBase::AddedL(TUint32 /*aProfileId*/) |
|
333 { |
|
334 User::Leave( KErrNotSupported ); |
|
335 } |
|
336 |
|
337 // ----------------------------------------------------------------------------- |
|
338 // CSIPProfileRegistryBase::RemovedL |
|
339 // ----------------------------------------------------------------------------- |
|
340 // |
|
341 void CSIPProfileRegistryBase::RemovedL(TUint32 /*aProfileId*/) |
|
342 { |
|
343 User::Leave( KErrNotSupported ); |
|
344 } |
|
345 |
|
346 // ----------------------------------------------------------------------------- |
|
347 // CSIPProfileRegistryBase::ErrorOccurredL |
|
348 // ----------------------------------------------------------------------------- |
|
349 // |
|
350 void CSIPProfileRegistryBase::ErrorOccurredL(TUint32 /*aProfileId*/, |
|
351 TInt /*aStatus*/, |
|
352 TInt /*aError*/ ) |
|
353 { |
|
354 User::Leave( KErrNotSupported ); |
|
355 } |
|
356 |
|
357 // ----------------------------------------------------------------------------- |
|
358 // CSIPProfileRegistryBase::BaseConstructL |
|
359 // ----------------------------------------------------------------------------- |
|
360 // |
|
361 void CSIPProfileRegistryBase::BaseConstructL() |
|
362 { |
|
363 |
|
364 } |
|
365 |
|
366 // ----------------------------------------------------------------------------- |
|
367 // CSIPProfileRegistryBase::CrashRevert |
|
368 // ----------------------------------------------------------------------------- |
|
369 // |
|
370 void CSIPProfileRegistryBase::CrashRevert (TAny* /*aItem*/) |
|
371 { |
|
372 } |
|
373 |
|
374 // ----------------------------------------------------------------------------- |
|
375 // CSIPProfileRegistryBase::LocalCrashRevert |
|
376 // ----------------------------------------------------------------------------- |
|
377 // |
|
378 void CSIPProfileRegistryBase::LocalCrashRevert (TAny* /*aItem*/) |
|
379 { |
|
380 } |
|
381 |