diff -r 6b1d113cdff3 -r 6638e7f4bd8f telephonyserverplugins/simtsy/test/Te_Sim/Te_SimSmsTxTest.cpp --- a/telephonyserverplugins/simtsy/test/Te_Sim/Te_SimSmsTxTest.cpp Mon May 03 13:37:20 2010 +0300 +++ b/telephonyserverplugins/simtsy/test/Te_Sim/Te_SimSmsTxTest.cpp Thu May 06 15:10:38 2010 +0100 @@ -1,156 +1,156 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#include "Te_SimSmsTxTest.h" - -CSimSmsTxTest::CSimSmsTxTest() - { - SetTestStepName(_L("SmsTxTest")); - } - -TVerdict CSimSmsTxTest::doTestStepL() - { - INFO_PRINTF1(_L("BeginSmsTxTest")); - - CreateConfigFileL(_L("c:\\config2.txt")); - SetTestNumberL(0); - - TInt ret = iPhone.Open(iTelServer,KPhoneName); - INFO_PRINTF2(_L("Result: %d"),ret); - TESTL(ret == KErrNone); - INFO_PRINTF1(_L("Opened phone object")); - TESTL(iSmsMessaging.Open(iPhone)==KErrNone); - INFO_PRINTF1(_L("Opened SMS Messaging object")); - - RMobileSmsMessaging::TMobileSmsCapsV1 caps; - RMobileSmsMessaging::TMobileSmsCapsV1Pckg capsPckg(caps); - iSmsMessaging.GetCaps(capsPckg); - TESTL(caps.iSmsMode==RMobileSmsMessaging::KCapsGsmSms); - TESTL(caps.iSmsControl==KSmsMessagingCaps); - - TRequestStatus stat0, statReceive, statSend; - - RMobileSmsMessaging::TMobileSmsReceiveMode rxMode; - rxMode = RMobileSmsMessaging::EReceiveUnstoredPhoneAck; - iSmsMessaging.SetReceiveMode(stat0,rxMode); - User::WaitForRequest(stat0); - TESTL(stat0==KErrNone); - - TSmsPdu smsPdu; - RMobileSmsMessaging::TMobileSmsReceiveAttributesV1 attrib; - RMobileSmsMessaging::TMobileSmsReceiveAttributesV1Pckg attribPckg(attrib); - iSmsMessaging.ReceiveMessage(statReceive,smsPdu,attribPckg); - INFO_PRINTF1(_L("1st receive Request sent")); - - RMobileSmsMessaging::TMobileSmsSendAttributesV1 attribSend; - RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg attribSendPckg(attribSend); - TSmsPdu smsPduSent; - smsPduSent.Copy(KTestSendPduA,sizeof(KTestSendPduA)); - iSmsMessaging.SendMessage(statSend,smsPduSent,attribSendPckg); - INFO_PRINTF1(_L("1st Send Request sent")); - User::WaitForRequest(statSend); - CHECKPOINTL(statSend,KErrNone,CHP_SMS_CASE("C.11")); - INFO_PRINTF1(_L("Message 1s sent")); - - //test sms sent atributes - TUint16 msgRef = 12;//test value - TESTL(attribSend.iMsgRef==msgRef); - - - TESTL(attribSend.iSubmitReport.Length()==sizeof(KTestSubmitReport)); - for(TInt j =0;j