cbsref/telephonyrefplugins/atltsy/integrationtest/src/testltsysmsdelete.cpp
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     1 // Copyright (c) 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 
       
    17 //user include
       
    18 #include "testltsysmsdelete.h"
       
    19 
       
    20 CTestLtsySmsDelete::CTestLtsySmsDelete(CTestLtsyModel& aTestModel)
       
    21 	: CTestLtsySmsBase(aTestModel)
       
    22 	{
       
    23 
       
    24 	}
       
    25 
       
    26 CTestLtsySmsDelete::~CTestLtsySmsDelete()
       
    27 	{
       
    28 	}
       
    29 
       
    30 CTestLtsySmsDelete* CTestLtsySmsDelete::NewLC(CTestLtsyModel& aTestModel)
       
    31 	{
       
    32 	CTestLtsySmsDelete* self = new (ELeave)CTestLtsySmsDelete(aTestModel);
       
    33 	CleanupStack::PushL(self);
       
    34 	self->ConstructL();
       
    35 	return self;
       
    36 	}
       
    37 
       
    38 CTestLtsySmsDelete* CTestLtsySmsDelete::NewL(CTestLtsyModel& aTestModel)
       
    39 	{
       
    40 	CTestLtsySmsDelete* self=CTestLtsySmsDelete::NewLC(aTestModel);
       
    41 	CleanupStack::Pop(self);
       
    42 	return self;
       
    43 	}
       
    44 
       
    45 void CTestLtsySmsDelete::ConstructL()
       
    46 	{
       
    47 
       
    48 	}
       
    49 
       
    50 TVerdict CTestLtsySmsDelete::doTestStepPreambleL()
       
    51 	{
       
    52 	INFO_PRINTF1(_L("CTestLtsySmsDelete::doTestStepPreambleL called"));
       
    53 	SetTestStepResult(EPass);
       
    54 	return TestStepResult();
       
    55 	}
       
    56 
       
    57 TVerdict CTestLtsySmsDelete::doTestStepL()
       
    58 	{
       
    59 	INFO_PRINTF1(_L("CTestLtsySmsDelete::doTestStepL called"));
       
    60 	TInt index(6);
       
    61 	TRAPD(err,DeleteSmsL(index));
       
    62 	if(err != KErrNone)
       
    63 		{
       
    64 		INFO_PRINTF2(_L("The error was returned %d!! when delete sms"),err);
       
    65 	    SetTestStepResult(EFail);
       
    66 		}
       
    67 	return TestStepResult();
       
    68 	}
       
    69 
       
    70 TVerdict CTestLtsySmsDelete::doTestStepPostambleL()
       
    71 	{
       
    72 	INFO_PRINTF1(_L("CTestLtsySmsDelete::doTestStepPostambleL called"));
       
    73 	return TestStepResult();
       
    74 	}
       
    75 void CTestLtsySmsDelete::DeleteSmsL(TInt aIndex)
       
    76 	{
       
    77 	TRequestStatus status;
       
    78 	SmsStore().Delete(status,aIndex);
       
    79 	User::WaitForRequest(status);
       
    80 	TInt r = status.Int();
       
    81 	INFO_PRINTF2(_L("Delete() request status = %d"),r);
       
    82 	}
       
    83 
       
    84 //End of file