13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
|
19 |
|
20 /** |
18 /** |
21 @file |
19 @file |
|
20 @test |
22 */ |
21 */ |
23 |
22 |
24 #if (!defined __WAPPROT_SUITE_STEP_BASE__) |
23 #ifndef WAPPROTSUITESTEPBASE_H |
25 #define __WAPPROT_SUITE_STEP_BASE__ |
24 #define WAPPROTSUITESTEPBASE_H |
26 #include <test/testexecutestepbase.h> |
25 |
|
26 #include "smsstackbaseteststeps.h" |
|
27 |
27 #include <connect/sbeclient.h> |
28 #include <connect/sbeclient.h> |
28 |
|
29 #include <es_sock.h> |
|
30 #include <es_wsms.h> |
29 #include <es_wsms.h> |
31 #include <smsuaddr.h> |
|
32 #include <gsmumsg.h> |
|
33 #include <gsmubuf.h> |
|
34 |
|
35 #include <c32comm.h> |
|
36 #include <etel.h> |
|
37 #include <e32property.h> |
|
38 #include <simtsy.h> |
|
39 #include <smsuaddr.h> |
|
40 #include <etelmm.h> |
30 #include <etelmm.h> |
41 #include "WapProtSuiteDefs.h" |
|
42 #include "wap_sock.h" |
|
43 #include "smsustrm.h" |
|
44 |
31 |
45 #if defined (__WINS__) |
32 #if defined (__WINS__) |
46 #define PDD_NAME _L("ECDRV") |
33 #define PDD_NAME _L("ECDRV") |
47 #define PDD_NAME2 _L("ECDRV") |
34 #define PDD_NAME2 _L("ECDRV") |
48 #define LDD_NAME _L("ECOMM") |
35 #define LDD_NAME _L("ECOMM") |
51 #define LDD_NAME _L("ECOMM") |
38 #define LDD_NAME _L("ECOMM") |
52 #endif |
39 #endif |
53 |
40 |
54 using namespace conn; |
41 using namespace conn; |
55 |
42 |
56 |
43 class CWapProtSuiteStepBase : public CSmsBaseTestStep |
57 // Location and name of the RSC file. |
|
58 _LIT(KSMSUResourceDir, "C:\\private\\101f7989\\sms\\"); |
|
59 _LIT(KSMSUResourceFile, "C:\\private\\101f7989\\sms\\smsu.rsc"); |
|
60 // Location of directory for reserving disk space |
|
61 _LIT(KTempDiskSpaceDirName, "C:\\sms\\temp\\"); |
|
62 |
|
63 class CWapProtSuiteStepBase : public CTestStep |
|
64 { |
44 { |
65 public: |
45 public: |
66 virtual TVerdict doTestStepPreambleL(); |
46 virtual TVerdict doTestStepPreambleL(); |
67 virtual TVerdict doTestStepPostambleL(); |
47 virtual TVerdict doTestStepPostambleL(); |
|
48 |
|
49 void SetupWapSocketL(); |
|
50 void SetupWapSocketL(RSocket& aSocket, TWapAddr& aWapAddr, const TDesC& aPort, TBool aNewStyleClient = ETrue); |
|
51 //Socket for receiving status reports |
|
52 void SetupStatusReportSocketL(); |
68 |
53 |
69 |
54 void ReadWapPortSettingsL(TWapAddr& aWapAddr, const TDesC& aPort); |
70 |
|
71 //Utitilies |
|
72 void WaitForRecvL(RSocket& aSocket); |
|
73 CSmsMessage* RecvSmsL(RSocket& aSocket, TInt aIoctl = KIoctlReadMessageSucceeded); |
|
74 TUint64 SetHighLowLimitsAndDiskSpaceLevelL(TUint aHighDrop, TUint aLowDrop, TUint aFreeDrop, TUint64 aMax=0x7fffffff); |
|
75 void SetFreeDiskSpaceFromDropLevelL(TUint aFreeDrop); |
|
76 void SetLowHighLimitsInSmsuRscL(TInt64 aLowLimit, TInt64 aHighLimit); |
|
77 void SetFreeDiskSpaceL(TInt64 aNewFreeValue); |
|
78 void ReleaseDiskSpaceL(); |
|
79 void ReadWapPortSettingsL(TWapAddr &aWapAddr); |
|
80 void SetTestNumberL(); |
|
81 void SetWapAddrL(); |
|
82 void SetCodingSchemeL(); |
55 void SetCodingSchemeL(); |
83 void SetMessageTypeL(); |
56 void SetMessageTypeL(); |
84 |
|
85 //Socket for receiving status reports |
|
86 void SetupStatusReportSocketL(); |
|
87 |
|
88 private: |
|
89 void CheckSmsMessageL(CSmsMessage& aSmsmessagebuf, TPtrC8& aScnumber); |
|
90 |
57 |
91 protected: |
58 protected: |
92 void WaitForInitializeL(); |
|
93 void InternaliseSmsDataAndCheckL(TDes8& aBuffer , TPtrC8& aScnumber); |
59 void InternaliseSmsDataAndCheckL(TDes8& aBuffer , TPtrC8& aScnumber); |
94 TInt GetMessageParameterLengthL(RSocket& aSock); |
60 TInt GetMessageParameterLengthL(RSocket& aSock); |
95 void GetMessageParameterL(RSocket& aSock, TPtr8& aParameterStorePtr); |
61 void GetMessageParameterL(RSocket& aSock, TPtr8& aParameterStorePtr); |
96 void OpenSocketLC(RSocketServ& aSocketServer, RSocket& aSocket, TUint aAddrFamily = KWAPSMSAddrFamily, TUint aProtocol =KWAPSMSDatagramProtocol); |
62 |
97 void OpenSocketL(RSocketServ& aSocketServer, RSocket& aSocket, TUint aAddrFamily = KWAPSMSAddrFamily, TUint aProtocol =KWAPSMSDatagramProtocol); |
63 void OpenSocketLC(RSocketServ& aSocketServer, RSocket& aSocket, TUint aAddrFamily = KWAPSMSAddrFamily, TUint aProtocol =KWAPSMSDatagramProtocol); |
|
64 void OpenSocketL(RSocketServ& aSocketServer, RSocket& aSocket, TUint aAddrFamily = KWAPSMSAddrFamily, TUint aProtocol =KWAPSMSDatagramProtocol); |
|
65 |
|
66 void ReceiveWapMessageFromSocket(TInt aLength, TPtrC& aData); |
|
67 void ReceiveWapMessage(TPtrC& aData); |
|
68 void SendWapMessage(TPtrC& aData); |
|
69 |
|
70 private: |
|
71 void CheckSmsMessageL(CSmsMessage& aSmsmessagebuf, TPtrC8& aScnumber); |
98 |
72 |
99 protected: |
73 protected: |
100 CActiveScheduler* iScheduler; |
|
101 CSBEClient* iSecureBackupEngine; |
|
102 RSocketServ iSocketServer; |
|
103 RSocket iSocket; |
74 RSocket iSocket; |
104 RSocket iStatusReportSocket; |
75 RSocket iStatusReportSocket; |
105 TWapAddr iWapAddr; |
76 TWapAddr iWapAddr; |
106 TWapSmsDataCodingScheme iCodingScheme; |
|
107 TSmsAddr iSmsAddr; |
77 TSmsAddr iSmsAddr; |
108 }; |
78 }; |
109 |
79 |
110 #endif |
80 #endif // WAPPROTSUITESTEPBASE_H |