|
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 "testltsysmsnack.h" |
|
19 #include "testltsysmsatutil.h" |
|
20 |
|
21 CTestLtsySmsNack::CTestLtsySmsNack(CTestLtsyModel& aTestModel) |
|
22 : CTestLtsySmsBase(aTestModel) |
|
23 { |
|
24 |
|
25 } |
|
26 |
|
27 CTestLtsySmsNack::~CTestLtsySmsNack() |
|
28 { |
|
29 } |
|
30 |
|
31 CTestLtsySmsNack* CTestLtsySmsNack::NewLC(CTestLtsyModel& aTestModel) |
|
32 { |
|
33 CTestLtsySmsNack* self = new (ELeave)CTestLtsySmsNack(aTestModel); |
|
34 CleanupStack::PushL(self); |
|
35 self->ConstructL(); |
|
36 return self; |
|
37 } |
|
38 |
|
39 CTestLtsySmsNack* CTestLtsySmsNack::NewL(CTestLtsyModel& aTestModel) |
|
40 { |
|
41 CTestLtsySmsNack* self=CTestLtsySmsNack::NewLC(aTestModel); |
|
42 CleanupStack::Pop(self); |
|
43 return self; |
|
44 } |
|
45 |
|
46 void CTestLtsySmsNack::ConstructL() |
|
47 { |
|
48 |
|
49 } |
|
50 |
|
51 TVerdict CTestLtsySmsNack::doTestStepPreambleL() |
|
52 { |
|
53 INFO_PRINTF1(_L("CTestLtsySmsNack::doTestStepPreambleL called")); |
|
54 SetTestStepResult(EPass); |
|
55 return TestStepResult(); |
|
56 } |
|
57 |
|
58 TVerdict CTestLtsySmsNack::doTestStepL() |
|
59 { |
|
60 INFO_PRINTF1(_L("CTestLtsySmsNack::doTestStepL called")); |
|
61 TRAPD(err,NackSmsStoredL()); |
|
62 if(err != KErrNone) |
|
63 { |
|
64 INFO_PRINTF2(_L("The error was returned %d!! when nack sms store"),err); |
|
65 SetTestStepResult(EFail); |
|
66 } |
|
67 return TestStepResult(); |
|
68 } |
|
69 |
|
70 TVerdict CTestLtsySmsNack::doTestStepPostambleL() |
|
71 { |
|
72 INFO_PRINTF1(_L("CTestLtsySmsNack::doTestStepPostambleL called")); |
|
73 return TestStepResult(); |
|
74 } |
|
75 |
|
76 void CTestLtsySmsNack::NackSmsStoredL() |
|
77 { |
|
78 _LIT8(KTest,"9f05"); |
|
79 TBuf8<12> nackAsciiTest = KTest(); |
|
80 TBuf8<12> nackTest; |
|
81 SmsAtUtil::ConvertAsciiToBinary(nackAsciiTest,nackTest); |
|
82 TRequestStatus status; |
|
83 TInt rpCause(2); |
|
84 |
|
85 Sms().NackSmsStored(status,nackTest,rpCause); |
|
86 User::WaitForRequest(status); |
|
87 TInt r=status.Int(); |
|
88 INFO_PRINTF2(_L("AckSmsStored() request status = %d"),r); |
|
89 } |
|
90 |
|
91 //End of file |