telephonyserver/etelsimtoolkit/tetel/Te_EtelSat/TE_EtelSatenvelopecmds.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     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_EtelSatenvelopecmds.h"
       
    18 
       
    19 CTestSatEnvelopeCmds::CTestSatEnvelopeCmds()
       
    20 /** Each test step initialises it's own name
       
    21 */
       
    22 	{
       
    23 	// store the name of this test case
       
    24 	// this is the name that is used by the script file
       
    25 	SetTestStepName(_L("TestSatEnvelopeCmds"));
       
    26 	}
       
    27 
       
    28 enum TVerdict CTestSatEnvelopeCmds::doTestStepL()
       
    29 	{
       
    30 	INFO_PRINTF1(_L("**************************************"));
       
    31 	INFO_PRINTF1(_L("Test RSat Envelope Cmds Functionality"));
       
    32 	INFO_PRINTF1(_L("**************************************"));
       
    33 
       
    34 	RPhone phone;
       
    35 	TInt ret=phone.Open(iTelServer,DSATTSY_PHONE_NAME);
       
    36 	TEST(ret==KErrNone);
       
    37 
       
    38 	RSat sat;
       
    39 	ret=sat.Open(phone);
       
    40     TEST(ret==KErrNone);
       
    41 
       
    42 	//
       
    43 	// Local variables used throughout the sat tests
       
    44 	//
       
    45 	TRequestStatus reqStatus;
       
    46 	iTestCount=1;
       
    47 
       
    48 	//
       
    49 	// Get ME side SAT profile for V2
       
    50 	//
       
    51 	RSat::TSatProfileV2 profile;
       
    52 	RSat::TSatProfileV2Pckg profilePckg(profile);
       
    53 
       
    54 	TEST(profile.ExtensionId() == RSat::KSatV2);
       
    55 
       
    56 	sat.GetMeSideSatProfile(reqStatus, profilePckg);
       
    57 	User::WaitForRequest(reqStatus);
       
    58 	TEST(reqStatus.Int()==KErrNone);
       
    59 
       
    60 	TEST(profile.iSatProfileByte1==0x01);
       
    61 	TEST(profile.iSatProfileByte2==0x02);
       
    62 	TEST(profile.iSatProfileByte3==0x03);
       
    63 	TEST(profile.iSatProfileByte4==0x04);
       
    64 	TEST(profile.iSatProfileByte5==0x05);
       
    65 	TEST(profile.iSatProfileByte6==0x06);
       
    66 	TEST(profile.iSatProfileByte7==0x07);
       
    67 	TEST(profile.iSatProfileByte8==0x08);
       
    68 	TEST(profile.iSatProfileByte9==0x09);
       
    69 	TEST(profile.iSatProfileByte10==0x0A);
       
    70 	TEST(profile.iSatProfileByte11==0x0B);
       
    71 	TEST(profile.iSatProfileByte12==0x0C);
       
    72 	TEST(profile.iSatProfileByte13==0x0D);
       
    73 	TEST(profile.iSatProfileByte14==0x0E);
       
    74 	TEST(profile.iSatProfileByte15==0x0F);
       
    75 	TEST(profile.iSatProfileByte16==0x10);
       
    76 	TEST(profile.iSatProfileByte17==0x20);
       
    77 	TEST(profile.iSatProfileByte18==0x30);
       
    78 	TEST(profile.iNumOfChannels==DSATTSY_NUMBER_OF_CHANNELS);
       
    79 	TEST(profile.iScreenHeight==DSATTSY_SCREEN_HEIGHT);
       
    80 	TEST(profile.iScreenWidth==DSATTSY_SCREEN_WIDTH);
       
    81 	TEST(profile.iTiaEiaProtoVersion==DSATTSY_PROTO_VERSION);
       
    82 	TEST(profile.iWidthReduction==DSATTSY_WIDTH_REDUCTION);
       
    83 
       
    84 	INFO_PRINTF2(_L("Test %d - RSat::GetMeSideSatProfile with RSat::TSatProfileV2 passed"),iTestCount++);
       
    85 
       
    86 	sat.GetMeSideSatProfile(reqStatus, profilePckg);
       
    87 	sat.CancelAsyncRequest(ESatGetMeSideSatProfile);
       
    88 	User::WaitForRequest(reqStatus);
       
    89 	TEST(reqStatus.Int()==KErrCancel);
       
    90 	INFO_PRINTF2(_L("Test %d - RSat::GetMeSideSatProfileCancel with RSat::TSatProfileV2 passed"),iTestCount++);
       
    91 
       
    92 	//
       
    93 	// Client SAT profile indication
       
    94 	//
       
    95 	TEST(sat.ClientSatProfileIndication(profilePckg)==KErrNone);
       
    96 	INFO_PRINTF2(_L("Test %d - RSat::ClientSatProfileIndication with RSat::TSatProfileV2 passed"),iTestCount++);
       
    97 
       
    98 	//
       
    99 	// Get ME side SAT profile for V5
       
   100 	//
       
   101 	RSat::TSatProfileV5 profileV5;
       
   102 	RSat::TSatProfileV5Pckg profileV5Pckg(profileV5);
       
   103 
       
   104 	TEST(profileV5.ExtensionId() == RSat::KSatV5);
       
   105 
       
   106 	sat.GetMeSideSatProfile(reqStatus, profileV5Pckg);
       
   107 	User::WaitForRequest(reqStatus);
       
   108 	TEST(reqStatus.Int()==KErrNone);
       
   109 
       
   110 	// Pre-version 5 parameters in SAT profile
       
   111 	TEST(profileV5.iSatProfileByte1==0x01);
       
   112 	TEST(profileV5.iSatProfileByte2==0x02);
       
   113 	TEST(profileV5.iSatProfileByte3==0x03);
       
   114 	TEST(profileV5.iSatProfileByte4==0x04);
       
   115 	TEST(profileV5.iSatProfileByte5==0x05);
       
   116 	TEST(profileV5.iSatProfileByte6==0x06);
       
   117 	TEST(profileV5.iSatProfileByte7==0x07);
       
   118 	TEST(profileV5.iSatProfileByte8==0x08);
       
   119 	TEST(profileV5.iSatProfileByte9==0x09);
       
   120 	TEST(profileV5.iSatProfileByte10==0x0A);
       
   121 	TEST(profileV5.iSatProfileByte11==0x0B);
       
   122 	TEST(profileV5.iSatProfileByte12==0x0C);
       
   123 	TEST(profileV5.iSatProfileByte13==0x0D);
       
   124 	TEST(profileV5.iSatProfileByte14==0x0E);
       
   125 	TEST(profileV5.iSatProfileByte15==0x0F);
       
   126 	TEST(profileV5.iSatProfileByte16==0x10);
       
   127 	TEST(profileV5.iSatProfileByte17==0x20);
       
   128 	TEST(profileV5.iSatProfileByte18==0x30);
       
   129 	TEST(profileV5.iNumOfChannels==DSATTSY_NUMBER_OF_CHANNELS);
       
   130 	TEST(profileV5.iScreenHeight==DSATTSY_SCREEN_HEIGHT);
       
   131 	TEST(profileV5.iScreenWidth==DSATTSY_SCREEN_WIDTH);
       
   132 	TEST(profileV5.iTiaEiaProtoVersion==DSATTSY_PROTO_VERSION);
       
   133 	TEST(profileV5.iWidthReduction==DSATTSY_WIDTH_REDUCTION);
       
   134 	// Version 5 parameters in profile
       
   135 	// (test also that the TSatProfileByte28 and TSatProfileByte29
       
   136 	// have been defined correctly as each should set a different bit).
       
   137 	TEST(profileV5.iSatProfileByte28==
       
   138 			(RSat::KCapsTextAttributeAlignmentLeft | RSat::KCapsTextAttributeAlignmentCentre |
       
   139 			 RSat::KCapsTextAttributeAlignmentRight | RSat::KCapsTextAttributeFontSizeNormal |
       
   140 			 RSat::KCapsTextAttributeFontSizeLarge | RSat::KCapsTextAttributeFontSizeSmall)); // 0x3F
       
   141 	TEST(profileV5.iSatProfileByte29==(RSat::KCapsTextAttributeStyleNormal |
       
   142 									 RSat::KCapsTextAttributeStyleBold |
       
   143 									 RSat::KCapsTextAttributeStyleItalic |
       
   144 									 RSat::KCapsTextAttributeStyleUnderline |
       
   145 									 RSat::KCapsTextAttributeStyleStrikethrough |
       
   146 									 RSat::KCapsTextAttributeStyleForeground |
       
   147 									 RSat::KCapsTextAttributeStyleBackground)); // 0x7F
       
   148 
       
   149 	INFO_PRINTF2(_L("Test %d - RSat::GetMeSideSatProfile with RSat::TSatProfileV5 passed"),iTestCount++);
       
   150 
       
   151 	sat.GetMeSideSatProfile(reqStatus, profileV5Pckg);
       
   152 	sat.CancelAsyncRequest(ESatGetMeSideSatProfile);
       
   153 	User::WaitForRequest(reqStatus);
       
   154 	TEST(reqStatus.Int()==KErrCancel);
       
   155 	INFO_PRINTF2(_L("Test %d - RSat::GetMeSideSatProfileCancel with RSat::TSatProfileV5 passed"),iTestCount++);
       
   156 
       
   157 	//
       
   158 	// Client SAT profile indication for V5
       
   159 	//
       
   160 	TEST(sat.ClientSatProfileIndication(profileV5Pckg)==KErrNone);
       
   161 	INFO_PRINTF2(_L("Test %d - RSat::ClientSatProfileIndication RSat::TSatProfileV5 passed"),iTestCount++);
       
   162 
       
   163 	// Menu Selection
       
   164 	RSat::TMenuSelectionV1 selection;
       
   165 	RSat::TMenuSelectionV1Pckg selectionPckg(selection);
       
   166 
       
   167 	selection.iHelp		=DSATTSY_HELP_REQUESTED;
       
   168 	selection.iItemId	=DSATTSY_ITEM_ID;
       
   169 
       
   170 	sat.MenuSelection(reqStatus, selectionPckg);
       
   171 	User::WaitForRequest(reqStatus);
       
   172 	TEST(reqStatus.Int()==KErrNone);
       
   173 	INFO_PRINTF2(_L("Test %d - RSat::MenuSelection passed"),iTestCount++);
       
   174 
       
   175 	// Menu Selection Cancel
       
   176 	sat.MenuSelection(reqStatus,selectionPckg);
       
   177 	sat.CancelAsyncRequest(ESatMenuSelection);
       
   178 	User::WaitForRequest(reqStatus);
       
   179 	TEST(reqStatus.Int()==KErrCancel);
       
   180 	INFO_PRINTF2(_L("Test %d - RSat::MenuSelectionCancel passed"),iTestCount++);
       
   181 
       
   182 	// Event Download
       
   183 
       
   184 	// Test each event
       
   185 
       
   186 	RSat::TEventList				eventList;
       
   187 	RSat::TEventDownloadBaseV2		eventBaseV2;
       
   188 	RSat::TEventDownloadBaseV2Pckg	eventBaseV2Pckg( eventBaseV2 );
       
   189 
       
   190 	// KUserActivity
       
   191 
       
   192 	eventList = RSat::KUserActivity;
       
   193 
       
   194 	sat.EventDownload( reqStatus, eventList, eventBaseV2Pckg );	// No associated data
       
   195 	User::WaitForRequest(reqStatus);
       
   196 	TEST(reqStatus.Int()==KErrNone);
       
   197 
       
   198 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KUserActivity) passed"),iTestCount++);
       
   199 
       
   200 	// Event Download Cancel
       
   201 
       
   202 	sat.EventDownload( reqStatus, eventList, eventBaseV2Pckg );	// No associated data
       
   203 	sat.CancelAsyncRequest(ESatEventDownload);
       
   204 	User::WaitForRequest(reqStatus);
       
   205 	TEST(reqStatus.Int()==KErrCancel);
       
   206 
       
   207 	INFO_PRINTF2(_L("Test %d - RSat::EventDownloadCancel passed"),iTestCount++);
       
   208 
       
   209 	// KIdleScreenAvailable
       
   210 
       
   211 	eventList = RSat::KIdleScreenAvailable;
       
   212 
       
   213 	sat.EventDownload( reqStatus, eventList,  eventBaseV2Pckg );	// No associated data
       
   214 	User::WaitForRequest(reqStatus);
       
   215 	TEST(reqStatus.Int()==KErrNone);
       
   216 
       
   217 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KIdleScreenAvailable) passed"),iTestCount++);
       
   218 
       
   219 	sat.EventDownload( reqStatus, eventList,  eventBaseV2Pckg );	// No associated data
       
   220 	sat.CancelAsyncRequest(ESatEventDownload);
       
   221 	User::WaitForRequest(reqStatus);
       
   222 
       
   223 	// KCardReaderStatus
       
   224 
       
   225 	RSat::TCardReaderStatusEventV2		eventCardStatus;
       
   226 	RSat::TCardReaderStatusEventV2Pckg	eventCardStatusPckg(eventCardStatus);
       
   227 
       
   228 	eventList						  = RSat::KCardReaderStatus;
       
   229 	eventCardStatus.iCardReaderStatus = DSATTSY_EVENT_CARD_READER_STATUS;
       
   230 
       
   231 	sat.EventDownload( reqStatus, eventList, eventCardStatusPckg );
       
   232 	User::WaitForRequest(reqStatus);
       
   233 	TEST(reqStatus.Int()==KErrNone);
       
   234 
       
   235 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KCardReaderStatus) passed"),iTestCount++);
       
   236 
       
   237 	sat.EventDownload( reqStatus, eventList, eventCardStatusPckg );
       
   238 	sat.CancelAsyncRequest(ESatEventDownload);
       
   239 	User::WaitForRequest(reqStatus);
       
   240 
       
   241 	// KLanguageSelection
       
   242 
       
   243 	RSat::TLanguageSelectionEventV2		languageSelect;
       
   244 	RSat::TLanguageSelectionEventV2Pckg	languageSelectPckg(languageSelect);
       
   245 
       
   246 	eventList				 = RSat::KLanguageSelection;
       
   247 	languageSelect.iLanguage = DSATTSY_EVENT_LANGUAGE_SELECTION;
       
   248 
       
   249 	sat.EventDownload( reqStatus, eventList, languageSelectPckg );
       
   250 	User::WaitForRequest(reqStatus);
       
   251 	TEST(reqStatus.Int()==KErrNone);
       
   252 
       
   253 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KLanguageSelection) passed"),iTestCount++);
       
   254 
       
   255 	sat.EventDownload( reqStatus, eventList, languageSelectPckg );
       
   256 	sat.CancelAsyncRequest(ESatEventDownload);
       
   257 	User::WaitForRequest(reqStatus);
       
   258 
       
   259 	// KBrowserTermination
       
   260 
       
   261 	RSat::TBrowserTerminationEventV2		browserTerm;
       
   262 	RSat::TBrowserTerminationEventV2Pckg	browserTermPckg( browserTerm );
       
   263 
       
   264 	eventList		   = RSat::KBrowserTermination;
       
   265 	browserTerm.iCause = DSATTSY_EVENT_BROWSER_TERMINATION_CAUSE;
       
   266 
       
   267 	sat.EventDownload( reqStatus, eventList, browserTermPckg );
       
   268 	User::WaitForRequest(reqStatus);
       
   269 	TEST(reqStatus.Int()==KErrNone);
       
   270 
       
   271 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KBrowserTermination) passed"),iTestCount++);
       
   272 
       
   273 	sat.EventDownload( reqStatus, eventList, browserTermPckg );
       
   274 	sat.CancelAsyncRequest(ESatEventDownload);
       
   275 	User::WaitForRequest(reqStatus);
       
   276 
       
   277 	// KDataAvailable
       
   278 
       
   279 	RSat::TDataAvailableEventV2		dataAvailable;
       
   280 	RSat::TDataAvailableEventV2Pckg	dataAvailablePckg( dataAvailable );
       
   281 
       
   282 	eventList	 = RSat::KDataAvailable;
       
   283 
       
   284 	dataAvailable.iStatus.Append( DSATTSY_EVENT_DATA_AVAILABLE_STATUS );
       
   285 	dataAvailable.iLength = DSATTSY_EVENT_DATA_AVAILABLE_LENGTH;
       
   286 
       
   287 	sat.EventDownload( reqStatus, eventList, dataAvailablePckg );
       
   288 	User::WaitForRequest(reqStatus);
       
   289 	TEST(reqStatus.Int()==KErrNone);
       
   290 
       
   291 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KDataAvailable) passed"),iTestCount++);
       
   292 
       
   293 	sat.EventDownload( reqStatus, eventList, dataAvailablePckg );
       
   294 	sat.CancelAsyncRequest(ESatEventDownload);
       
   295 	User::WaitForRequest(reqStatus);
       
   296 
       
   297 	// KChannelStatus
       
   298 
       
   299 	RSat::TChannelStatusEventV2		channelStatus;
       
   300 	RSat::TChannelStatusEventV2Pckg	channelStatusPckg( channelStatus );
       
   301 
       
   302 	eventList			  = RSat::KChannelStatus;
       
   303 	channelStatus.iStatus = DSATTSY_EVENT_CHANNEL_STATUS;
       
   304 
       
   305 	sat.EventDownload( reqStatus, eventList, channelStatusPckg );
       
   306 	User::WaitForRequest(reqStatus);
       
   307 	TEST(reqStatus.Int()==KErrNone);
       
   308 
       
   309 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KChannelStatus) passed"),iTestCount++);
       
   310 
       
   311 	sat.EventDownload( reqStatus, eventList, channelStatusPckg );
       
   312 	sat.CancelAsyncRequest(ESatEventDownload);
       
   313 	User::WaitForRequest(reqStatus);
       
   314 
       
   315 	// KDisplayParamsChanges
       
   316 
       
   317 	RSat::TDisplayParamsEventV2		displayParams;
       
   318 	RSat::TDisplayParamsEventV2Pckg	displayParamsPckg( displayParams );
       
   319 
       
   320 	eventList	 = RSat::KDisplayParamsChanges;
       
   321 
       
   322 	displayParams.iSatProfileByte14 = DSATTSY_EVENT_DISPLAY_PROF14;
       
   323 	displayParams.iScreenHeight     = DSATTSY_SCREEN_HEIGHT;
       
   324 	displayParams.iSatProfileByte15 = DSATTSY_EVENT_DISPLAY_PROF15;
       
   325 	displayParams.iScreenWidth		= DSATTSY_SCREEN_WIDTH;
       
   326 	displayParams.iSatProfileByte16 = DSATTSY_EVENT_DISPLAY_PROF16;
       
   327 	displayParams.iWidthReduction   = DSATTSY_WIDTH_REDUCTION;
       
   328 
       
   329 	sat.EventDownload( reqStatus, eventList, displayParamsPckg );
       
   330 	User::WaitForRequest(reqStatus);
       
   331 	TEST(reqStatus.Int()==KErrNone);
       
   332 
       
   333 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KDisplayParams) passed"),iTestCount++);
       
   334 
       
   335 	sat.EventDownload( reqStatus, eventList, displayParamsPckg );
       
   336 	sat.CancelAsyncRequest(ESatEventDownload);
       
   337 	User::WaitForRequest(reqStatus);
       
   338 
       
   339 	// KLocalConnection
       
   340 
       
   341 	RSat::TLocalConnectionEventV2		localConnection;
       
   342 	RSat::TLocalConnectionEventV2Pckg	localConnectionPckg( localConnection );
       
   343 
       
   344 	eventList	 = RSat::KLocalConnection;
       
   345 	localConnection.iRecord.iBearerId  = DSATTSY_EVENT_LOCAL_BEARER_ID;
       
   346 	localConnection.iRecord.iServiceId = DSATTSY_EVENT_LOCAL_SERVICE_ID;
       
   347 	localConnection.iRecord.iRecord	   = DSATTSY_EVENT_LOCAL_SERVICE_RECORD;
       
   348 	localConnection.iAddress.iCoding   = DSATTSY_EVENT_LOCAL_ADDR_CODING ;
       
   349 	localConnection.iAddress.iAddress  = DSATTSY_EVENT_LOCAL_ADDRESS;
       
   350 
       
   351 	sat.EventDownload( reqStatus, eventList, localConnectionPckg );
       
   352 	User::WaitForRequest(reqStatus);
       
   353 	TEST(reqStatus.Int()==KErrNone);
       
   354 
       
   355 	INFO_PRINTF2(_L("Test %d - RSat::EventDownload(KLocalConnection) passed"),iTestCount++);
       
   356 
       
   357 	sat.EventDownload( reqStatus, eventList, displayParamsPckg );
       
   358 	sat.CancelAsyncRequest(ESatEventDownload);
       
   359 	User::WaitForRequest(reqStatus);
       
   360 	
       
   361 	/** Testing the Release 6 features supported by the envelope commands*/
       
   362 	/**
       
   363 	Testing Event Download envelope command w.r.t NetworkSearchModeChangeEvent which has been updated
       
   364     as part of the Release 6 Features of USIM Application ToolKit
       
   365 	@test TSAT324
       
   366 	*/
       
   367 	RSat::TNetworkSearchModeChangeEventV6 networkSearchModeChangeEvent;	
       
   368 	RSat::TNetworkSearchModeChangeEventV6Pckg networkSearchModeChangeEventPckg(networkSearchModeChangeEvent);
       
   369 	
       
   370 	eventList=RSat::KNetworkSearchModeChange;
       
   371 	networkSearchModeChangeEvent.iNetworkSearchMode=DSATTSY_NETWORK_SEARCH_MODE1;
       
   372 	
       
   373 	sat.EventDownload(reqStatus,eventList,networkSearchModeChangeEventPckg);
       
   374 	User::WaitForRequest(reqStatus);
       
   375 	TEST(reqStatus.Int()==KErrNone);
       
   376 	
       
   377     INFO_PRINTF2(_L("Test %d - EventDownload - NetworkSearchModeChangeEvent- passed"),iTestCount++);
       
   378     
       
   379     /**
       
   380     Testing Cancel API for the Event Download envelope command
       
   381     @test TSAT325
       
   382     */
       
   383     
       
   384     //Cancel	
       
   385 	sat.EventDownload(reqStatus,eventList,networkSearchModeChangeEventPckg);
       
   386 	sat.CancelAsyncRequest(ESatEventDownload);
       
   387 	User::WaitForRequest(reqStatus);
       
   388 	TEST(reqStatus.Int()==KErrCancel);
       
   389 	
       
   390 	//BrowsingStatusEvent 
       
   391 	
       
   392 	/**
       
   393 	Testing Event Download envelope command w.r.t TBrowsingStatusEventV6 which has been updated
       
   394     as part of the Release 6 Features of USIM Application ToolKit
       
   395 	@test TSAT326
       
   396 	*/
       
   397 	RSat::TBrowsingStatusEventV6 browsingStatusEvent;
       
   398 	RSat::TBrowsingStatusEventV6Pckg	browsingStatusEventPckg(browsingStatusEvent);
       
   399 
       
   400 	eventList=RSat::KBrowsingStatusChange;
       
   401 	browsingStatusEvent.iBrowserStatus = DSATTSY_BROWSING_STATUS1;
       
   402 	
       
   403 	sat.EventDownload(reqStatus,eventList,browsingStatusEventPckg);
       
   404 	User::WaitForRequest(reqStatus);
       
   405 	TEST(reqStatus.Int()==KErrNone);
       
   406 	
       
   407     INFO_PRINTF2(_L("Test %d - EventDownload - BrowsingStatusEvent- passed"),iTestCount++);
       
   408     
       
   409     /**
       
   410     Testing Cancel API for the Event Download envelope command
       
   411     @test TSAT327
       
   412     */
       
   413     
       
   414     //Cancel	
       
   415 	sat.EventDownload(reqStatus,eventList, browsingStatusEventPckg);
       
   416 	sat.CancelAsyncRequest(ESatEventDownload);
       
   417 	User::WaitForRequest(reqStatus);
       
   418 	TEST(reqStatus.Int()==KErrCancel);
       
   419 	
       
   420 	//FramesInformationChangedEvent
       
   421 	
       
   422 	/**
       
   423 	Testing Event Download envelope command w.r.t FramesInformationChangedEvent which has been updated
       
   424     as part of the Release 6 Features of USIM Application ToolKit
       
   425 	@test TSAT328
       
   426 	*/
       
   427 	RSat::TFramesInformationChangedEventV6 framesInfoChangedEvent;
       
   428 	RSat::TFramesInformationChangedEventV6Pckg	framesInfoChangedEventPckg(framesInfoChangedEvent);
       
   429 
       
   430 	eventList=RSat::KFramesInformationChange;
       
   431 	framesInfoChangedEvent.iFramesInformation.iFrameId = DSATTSY_FRAMES_INFORMATION_FRAMEID;
       
   432 	framesInfoChangedEvent.iFramesInformation.iFrameList= DSATTSY_FRAMES_INFORMATION_FRAME_LIST;
       
   433 	
       
   434 	sat.EventDownload(reqStatus,eventList, framesInfoChangedEventPckg);
       
   435 	User::WaitForRequest(reqStatus);
       
   436 	TEST(reqStatus.Int()==KErrNone);
       
   437 	
       
   438     INFO_PRINTF2(_L("Test %d - EventDownload - framesInformationChangedEvent- passed"),iTestCount++);
       
   439     
       
   440     /**
       
   441     Testing Cancel API for the Event Download envelope command
       
   442     @test TSAT329
       
   443     */
       
   444     
       
   445     //Cancel	
       
   446 	sat.EventDownload(reqStatus,eventList, framesInfoChangedEventPckg);
       
   447 	sat.CancelAsyncRequest(ESatEventDownload);
       
   448 	User::WaitForRequest(reqStatus);
       
   449 	TEST(reqStatus.Int()==KErrCancel);
       
   450 	
       
   451 	/**
       
   452 	Testing Multimedia Messaging Service Transfer Status envelope command which has been newly
       
   453 	added as part of the Release 6 Features of USIM Application ToolKit
       
   454 	@test TSAT299
       
   455 	*/
       
   456 	RSat::TMmsTransferStatusV6 mmsTransferStatus;
       
   457 	RSat::TMmsTransferStatusV6Pckg	mmsTransferStatusPckg(mmsTransferStatus);
       
   458 
       
   459 	mmsTransferStatus.iDeviceId = DSATTSYV6_DEVICE_ID3;
       
   460 	mmsTransferStatus.iMultimediaMessageId =DSATTSYV6_MULTIMEDIA_MESSAGE_ID1;
       
   461 	mmsTransferStatus.iMultimediaMessageStatus =DSATTSYV6_MULTIMEDIA_MESSAGE_STATUS;
       
   462 	
       
   463 	sat.MmsTransferStatus(reqStatus, mmsTransferStatusPckg);
       
   464 	User::WaitForRequest(reqStatus);
       
   465 	TEST(reqStatus.Int()==KErrNone);
       
   466 	
       
   467     INFO_PRINTF2(_L("Test %d - RSat::MmsTransferStatus - Multimedia Messaging Service Transfer Status - passed"),iTestCount++);
       
   468     
       
   469     /**
       
   470     Testing Cancel API for the Multimedia Messaging  Service Transfer Status envelope command
       
   471     @test TSAT300
       
   472     */
       
   473     
       
   474     //Cancel	
       
   475 	sat.MmsTransferStatus(reqStatus, mmsTransferStatusPckg);
       
   476 	sat.CancelAsyncRequest(ESatMmsTransferStatus);
       
   477 	User::WaitForRequest(reqStatus);
       
   478 	TEST(reqStatus.Int()==KErrCancel);
       
   479 	
       
   480 	/**
       
   481 	Testing Multimedia Messaging  Service Notificaiton Download envelope command which has been newly
       
   482 	added as part of the Release 6 Features of USIM Application ToolKit
       
   483 	@test TSAT301
       
   484 	*/
       
   485 	RSat::TMmsNotificationDownloadV6 mmsNotificationDownload;
       
   486 	RSat::TMmsNotificationDownloadV6Pckg	mmsNotificationDownloadPckg(mmsNotificationDownload);
       
   487 
       
   488 	mmsNotificationDownload.iDeviceId = DSATTSYV6_DEVICE_ID1;
       
   489 	mmsNotificationDownload.iLastEnvelope = DSATTSYV6_LAST_ENVELOPE1; 
       
   490 	mmsNotificationDownload.iMMSNotification = DSATTSYV6_MMS_NOTIFICATION1;
       
   491 	
       
   492 	sat.MmsNotificationDownload(reqStatus, mmsNotificationDownloadPckg);
       
   493 	User::WaitForRequest(reqStatus);
       
   494 	TEST(reqStatus.Int()==KErrNone);
       
   495 	
       
   496     INFO_PRINTF2(_L("Test %d - RSat::MmsNotificationDownload - Multimedia Messaging  Service Notificaiton Download - passed"),iTestCount++);
       
   497     
       
   498     /**
       
   499     Testing Cancel API for the Multimedia Messaging  Notification Download envelope command
       
   500     @test TSAT302
       
   501     */
       
   502     
       
   503     //Cancel	
       
   504 	sat.MmsNotificationDownload(reqStatus, mmsNotificationDownloadPckg);
       
   505 	sat.CancelAsyncRequest(ESatMmsNotificationDownload);
       
   506 	User::WaitForRequest(reqStatus);
       
   507 	TEST(reqStatus.Int()==KErrCancel);
       
   508 	
       
   509 		
       
   510 	/**
       
   511 	Testing Ussd Data Download command which has been newly
       
   512 	added as part of the Release 6 Features of USIM Application ToolKit
       
   513 	@test TSAT303
       
   514 	@test TSAT313
       
   515 	*/
       
   516 	RSat::TUssdDataDownloadV6 ussdDataDownload;
       
   517 	RSat::TUssdDataDownloadV6Pckg	ussdDataDownloadPckg(ussdDataDownload);
       
   518 
       
   519 	ussdDataDownload.iDeviceId = DSATTSYV6_DEVICE_ID1;
       
   520 	ussdDataDownload.iUssdString.iUssdString = DSATTSY_USSD_STRING;
       
   521 
       
   522 	sat.UssdDataDownload(reqStatus, ussdDataDownloadPckg);
       
   523 	User::WaitForRequest(reqStatus);
       
   524 	TEST(reqStatus.Int()==KErrNone);
       
   525     INFO_PRINTF2(_L("Test %d - UssdDataDownload - Ussd Data Download command- passed"),iTestCount++);
       
   526     
       
   527     /**
       
   528     Testing Cancel API for the Ussd Data Download command
       
   529     @test TSAT304
       
   530     @test TSAT314
       
   531     */
       
   532     
       
   533     //Cancel	
       
   534 	sat.UssdDataDownload(reqStatus, ussdDataDownloadPckg);
       
   535 	sat.CancelAsyncRequest(ESatUssdDataDownload);
       
   536 	User::WaitForRequest(reqStatus);
       
   537 	TEST(reqStatus.Int()==KErrCancel);
       
   538 	
       
   539 	sat.Close();
       
   540 	phone.Close();
       
   541 
       
   542 	return TestStepResult();
       
   543 
       
   544 	}