|
1 /* |
|
2 * Copyright (c) 2002 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: MPXClientList testing implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <mpxclientlist.h> |
|
20 #include "commontestclass.h" |
|
21 #include <mpxplaybackmessagedefs.h> |
|
22 #include <mpxmediageneraldefs.h> |
|
23 #include <mpxcommandgeneraldefs.h> |
|
24 #include <mpxcollectionframeworkdefs.h> |
|
25 |
|
26 #include "mpxsubscriptiondefs.h" //added on 2009,2,12 |
|
27 #include <mpxmediageneraldefs.h> //added on 2009,2,12 |
|
28 |
|
29 |
|
30 // Begin MPXClientList testing implementation (mpxclientlist.h)============================ |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CCommonTestClass::MpxClientListNewL() |
|
34 // Returns: Symbian OS errors. |
|
35 // ----------------------------------------------------------------------------- |
|
36 TInt CCommonTestClass::MpxClientListNewL(CStifItemParser& /*aItem*/) |
|
37 { |
|
38 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListNewL testing CMPXClientList::NewL() begin"))); |
|
39 iLog->Log(_L("CCommonTestClass::MpxClientListNewL testing CMPXClientList::NewL() begin")); |
|
40 TInt err=KErrNone; |
|
41 if ( iClientList ) |
|
42 { |
|
43 delete iClientList; |
|
44 iClientList = NULL; |
|
45 } |
|
46 iClientList = CMPXClientList::NewL(); |
|
47 return err; |
|
48 } |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CCommonTestClass::MpxClientListD() |
|
51 // Returns: Symbian OS errors. |
|
52 // ----------------------------------------------------------------------------- |
|
53 TInt CCommonTestClass::MpxClientListDestruction(CStifItemParser& /*aItem*/) |
|
54 { |
|
55 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListDestruction testing CMPXClientList::~ begin"))); |
|
56 iLog->Log(_L("CCommonTestClass::MpxClientListDestruction testing CMPXClientList::~ begin")); |
|
57 TInt err=KErrNone; |
|
58 |
|
59 delete iClientList; |
|
60 iClientList = NULL; |
|
61 |
|
62 return err; |
|
63 } |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CCommonTestClass::MpxClientListClientCount() |
|
66 // Returns: Symbian OS errors. |
|
67 // ----------------------------------------------------------------------------- |
|
68 TInt CCommonTestClass::MpxClientListClientCount(CStifItemParser& aItem) |
|
69 { |
|
70 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListClientCount testing CMPXClientList::ClientCount() begin"))); |
|
71 iLog->Log(_L("CCommonTestClass::MpxClientListClientCount testing CMPXClientList::ClientCount() begin")); |
|
72 TInt err=KErrNone; |
|
73 TInt expectedCount; |
|
74 |
|
75 // read in parameters |
|
76 if ( aItem.GetNextInt(expectedCount) ) |
|
77 { |
|
78 iLog->Log(_L("Missing Parameter: Expected count.")); |
|
79 return KErrBadTestParameter; |
|
80 } |
|
81 if ( !iClientList ) |
|
82 { |
|
83 iLog->Log(_L("Error: MPXClientList not created.")); |
|
84 return KErrBadTestParameter; |
|
85 } |
|
86 |
|
87 TInt count = iClientList->ClientCount(); |
|
88 // verification |
|
89 if ( count != expectedCount ) |
|
90 { |
|
91 iLog->Log(_L("Verification Failed: count=%d, expectedCount=%d."), count, expectedCount); |
|
92 err = KErrUnexpectedValue; |
|
93 } |
|
94 return err; |
|
95 } |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // CCommonTestClass::MpxClientListIsClient() |
|
99 // Returns: Symbian OS errors. |
|
100 // ----------------------------------------------------------------------------- |
|
101 TInt CCommonTestClass::MpxClientListIsClient(CStifItemParser& aItem) |
|
102 { |
|
103 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListIsClient testing CMPXClientList::IsClient() begin"))); |
|
104 iLog->Log(_L("CCommonTestClass::MpxClientListIsClient testing CMPXClientList::IsClient() begin")); |
|
105 TInt err=KErrNone; |
|
106 TBool expectedResult; |
|
107 TThreadId threadId = 2222; |
|
108 |
|
109 // read in parameters |
|
110 if ( aItem.GetNextInt(expectedResult) ) |
|
111 { |
|
112 iLog->Log(_L("Missing Parameter: Expected result.")); |
|
113 return KErrBadTestParameter; |
|
114 } |
|
115 if ( !iClientList ) |
|
116 { |
|
117 iLog->Log(_L("Error: MPXClientList not created.")); |
|
118 return KErrBadTestParameter; |
|
119 } |
|
120 |
|
121 TBool result = iClientList->IsClient(threadId); |
|
122 // verification |
|
123 if ( result != expectedResult ) |
|
124 { |
|
125 iLog->Log(_L("Verification Failed: result=%d, expectedResult=%d."), result, expectedResult); |
|
126 err = KErrUnexpectedValue; |
|
127 } |
|
128 return err; |
|
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // CCommonTestClass::MpxClientListFindByMsg() |
|
133 // Returns: Symbian OS errors. |
|
134 // ----------------------------------------------------------------------------- |
|
135 TInt CCommonTestClass::MpxClientListFindByMsg(CStifItemParser& aItem) |
|
136 { |
|
137 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListFindByMsg testing CMPXClientList::Find() begin"))); |
|
138 iLog->Log(_L("CCommonTestClass::MpxClientListFindByMsg testing CMPXClientList::Find() begin")); |
|
139 TInt err=KErrNone; |
|
140 TBool expectedResult; |
|
141 |
|
142 // read in parameters |
|
143 if ( aItem.GetNextInt(expectedResult) ) |
|
144 { |
|
145 iLog->Log(_L("Missing Parameter: Expected result.")); |
|
146 return KErrBadTestParameter; |
|
147 } |
|
148 if ( !iClientList ) |
|
149 { |
|
150 iLog->Log(_L("Error: MPXClientList not created.")); |
|
151 return KErrBadTestParameter; |
|
152 } |
|
153 if ( !iMessageQueue ) |
|
154 { |
|
155 iLog->Log(_L("Error: MPXMsgQueue not created.")); |
|
156 return KErrBadTestParameter; |
|
157 } |
|
158 |
|
159 TBool result = iClientList->Find(*iMessageQueue); |
|
160 // verification |
|
161 if ( result != expectedResult ) |
|
162 { |
|
163 iLog->Log(_L("Verification Failed: result=%d, expectedResult=%d."), result, expectedResult); |
|
164 err = KErrUnexpectedValue; |
|
165 } |
|
166 return err; |
|
167 } |
|
168 |
|
169 // ----------------------------------------------------------------------------- |
|
170 // CCommonTestClass::MpxClientListFindById() |
|
171 // Returns: Symbian OS errors. |
|
172 // ----------------------------------------------------------------------------- |
|
173 TInt CCommonTestClass::MpxClientListFindById(CStifItemParser& aItem) |
|
174 { |
|
175 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListFindById testing CMPXClientList::Find() begin"))); |
|
176 iLog->Log(_L("CCommonTestClass::MpxClientListFindById testing CMPXClientList::Find() begin")); |
|
177 TInt err=KErrNone; |
|
178 TThreadId threadId = 2222; |
|
179 TBool expectedResult; |
|
180 |
|
181 // read in parameters |
|
182 if ( aItem.GetNextInt(expectedResult) ) |
|
183 { |
|
184 iLog->Log(_L("Missing Parameter: Expected result.")); |
|
185 return KErrBadTestParameter; |
|
186 } |
|
187 if ( !iClientList ) |
|
188 { |
|
189 iLog->Log(_L("Error: MPXClientList not created.")); |
|
190 return KErrBadTestParameter; |
|
191 } |
|
192 |
|
193 TBool result = iClientList->Find(threadId); |
|
194 // verification |
|
195 if ( result != expectedResult ) |
|
196 { |
|
197 iLog->Log(_L("Verification Failed: result=%d, expectedResult=%d."), result, expectedResult); |
|
198 err = KErrUnexpectedValue; |
|
199 } |
|
200 return err; |
|
201 } |
|
202 |
|
203 // To test the destruction function of CCommonTestClass |
|
204 TInt CCommonTestClass::DeleteMpxClientList() |
|
205 { |
|
206 FTRACE(FPrint(_L("CCommonTestClass::DeleteMpxClientList testing CMPXClientList::~CMPXClientList() begin"))); |
|
207 iLog->Log(_L("CCommonTestClass::DeleteMpxClientList testing CMPXClientList::~CMPXClientList() begin")); |
|
208 TInt err=KErrNone; |
|
209 |
|
210 delete iClientList; |
|
211 iClientList = NULL; |
|
212 |
|
213 FTRACE(FPrint(_L("CCommonTestClass::DeleteMpxClientList testing CMPXClientList::~CMPXClientList() end err=%d"),err)); |
|
214 iLog->Log(_L("CCommonTestClass::DeleteMpxClientList testing CMPXClientList::~CMPXClientList() end err=%d"),err); |
|
215 |
|
216 return err; |
|
217 } |
|
218 // ----------------------------------------------------------------------------- |
|
219 // CCommonTestClass::MpxClientListAddClientL() |
|
220 // Returns: Symbian OS errors. |
|
221 // ----------------------------------------------------------------------------- |
|
222 TInt CCommonTestClass::MpxClientListAddClientL() |
|
223 { |
|
224 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListAddClient testing CMPXClientList::AddClientL() begin"))); |
|
225 iLog->Log(_L("CCommonTestClass::MpxClientListAddClietn testing CMPXClientList::AddClientL() begin")); |
|
226 iClientList = CMPXClientList::NewL(); |
|
227 if ( !iClientList ) |
|
228 { |
|
229 iLog->Log(_L("Error: MPXClientList not created.")); |
|
230 return KErrBadTestParameter; |
|
231 } |
|
232 |
|
233 if ( !iMessageQueue ) |
|
234 { |
|
235 iMessageQueue = CMPXMessageQueue::NewL(); |
|
236 } |
|
237 TRAPD(err, iClientList->AddClientL( RThread().Id(), iMessageQueue )); |
|
238 return err; |
|
239 } |
|
240 //To test CMPXClientList::AddClientL(TThreadId aId,TInt aMode,CMPXMessageQueue* aMsgQueue); |
|
241 // Returns: Symbian OS errors. |
|
242 TInt CCommonTestClass::MpxClientListAddClientLUsingMode() |
|
243 { |
|
244 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListAddClientLUsingMode testing CMPXClientList::AddClientL() begin"))); |
|
245 iLog->Log(_L("CCommonTestClass::MpxClientListAddClientLUsingMode testing CMPXClientList::AddClientL() begin")); |
|
246 TThreadId threadId = RThread().Id();// 2222; |
|
247 TInt err = KErrNone; |
|
248 TRAP(err , iClientList = CMPXClientList::NewL()); |
|
249 if ( !iClientList ) |
|
250 { |
|
251 iLog->Log(_L("Error: MPXClientList not created.")); |
|
252 return KErrBadTestParameter; |
|
253 } |
|
254 |
|
255 if ( !iMessageQueue ) |
|
256 { |
|
257 TRAPD(err,iMessageQueue = CMPXMessageQueue::NewL()); |
|
258 } |
|
259 TRAP(err,iClientList->AddClientL(threadId,KErrUnknown,iMessageQueue)); |
|
260 return err; |
|
261 } |
|
262 |
|
263 //To test CMPXClientList::RemoveClient(TInt aIndex) |
|
264 // Returns: Symbian OS errors. |
|
265 TInt CCommonTestClass::MpxClientListRemoveClient() |
|
266 { |
|
267 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListRemoveClient testing CMPXClientList::RemoveClient(TInt aIndex) begin"))); |
|
268 iLog->Log(_L("CCommonTestClass::MpxClientListRemoveClient testing CMPXClientList::RemoveClient(TInt aIndex) begin")); |
|
269 |
|
270 TInt iIndex = 0; |
|
271 TRAPD(err,iClientList->RemoveClient(iIndex)); |
|
272 |
|
273 return err; |
|
274 } |
|
275 |
|
276 //To test CMPXClientList::ClientProcessList() |
|
277 // Returns: Symbian OS errors. |
|
278 TInt CCommonTestClass::MpxClientListClientProcessList() |
|
279 { |
|
280 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListClientProcessList testing CMPXClientList::ClientProcessList() begin"))); |
|
281 iLog->Log(_L("CCommonTestClass::MpxClientListClientProcessList testing CMPXClientList::ClientProcessList() begin")); |
|
282 |
|
283 TInt err = KErrNone; |
|
284 TArray<TProcessId> iClientProcess = iClientList->ClientProcessList(); |
|
285 |
|
286 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListClientProcessList testing CMPXClientList::ClientProcessList() end err=%d"), err)); |
|
287 iLog->Log(_L("CCommonTestClass::MpxClientListClientProcessList testing CMPXClientList::ClientProcessList() end err=%d"), err); |
|
288 |
|
289 return err; |
|
290 } |
|
291 |
|
292 // ----------------------------------------------------------------------------- |
|
293 // CCommonTestClass::MpxClientListClientMode() |
|
294 // Returns: Symbian OS errors. |
|
295 // ----------------------------------------------------------------------------- |
|
296 TInt CCommonTestClass::MpxClientListClientMode(CStifItemParser& /*aItem*/) |
|
297 { |
|
298 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListClientMode testing CMPXClientList::ClientMode() begin"))); |
|
299 iLog->Log(_L("CCommonTestClass::MpxClientListClientMode testing CMPXClientList::ClientMode() begin")); |
|
300 TInt err=KErrNone; |
|
301 TInt aIndex=0; |
|
302 if ( !iClientList ) |
|
303 { |
|
304 iLog->Log(_L("Error: MPXClientList not created.")); |
|
305 return KErrBadTestParameter; |
|
306 } |
|
307 |
|
308 iClientList->ClientMode(aIndex); |
|
309 |
|
310 iLog->Log(_L("CMPXClientList::ClientMode() return"),err); |
|
311 return err; |
|
312 } |
|
313 // ----------------------------------------------------------------------------- |
|
314 // CCommonTestClass::MpxClientListSendMsg() |
|
315 // Returns: Symbian OS errors. |
|
316 // ----------------------------------------------------------------------------- |
|
317 TInt CCommonTestClass::MpxClientListSendMsg(CStifItemParser& /*aItem*/) |
|
318 { |
|
319 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListSendMsg testing CMPXClientList::SendMsg() begin"))); |
|
320 iLog->Log(_L("CCommonTestClass::MpxClientListSendMsg testing CMPXClientList::SendMsg() begin")); |
|
321 TInt err=KErrNone; |
|
322 CMPXMessage* aMsg(NULL); |
|
323 TInt aError=KErrNone; |
|
324 if ( !iClientList ) |
|
325 { |
|
326 iLog->Log(_L("Error: MPXClientList not created.")); |
|
327 return KErrBadTestParameter; |
|
328 } |
|
329 iClientList->SendMsg(aMsg,aError); |
|
330 iLog->Log(_L("CMPXClientList::SendMsg() return"),err); |
|
331 return err; |
|
332 |
|
333 } |
|
334 // ----------------------------------------------------------------------------- |
|
335 // CCommonTestClass::MpxClientListSendMsgaIndex() |
|
336 // Returns: Symbian OS errors. |
|
337 // ----------------------------------------------------------------------------- |
|
338 TInt CCommonTestClass::MpxClientListSendMsgaIndex(CStifItemParser& /*aItem*/) |
|
339 |
|
340 { |
|
341 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListSendMsgaIndex testing CMPXClientList::SendMsg() begin"))); |
|
342 iLog->Log(_L("CCommonTestClass::MpxClientListSendMsgaIndex testing CMPXClientList::SendMsg() begin")); |
|
343 TInt err=KErrNone; |
|
344 TInt aError=KErrNone; |
|
345 TInt aIndex=0; |
|
346 TMPXMessage message; |
|
347 message = TMPXPlaybackMessage(static_cast<TMPXPlaybackMessage::TEvent>(KMPXMessageContentIdGeneral), |
|
348 EMPXMessageGeneralId, |
|
349 KMPXMessagePbMediaChanged); |
|
350 if ( iClientList== NULL ) |
|
351 { |
|
352 iLog->Log(_L("Error: MPXClientList not created.")); |
|
353 return KErrBadTestParameter; |
|
354 } |
|
355 CMPXMessage* cmp = iClientList->ConvertMsgLC(message); |
|
356 TRAP(err,iClientList->SendMsg(aIndex, cmp, KErrNone)); |
|
357 CleanupStack::PopAndDestroy(cmp); |
|
358 iLog->Log(_L("CMPXClientList::SendMsg() return"),err); |
|
359 return err; |
|
360 } |
|
361 |
|
362 // ----------------------------------------------------------------------------- |
|
363 // CCommonTestClass::SendMsgLByMsgCMPXClientList() |
|
364 // Returns: Symbian OS errors. |
|
365 // ----------------------------------------------------------------------------- |
|
366 TInt CCommonTestClass::SendMsgLByMsgCMPXClientList(CStifItemParser&) |
|
367 { |
|
368 FTRACE(FPrint(_L("CCommonTestClass::SendMsgLByMsgCMPXClientList testing CMPXClientList::SendMsgL(const TMPXMessage& aMsg) begin"))); |
|
369 iLog->Log(_L("CCommonTestClass::SendMsgLByMsgCMPXClientList testing CMPXClientList::SendMsgL(const TMPXMessage& aMsg) begin")); |
|
370 TInt err= KErrNone; |
|
371 TMPXMessage aMsg; //=TMPXMessage::TMPXMessage(); |
|
372 // TInt aError=KErrNone; |
|
373 if ( !iClientList ) |
|
374 { |
|
375 iLog->Log(_L("Error: MPXClientList not created.")); |
|
376 return KErrBadTestParameter; |
|
377 } |
|
378 TRAP(err,iClientList->SendMsgL(aMsg)); |
|
379 if(err!=KErrNone) |
|
380 { |
|
381 iLog->Log(_L("CMPXClientList::SendMsgL() return"),err); |
|
382 } |
|
383 return err; |
|
384 } |
|
385 |
|
386 // ----------------------------------------------------------------------------- |
|
387 // CCommonTestClass::MPXClientListConvertMsgLC() |
|
388 // Returns: Symbian OS errors. |
|
389 // ----------------------------------------------------------------------------- |
|
390 TInt CCommonTestClass::MPXClientListConvertMsgLC(CStifItemParser& ) |
|
391 { |
|
392 FTRACE(FPrint(_L("CCommonTestClass::MPXClientListConvertMsgLC testing CMPXClientList::ConvertMsgLC() begin"))); |
|
393 iLog->Log(_L("CCommonTestClass::MPXClientListConvertMsgLC testing CMPXClientList::ConvertMsgLC() begin")); |
|
394 TInt err=KErrNone; |
|
395 //TMPXMessage aMsg =TMPXMessage::TMPXMessage(); |
|
396 TMPXMessage message; |
|
397 message = TMPXPlaybackMessage(static_cast<TMPXPlaybackMessage::TEvent>(KMPXMessageContentIdGeneral), |
|
398 EMPXMessageGeneralId, |
|
399 KMPXMessagePbMediaChanged); |
|
400 if ( iClientList== NULL ) |
|
401 { |
|
402 iLog->Log(_L("Error: MPXClientList not created.")); |
|
403 return KErrBadTestParameter; |
|
404 } |
|
405 CMPXMessage* cmp = iClientList->ConvertMsgLC(message); |
|
406 CleanupStack::PopAndDestroy(cmp); |
|
407 iLog->Log(_L("CMPXClientList::ConvertMsgLC() return"),err); |
|
408 return err; |
|
409 } |
|
410 |
|
411 // ----------------------------------------------------------------------------- |
|
412 // CCommonTestClass::SendMsgLIndexAndTMPMsgCMPXClientList() |
|
413 // Returns: Symbian OS errors. |
|
414 // ----------------------------------------------------------------------------- |
|
415 TInt CCommonTestClass::SendMsgLIndexAndTMPMsgCMPXClientList(CStifItemParser&) |
|
416 { |
|
417 FTRACE(FPrint(_L("CCommonTestClass::SendMsgLIndexAndTMPMsgCMPXClientList testing CMPXClientList::SendMsgL(TInt aIndex, const TMPXMessage& aMsg) begin"))); |
|
418 iLog->Log(_L("CCommonTestClass::SendMsgLIndexAndTMPMsgCMPXClientList testing CMPXClientList::SendMsgL(TInt aIndex, const TMPXMessage& aMsg) begin")); |
|
419 TInt err= KErrNone; |
|
420 TInt index = 0; |
|
421 TMPXMessage aMsg ;//=TMPXMessage::TMPXMessage(); |
|
422 |
|
423 if ( !iClientList ) |
|
424 { |
|
425 iLog->Log(_L("Error: MPXClientList not created.")); |
|
426 return KErrBadTestParameter; |
|
427 } |
|
428 |
|
429 TRAP(err,iClientList->SendMsgL(index,aMsg)); |
|
430 |
|
431 if(err!=KErrNone) |
|
432 { |
|
433 iLog->Log(_L("CMPXClientList::SendMsgL() return"),err); |
|
434 } |
|
435 return err; |
|
436 } |
|
437 |
|
438 // ----------------------------------------------------------------------------- |
|
439 // CCommonTestClass::MpxClientListAddSubscriptionL() |
|
440 // Returns: Symbian OS errors. |
|
441 // ----------------------------------------------------------------------------- |
|
442 TInt CCommonTestClass::MpxClientListAddSubscriptionL(CStifItemParser& /*aItem*/) |
|
443 { |
|
444 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListAddSubscriptionL testing CMPXClientList::AddSubscriptionL(TInt aIndex,CMPXSubscription* aSubscription) begin"))); |
|
445 iLog->Log(_L("CCommonTestClass::MpxClientListAddSubscriptionL testing CMPXClientList::AddSubscriptionL(TInt aIndex,CMPXSubscription* aSubscription) begin")); |
|
446 TInt err= KErrNone; |
|
447 |
|
448 TInt index = 0; |
|
449 iClientList->AddSubscriptionL(index,iSubscription); |
|
450 |
|
451 if(err!=KErrNone) |
|
452 { |
|
453 iLog->Log(_L("CMPXClientList::AddSubscriptionL() return"),err); |
|
454 } |
|
455 return err; |
|
456 } |
|
457 |
|
458 |
|
459 // ----------------------------------------------------------------------------- |
|
460 // CCommonTestClass::MpxClientListRemoveSubscriptionL() |
|
461 // Returns: Symbian OS errors. |
|
462 // ----------------------------------------------------------------------------- |
|
463 TInt CCommonTestClass::MpxClientListRemoveSubscriptionL(CStifItemParser& /*aItem*/) |
|
464 { |
|
465 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListRemoveSubscriptionL testing CMPXClientList::RemoveSubscriptionL(TInt aIndex,CMPXSubscription* aSubscription) begin"))); |
|
466 iLog->Log(_L("CCommonTestClass::MpxClientListRemoveSubscriptionL testing CMPXClientList::RemoveSubscriptionL(TInt aIndex,CMPXSubscription* aSubscription) begin")); |
|
467 TInt err= KErrNone; |
|
468 |
|
469 TInt index = 0; |
|
470 TRAP(err,iClientList->RemoveSubscriptionL(index,*iSubscription)); |
|
471 //iClientList->RemoveSubscriptionL(index,*iSubscription); |
|
472 |
|
473 if(err!=KErrNone) |
|
474 { |
|
475 iLog->Log(_L("CMPXClientList::RemoveSubscriptionL() return"),err); |
|
476 } |
|
477 return err; |
|
478 } |
|
479 |
|
480 // ----------------------------------------------------------------------------- |
|
481 // CCommonTestClass::MpxClientListRemoveSubscriptionL() |
|
482 // Returns: Symbian OS errors. |
|
483 // ----------------------------------------------------------------------------- |
|
484 TInt CCommonTestClass::MpxClientListRemoveAllSubscriptionsL(CStifItemParser& /*aItem*/) |
|
485 { |
|
486 FTRACE(FPrint(_L("CCommonTestClass::MpxClientListRemoveAllSubscriptionsL testing CMPXClientList::RemoveAllSubscriptionsL(TInt aIndex) begin"))); |
|
487 iLog->Log(_L("CCommonTestClass::MpxClientListRemoveAllSubscriptionsL testing CMPXClientList::RemoveAllSubscriptionsL(TInt aIndex) begin")); |
|
488 TInt err= KErrNone; |
|
489 |
|
490 TInt index = 0; |
|
491 //iClientList->RemoveAllSubscriptionsL(index); |
|
492 TRAP(err,iClientList->RemoveAllSubscriptionsL(index)); |
|
493 |
|
494 if(err!=KErrNone) |
|
495 { |
|
496 iLog->Log(_L("CMPXClientList::RemoveSubscriptionL() return error %d."),err); |
|
497 } |
|
498 return err; |
|
499 } |
|
500 |
|
501 // end of MPXClientList testing implementation (mpxclientlist.h)=========================== |