24
|
1 |
// Copyright (c) 2002-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 "Te_EtelSatTestStepBase.h"
|
|
17 |
#include "TE_EtelSatpcmds1b.h"
|
|
18 |
#include <utf.h>
|
|
19 |
|
|
20 |
CTestSatPCmds1b::CTestSatPCmds1b()
|
|
21 |
/** Each test step initialises it's own name
|
|
22 |
*/
|
|
23 |
{
|
|
24 |
// store the name of this test case
|
|
25 |
// this is the name that is used by the script file
|
|
26 |
SetTestStepName(_L("TestSatPCmds1b"));
|
|
27 |
}
|
|
28 |
|
|
29 |
enum TVerdict CTestSatPCmds1b::doTestStepL()
|
|
30 |
{
|
|
31 |
INFO_PRINTF1(_L("***********************************************"));
|
|
32 |
INFO_PRINTF1(_L("RSat Proactive Commands Functionality suite - 1"));
|
|
33 |
INFO_PRINTF1(_L("***********************************************"));
|
|
34 |
|
|
35 |
TInt ret=phone.Open(iTelServer,DSATTSY_PHONE_NAME);
|
|
36 |
TEST(ret==KErrNone);
|
|
37 |
|
|
38 |
ret=sat.Open(phone);
|
|
39 |
TEST(ret==KErrNone);
|
|
40 |
|
|
41 |
// local variables used throughout the sat tests
|
|
42 |
// Boundary error testing
|
|
43 |
|
|
44 |
// Select Item
|
|
45 |
RSat::TSelectItemV2* selectItem = new (ELeave) RSat::TSelectItemV2;
|
|
46 |
CleanupStack::PushL(selectItem);
|
|
47 |
|
|
48 |
RSat::TSelectItemV2Pckg* selectItemPckg = new (ELeave) RSat::TSelectItemV2Pckg(*selectItem);
|
|
49 |
CleanupStack::PushL(selectItemPckg);
|
|
50 |
|
|
51 |
TEST(selectItem->ExtensionId()== RSat::KSatV2);
|
|
52 |
TEST(selectItem->NumberOfItems()==0);
|
|
53 |
TEST(selectItem->IsRemoveMenu());
|
|
54 |
|
|
55 |
sat.NotifySelectItemPCmd(reqStatus, *selectItemPckg);
|
|
56 |
User::WaitForRequest(reqStatus);
|
|
57 |
TEST(reqStatus.Int()==KErrNone);
|
|
58 |
|
|
59 |
TEST(selectItem->MenuContent()==DSATTSY_ITEMS_ACTIONS_AND_ICONS);
|
|
60 |
TEST(selectItem->NumberOfItems()==0x03);
|
|
61 |
TEST(selectItem->iPreference==DSATTSY_SELECTION_PREFERENCE);
|
|
62 |
|
|
63 |
index=1;
|
|
64 |
TEST(selectItem->GetItem(index++,item,action,icon)==KErrNone);
|
|
65 |
|
|
66 |
TEST(item.iItemId==0x01);
|
|
67 |
TEST(item.iItemString==DSATTSY_ITEM1);
|
|
68 |
TEST(action==0x01);
|
|
69 |
TEST(icon==0x01);
|
|
70 |
|
|
71 |
TEST(selectItem->GetItem(index++,item,action,icon)==KErrNone);
|
|
72 |
TEST(item.iItemId==0x02);
|
|
73 |
TEST(item.iItemString==DSATTSY_ITEM2);
|
|
74 |
TEST(action==0x02);
|
|
75 |
TEST(icon==0x02);
|
|
76 |
|
|
77 |
TEST(selectItem->GetItem(index++,item,action,icon)==KErrNone);
|
|
78 |
TEST(item.iItemId==0x03);
|
|
79 |
TEST(item.iItemString==DSATTSY_ITEM3);
|
|
80 |
TEST(action==0x03);
|
|
81 |
TEST(icon==0x03);
|
|
82 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySelectItemPCmd with RSat::TSelectItemV2 passed"),iTestCount++);
|
|
83 |
|
|
84 |
// Select Item Cancel
|
|
85 |
sat.NotifySelectItemPCmd(reqStatus,*selectItemPckg);
|
|
86 |
sat.CancelAsyncRequest(ESatNotifySelectItemPCmd);
|
|
87 |
|
|
88 |
User::WaitForRequest(reqStatus);
|
|
89 |
TEST(reqStatus.Int()==KErrCancel);
|
|
90 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySelectItemPCmdCancel with RSat::TSelectItemV2 passed"),iTestCount++);
|
|
91 |
|
|
92 |
// Select Item with RSat::TSelectItemV5
|
|
93 |
|
|
94 |
// Text attribute parameters used for tests
|
|
95 |
RSat::TTextAttribute textAttribute1, textAttribute2, textAttribute3, textAttribute4;
|
|
96 |
|
|
97 |
textAttribute1.iStatus = DSATTSY_TEXT_ATTRIBUTE_STATUS;
|
|
98 |
const TUint8 textAttributeData[DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH] = DSATTSY_TEXT_ATTRIBUTE_DATA;
|
|
99 |
textAttribute1.iTextAttributeData.Append(textAttributeData, DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH);
|
|
100 |
|
|
101 |
textAttribute2.iStatus = DSATTSY_TEXT_ATTRIBUTE_STATUS2;
|
|
102 |
const TUint8 textAttributeData2[DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH] = DSATTSY_TEXT_ATTRIBUTE_DATA2;
|
|
103 |
textAttribute2.iTextAttributeData.Append(textAttributeData2, DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH);
|
|
104 |
|
|
105 |
textAttribute3.iStatus = DSATTSY_TEXT_ATTRIBUTE_STATUS3;
|
|
106 |
const TUint8 textAttributeData3[DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH] = DSATTSY_TEXT_ATTRIBUTE_DATA3;
|
|
107 |
textAttribute3.iTextAttributeData.Append(textAttributeData3, DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH);
|
|
108 |
|
|
109 |
textAttribute4.iStatus = DSATTSY_TEXT_ATTRIBUTE_STATUS4;
|
|
110 |
const TUint8 textAttributeData4[DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH] = DSATTSY_TEXT_ATTRIBUTE_DATA4;
|
|
111 |
textAttribute4.iTextAttributeData.Append(textAttributeData4, DSATTSY_TEXT_ATTRIBUTE_DATA_LENGTH);
|
|
112 |
|
|
113 |
RSat::TSelectItemV5* selectItemV5 = new (ELeave) RSat::TSelectItemV5;
|
|
114 |
CleanupStack::PushL(selectItemV5);
|
|
115 |
|
|
116 |
TEST(selectItemV5->ExtensionId()== RSat::KSatV5);
|
|
117 |
TEST(selectItemV5->NumberOfItems()==0);
|
|
118 |
TEST(selectItemV5->IsRemoveMenu());
|
|
119 |
|
|
120 |
TEST(selectItemV5->iAlphaId.iStatus==RSat::EAlphaIdNotSet);
|
|
121 |
TEST(selectItemV5->iHelp==RSat::EHelpNotSet);
|
|
122 |
TEST(selectItemV5->iDefaultItemId==0);
|
|
123 |
TEST(selectItemV5->iIconId.iQualifier==RSat::EIconQualifierNotSet);
|
|
124 |
TEST(selectItemV5->iIconId.iIdentifier==0);
|
|
125 |
TEST(selectItemV5->iIconListQualifier==RSat::EIconQualifierNotSet);
|
|
126 |
TEST(selectItemV5->iPreference==RSat::ESelectionPreferenceNotSet);
|
|
127 |
TEST(selectItemV5->iTextAttribute.iStatus == RSat::ETextAttributeNotSet);
|
|
128 |
|
|
129 |
RSat::TSelectItemV5Pckg* selectItemV5Pckg = new (ELeave) RSat::TSelectItemV5Pckg(*selectItemV5);
|
|
130 |
CleanupStack::PushL(selectItemV5Pckg);
|
|
131 |
|
|
132 |
sat.NotifySelectItemPCmd(reqStatus, *selectItemV5Pckg);
|
|
133 |
User::WaitForRequest(reqStatus);
|
|
134 |
TEST(reqStatus.Int()==KErrNone);
|
|
135 |
|
|
136 |
TEST(selectItemV5->MenuContent()==DSATTSY_ITEMS_WITH_TEXT_ATTRIBUTES_ACTIONS_AND_ICONS);
|
|
137 |
TEST(selectItemV5->NumberOfItems()==0x03);
|
|
138 |
TEST(selectItemV5->iAlphaId.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
139 |
TEST(selectItemV5->iAlphaId.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
140 |
TEST(selectItemV5->iHelp==DSATTSY_HELP);
|
|
141 |
TEST(selectItemV5->iDefaultItemId==DSATTSY_DEFAULT_ITEM);
|
|
142 |
TEST(selectItemV5->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
143 |
TEST(selectItemV5->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
144 |
TEST(selectItemV5->iIconListQualifier==DSATTSY_ICON_QUALIFIER2);
|
|
145 |
TEST(selectItemV5->iPreference==DSATTSY_SELECTION_PREFERENCE);
|
|
146 |
|
|
147 |
TEST(selectItemV5->iTextAttribute.iStatus == textAttribute1.iStatus);
|
|
148 |
TEST(selectItemV5->iTextAttribute.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
149 |
|
|
150 |
index = 1;
|
|
151 |
TEST(selectItemV5->GetItem(index++, item, iTextAttribute, action, icon)==KErrNone);
|
|
152 |
TEST(item.iItemId==0x01);
|
|
153 |
TEST(item.iItemString==DSATTSY_ITEM1);
|
|
154 |
TEST(iTextAttribute.iStatus == textAttribute1.iStatus);
|
|
155 |
TEST(iTextAttribute.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
156 |
TEST(icon==0x01);
|
|
157 |
TEST(action==0x01);
|
|
158 |
|
|
159 |
TEST(selectItemV5->GetItem(index++, item, iTextAttribute, action, icon)==KErrNone);
|
|
160 |
TEST(item.iItemId==0x02);
|
|
161 |
TEST(item.iItemString==DSATTSY_ITEM2);
|
|
162 |
TEST(iTextAttribute.iStatus == textAttribute2.iStatus);
|
|
163 |
TEST(iTextAttribute.iTextAttributeData == textAttribute2.iTextAttributeData);
|
|
164 |
TEST(icon==0x02);
|
|
165 |
TEST(action==0x02);
|
|
166 |
|
|
167 |
TEST(selectItemV5->GetItem(index++, item, iTextAttribute, action, icon)==KErrNone);
|
|
168 |
TEST(item.iItemId==0x03);
|
|
169 |
TEST(item.iItemString==DSATTSY_ITEM3);
|
|
170 |
TEST(iTextAttribute.iStatus == textAttribute3.iStatus);
|
|
171 |
TEST(iTextAttribute.iTextAttributeData == textAttribute3.iTextAttributeData);
|
|
172 |
TEST(icon==0x03);
|
|
173 |
TEST(action==0x03);
|
|
174 |
|
|
175 |
TEST(selectItemV5->GetItem(index,item, iTextAttribute, action)==KErrNotFound);
|
|
176 |
|
|
177 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySelectItemPCmd with RSat::TSelectItemV5 passed"),iTestCount++);
|
|
178 |
|
|
179 |
// Select Item Cancel with RSat::TSelectItemV5
|
|
180 |
sat.NotifySelectItemPCmd(reqStatus,*selectItemV5Pckg);
|
|
181 |
sat.CancelAsyncRequest(ESatNotifySelectItemPCmd);
|
|
182 |
|
|
183 |
User::WaitForRequest(reqStatus);
|
|
184 |
TEST(reqStatus.Int()==KErrCancel);
|
|
185 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySelectItemPCmdCancel with RSat::TSelectItemV5 passed"),iTestCount++);
|
|
186 |
|
|
187 |
// Select Item Terminal Response
|
|
188 |
sat.NotifySelectItemPCmd(reqStatus,*selectItemPckg);
|
|
189 |
User::WaitForRequest(reqStatus);
|
|
190 |
TEST(reqStatus.Int()==KErrNone);
|
|
191 |
|
|
192 |
RSat::TSelectItemRspV1* selectItemRsp = new (ELeave) RSat::TSelectItemRspV1;
|
|
193 |
CleanupStack::PushL(selectItemRsp);
|
|
194 |
RSat::TSelectItemRspV1Pckg* selectItemRspPckg = new (ELeave) RSat::TSelectItemRspV1Pckg(*selectItemRsp);
|
|
195 |
CleanupStack::PushL(selectItemRspPckg);
|
|
196 |
|
|
197 |
// Testing that PCmdNumber = 0 is not supported as out of range
|
|
198 |
TEST(selectItemRsp->SetPCmdNumber(0)==KErrNotSupported);
|
|
199 |
|
|
200 |
selectItemRsp->SetPCmdNumber(selectItem->PCmdNumber());
|
|
201 |
selectItemRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
202 |
selectItemRsp->iInfoType=DSATTSY_PCMD_RSP_ITEM_ID;
|
|
203 |
selectItemRsp->iAdditionalInfo=DSATTSY_RSP_ITEM_ID;
|
|
204 |
|
|
205 |
sat.TerminalRsp(reqStatus,RSat::ESelectItem,*selectItemRspPckg);
|
|
206 |
User::WaitForRequest(reqStatus);
|
|
207 |
TEST(reqStatus.Int()==KErrNone);
|
|
208 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp - Select Item - passed"),iTestCount++);
|
|
209 |
|
|
210 |
CleanupStack::PopAndDestroy(6, selectItem);
|
|
211 |
|
|
212 |
// Send Sm with V1
|
|
213 |
RSat::TSendSmV1* sendSm = new (ELeave) RSat::TSendSmV1;
|
|
214 |
CleanupStack::PushL(sendSm);
|
|
215 |
RSat::TSendSmV1Pckg* sendSmPckg = new (ELeave) RSat::TSendSmV1Pckg(*sendSm);
|
|
216 |
CleanupStack::PushL(sendSmPckg);
|
|
217 |
|
|
218 |
sat.NotifySendSmPCmd(reqStatus,*sendSmPckg);
|
|
219 |
User::WaitForRequest(reqStatus);
|
|
220 |
TEST(reqStatus.Int()==KErrNone);
|
|
221 |
|
|
222 |
TEST(sendSm->PCmdNumber()==DSATTSY_SEND_SM_NUMBER);
|
|
223 |
|
|
224 |
TEST(sendSm->iAlphaId.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
225 |
TEST(sendSm->iAlphaId.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
226 |
TEST(sendSm->iAddress.iTypeOfNumber==DSATTSY_TON);
|
|
227 |
TEST(sendSm->iAddress.iNumberPlan==DSATTSY_NPI);
|
|
228 |
TEST(sendSm->iAddress.iTelNumber==DSATTSY_TEL_NUMBER);
|
|
229 |
TEST(sendSm->iSmsTpdu==DSATTSY_SMS_TPDU);
|
|
230 |
TEST(sendSm->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
231 |
TEST(sendSm->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
232 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSmPCmd with RSat::TSendSmV1 passed"),iTestCount++);
|
|
233 |
|
|
234 |
// Send Sm Cancel with V1
|
|
235 |
sat.NotifySendSmPCmd(reqStatus,*sendSmPckg);
|
|
236 |
sat.CancelAsyncRequest(ESatNotifySendSmPCmd);
|
|
237 |
|
|
238 |
User::WaitForRequest(reqStatus);
|
|
239 |
TEST(reqStatus.Int()==KErrCancel);
|
|
240 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSmPCmdCancel with RSat::TSendSmV1 passed"),iTestCount++);
|
|
241 |
|
|
242 |
// Send Sm with V5
|
|
243 |
RSat::TSendSmV5* sendSmV5 = new (ELeave) RSat::TSendSmV5;
|
|
244 |
CleanupStack::PushL(sendSmV5);
|
|
245 |
RSat::TSendSmV5Pckg* sendSmV5Pckg = new (ELeave) RSat::TSendSmV5Pckg(*sendSmV5);
|
|
246 |
CleanupStack::PushL(sendSmV5Pckg);
|
|
247 |
|
|
248 |
TEST(sendSmV5->ExtensionId() == RSat::KSatV5);
|
|
249 |
TEST(sendSmV5->iTextAttribute.iStatus == RSat::ETextAttributeNotSet);
|
|
250 |
|
|
251 |
sat.NotifySendSmPCmd(reqStatus, *sendSmV5Pckg);
|
|
252 |
User::WaitForRequest(reqStatus);
|
|
253 |
TEST(reqStatus.Int()==KErrNone);
|
|
254 |
|
|
255 |
TEST(sendSmV5->PCmdNumber()==DSATTSY_SEND_SM_NUMBER);
|
|
256 |
|
|
257 |
TEST(sendSmV5->iAlphaId.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
258 |
TEST(sendSmV5->iAlphaId.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
259 |
TEST(sendSmV5->iAddress.iTypeOfNumber==DSATTSY_TON);
|
|
260 |
TEST(sendSmV5->iAddress.iNumberPlan==DSATTSY_NPI);
|
|
261 |
TEST(sendSmV5->iAddress.iTelNumber==DSATTSY_TEL_NUMBER);
|
|
262 |
TEST(sendSmV5->iSmsTpdu==DSATTSY_SMS_TPDU);
|
|
263 |
TEST(sendSmV5->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
264 |
TEST(sendSmV5->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
265 |
|
|
266 |
// V5 parameters
|
|
267 |
|
|
268 |
TEST(sendSmV5->iTextAttribute.iStatus == textAttribute1.iStatus);
|
|
269 |
TEST(sendSmV5->iTextAttribute.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
270 |
|
|
271 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSmPCmd with RSat::TSendSmV5 passed"),iTestCount++);
|
|
272 |
|
|
273 |
// Send Sm Cancel with V5
|
|
274 |
sat.NotifySendSmPCmd(reqStatus,*sendSmV5Pckg);
|
|
275 |
sat.CancelAsyncRequest(ESatNotifySendSmPCmd);
|
|
276 |
|
|
277 |
User::WaitForRequest(reqStatus);
|
|
278 |
TEST(reqStatus.Int()==KErrCancel);
|
|
279 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSmPCmdCancel with RSat::TSendSmV5 passed"),iTestCount++);
|
|
280 |
|
|
281 |
// Send Sm Terminal Rsp
|
|
282 |
sat.NotifySendSmPCmd(reqStatus,*sendSmPckg);
|
|
283 |
User::WaitForRequest(reqStatus);
|
|
284 |
TEST(reqStatus.Int()==KErrNone);
|
|
285 |
|
|
286 |
RSat::TSendSmRspV1* sendSmRsp = new (ELeave) RSat::TSendSmRspV1;
|
|
287 |
CleanupStack::PushL(sendSmRsp);
|
|
288 |
RSat::TSendSmRspV1Pckg* sendSmRspPckg = new (ELeave) RSat::TSendSmRspV1Pckg(*sendSmRsp);
|
|
289 |
CleanupStack::PushL(sendSmRspPckg);
|
|
290 |
|
|
291 |
sendSmRsp->SetPCmdNumber(sendSm->PCmdNumber());
|
|
292 |
sendSmRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
293 |
sendSmRsp->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
294 |
sendSmRsp->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
295 |
|
|
296 |
sat.TerminalRsp(reqStatus,RSat::ESendSm,*sendSmRspPckg);
|
|
297 |
User::WaitForRequest(reqStatus);
|
|
298 |
TEST(reqStatus.Int()==KErrNone);
|
|
299 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSmPCmd - Send Sm - passed"),iTestCount++);
|
|
300 |
|
|
301 |
CleanupStack::PopAndDestroy(6, sendSm);
|
|
302 |
|
|
303 |
// Send Message No Logging
|
|
304 |
RSat::TSatSmsV1* satSms = new (ELeave) RSat::TSatSmsV1;
|
|
305 |
CleanupStack::PushL(satSms);
|
|
306 |
RSat::TSatSmsV1Pckg* satSmsPckg = new (ELeave) RSat::TSatSmsV1Pckg(*satSms);
|
|
307 |
CleanupStack::PushL(satSmsPckg);
|
|
308 |
|
|
309 |
satSms->iBuf=DSATTSY_SMS_TPDU;
|
|
310 |
satSms->iServiceCenter.iNumberPlan=DSATTSY_NPI;
|
|
311 |
satSms->iServiceCenter.iTypeOfNumber=DSATTSY_TON;
|
|
312 |
satSms->iServiceCenter.iTelNumber=DSATTSY_TEL_NUMBER;
|
|
313 |
TUint16 smsRef;
|
|
314 |
|
|
315 |
sat.SendMessageNoLogging(reqStatus,*satSmsPckg,smsRef);
|
|
316 |
User::WaitForRequest(reqStatus);
|
|
317 |
TEST(reqStatus.Int()==KErrNone);
|
|
318 |
TEST(smsRef==DSATTSY_SMS_REF);
|
|
319 |
INFO_PRINTF2(_L("Test %d - RSat::SendMessageNoLogging passed"),iTestCount++);
|
|
320 |
|
|
321 |
// Send Message No Logging Cancel
|
|
322 |
sat.SendMessageNoLogging(reqStatus,*satSmsPckg,smsRef);
|
|
323 |
sat.CancelAsyncRequest(ESatSendMessageNoLogging);
|
|
324 |
User::WaitForRequest(reqStatus);
|
|
325 |
TEST(reqStatus.Int()==KErrCancel);
|
|
326 |
INFO_PRINTF2(_L("Test %d - RSat::SendMessageNoLoggingCancel passed"),iTestCount++);
|
|
327 |
|
|
328 |
CleanupStack::PopAndDestroy(2, satSms);
|
|
329 |
|
|
330 |
// Send Ss
|
|
331 |
RSat::TSendSsV1* sendSs = new (ELeave) RSat::TSendSsV1;
|
|
332 |
CleanupStack::PushL(sendSs);
|
|
333 |
RSat::TSendSsV1Pckg* sendSsPckg = new (ELeave) RSat::TSendSsV1Pckg(*sendSs);
|
|
334 |
CleanupStack::PushL(sendSsPckg);
|
|
335 |
|
|
336 |
sat.NotifySendSsPCmd(reqStatus,*sendSsPckg);
|
|
337 |
User::WaitForRequest(reqStatus);
|
|
338 |
TEST(reqStatus.Int()==KErrNone);
|
|
339 |
|
|
340 |
TEST(sendSs->PCmdNumber()==DSATTSY_SEND_SS_NUMBER);
|
|
341 |
|
|
342 |
TEST(sendSs->iAlphaId.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
343 |
TEST(sendSs->iAlphaId.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
344 |
TEST(sendSs->iSsString.iTypeOfNumber==DSATTSY_TON);
|
|
345 |
TEST(sendSs->iSsString.iNumberPlan==DSATTSY_NPI);
|
|
346 |
TEST(sendSs->iSsString.iSsString==DSATTSY_SS_STRING);
|
|
347 |
TEST(sendSs->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
348 |
TEST(sendSs->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
349 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSsPCmd passed"),iTestCount++);
|
|
350 |
|
|
351 |
// Send Ss Cancel
|
|
352 |
sat.NotifySendSsPCmd(reqStatus,*sendSsPckg);
|
|
353 |
sat.CancelAsyncRequest(ESatNotifySendSsPCmd);
|
|
354 |
|
|
355 |
User::WaitForRequest(reqStatus);
|
|
356 |
TEST(reqStatus.Int()==KErrCancel);
|
|
357 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendSsPCmdCancel passed"),iTestCount++);
|
|
358 |
|
|
359 |
// Send Ss Terminal Rsp
|
|
360 |
sat.NotifySendSsPCmd(reqStatus,*sendSsPckg);
|
|
361 |
User::WaitForRequest(reqStatus);
|
|
362 |
TEST(reqStatus.Int()==KErrNone);
|
|
363 |
|
|
364 |
RSat::TSendSsRspV2* sendSsRsp = new (ELeave) RSat::TSendSsRspV2;
|
|
365 |
CleanupStack::PushL(sendSsRsp);
|
|
366 |
RSat::TSendSsRspV2Pckg* sendSsRspPckg = new (ELeave) RSat::TSendSsRspV2Pckg(*sendSsRsp);
|
|
367 |
CleanupStack::PushL(sendSsRspPckg);
|
|
368 |
|
|
369 |
sendSsRsp->SetPCmdNumber(sendSs->PCmdNumber());
|
|
370 |
|
|
371 |
RSat::TCallControlV1* ccRequestedAction = new (ELeave) RSat::TCallControlV1;
|
|
372 |
CleanupStack::PushL(ccRequestedAction);
|
|
373 |
|
|
374 |
sendSsRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
375 |
sendSsRsp->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
376 |
sendSsRsp->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
377 |
|
|
378 |
sendSsRsp->iUssdString.iUssdString=DSATTSY_DEFAULT_TEXT;
|
|
379 |
sendSsRsp->iUssdString.iDcs=DSATTSY_DCS;
|
|
380 |
|
|
381 |
RSat::TCallSetUpParams* params = new (ELeave) RSat::TCallSetUpParams;
|
|
382 |
CleanupStack::PushL(params);
|
|
383 |
|
|
384 |
params->iCcp1 =DSATTSY_CCP1;
|
|
385 |
params->iSubAddress =DSATTSY_SUBADDRESS;
|
|
386 |
params->iCcp2 =DSATTSY_CCP2;
|
|
387 |
params->iAddress.iTypeOfNumber =DSATTSY_TON;
|
|
388 |
params->iAddress.iNumberPlan =DSATTSY_NPI;
|
|
389 |
params->iAddress.iTelNumber =DSATTSY_TEL_NUMBER;
|
|
390 |
|
|
391 |
RSat::TAlphaId* nullBuf = new (ELeave) RSat::TAlphaId;
|
|
392 |
CleanupStack::PushL(nullBuf);
|
|
393 |
|
|
394 |
nullBuf->iAlphaId=DSATTSY_NULL_BUF;
|
|
395 |
nullBuf->iStatus=DSATTSY_ALPHAID_STATUS;
|
|
396 |
ccRequestedAction->SetCcGeneralResult(DSATTSY_CC_RESULT);
|
|
397 |
ccRequestedAction->SetAlphaId(DSATTSY_NO_ALPHAID, *nullBuf);
|
|
398 |
ccRequestedAction->SetCallSetUpDetails(*params);
|
|
399 |
ccRequestedAction->SetBCRepeatIndicator(RSat::EBCSequentialMode);
|
|
400 |
|
|
401 |
sendSsRsp->iCcRequestedAction=*ccRequestedAction;
|
|
402 |
|
|
403 |
sendSsRsp->iGeneralResult2=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
404 |
sendSsRsp->iInfoType2=DSATTSY_PCMD_RSP_NO_INFO;
|
|
405 |
sendSsRsp->iAdditionalInfo2=DSATTSY_NULL_BUF;
|
|
406 |
|
|
407 |
sat.TerminalRsp(reqStatus,RSat::ESendSs,*sendSsRspPckg);
|
|
408 |
User::WaitForRequest(reqStatus);
|
|
409 |
TEST(reqStatus.Int()==KErrNone);
|
|
410 |
|
|
411 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp -Send Ss - passed"),iTestCount++);
|
|
412 |
|
|
413 |
// Send Ussd
|
|
414 |
RSat::TSendUssdV1* sendUssd = new (ELeave) RSat::TSendUssdV1;
|
|
415 |
CleanupStack::PushL(sendUssd);
|
|
416 |
RSat::TSendUssdV1Pckg* sendUssdPckg = new (ELeave) RSat::TSendUssdV1Pckg(*sendUssd);
|
|
417 |
CleanupStack::PushL(sendUssdPckg);
|
|
418 |
|
|
419 |
sat.NotifySendUssdPCmd(reqStatus,*sendUssdPckg);
|
|
420 |
User::WaitForRequest(reqStatus);
|
|
421 |
TEST(reqStatus.Int()==KErrNone);
|
|
422 |
|
|
423 |
TEST(sendUssd->PCmdNumber()==DSATTSY_SEND_USSD_NUMBER);
|
|
424 |
|
|
425 |
TEST(sendUssd->iAlphaId.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
426 |
TEST(sendUssd->iAlphaId.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
427 |
TEST(sendUssd->iUssdString.iDcs==DSATTSY_DCS);
|
|
428 |
TEST(sendUssd->iUssdString.iUssdString==DSATTSY_USSD_STRING);
|
|
429 |
TEST(sendUssd->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
430 |
TEST(sendUssd->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
431 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendUssdPCmd passed"),iTestCount++);
|
|
432 |
|
|
433 |
// Send Ussd Cancel
|
|
434 |
sat.NotifySendUssdPCmd(reqStatus,*sendUssdPckg);
|
|
435 |
sat.CancelAsyncRequest(ESatNotifySendUssdPCmd);
|
|
436 |
|
|
437 |
User::WaitForRequest(reqStatus);
|
|
438 |
TEST(reqStatus.Int()==KErrCancel);
|
|
439 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySendUssdPCmdCancel passed"), iTestCount++);
|
|
440 |
|
|
441 |
// Send Ussd Terminal Rsp
|
|
442 |
sat.NotifySendUssdPCmd(reqStatus,*sendUssdPckg);
|
|
443 |
User::WaitForRequest(reqStatus);
|
|
444 |
TEST(reqStatus.Int()==KErrNone);
|
|
445 |
|
|
446 |
RSat::TSendUssdRspV1* sendUssdRsp = new (ELeave) RSat::TSendUssdRspV1;
|
|
447 |
CleanupStack::PushL(sendUssdRsp);
|
|
448 |
RSat::TSendUssdRspV1Pckg* sendUssdRspPckg = new (ELeave) RSat::TSendUssdRspV1Pckg(*sendUssdRsp);
|
|
449 |
CleanupStack::PushL(sendUssdRspPckg);
|
|
450 |
|
|
451 |
sendUssdRsp->SetPCmdNumber(sendUssd->PCmdNumber());
|
|
452 |
|
|
453 |
sendUssdRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
454 |
sendUssdRsp->iInfoType=DSATTSY_PCMD_RSP_TEXT_STRING;
|
|
455 |
sendUssdRsp->iAdditionalInfo=DSATTSY_NETWORK_TEXT_STRING;
|
|
456 |
|
|
457 |
sendUssdRsp->iCcRequestedAction=*ccRequestedAction;
|
|
458 |
|
|
459 |
sendUssdRsp->iGeneralResult2=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
460 |
sendUssdRsp->iInfoType2=DSATTSY_PCMD_RSP_NO_INFO;
|
|
461 |
sendUssdRsp->iAdditionalInfo2=DSATTSY_NULL_BUF;
|
|
462 |
|
|
463 |
sat.TerminalRsp(reqStatus,RSat::ESendUssd,*sendUssdRspPckg);
|
|
464 |
User::WaitForRequest(reqStatus);
|
|
465 |
TEST(reqStatus.Int()==KErrNone);
|
|
466 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp - Send USSD - passed"),iTestCount++);
|
|
467 |
|
|
468 |
// Set Up Call
|
|
469 |
RSat::TSetUpCallV1* setUpCall = new (ELeave) RSat::TSetUpCallV1;
|
|
470 |
CleanupStack::PushL(setUpCall);
|
|
471 |
RSat::TSetUpCallV1Pckg* setUpCallPckg = new (ELeave) RSat::TSetUpCallV1Pckg(*setUpCall);
|
|
472 |
CleanupStack::PushL(setUpCallPckg);
|
|
473 |
|
|
474 |
sat.NotifySetUpCallPCmd(reqStatus,*setUpCallPckg);
|
|
475 |
User::WaitForRequest(reqStatus);
|
|
476 |
TEST(reqStatus.Int()==KErrNone);
|
|
477 |
|
|
478 |
TEST(setUpCall->PCmdNumber()==DSATTSY_SET_UP_CALL_NUMBER);
|
|
479 |
|
|
480 |
TEST(setUpCall->iType==DSATTSY_SET_UP_CALL_TYPE);
|
|
481 |
TEST(setUpCall->iAlphaIdConfirmationPhase.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
482 |
TEST(setUpCall->iAlphaIdConfirmationPhase.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
483 |
TEST(setUpCall->iIconIdConfirmationPhase.iIdentifier==DSATTSY_ICON_ID1);
|
|
484 |
TEST(setUpCall->iIconIdConfirmationPhase.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
485 |
TEST(setUpCall->iAddress.iTypeOfNumber==DSATTSY_TON);
|
|
486 |
TEST(setUpCall->iAddress.iNumberPlan==DSATTSY_NPI);
|
|
487 |
TEST(setUpCall->iAddress.iTelNumber==DSATTSY_TEL_NUMBER);
|
|
488 |
TEST(setUpCall->iCapabilityConfigParams==DSATTSY_CCP1);
|
|
489 |
TEST(setUpCall->iSubAddress==DSATTSY_SUBADDRESS);
|
|
490 |
TEST(setUpCall->iDuration.iTimeUnit==DSATTSY_TIME_UNIT);
|
|
491 |
TEST(setUpCall->iDuration.iNumOfUnits==DSATTSY_NUM_OF_UNITS);
|
|
492 |
TEST(setUpCall->iAlphaIdCallSetUpPhase.iStatus==DSATTSY_ALPHA_ID2_STATUS);
|
|
493 |
TEST(setUpCall->iAlphaIdCallSetUpPhase.iAlphaId==DSATTSY_ALPHA_ID2);
|
|
494 |
TEST(setUpCall->iIconIdCallSetUpPhase.iIdentifier==DSATTSY_ICON_ID2);
|
|
495 |
TEST(setUpCall->iIconIdCallSetUpPhase.iQualifier==DSATTSY_ICON_QUALIFIER2);
|
|
496 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpCallPCmd RSat::TSetUpCallV1 passed"),iTestCount++);
|
|
497 |
|
|
498 |
// Set Up Call Cancel
|
|
499 |
sat.NotifySetUpCallPCmd(reqStatus,*setUpCallPckg);
|
|
500 |
sat.CancelAsyncRequest(ESatNotifySetUpCallPCmd);
|
|
501 |
|
|
502 |
User::WaitForRequest(reqStatus);
|
|
503 |
TEST(reqStatus.Int()==KErrCancel);
|
|
504 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpCallPCmdCancel RSat::TSetUpCallV1 passed"), iTestCount++);
|
|
505 |
|
|
506 |
// Set Up Call
|
|
507 |
RSat::TSetUpCallV5* setUpCallV5 = new (ELeave) RSat::TSetUpCallV5;
|
|
508 |
CleanupStack::PushL(setUpCallV5);
|
|
509 |
RSat::TSetUpCallV5Pckg* setUpCallV5Pckg = new (ELeave) RSat::TSetUpCallV5Pckg(*setUpCallV5);
|
|
510 |
CleanupStack::PushL(setUpCallV5Pckg);
|
|
511 |
|
|
512 |
TEST(setUpCallV5->ExtensionId() == RSat::KSatV5);
|
|
513 |
TEST(setUpCallV5->iTextAttributeConfirmationPhase.iStatus == RSat::ETextAttributeNotSet);
|
|
514 |
TEST(setUpCallV5->iTextAttributeCallSetUpPhase.iStatus == RSat::ETextAttributeNotSet);
|
|
515 |
|
|
516 |
sat.NotifySetUpCallPCmd(reqStatus,*setUpCallV5Pckg);
|
|
517 |
User::WaitForRequest(reqStatus);
|
|
518 |
TEST(reqStatus.Int()==KErrNone);
|
|
519 |
|
|
520 |
TEST(setUpCallV5->PCmdNumber()==DSATTSY_SET_UP_CALL_NUMBER);
|
|
521 |
|
|
522 |
TEST(setUpCallV5->iType==DSATTSY_SET_UP_CALL_TYPE);
|
|
523 |
TEST(setUpCallV5->iAlphaIdConfirmationPhase.iStatus==DSATTSY_ALPHA_ID1_STATUS);
|
|
524 |
TEST(setUpCallV5->iAlphaIdConfirmationPhase.iAlphaId==DSATTSY_ALPHA_ID1);
|
|
525 |
TEST(setUpCallV5->iIconIdConfirmationPhase.iIdentifier==DSATTSY_ICON_ID1);
|
|
526 |
TEST(setUpCallV5->iIconIdConfirmationPhase.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
527 |
TEST(setUpCallV5->iAddress.iTypeOfNumber==DSATTSY_TON);
|
|
528 |
TEST(setUpCallV5->iAddress.iNumberPlan==DSATTSY_NPI);
|
|
529 |
TEST(setUpCallV5->iAddress.iTelNumber==DSATTSY_TEL_NUMBER);
|
|
530 |
TEST(setUpCallV5->iCapabilityConfigParams==DSATTSY_CCP1);
|
|
531 |
TEST(setUpCallV5->iSubAddress==DSATTSY_SUBADDRESS);
|
|
532 |
TEST(setUpCallV5->iDuration.iTimeUnit==DSATTSY_TIME_UNIT);
|
|
533 |
TEST(setUpCallV5->iDuration.iNumOfUnits==DSATTSY_NUM_OF_UNITS);
|
|
534 |
TEST(setUpCallV5->iAlphaIdCallSetUpPhase.iStatus==DSATTSY_ALPHA_ID2_STATUS);
|
|
535 |
TEST(setUpCallV5->iAlphaIdCallSetUpPhase.iAlphaId==DSATTSY_ALPHA_ID2);
|
|
536 |
TEST(setUpCallV5->iIconIdCallSetUpPhase.iIdentifier==DSATTSY_ICON_ID2);
|
|
537 |
TEST(setUpCallV5->iIconIdCallSetUpPhase.iQualifier==DSATTSY_ICON_QUALIFIER2);
|
|
538 |
// Version 5 parameters
|
|
539 |
TEST(setUpCallV5->iTextAttributeConfirmationPhase.iStatus == textAttribute1.iStatus);
|
|
540 |
TEST(setUpCallV5->iTextAttributeConfirmationPhase.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
541 |
TEST(setUpCallV5->iTextAttributeCallSetUpPhase.iStatus == textAttribute1.iStatus);
|
|
542 |
TEST(setUpCallV5->iTextAttributeCallSetUpPhase.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
543 |
|
|
544 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpCallPCmd with RSat::TSetUpCallV5 passed"),iTestCount++);
|
|
545 |
|
|
546 |
// Set Up Call Cancel
|
|
547 |
sat.NotifySetUpCallPCmd(reqStatus,*setUpCallV5Pckg);
|
|
548 |
sat.CancelAsyncRequest(ESatNotifySetUpCallPCmd);
|
|
549 |
|
|
550 |
User::WaitForRequest(reqStatus);
|
|
551 |
TEST(reqStatus.Int()==KErrCancel);
|
|
552 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpCallPCmdCancel with RSat::TSetUpCallV5 passed"), iTestCount++);
|
|
553 |
|
|
554 |
// Set Up Call Terminal Rsp
|
|
555 |
sat.NotifySetUpCallPCmd(reqStatus,*setUpCallPckg);
|
|
556 |
User::WaitForRequest(reqStatus);
|
|
557 |
TEST(reqStatus.Int()==KErrNone);
|
|
558 |
|
|
559 |
RSat::TSetUpCallRspV2* setUpCallRspV2 = new (ELeave) RSat::TSetUpCallRspV2;
|
|
560 |
CleanupStack::PushL(setUpCallRspV2);
|
|
561 |
RSat::TSetUpCallRspV2Pckg* setUpCallRspV2Pckg = new (ELeave) RSat::TSetUpCallRspV2Pckg(*setUpCallRspV2);
|
|
562 |
CleanupStack::PushL(setUpCallRspV2Pckg);
|
|
563 |
|
|
564 |
setUpCallRspV2->SetPCmdNumber(DSATTSY_SET_UP_CALL_NUMBER);
|
|
565 |
setUpCallRspV2->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
566 |
setUpCallRspV2->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
567 |
setUpCallRspV2->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
568 |
setUpCallRspV2->iCcRequestedAction=*ccRequestedAction;
|
|
569 |
|
|
570 |
setUpCallRspV2->iGeneralResult2=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
571 |
setUpCallRspV2->iInfoType2=DSATTSY_PCMD_RSP_NO_INFO;
|
|
572 |
setUpCallRspV2->iAdditionalInfo2=DSATTSY_NULL_BUF;
|
|
573 |
|
|
574 |
setUpCallRspV2->iUssdString.iUssdString=DSATTSY_DEFAULT_TEXT;
|
|
575 |
setUpCallRspV2->iUssdString.iDcs=DSATTSY_DCS;
|
|
576 |
|
|
577 |
sat.TerminalRsp(reqStatus,RSat::ESetUpCall,*setUpCallRspV2Pckg);
|
|
578 |
User::WaitForRequest(reqStatus);
|
|
579 |
TEST(reqStatus.Int()==KErrNone);
|
|
580 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp - Set Up Call passed"),iTestCount++);
|
|
581 |
|
|
582 |
CleanupStack::PopAndDestroy(17, sendSs);
|
|
583 |
|
|
584 |
// Refresh
|
|
585 |
RSat::TRefreshV2* refresh = new (ELeave) RSat::TRefreshV2;
|
|
586 |
CleanupStack::PushL(refresh);
|
|
587 |
RSat::TRefreshV2Pckg* refreshPckg = new (ELeave) RSat::TRefreshV2Pckg(*refresh);
|
|
588 |
CleanupStack::PushL(refreshPckg);
|
|
589 |
|
|
590 |
sat.NotifyRefreshPCmd(reqStatus,*refreshPckg);
|
|
591 |
User::WaitForRequest(reqStatus);
|
|
592 |
TEST(reqStatus.Int()==KErrNone);
|
|
593 |
|
|
594 |
TEST(refresh->PCmdNumber()==DSATTSY_REFRESH_NUMBER);
|
|
595 |
|
|
596 |
TEST(refresh->iType==DSATTSY_REFRESH_TYPE);
|
|
597 |
TEST(refresh->iFileList.Length()==2);
|
|
598 |
TEST(refresh->iFileList[0]==DSATTSY_REFRESH_ADN_EF);
|
|
599 |
TEST(refresh->iFileList[1]==DSATTSY_REFRESH_FDN_EF);
|
|
600 |
TEST(refresh->iAid==DSATTSY_AID);
|
|
601 |
INFO_PRINTF2(_L("Test %d - RSat::NotifyRefreshPCmd passed"),iTestCount++);
|
|
602 |
|
|
603 |
// Refresh Cancel
|
|
604 |
sat.NotifyRefreshPCmd(reqStatus,*refreshPckg);
|
|
605 |
sat.CancelAsyncRequest(ESatNotifyRefreshPCmd);
|
|
606 |
|
|
607 |
User::WaitForRequest(reqStatus);
|
|
608 |
TEST(reqStatus.Int()==KErrCancel);
|
|
609 |
INFO_PRINTF2(_L("Test %d - RSat::NotifyRefreshPCmdCancel passed"),iTestCount++);
|
|
610 |
|
|
611 |
// Refresh Required
|
|
612 |
sat.NotifyRefreshRequired(reqStatus);
|
|
613 |
User::WaitForRequest(reqStatus);
|
|
614 |
TEST(reqStatus.Int()==KErrNone);
|
|
615 |
INFO_PRINTF2(_L("Test %d - RSat::NotifyRefreshRequired passed"),iTestCount++);
|
|
616 |
|
|
617 |
// Refresh Required Cancel
|
|
618 |
sat.NotifyRefreshRequired(reqStatus);
|
|
619 |
sat.CancelAsyncRequest(ESatNotifyRefreshRequired);
|
|
620 |
|
|
621 |
User::WaitForRequest(reqStatus);
|
|
622 |
TEST(reqStatus.Int()==KErrCancel);
|
|
623 |
INFO_PRINTF2(_L("Test %d - RSat::NotifyRefreshRequiredCancel passed"),iTestCount++);
|
|
624 |
|
|
625 |
// Refresh Required
|
|
626 |
sat.NotifyRefreshRequired(reqStatus,*refreshPckg);
|
|
627 |
User::WaitForRequest(reqStatus);
|
|
628 |
TEST(reqStatus.Int()==KErrNone);
|
|
629 |
|
|
630 |
TEST(refresh->iType==DSATTSY_REFRESH_TYPE);
|
|
631 |
TEST(refresh->iFileList.Length()==2);
|
|
632 |
TEST(refresh->iFileList[0]==DSATTSY_REFRESH_FDN_EF);
|
|
633 |
TEST(refresh->iFileList[1]==DSATTSY_REFRESH_ADN_EF);
|
|
634 |
TEST(refresh->iAid==DSATTSY_AID);
|
|
635 |
INFO_PRINTF2(_L("Test %d - RSat::NotifyRefreshRequiredParam passed"),iTestCount++);
|
|
636 |
|
|
637 |
sat.NotifyRefreshRequired(reqStatus,*refreshPckg);
|
|
638 |
sat.CancelAsyncRequest(ESatNotifyRefreshRequiredParam);
|
|
639 |
|
|
640 |
User::WaitForRequest(reqStatus);
|
|
641 |
TEST(reqStatus.Int()==KErrCancel);
|
|
642 |
INFO_PRINTF2(_L("Test %d - RSat::NotifyRefreshRequiredParamCancel passed"),iTestCount++);
|
|
643 |
|
|
644 |
// Refresh Terminal Response
|
|
645 |
sat.NotifyRefreshPCmd(reqStatus,*refreshPckg);
|
|
646 |
User::WaitForRequest(reqStatus);
|
|
647 |
TEST(reqStatus.Int()==KErrNone);
|
|
648 |
|
|
649 |
RSat::TRefreshRspV1* refreshRsp = new (ELeave) RSat::TRefreshRspV1;
|
|
650 |
CleanupStack::PushL(refreshRsp);
|
|
651 |
RSat::TRefreshRspV1Pckg* refreshRspPckg = new (ELeave) RSat::TRefreshRspV1Pckg(*refreshRsp);
|
|
652 |
CleanupStack::PushL(refreshRspPckg);
|
|
653 |
|
|
654 |
refreshRsp->SetPCmdNumber(refresh->PCmdNumber());
|
|
655 |
refreshRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
656 |
refreshRsp->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
657 |
refreshRsp->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
658 |
|
|
659 |
sat.TerminalRsp(reqStatus,RSat::ERefresh,*refreshRspPckg);
|
|
660 |
User::WaitForRequest(reqStatus);
|
|
661 |
TEST(reqStatus.Int()==KErrNone);
|
|
662 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp - Refresh - passed"),iTestCount++);
|
|
663 |
|
|
664 |
// Refresh Required Response
|
|
665 |
RSat::TRefreshRspV1* refreshAllowedRsp = new (ELeave) RSat::TRefreshRspV1;
|
|
666 |
CleanupStack::PushL(refreshAllowedRsp);
|
|
667 |
RSat::TRefreshRspV1Pckg* refreshAllowedRspPckg = new (ELeave) RSat::TRefreshRspV1Pckg(*refreshAllowedRsp);
|
|
668 |
CleanupStack::PushL(refreshAllowedRspPckg);
|
|
669 |
|
|
670 |
refreshAllowedRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
671 |
refreshAllowedRsp->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
672 |
refreshAllowedRsp->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
673 |
|
|
674 |
sat.RefreshAllowed(reqStatus, *refreshAllowedRspPckg);
|
|
675 |
User::WaitForRequest(reqStatus);
|
|
676 |
TEST(reqStatus.Int()==KErrNone);
|
|
677 |
|
|
678 |
INFO_PRINTF2(_L("Test %d - RSat::RefreshAllowed - passed"),iTestCount++);
|
|
679 |
|
|
680 |
// Refresh Required Response Cancel
|
|
681 |
sat.RefreshAllowed(reqStatus, *refreshAllowedRspPckg);
|
|
682 |
sat.CancelAsyncRequest(ESatRefreshAllowed);
|
|
683 |
|
|
684 |
User::WaitForRequest(reqStatus);
|
|
685 |
TEST(reqStatus.Int()==KErrCancel);
|
|
686 |
INFO_PRINTF2(_L("Test %d - RSat::RefreshAllowedCancel passed"),iTestCount++);
|
|
687 |
|
|
688 |
CleanupStack::PopAndDestroy(6, refresh);
|
|
689 |
|
|
690 |
// Set Up Event List
|
|
691 |
RSat::TSetUpEventListV1* setUpEventList = new (ELeave) RSat::TSetUpEventListV1;
|
|
692 |
CleanupStack::PushL(setUpEventList);
|
|
693 |
RSat::TSetUpEventListV1Pckg* setUpEventListPckg = new (ELeave) RSat::TSetUpEventListV1Pckg(*setUpEventList);
|
|
694 |
CleanupStack::PushL(setUpEventListPckg);
|
|
695 |
|
|
696 |
sat.NotifySetUpEventListPCmd(reqStatus,*setUpEventListPckg);
|
|
697 |
User::WaitForRequest(reqStatus);
|
|
698 |
TEST(reqStatus.Int()==KErrNone);
|
|
699 |
|
|
700 |
TEST(setUpEventList->PCmdNumber()==DSATTSY_SET_UP_EVENT_LIST_NUMBER);
|
|
701 |
|
|
702 |
TEST(setUpEventList->iType==DSATTSY_SET_UP_EVENT_LIST_TYPE);
|
|
703 |
TEST(setUpEventList->iEvents==DSATTSY_EVENTS);
|
|
704 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpEventList passed"),iTestCount++);
|
|
705 |
|
|
706 |
// Set Up Event List Cancel
|
|
707 |
sat.NotifySetUpEventListPCmd(reqStatus,*setUpEventListPckg);
|
|
708 |
sat.CancelAsyncRequest(ESatNotifySetUpEventListPCmd);
|
|
709 |
|
|
710 |
User::WaitForRequest(reqStatus);
|
|
711 |
TEST(reqStatus.Int()==KErrCancel);
|
|
712 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpEventListPCmdCancel passed"),iTestCount++);
|
|
713 |
|
|
714 |
// Set Up Event List Terminal Response
|
|
715 |
sat.NotifySetUpEventListPCmd(reqStatus,*setUpEventListPckg);
|
|
716 |
User::WaitForRequest(reqStatus);
|
|
717 |
TEST(reqStatus.Int()==KErrNone);
|
|
718 |
|
|
719 |
RSat::TSetUpEventListRspV1* setUpEventListRsp = new (ELeave) RSat::TSetUpEventListRspV1;
|
|
720 |
CleanupStack::PushL(setUpEventListRsp);
|
|
721 |
RSat::TSetUpEventListRspV1Pckg* setUpEventListRspPckg = new (ELeave) RSat::TSetUpEventListRspV1Pckg(*setUpEventListRsp);
|
|
722 |
CleanupStack::PushL(setUpEventListRspPckg);
|
|
723 |
|
|
724 |
setUpEventListRsp->SetPCmdNumber(setUpEventList->PCmdNumber());
|
|
725 |
setUpEventListRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
726 |
setUpEventListRsp->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
727 |
setUpEventListRsp->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
728 |
|
|
729 |
sat.TerminalRsp(reqStatus,RSat::ESetUpEventList,*setUpEventListRspPckg);
|
|
730 |
User::WaitForRequest(reqStatus);
|
|
731 |
TEST(reqStatus.Int()==KErrNone);
|
|
732 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp - Set Up Event List - passed"),iTestCount++);
|
|
733 |
|
|
734 |
CleanupStack::PopAndDestroy(4, setUpEventList);
|
|
735 |
|
|
736 |
// Set Up Idle Mode Text with V1
|
|
737 |
RSat::TSetUpIdleModeTextV1* setUpIdleModeText = new (ELeave) RSat::TSetUpIdleModeTextV1;
|
|
738 |
CleanupStack::PushL(setUpIdleModeText);
|
|
739 |
RSat::TSetUpIdleModeTextV1Pckg* setUpIdleModeTextPckg = new (ELeave) RSat::TSetUpIdleModeTextV1Pckg(*setUpIdleModeText);
|
|
740 |
CleanupStack::PushL(setUpIdleModeTextPckg);
|
|
741 |
|
|
742 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextPckg);
|
|
743 |
User::WaitForRequest(reqStatus);
|
|
744 |
TEST(reqStatus.Int()==KErrNone);
|
|
745 |
|
|
746 |
TEST(setUpIdleModeText->PCmdNumber()==DSATTSY_SET_UP_IDLE_MODE_TEXT_NUMBER);
|
|
747 |
|
|
748 |
TEST(setUpIdleModeText->iType==DSATTSY_IDLE_MODE_TXT_TYPE);
|
|
749 |
TEST(setUpIdleModeText->iText==DSATTSY_IDLE_MODE_TEXT);
|
|
750 |
TEST(setUpIdleModeText->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
751 |
TEST(setUpIdleModeText->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
752 |
TEST(setUpIdleModeText->iCodingScheme==DSATTSY_TEXT_ENCODING_SCHEME);
|
|
753 |
TPtrC idleModeText(DSATTSY_IDLE_MODE_TEXT);
|
|
754 |
TEST(setUpIdleModeText->iText.Length() == idleModeText.Length()); // 276
|
|
755 |
TEST(setUpIdleModeText->iText.Size() == idleModeText.Size()); // 552
|
|
756 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeText (Unicode) with RSat::TSetUpIdleModeTextV1 passed"),iTestCount++);
|
|
757 |
|
|
758 |
// Set Up Idle Mode Text Cancel with V1
|
|
759 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextPckg);
|
|
760 |
sat.CancelAsyncRequest(ESatNotifySetUpIdleModeTextPCmd);
|
|
761 |
|
|
762 |
User::WaitForRequest(reqStatus);
|
|
763 |
TEST(reqStatus.Int()==KErrCancel);
|
|
764 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeTextPCmdCancel with RSat::TSetUpIdleModeTextV1passed"),iTestCount++);
|
|
765 |
|
|
766 |
// Issue another request. The DTSY will set the idle text mode to an 8-bit string
|
|
767 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextPckg);
|
|
768 |
User::WaitForRequest(reqStatus);
|
|
769 |
TEST(reqStatus.Int()==KErrNone);
|
|
770 |
|
|
771 |
TEST(setUpIdleModeText->PCmdNumber()==DSATTSY_SET_UP_IDLE_MODE_TEXT_NUMBER);
|
|
772 |
|
|
773 |
TPtrC8 textIdleMode8(DSATTSY_IDLE_MODE_TEXT_8BIT);
|
|
774 |
TEST(setUpIdleModeText->iType==DSATTSY_IDLE_MODE_TXT_TYPE);
|
|
775 |
TBuf8<276> text8;
|
|
776 |
CnvUtfConverter::ConvertFromUnicodeToUtf8(text8,setUpIdleModeText->iText);
|
|
777 |
TEST(text8==DSATTSY_IDLE_MODE_TEXT_8BIT);
|
|
778 |
TEST(setUpIdleModeText->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
779 |
TEST(setUpIdleModeText->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
780 |
TEST(setUpIdleModeText->iCodingScheme==DSATTSY_TEXT_ENCODING_SCHEME_8);
|
|
781 |
|
|
782 |
TEST(setUpIdleModeText->iText.Length() == textIdleMode8.Length()); // 276
|
|
783 |
TEST(setUpIdleModeText->iText.Size() == 2*textIdleMode8.Size()); // 2*276
|
|
784 |
|
|
785 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeText (8-bit) with RSat::TSetUpIdleModeTextV1 passed"),iTestCount++);
|
|
786 |
|
|
787 |
// Set Up Idle Mode Text Cancel with V1
|
|
788 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextPckg);
|
|
789 |
sat.CancelAsyncRequest(ESatNotifySetUpIdleModeTextPCmd);
|
|
790 |
|
|
791 |
User::WaitForRequest(reqStatus);
|
|
792 |
TEST(reqStatus.Int()==KErrCancel);
|
|
793 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeTextPCmdCancel passed"),iTestCount++);
|
|
794 |
|
|
795 |
// Set Up Idle Mode Text with V5
|
|
796 |
RSat::TSetUpIdleModeTextV5* setUpIdleModeTextV5 = new (ELeave) RSat::TSetUpIdleModeTextV5;
|
|
797 |
CleanupStack::PushL(setUpIdleModeTextV5);
|
|
798 |
RSat::TSetUpIdleModeTextV5Pckg* setUpIdleModeTextV5Pckg = new (ELeave) RSat::TSetUpIdleModeTextV5Pckg(*setUpIdleModeTextV5);
|
|
799 |
CleanupStack::PushL(setUpIdleModeTextV5Pckg);
|
|
800 |
|
|
801 |
TEST(setUpIdleModeTextV5->ExtensionId() == RSat::KSatV5);
|
|
802 |
TEST(setUpIdleModeTextV5->iTextAttribute.iStatus == RSat::ETextAttributeNotSet);
|
|
803 |
|
|
804 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextV5Pckg);
|
|
805 |
User::WaitForRequest(reqStatus);
|
|
806 |
TEST(reqStatus.Int()==KErrNone);
|
|
807 |
|
|
808 |
TEST(setUpIdleModeTextV5->PCmdNumber()==DSATTSY_SET_UP_IDLE_MODE_TEXT_NUMBER);
|
|
809 |
|
|
810 |
TEST(setUpIdleModeTextV5->iType==DSATTSY_IDLE_MODE_TXT_TYPE);
|
|
811 |
TEST(setUpIdleModeTextV5->iText==DSATTSY_IDLE_MODE_TEXT);
|
|
812 |
TEST(setUpIdleModeTextV5->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
813 |
TEST(setUpIdleModeTextV5->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
814 |
TEST(setUpIdleModeTextV5->iCodingScheme==DSATTSY_TEXT_ENCODING_SCHEME);
|
|
815 |
|
|
816 |
TEST(setUpIdleModeTextV5->iText.Length() == idleModeText.Length()); // 276
|
|
817 |
TEST(setUpIdleModeTextV5->iText.Size() == idleModeText.Size()); // 552
|
|
818 |
|
|
819 |
// V5 parameters
|
|
820 |
TEST(setUpIdleModeTextV5->iTextAttribute.iStatus == textAttribute1.iStatus);
|
|
821 |
TEST(setUpIdleModeTextV5->iTextAttribute.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
822 |
|
|
823 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeText (Unicode) with RSat::TSetUpIdleModeTextV5 passed"),iTestCount++);
|
|
824 |
|
|
825 |
// Set Up Idle Mode Text Cancel
|
|
826 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextV5Pckg);
|
|
827 |
sat.CancelAsyncRequest(ESatNotifySetUpIdleModeTextPCmd);
|
|
828 |
|
|
829 |
User::WaitForRequest(reqStatus);
|
|
830 |
TEST(reqStatus.Int()==KErrCancel);
|
|
831 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeTextPCmdCancel with RSat::TSetUpIdleModeTextV5 passed"),iTestCount++);
|
|
832 |
|
|
833 |
// Issue another request. The DTSY will set the idle text mode to an 8-bit string
|
|
834 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextV5Pckg);
|
|
835 |
User::WaitForRequest(reqStatus);
|
|
836 |
TEST(reqStatus.Int()==KErrNone);
|
|
837 |
|
|
838 |
TEST(setUpIdleModeTextV5->PCmdNumber()==DSATTSY_SET_UP_IDLE_MODE_TEXT_NUMBER);
|
|
839 |
|
|
840 |
TPtrC8 textIdleMode8_V5(DSATTSY_IDLE_MODE_TEXT_8BIT);
|
|
841 |
TEST(setUpIdleModeTextV5->iType==DSATTSY_IDLE_MODE_TXT_TYPE);
|
|
842 |
TBuf8<276> text8_V5;
|
|
843 |
CnvUtfConverter::ConvertFromUnicodeToUtf8(text8_V5,setUpIdleModeText->iText);
|
|
844 |
TEST(text8==DSATTSY_IDLE_MODE_TEXT_8BIT);
|
|
845 |
TEST(setUpIdleModeTextV5->iIconId.iIdentifier==DSATTSY_ICON_ID1);
|
|
846 |
TEST(setUpIdleModeTextV5->iIconId.iQualifier==DSATTSY_ICON_QUALIFIER1);
|
|
847 |
TEST(setUpIdleModeTextV5->iCodingScheme==DSATTSY_TEXT_ENCODING_SCHEME_8);
|
|
848 |
|
|
849 |
TEST(setUpIdleModeTextV5->iText.Length() == textIdleMode8_V5.Length()); // 276
|
|
850 |
TEST(setUpIdleModeTextV5->iText.Size() == 2*textIdleMode8_V5.Size()); // 2*276
|
|
851 |
|
|
852 |
TEST(setUpIdleModeTextV5->iTextAttribute.iStatus == textAttribute1.iStatus);
|
|
853 |
TEST(setUpIdleModeTextV5->iTextAttribute.iTextAttributeData == textAttribute1.iTextAttributeData);
|
|
854 |
|
|
855 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeText (8-bit) with RSat::TSetUpIdleModeTextV5 passed"),iTestCount++);
|
|
856 |
|
|
857 |
// Set Up Idle Mode Text Cancel
|
|
858 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextV5Pckg);
|
|
859 |
sat.CancelAsyncRequest(ESatNotifySetUpIdleModeTextPCmd);
|
|
860 |
|
|
861 |
User::WaitForRequest(reqStatus);
|
|
862 |
TEST(reqStatus.Int()==KErrCancel);
|
|
863 |
INFO_PRINTF2(_L("Test %d - RSat::NotifySetUpIdleModeTextPCmdCancel with RSat::TSetUpIdleModeTextV5 passed"),iTestCount++);
|
|
864 |
|
|
865 |
// Set Up Idle Mode Text Terminal Rsp
|
|
866 |
sat.NotifySetUpIdleModeTextPCmd(reqStatus,*setUpIdleModeTextPckg);
|
|
867 |
User::WaitForRequest(reqStatus);
|
|
868 |
TEST(reqStatus.Int()==KErrNone);
|
|
869 |
|
|
870 |
RSat::TSetUpIdleModeTextRspV1* setUpIdleModeTextRsp = new (ELeave) RSat::TSetUpIdleModeTextRspV1;
|
|
871 |
CleanupStack::PushL(setUpIdleModeTextRsp);
|
|
872 |
RSat::TSetUpIdleModeTextRspV1Pckg* setUpIdleModeTextRspPckg = new (ELeave) RSat::TSetUpIdleModeTextRspV1Pckg(*setUpIdleModeTextRsp);
|
|
873 |
CleanupStack::PushL(setUpIdleModeTextRspPckg);
|
|
874 |
|
|
875 |
setUpIdleModeTextRsp->SetPCmdNumber(setUpIdleModeText->PCmdNumber());
|
|
876 |
setUpIdleModeTextRsp->iGeneralResult=DSATTSY_PCMD_RESULT_SUCCESS;
|
|
877 |
setUpIdleModeTextRsp->iInfoType=DSATTSY_PCMD_RSP_NO_INFO;
|
|
878 |
setUpIdleModeTextRsp->iAdditionalInfo=DSATTSY_NULL_BUF;
|
|
879 |
|
|
880 |
sat.TerminalRsp(reqStatus,RSat::ESetUpIdleModeText,*setUpIdleModeTextRspPckg);
|
|
881 |
User::WaitForRequest(reqStatus);
|
|
882 |
TEST(reqStatus.Int()==KErrNone);
|
|
883 |
INFO_PRINTF2(_L("Test %d - RSat::TerminalRsp - Set Up Idle Mode Text - passed"),iTestCount++);
|
|
884 |
|
|
885 |
CleanupStack::PopAndDestroy(6, setUpIdleModeText);
|
|
886 |
|
|
887 |
sat.Close();
|
|
888 |
phone.Close();
|
|
889 |
|
|
890 |
return TestStepResult();
|
|
891 |
}
|