|
1 // Copyright (c) 1999-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 "smstestutils.h" |
|
17 |
|
18 #include <msvapi.h> |
|
19 |
|
20 #define KSendRecvScript _L("biotest.script") |
|
21 |
|
22 class CMsvEntrySelection; |
|
23 class CSendReceive : public CActive |
|
24 { |
|
25 public: |
|
26 static CSendReceive* NewL(CSmsTestUtils& aTestUtils); |
|
27 void StartL(CMsvEntrySelection* aReceived); |
|
28 ~CSendReceive(); |
|
29 private: |
|
30 CSendReceive(CSmsTestUtils& aTestUtils); |
|
31 |
|
32 void TestSendingL(); |
|
33 TBool SendNextMessageL(); |
|
34 void TestWaitForReceiveL(); |
|
35 void TestParseL(); |
|
36 void DoRunTestParseL(); |
|
37 |
|
38 virtual void ConstructL(); |
|
39 |
|
40 void DoRunL(); |
|
41 void RunL(); |
|
42 void DoCancel(); |
|
43 |
|
44 void DoRunSendingL(); |
|
45 void DoRunWaitingToReceiveL(); |
|
46 void DoWaitL(); |
|
47 |
|
48 void WaitForExtraL(); |
|
49 void DoRunWaitForExtraL(); |
|
50 |
|
51 // void CreateWappMessagesL(); |
|
52 // HBufC* ReadWappMessageFromFileL(const TDesC& aFile); |
|
53 // void CreateMessageL(const TDesC& aFile); |
|
54 |
|
55 CMsvSession& Session() {return *iSmsTest.iMsvSession;} |
|
56 CMsvEntry& MsvEntry() {return *iSmsTest.iMsvEntry;} |
|
57 CSmsClientMtm& Client() {return *iSmsTest.iSmsClientMtm;} |
|
58 |
|
59 CMsvEntrySelection* iReceived; |
|
60 TInt iCountWaits; |
|
61 |
|
62 |
|
63 CMsvEntry* iEntryForObserver; |
|
64 TInt iCurrentMessageNum; |
|
65 |
|
66 CSmsTestUtils& iSmsTest; |
|
67 CMsvEntrySelection* iSelection; |
|
68 CMsvOperation* iOperation; |
|
69 CTestTimer* iTimer; |
|
70 |
|
71 TInt iCurrentTest; |
|
72 |
|
73 CDir* iDir; |
|
74 |
|
75 enum TSmsSendTestState |
|
76 { |
|
77 EStateWaiting, |
|
78 EStateSending, |
|
79 EStateWaitingToReceive, |
|
80 EStateMessageReceived, |
|
81 EStateWaitingToReceiveAnyExtra |
|
82 } iState; |
|
83 }; |