|
1 // Copyright (c) 1997-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 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef __CSMSDELETE_H__ |
|
22 #define __CSMSDELETE_H__ |
|
23 |
|
24 #include "Te_LoopbackTestStepBase.h" |
|
25 #include "Te_LoopBackScriptEng.h" |
|
26 |
|
27 const TUint8 KTestPduF[]= { |
|
28 0x04, 0x0c, 0x91, 0x44, 0x77, 0x74, 0x60, 0x45, 0x61, 0x00, 0x00, 0x00, 0x30, |
|
29 0x71, 0x61, 0x03, 0x52, 0x00, 0x0a, 0xd4, 0xf2, 0x9c, 0x9e, 0x76, 0x9f, 0x5d, |
|
30 0x2e, 0x17 }; |
|
31 |
|
32 const TUint8 KTestPduG[]= { |
|
33 0x04, 0x0c, 0x91, 0x44, 0x77, 0x74, 0x60, 0x45, 0x61, 0x00, 0x00, 0x00, 0x30, |
|
34 0x71, 0x61, 0x03, 0x52, 0x00, 0x0a, 0xd4, 0xf2, 0x9c, 0x9e, 0x76, 0x9f, 0x5d, |
|
35 0x2e, 0x17 }; |
|
36 |
|
37 |
|
38 const struct TScript KDeleteSmsScript[]= { |
|
39 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
40 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
41 |
|
42 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
43 |
|
44 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
45 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
46 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
47 |
|
48 // |
|
49 // The initialisation string - we don't care what it is |
|
50 // |
|
51 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
52 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
53 |
|
54 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
55 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
56 |
|
57 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
58 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
59 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
60 |
|
61 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
62 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
63 |
|
64 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
65 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
66 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
67 |
|
68 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
69 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
70 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
71 |
|
72 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
73 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
74 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
75 |
|
76 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
77 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
78 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
79 |
|
80 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
81 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
82 |
|
83 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
84 { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
85 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
86 |
|
87 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
88 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
89 |
|
90 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
91 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
92 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
93 |
|
94 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
95 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
96 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
97 |
|
98 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
99 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
100 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
101 |
|
102 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
103 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
104 |
|
105 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
106 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
107 |
|
108 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
109 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
110 |
|
111 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
112 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
113 |
|
114 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
115 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
116 |
|
117 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
118 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
119 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
120 |
|
121 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
122 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
123 |
|
124 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
125 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
126 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
127 |
|
128 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
129 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
130 |
|
131 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
132 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
133 |
|
134 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
135 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
136 |
|
137 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
138 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
139 |
|
140 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
141 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
142 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
143 |
|
144 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
145 { ETxString, (TText8*)"+CBST: (0-7,12,14-16,34,36,38,39,43,47-51,65,66,68,70,71,75,79-81),(0,2),(1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
146 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
147 |
|
148 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
149 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
150 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
151 |
|
152 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
153 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
154 |
|
155 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
156 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
157 |
|
158 { ERxString, (TText8*)"AT+CPMS=\"MT\",\"MT\"", 0, ERxEvent }, |
|
159 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
160 |
|
161 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
162 { ETxString, (TText8*)"+CPMS: \"MT\",0,15,\"MT\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
163 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
164 |
|
165 { ERxString, (TText8*)"AT+CMGW = 26", 0, ERxEvent }, |
|
166 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
167 |
|
168 { ERxString, (TText8*)"3232323231323334353637383939383736353433323132323232\x1A", |
|
169 0, ERxEvent|EFailIfTimeOut }, |
|
170 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
171 |
|
172 { ERxString, (TText8*)"AT+CMGW = 26", 0, ERxEvent }, |
|
173 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
174 |
|
175 { ERxString, (TText8*)"003232323231323334353637383939383736353433323132323232\x1A", |
|
176 0, ERxEvent|EFailIfTimeOut }, |
|
177 { ETxString, (TText8*)"\r+CMGW: 2", 0, ETxEvent|EFailIfTimeOut }, |
|
178 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
179 |
|
180 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
181 { ETxString, (TText8*)"+CPMS: \"MT\",0,15,\"MT\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
182 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
183 |
|
184 { ERxString, (TText8*)"AT+CMGD=1", 0, ERxEvent }, |
|
185 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
186 |
|
187 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
188 { ETxString, (TText8*)"+CPMS: \"MT\",0,15,\"MT\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
189 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
190 |
|
191 { EWait, NULL, 1, ETimeOutEvent }, |
|
192 { EComplete, NULL, 0, 0 } |
|
193 }; |
|
194 |
|
195 |
|
196 // |
|
197 // CMTI Rx SMS messages |
|
198 // |
|
199 class CTestDriveSmsDelete : public CTestBase |
|
200 { |
|
201 public: |
|
202 static CTestDriveSmsDelete* NewL(const TScriptList aScriptListEntry); |
|
203 ~CTestDriveSmsDelete(); |
|
204 virtual TInt RunTestL(); |
|
205 |
|
206 protected: |
|
207 virtual TInt DriveETelApiL(); |
|
208 |
|
209 private: |
|
210 CTestDriveSmsDelete(const TScriptList aScriptListEntry); |
|
211 void TestSmsDeleteL(RMobileSmsStore& aSmsSimStore); |
|
212 void DisplayPhoneStoreInfo(RMobilePhoneStore::TMobilePhoneStoreInfoV1& aStoreInfo); |
|
213 |
|
214 TScriptList iScriptListEntry; |
|
215 }; |
|
216 |
|
217 |
|
218 class CTestSmsDelMess : public CATScriptEng |
|
219 { |
|
220 public: |
|
221 static CTestSmsDelMess* NewL(const TScript* aScript); |
|
222 ~CTestSmsDelMess(); |
|
223 |
|
224 virtual void SpecificAlgorithmL(TInt aParam); |
|
225 virtual void Complete(TInt aError); |
|
226 virtual TInt Start(); |
|
227 |
|
228 private: |
|
229 CTestSmsDelMess(const TScript* aScript); |
|
230 void ConstructL(); |
|
231 |
|
232 const TScript* iScript; |
|
233 }; |
|
234 |
|
235 |
|
236 #endif |