24
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#include "tsupplementaltsytesthelper.h"
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
/**
|
|
21 |
* Constructor
|
|
22 |
*/
|
|
23 |
TSupplementalTsyTestHelper::TSupplementalTsyTestHelper(CCTSYIntegrationTestSuiteStepBase& aTestStep)
|
|
24 |
: TTsyTestHelperBase( aTestStep )
|
|
25 |
{
|
|
26 |
}
|
|
27 |
/**
|
|
28 |
* Notify reset for RMobilePhone::NotifyCCBSRecall
|
|
29 |
*/
|
|
30 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCCBSRecall(
|
|
31 |
RMobilePhone& aMobilePhone,
|
|
32 |
TEtelRequestBase& aRequestStatus,
|
|
33 |
TCmpBase<RMobilePhone::TMobilePhoneCCBSEntryV1> &aMobilePhoneCCBSEntryV1,
|
|
34 |
TInt aWantedStatus )
|
|
35 |
|
|
36 |
{
|
|
37 |
// Wait for the request to complete
|
|
38 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
39 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCCBSRecall did not complete"))
|
|
40 |
|
|
41 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
42 |
&& !aMobilePhoneCCBSEntryV1.IsEqual(ENoLogError) )
|
|
43 |
{
|
|
44 |
// Request has completed with incorrect result. Consume any outstanding
|
|
45 |
// Repost notification until timeout or we get the right result.
|
|
46 |
RMobilePhone::TMobilePhoneCCBSEntryV1Pckg pkgParam( aMobilePhoneCCBSEntryV1.GetValue() );
|
|
47 |
aMobilePhone.NotifyCCBSRecall(aRequestStatus, pkgParam);
|
|
48 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
49 |
}
|
|
50 |
|
|
51 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCCBSRecall Wrong completion status"))
|
|
52 |
ASSERT_TRUE(aMobilePhoneCCBSEntryV1.IsEqual(ELogError),
|
|
53 |
_L("RMobilePhone::NotifyCCBSRecall Wrong result"))
|
|
54 |
|
|
55 |
// Cancel request if it is still pending
|
|
56 |
if (aRequestStatus.Int() == KRequestPending)
|
|
57 |
{
|
|
58 |
aRequestStatus.Cancel();
|
|
59 |
}
|
|
60 |
}
|
|
61 |
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Notify reset for RMobilePhone::NotifyCCBSRecall
|
|
65 |
*/
|
|
66 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCCBSRecall(
|
|
67 |
RMobilePhone& aMobilePhone,
|
|
68 |
TEtelRequestBase& aRequestStatus,
|
|
69 |
TCmpBase<RMobilePhone::TMobilePhoneCCBSEntryV2> &aMobilePhoneCCBSEntryV2,
|
|
70 |
TInt aWantedStatus )
|
|
71 |
|
|
72 |
{
|
|
73 |
// Wait for the request to complete
|
|
74 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
75 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCCBSRecall did not complete"))
|
|
76 |
|
|
77 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
78 |
&& !aMobilePhoneCCBSEntryV2.IsEqual(ENoLogError) )
|
|
79 |
{
|
|
80 |
// Request has completed with incorrect result. Consume any outstanding
|
|
81 |
// Repost notification until timeout or we get the right result.
|
|
82 |
RMobilePhone::TMobilePhoneCCBSEntryV2Pckg pkgParam( aMobilePhoneCCBSEntryV2.GetValue() );
|
|
83 |
aMobilePhone.NotifyCCBSRecall(aRequestStatus, pkgParam);
|
|
84 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
85 |
}
|
|
86 |
|
|
87 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCCBSRecall Wrong completion status"))
|
|
88 |
ASSERT_TRUE(aMobilePhoneCCBSEntryV2.IsEqual(ELogError),
|
|
89 |
_L("RMobilePhone::NotifyCCBSRecall Wrong result"))
|
|
90 |
|
|
91 |
// Cancel request if it is still pending
|
|
92 |
if (aRequestStatus.Int() == KRequestPending)
|
|
93 |
{
|
|
94 |
aRequestStatus.Cancel();
|
|
95 |
}
|
|
96 |
}
|
|
97 |
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Notify reset for RMobilePhone::NotifyCCBSStatusChange
|
|
101 |
*/
|
|
102 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCCBSStatusChange(
|
|
103 |
RMobilePhone& aMobilePhone,
|
|
104 |
TEtelRequestBase& aRequestStatus,
|
|
105 |
RMobilePhone::TMobilePhoneCCBSStatus& aCcbsStatus,
|
|
106 |
RMobilePhone::TMobilePhoneCCBSStatus aExpectedCcbsStatus,
|
|
107 |
TInt aWantedStatus )
|
|
108 |
|
|
109 |
{
|
|
110 |
// Wait for the request to complete
|
|
111 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
112 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCCBSStatusChange did not complete"))
|
|
113 |
|
|
114 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
115 |
&& aCcbsStatus != aExpectedCcbsStatus )
|
|
116 |
{
|
|
117 |
// Request has completed with incorrect result. Consume any outstanding
|
|
118 |
// Repost notification until timeout or we get the right result.
|
|
119 |
|
|
120 |
aMobilePhone.NotifyCCBSStatusChange(aRequestStatus, aCcbsStatus);
|
|
121 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
122 |
}
|
|
123 |
|
|
124 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCCBSStatusChange Wrong completion status"))
|
|
125 |
ASSERT_EQUALS(aCcbsStatus, aExpectedCcbsStatus,
|
|
126 |
_L("RMobilePhone::NotifyCCBSStatusChange Wrong result"))
|
|
127 |
|
|
128 |
// Cancel request if it is still pending
|
|
129 |
if (aRequestStatus.Int() == KRequestPending)
|
|
130 |
{
|
|
131 |
aRequestStatus.Cancel();
|
|
132 |
}
|
|
133 |
}
|
|
134 |
|
|
135 |
|
|
136 |
/**
|
|
137 |
* Notify reset for RMobilePhone::NotifyCallBarringStatusChange
|
|
138 |
*/
|
|
139 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCallBarringStatusChange(
|
|
140 |
RMobilePhone& aMobilePhone,
|
|
141 |
TEtelRequestBase& aRequestStatus,
|
|
142 |
RMobilePhone::TMobilePhoneCBCondition& aCondition,
|
|
143 |
RMobilePhone::TMobilePhoneCBCondition aExpectedCondition,
|
|
144 |
TInt aWantedStatus )
|
|
145 |
|
|
146 |
{
|
|
147 |
// Wait for the request to complete
|
|
148 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeLong);
|
|
149 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCallBarringStatusChange did not complete"))
|
|
150 |
|
|
151 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
152 |
&& aCondition != aExpectedCondition )
|
|
153 |
{
|
|
154 |
// Request has completed with incorrect result. Consume any outstanding
|
|
155 |
// Repost notification until timeout or we get the right result.
|
|
156 |
|
|
157 |
aMobilePhone.NotifyCallBarringStatusChange(aRequestStatus, aCondition);
|
|
158 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
159 |
}
|
|
160 |
|
|
161 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCallBarringStatusChange Wrong completion status"))
|
|
162 |
ASSERT_EQUALS(aCondition, aExpectedCondition,
|
|
163 |
_L("RMobilePhone::NotifyCallBarringStatusChange Wrong result"))
|
|
164 |
|
|
165 |
// Cancel request if it is still pending
|
|
166 |
if (aRequestStatus.Int() == KRequestPending)
|
|
167 |
{
|
|
168 |
aRequestStatus.Cancel();
|
|
169 |
}
|
|
170 |
}
|
|
171 |
|
|
172 |
|
|
173 |
/**
|
|
174 |
* Notify reset for RMobilePhone::NotifyCallForwardingActive
|
|
175 |
*/
|
|
176 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCallForwardingActive(
|
|
177 |
RMobilePhone& aMobilePhone,
|
|
178 |
TEtelRequestBase& aRequestStatus,
|
|
179 |
RMobilePhone::TMobileService& aServiceGroup,
|
|
180 |
RMobilePhone::TMobileService aExpectedServiceGroup,
|
|
181 |
RMobilePhone::TMobilePhoneCFActive &aActiveType,
|
|
182 |
TInt aWantedStatus )
|
|
183 |
|
|
184 |
{
|
|
185 |
// Wait for the request to complete
|
|
186 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
187 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCallForwardingActive did not complete"))
|
|
188 |
|
|
189 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
190 |
&& aServiceGroup != aExpectedServiceGroup )
|
|
191 |
{
|
|
192 |
// Request has completed with incorrect result. Consume any outstanding
|
|
193 |
// Repost notification until timeout or we get the right result.
|
|
194 |
|
|
195 |
aMobilePhone.NotifyCallForwardingActive(aRequestStatus, aServiceGroup, aActiveType);
|
|
196 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
197 |
}
|
|
198 |
|
|
199 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCallForwardingActive Wrong completion status"))
|
|
200 |
ASSERT_EQUALS(aServiceGroup, aExpectedServiceGroup,
|
|
201 |
_L("RMobilePhone::NotifyCallForwardingActive Wrong result"))
|
|
202 |
|
|
203 |
// Cancel request if it is still pending
|
|
204 |
if (aRequestStatus.Int() == KRequestPending)
|
|
205 |
{
|
|
206 |
aRequestStatus.Cancel();
|
|
207 |
}
|
|
208 |
}
|
|
209 |
|
|
210 |
|
|
211 |
/**
|
|
212 |
* Notify reset for RMobilePhone::NotifyCallForwardingStatusChange
|
|
213 |
*/
|
|
214 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCallForwardingStatusChange(
|
|
215 |
RMobilePhone& aMobilePhone,
|
|
216 |
TEtelRequestBase& aRequestStatus,
|
|
217 |
RMobilePhone::TMobilePhoneCFCondition& aCondition,
|
|
218 |
RMobilePhone::TMobilePhoneCFCondition aExpectedCondition,
|
|
219 |
TInt aWantedStatus )
|
|
220 |
|
|
221 |
{
|
|
222 |
// Wait for the request to complete
|
|
223 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
224 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCallForwardingStatusChange did not complete"))
|
|
225 |
|
|
226 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
227 |
&& aCondition != aExpectedCondition )
|
|
228 |
{
|
|
229 |
// Request has completed with incorrect result. Consume any outstanding
|
|
230 |
// Repost notification until timeout or we get the right result.
|
|
231 |
|
|
232 |
aMobilePhone.NotifyCallForwardingStatusChange(aRequestStatus, aCondition);
|
|
233 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
234 |
}
|
|
235 |
|
|
236 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCallForwardingStatusChange Wrong completion status"))
|
|
237 |
ASSERT_EQUALS(aCondition, aExpectedCondition,
|
|
238 |
_L("RMobilePhone::NotifyCallForwardingStatusChange Wrong result"))
|
|
239 |
|
|
240 |
// Cancel request if it is still pending
|
|
241 |
if (aRequestStatus.Int() == KRequestPending)
|
|
242 |
{
|
|
243 |
aRequestStatus.Cancel();
|
|
244 |
}
|
|
245 |
}
|
|
246 |
|
|
247 |
|
|
248 |
/**
|
|
249 |
* Notify reset for RMobilePhone::NotifyCallServiceCapsChange
|
|
250 |
*/
|
|
251 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCallServiceCapsChange(
|
|
252 |
RMobilePhone& aMobilePhone,
|
|
253 |
TEtelRequestBase& aRequestStatus,
|
|
254 |
TUint32& aCaps,
|
|
255 |
TUint32 aWantedCaps,
|
|
256 |
TUint32 aUnwantedCaps,
|
|
257 |
TInt aWantedStatus )
|
|
258 |
|
|
259 |
{
|
|
260 |
// Wait for the request to complete
|
|
261 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
262 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCallServiceCapsChange did not complete"))
|
|
263 |
|
|
264 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
265 |
&& ( ((aCaps & aWantedCaps) != aWantedCaps)
|
|
266 |
|| ((aCaps & aUnwantedCaps) != 0) ) )
|
|
267 |
{
|
|
268 |
// Request has completed with incorrect result. Consume any outstanding
|
|
269 |
// Repost notification until timeout or we get the right result.
|
|
270 |
aMobilePhone.NotifyCallServiceCapsChange(aRequestStatus, aCaps);
|
|
271 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
272 |
}
|
|
273 |
|
|
274 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus,
|
|
275 |
_L("RMobilePhone::NotifyCallServiceCapsChange Wrong completion status"))
|
|
276 |
ASSERT_BITS_SET(aCaps, aWantedCaps, aUnwantedCaps,
|
|
277 |
_L("RMobilePhone::NotifyCallServiceCapsChange Wrong caps"))
|
|
278 |
|
|
279 |
// Cancel request if it is still pending
|
|
280 |
if (aRequestStatus.Int() == KRequestPending)
|
|
281 |
{
|
|
282 |
aRequestStatus.Cancel();
|
|
283 |
}
|
|
284 |
}
|
|
285 |
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Notify reset for RMobilePhone::NotifyCallWaitingStatusChange
|
|
289 |
*/
|
|
290 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCallWaitingStatusChange(
|
|
291 |
RMobilePhone& aMobilePhone,
|
|
292 |
TEtelRequestBase& aRequestStatus,
|
|
293 |
TCmpBase<RMobilePhone::TMobilePhoneCWInfoEntryV1> &aMobilePhoneCWInfoEntryV1,
|
|
294 |
TInt aWantedStatus )
|
|
295 |
|
|
296 |
{
|
|
297 |
// Wait for the request to complete
|
|
298 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
299 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCallWaitingStatusChange did not complete"))
|
|
300 |
|
|
301 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
302 |
&& !aMobilePhoneCWInfoEntryV1.IsEqual(ENoLogError) )
|
|
303 |
{
|
|
304 |
// Request has completed with incorrect result. Consume any outstanding
|
|
305 |
// Repost notification until timeout or we get the right result.
|
|
306 |
RMobilePhone::TMobilePhoneCWInfoEntryV1Pckg pkgParam( aMobilePhoneCWInfoEntryV1.GetValue() );
|
|
307 |
aMobilePhone.NotifyCallWaitingStatusChange(aRequestStatus, pkgParam);
|
|
308 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
309 |
}
|
|
310 |
|
|
311 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCallWaitingStatusChange Wrong completion status"))
|
|
312 |
ASSERT_TRUE(aMobilePhoneCWInfoEntryV1.IsEqual(ELogError),
|
|
313 |
_L("RMobilePhone::NotifyCallWaitingStatusChange Wrong result"))
|
|
314 |
|
|
315 |
// Cancel request if it is still pending
|
|
316 |
if (aRequestStatus.Int() == KRequestPending)
|
|
317 |
{
|
|
318 |
aRequestStatus.Cancel();
|
|
319 |
}
|
|
320 |
}
|
|
321 |
|
|
322 |
|
|
323 |
/**
|
|
324 |
* Notify reset for RMobilePhone::NotifyCipheringIndicatorStatus
|
|
325 |
*/
|
|
326 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyCipheringIndicatorStatus(
|
|
327 |
RMobilePhone& aMobilePhone,
|
|
328 |
TEtelRequestBase& aRequestStatus,
|
|
329 |
RMobilePhone::TMobileCallCipheringIndicator& aIndicatorStatus,
|
|
330 |
RMobilePhone::TMobileCallCipheringIndicator aExpectedIndicatorStatus,
|
|
331 |
TInt aWantedStatus )
|
|
332 |
|
|
333 |
{
|
|
334 |
// Wait for the request to complete
|
|
335 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
336 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyCipheringIndicatorStatus did not complete"))
|
|
337 |
|
|
338 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
339 |
&& aIndicatorStatus != aExpectedIndicatorStatus )
|
|
340 |
{
|
|
341 |
// Request has completed with incorrect result. Consume any outstanding
|
|
342 |
// Repost notification until timeout or we get the right result.
|
|
343 |
|
|
344 |
aMobilePhone.NotifyCipheringIndicatorStatus(aRequestStatus, aIndicatorStatus);
|
|
345 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
346 |
}
|
|
347 |
|
|
348 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyCipheringIndicatorStatus Wrong completion status"))
|
|
349 |
ASSERT_EQUALS(aIndicatorStatus, aExpectedIndicatorStatus,
|
|
350 |
_L("RMobilePhone::NotifyCipheringIndicatorStatus Wrong result"))
|
|
351 |
|
|
352 |
// Cancel request if it is still pending
|
|
353 |
if (aRequestStatus.Int() == KRequestPending)
|
|
354 |
{
|
|
355 |
aRequestStatus.Cancel();
|
|
356 |
}
|
|
357 |
}
|
|
358 |
|
|
359 |
|
|
360 |
/**
|
|
361 |
* Notify reset for RMobilePhone::NotifyIdentityServiceStatus
|
|
362 |
*/
|
|
363 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyIdentityServiceStatus(
|
|
364 |
RMobilePhone& aMobilePhone,
|
|
365 |
TEtelRequestBase& aRequestStatus,
|
|
366 |
RMobilePhone::TMobilePhoneIdService& aService,
|
|
367 |
RMobilePhone::TMobilePhoneIdService aExpectedService,
|
|
368 |
RMobilePhone::TMobilePhoneIdServiceStatus &aStatus,
|
|
369 |
TInt aWantedStatus )
|
|
370 |
|
|
371 |
{
|
|
372 |
// Wait for the request to complete
|
|
373 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
374 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyIdentityServiceStatus did not complete"))
|
|
375 |
|
|
376 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
377 |
&& aService != aExpectedService )
|
|
378 |
{
|
|
379 |
// Request has completed with incorrect result. Consume any outstanding
|
|
380 |
// Repost notification until timeout or we get the right result.
|
|
381 |
|
|
382 |
aMobilePhone.NotifyIdentityServiceStatus(aRequestStatus, aService, aStatus);
|
|
383 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
384 |
}
|
|
385 |
|
|
386 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyIdentityServiceStatus Wrong completion status"))
|
|
387 |
ASSERT_EQUALS(aService, aExpectedService,
|
|
388 |
_L("RMobilePhone::NotifyIdentityServiceStatus Wrong result"))
|
|
389 |
|
|
390 |
// Cancel request if it is still pending
|
|
391 |
if (aRequestStatus.Int() == KRequestPending)
|
|
392 |
{
|
|
393 |
aRequestStatus.Cancel();
|
|
394 |
}
|
|
395 |
}
|
|
396 |
|
|
397 |
|
|
398 |
/**
|
|
399 |
* Notify reset for RMobilePhone::NotifyIdentitySuppressionRejected
|
|
400 |
*/
|
|
401 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifyIdentitySuppressionRejected(
|
|
402 |
TEtelRequestBase& aRequestStatus,
|
|
403 |
TInt aWantedStatus )
|
|
404 |
|
|
405 |
{
|
|
406 |
// Wait for the request to complete
|
|
407 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
408 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifyIdentitySuppressionRejected did not complete"))
|
|
409 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifyIdentitySuppressionRejected Wrong completion status"))
|
|
410 |
// Cancel request if it is still pending
|
|
411 |
if (aRequestStatus.Int() == KRequestPending)
|
|
412 |
{
|
|
413 |
aRequestStatus.Cancel();
|
|
414 |
}
|
|
415 |
}
|
|
416 |
|
|
417 |
|
|
418 |
/**
|
|
419 |
* Notify reset for RMobilePhone::NotifySendNetworkServiceRequest
|
|
420 |
*/
|
|
421 |
void TSupplementalTsyTestHelper::WaitForMobilePhoneNotifySendNetworkServiceRequest(
|
|
422 |
RMobilePhone& aMobilePhone,
|
|
423 |
TEtelRequestBase& aRequestStatus,
|
|
424 |
RMobilePhone::TMobilePhoneNotifySendSSOperation &aOperation,
|
|
425 |
TCmpBase<RMobilePhone::TMobilePhoneSendSSRequestV3> &aMobilePhoneSendSSRequestV3,
|
|
426 |
TInt aWantedStatus )
|
|
427 |
|
|
428 |
{
|
|
429 |
// Wait for the request to complete
|
|
430 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
431 |
ASSERT_EQUALS(err, KErrNone, _L("RMobilePhone::NotifySendNetworkServiceRequest did not complete"))
|
|
432 |
|
|
433 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
434 |
&& !aMobilePhoneSendSSRequestV3.IsEqual(ENoLogError) )
|
|
435 |
{
|
|
436 |
// Request has completed with incorrect result. Consume any outstanding
|
|
437 |
// Repost notification until timeout or we get the right result.
|
|
438 |
RMobilePhone::TMobilePhoneSendSSRequestV3Pckg pkgParam( aMobilePhoneSendSSRequestV3.GetValue() );
|
|
439 |
aMobilePhone.NotifySendNetworkServiceRequest(aRequestStatus, aOperation, pkgParam);
|
|
440 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
441 |
}
|
|
442 |
|
|
443 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobilePhone::NotifySendNetworkServiceRequest Wrong completion status"))
|
|
444 |
ASSERT_TRUE(aMobilePhoneSendSSRequestV3.IsEqual(ELogError),
|
|
445 |
_L("RMobilePhone::NotifySendNetworkServiceRequest Wrong result"))
|
|
446 |
|
|
447 |
// Cancel request if it is still pending
|
|
448 |
if (aRequestStatus.Int() == KRequestPending)
|
|
449 |
{
|
|
450 |
aRequestStatus.Cancel();
|
|
451 |
}
|
|
452 |
}
|
|
453 |
|
|
454 |
|
|
455 |
/**
|
|
456 |
* Notify reset for RMobileUssdMessaging::NotifyNetworkRelease
|
|
457 |
*/
|
|
458 |
void TSupplementalTsyTestHelper::WaitForMobileUssdMessagingNotifyNetworkRelease(
|
|
459 |
RMobileUssdMessaging& aMobileUssdMessaging,
|
|
460 |
TEtelRequestBase& aRequestStatus,
|
|
461 |
TCmpBase<RMobileUssdMessaging::TMobileUssdAttributesV1> &aMobileUssdAttributesV1,
|
|
462 |
TDes8 &aMsgAttributes,
|
|
463 |
TInt aWantedStatus )
|
|
464 |
|
|
465 |
{
|
|
466 |
// Wait for the request to complete
|
|
467 |
TInt err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
468 |
ASSERT_EQUALS(err, KErrNone, _L("RMobileUssdMessaging::NotifyNetworkRelease did not complete"))
|
|
469 |
|
|
470 |
while ( err == KErrNone && aRequestStatus.Int() == KErrNone
|
|
471 |
&& !aMobileUssdAttributesV1.IsEqual(ENoLogError) )
|
|
472 |
{
|
|
473 |
// Request has completed with incorrect result. Consume any outstanding
|
|
474 |
// Repost notification until timeout or we get the right result.
|
|
475 |
RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pkgParam( aMobileUssdAttributesV1.GetValue() );
|
|
476 |
aMobileUssdMessaging.NotifyNetworkRelease(aRequestStatus, pkgParam, aMsgAttributes);
|
|
477 |
err = iTestStep.WaitForRequestWithTimeOut(aRequestStatus, ETimeShort);
|
|
478 |
}
|
|
479 |
|
|
480 |
ASSERT_EQUALS(aRequestStatus.Int(), aWantedStatus, _L("RMobileUssdMessaging::NotifyNetworkRelease Wrong completion status"))
|
|
481 |
ASSERT_TRUE(aMobileUssdAttributesV1.IsEqual(ELogError),
|
|
482 |
_L("RMobileUssdMessaging::NotifyNetworkRelease Wrong result"))
|
|
483 |
|
|
484 |
// Cancel request if it is still pending
|
|
485 |
if (aRequestStatus.Int() == KRequestPending)
|
|
486 |
{
|
|
487 |
aRequestStatus.Cancel();
|
|
488 |
}
|
|
489 |
}
|
|
490 |
|
|
491 |
|