11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // |
14 // |
15 |
15 |
16 #include "TE_SMSEMSPRTBASE.h" |
|
17 #include "TE_SMSEMSPRT.h" |
16 #include "TE_SMSEMSPRT.h" |
18 |
17 |
19 #if defined (__WINS__) |
18 _LIT(KBasicSmsText,"abcdefghijklmnopqrstuvwxyz"); // The basic text we send - 26 chars long |
20 #define PDD_NAME _L("ECDRV") |
|
21 #define LDD_NAME _L("ECOMM") |
|
22 #else |
|
23 #define PDD_NAME _L("EUART1") |
|
24 #define LDD_NAME _L("ECOMM") |
|
25 #endif |
|
26 |
|
27 |
|
28 TVerdict CTestInit::doTestStepL() |
|
29 { |
|
30 User::LeaveIfError(iFs.Connect()); |
|
31 |
|
32 TRAPD( ret, ParseSettingsFromFileL()); |
|
33 if (ret != KErrNone) |
|
34 { |
|
35 INFO_PRINTF2(_L("ParseSettingsFromFileL [err=%d]"), ret); |
|
36 } |
|
37 |
|
38 iSmsStackTestUtils = CSmsStackTestUtils::NewL(this, iFs); |
|
39 |
|
40 INFO_PRINTF2(_L("TelNo: [%S]"), &iTelephoneNumber); |
|
41 INFO_PRINTF2(_L("ScNo: [%S]"), &iServiceCenterNumber); |
|
42 |
|
43 CommInit(); |
|
44 iSmsStackTestUtils->CopyConfigFileL(KTSmsEmsPrtConfigFileName); |
|
45 |
|
46 delete iSmsStackTestUtils; |
|
47 iSmsStackTestUtils = NULL; |
|
48 |
|
49 iFs.Close(); |
|
50 |
|
51 return TestStepResult(); |
|
52 } |
|
53 |
|
54 |
19 |
55 TVerdict CTestEmsFormatA::doTestStepL() |
20 TVerdict CTestEmsFormatA::doTestStepL() |
56 { |
21 { |
57 // send a message 26 characters long |
22 // send a message 26 characters long |
58 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
23 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
59 |
24 |
60 // create the formatting object |
25 // create the formatting object |
61 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
26 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
62 object->SetStartPosition(5); |
27 object->SetStartPosition(5); |
63 object->SetFormatLength(20); |
28 object->SetFormatLength(20); |
70 SendReceiveMsgL(*smsMessage); |
35 SendReceiveMsgL(*smsMessage); |
71 CleanupStack::PopAndDestroy(smsMessage); |
36 CleanupStack::PopAndDestroy(smsMessage); |
72 return TestStepResult(); |
37 return TestStepResult(); |
73 } |
38 } |
74 |
39 |
75 |
|
76 TVerdict CTestEmsFormatB::doTestStepL() |
40 TVerdict CTestEmsFormatB::doTestStepL() |
77 { |
41 { |
78 TBuf<26*8> buf; |
42 TBuf<26*8> buf; |
79 |
43 |
80 // create a buffer based on KBasicSmsText |
44 // create a buffer based on KBasicSmsText |
81 for (TInt i = 0; i < 8; ++i) |
45 for (TInt i = 0; i < 8; ++i) |
82 { |
46 { |
83 buf.Append(KBasicSmsText); |
47 buf.Append(KBasicSmsText); |
84 } |
48 } |
85 |
49 |
86 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf); |
50 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
87 |
51 |
88 // create the formatting object |
52 // create the formatting object |
89 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
53 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
90 object->SetStartPosition(120); |
54 object->SetStartPosition(120); |
91 object->SetFormatLength(60); |
55 object->SetFormatLength(60); |
98 SendReceiveMsgL(*smsMessage); |
62 SendReceiveMsgL(*smsMessage); |
99 CleanupStack::PopAndDestroy(smsMessage); |
63 CleanupStack::PopAndDestroy(smsMessage); |
100 return TestStepResult(); |
64 return TestStepResult(); |
101 } |
65 } |
102 |
66 |
103 |
|
104 TVerdict CTestEmsFormatC::doTestStepL() |
67 TVerdict CTestEmsFormatC::doTestStepL() |
105 { |
68 { |
106 TBuf<26*8> buf; |
69 TBuf<26*8> buf; |
107 |
70 |
108 // create a buffer based on KBasicSmsText |
71 // create a buffer based on KBasicSmsText |
109 for (TInt i = 0; i < 8; ++i) |
72 for (TInt i = 0; i < 8; ++i) |
110 { |
73 { |
111 buf.Append(KBasicSmsText); |
74 buf.Append(KBasicSmsText); |
112 } |
75 } |
113 |
76 |
114 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet7Bit); |
77 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet7Bit); |
115 |
78 |
116 // create the formatting object |
79 // create the formatting object |
117 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
80 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
118 object->SetStartPosition(120); |
81 object->SetStartPosition(120); |
119 object->SetFormatLength(60); |
82 object->SetFormatLength(60); |
126 SendReceiveMsgL(*smsMessage); |
89 SendReceiveMsgL(*smsMessage); |
127 CleanupStack::PopAndDestroy(smsMessage); |
90 CleanupStack::PopAndDestroy(smsMessage); |
128 return TestStepResult(); |
91 return TestStepResult(); |
129 } |
92 } |
130 |
93 |
131 |
|
132 TVerdict CTestEmsFormatD::doTestStepL() |
94 TVerdict CTestEmsFormatD::doTestStepL() |
133 { |
95 { |
134 TBuf<26*4> buf; |
96 TBuf<26*4> buf; |
135 |
97 |
136 // create a buffer based on KBasicSmsText |
98 // create a buffer based on KBasicSmsText |
137 for (TInt i = 0; i < 4; ++i) |
99 for (TInt i = 0; i < 4; ++i) |
138 { |
100 { |
139 buf.Append(KBasicSmsText); |
101 buf.Append(KBasicSmsText); |
140 } |
102 } |
141 |
103 |
142 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabetUCS2); |
104 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabetUCS2); |
143 |
105 |
144 // create the formatting object |
106 // create the formatting object |
145 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
107 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
146 object->SetStartPosition(60); |
108 object->SetStartPosition(60); |
147 object->SetFormatLength(30); |
109 object->SetFormatLength(30); |
154 SendReceiveMsgL(*smsMessage); |
116 SendReceiveMsgL(*smsMessage); |
155 CleanupStack::PopAndDestroy(smsMessage); |
117 CleanupStack::PopAndDestroy(smsMessage); |
156 return TestStepResult(); |
118 return TestStepResult(); |
157 } |
119 } |
158 |
120 |
159 |
|
160 TVerdict CTestEmsFormatE::doTestStepL() |
121 TVerdict CTestEmsFormatE::doTestStepL() |
161 { |
122 { |
162 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
123 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
163 |
124 |
164 // create the formatting object - set the start position to be out of range |
125 // create the formatting object - set the start position to be out of range |
165 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
126 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
166 CleanupStack::PushL(object); |
127 CleanupStack::PushL(object); |
167 |
128 |
199 { |
159 { |
200 buf.Append(KBasicSmsText); |
160 buf.Append(KBasicSmsText); |
201 } |
161 } |
202 |
162 |
203 // send a message 26*8 characters long |
163 // send a message 26*8 characters long |
204 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf); |
164 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
205 |
165 |
206 // create the formatting object |
166 // create the formatting object |
207 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
167 CEmsFormatIE* object = CEmsFormatIE::NewL(); |
208 object->SetStartPosition(160); |
168 object->SetStartPosition(160); |
209 object->SetFormatLength(40); |
169 object->SetFormatLength(40); |
216 SendReceiveMsgL(*smsMessage); |
176 SendReceiveMsgL(*smsMessage); |
217 CleanupStack::PopAndDestroy(smsMessage); |
177 CleanupStack::PopAndDestroy(smsMessage); |
218 return TestStepResult(); |
178 return TestStepResult(); |
219 } |
179 } |
220 |
180 |
221 |
|
222 TVerdict CTestEmsSoundA::doTestStepL() |
181 TVerdict CTestEmsSoundA::doTestStepL() |
223 { |
182 { |
224 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
183 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
225 |
184 |
226 // create the sound object - EChimes at pos 5 |
185 // create the sound object - EChimes at pos 5 |
227 CEmsPreDefSoundIE* object = |
186 CEmsPreDefSoundIE* object = |
228 CEmsPreDefSoundIE::NewL(CEmsPreDefSoundIE::EChimesLow); |
187 CEmsPreDefSoundIE::NewL(CEmsPreDefSoundIE::EChimesLow); |
229 object->SetStartPosition(5); |
188 object->SetStartPosition(5); |
242 SendReceiveMsgL(*smsMessage); |
201 SendReceiveMsgL(*smsMessage); |
243 CleanupStack::PopAndDestroy(smsMessage); |
202 CleanupStack::PopAndDestroy(smsMessage); |
244 return TestStepResult(); |
203 return TestStepResult(); |
245 } |
204 } |
246 |
205 |
247 |
|
248 TVerdict CTestEmsSoundB::doTestStepL() |
206 TVerdict CTestEmsSoundB::doTestStepL() |
249 { |
207 { |
250 // User melody |
208 // User melody |
251 _LIT8(KUserMelody, "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" |
209 _LIT8(KUserMelody, "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" |
252 "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"); |
210 "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"); |
253 |
211 |
254 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
212 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
255 |
213 |
256 // create one melody at position 20 |
214 // create one melody at position 20 |
257 CEmsSoundIE* object = |
215 CEmsSoundIE* object = |
258 CEmsSoundIE::NewL(KUserMelody()); |
216 CEmsSoundIE::NewL(KUserMelody()); |
259 object->SetStartPosition(20); |
217 object->SetStartPosition(20); |
271 // Send and receive message |
229 // Send and receive message |
272 SendReceiveMsgL(*smsMessage); |
230 SendReceiveMsgL(*smsMessage); |
273 CleanupStack::PopAndDestroy(smsMessage); |
231 CleanupStack::PopAndDestroy(smsMessage); |
274 return TestStepResult(); |
232 return TestStepResult(); |
275 } |
233 } |
276 |
|
277 |
234 |
278 TVerdict CTestEmsSoundC::doTestStepL() |
235 TVerdict CTestEmsSoundC::doTestStepL() |
279 { |
236 { |
280 TBuf<26*4> buf; |
237 TBuf<26*4> buf; |
281 |
238 |
283 for (TInt i = 0; i < 4; ++i) |
240 for (TInt i = 0; i < 4; ++i) |
284 { |
241 { |
285 buf.Append(KBasicSmsText); |
242 buf.Append(KBasicSmsText); |
286 } |
243 } |
287 |
244 |
288 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf); |
245 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
289 |
246 |
290 // Create a 128-byte sound - fill it with byte 0x02 |
247 // Create a 128-byte sound - fill it with byte 0x02 |
291 TBuf8<128> soundBuf; |
248 TBuf8<128> soundBuf; |
292 soundBuf.Fill(TChar(0x02), 128); |
249 soundBuf.Fill(TChar(0x02), 128); |
293 |
250 |
310 SendReceiveMsgL(*smsMessage); |
267 SendReceiveMsgL(*smsMessage); |
311 CleanupStack::PopAndDestroy(smsMessage); |
268 CleanupStack::PopAndDestroy(smsMessage); |
312 return TestStepResult(); |
269 return TestStepResult(); |
313 } |
270 } |
314 |
271 |
315 |
|
316 TVerdict CTestEmsSoundD::doTestStepL() |
272 TVerdict CTestEmsSoundD::doTestStepL() |
317 { |
273 { |
318 // Create a 130-byte sound - fill it with byte 0x02 |
274 // Create a 130-byte sound - fill it with byte 0x02 |
319 TBuf8<130> soundBuf; |
275 TBuf8<130> soundBuf; |
320 soundBuf.Fill(TChar(0x02), 130); |
276 soundBuf.Fill(TChar(0x02), 130); |
325 TRAP(ret, CEmsSoundIE::NewL(soundBuf)); |
281 TRAP(ret, CEmsSoundIE::NewL(soundBuf)); |
326 TEST(ret != KErrNone); |
282 TEST(ret != KErrNone); |
327 return TestStepResult(); |
283 return TestStepResult(); |
328 } |
284 } |
329 |
285 |
330 |
|
331 TVerdict CTestEmsPicture::doTestStepL() |
286 TVerdict CTestEmsPicture::doTestStepL() |
332 { |
287 { |
333 // Create a standard message |
288 // Create a standard message |
334 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
289 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
335 |
290 |
336 for (TInt i = 0; i < 3; ++i) |
291 for (TInt i = 0; i < 3; ++i) |
337 { |
292 { |
338 // Create the picture objects and set the start positions to |
293 // Create the picture objects and set the start positions to |
339 // be at 0, 10, and 20. These pictures are loaded from |
294 // be at 0, 10, and 20. These pictures are loaded from |
343 CleanupStack::PushL(picture); |
298 CleanupStack::PushL(picture); |
344 smsMessage->AddEMSInformationElementL(*picture); |
299 smsMessage->AddEMSInformationElementL(*picture); |
345 CleanupStack::PopAndDestroy(picture); |
300 CleanupStack::PopAndDestroy(picture); |
346 } |
301 } |
347 |
302 |
348 |
303 // Send and receive message |
349 // Send and receive message |
304 SendReceiveMsgL(*smsMessage); |
350 SendReceiveMsgL(*smsMessage); |
305 CleanupStack::PopAndDestroy(smsMessage); |
351 CleanupStack::PopAndDestroy(smsMessage); |
306 return TestStepResult(); |
352 return TestStepResult(); |
307 } |
353 } |
|
354 |
|
355 |
308 |
356 TVerdict CTestEmsAnimation::doTestStepL() |
309 TVerdict CTestEmsAnimation::doTestStepL() |
357 { |
310 { |
358 // Create a standard message |
311 // Create a standard message |
359 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
312 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
360 |
313 |
361 for (TInt i = 0; i < 2; ++i) |
314 for (TInt i = 0; i < 2; ++i) |
362 { |
315 { |
363 // Create the animation object and set the start positions to |
316 // Create the animation object and set the start positions to |
364 // be at 0 and 10 |
317 // be at 0 and 10 |
381 SendReceiveMsgL(*smsMessage); |
334 SendReceiveMsgL(*smsMessage); |
382 CleanupStack::PopAndDestroy(smsMessage); |
335 CleanupStack::PopAndDestroy(smsMessage); |
383 return TestStepResult(); |
336 return TestStepResult(); |
384 } |
337 } |
385 |
338 |
386 |
|
387 TVerdict CTestEmsUserPromptA::doTestStepL() |
339 TVerdict CTestEmsUserPromptA::doTestStepL() |
388 { |
340 { |
389 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
341 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
390 |
342 |
391 // Create a 32-byte sound - fill it with byte 0x02 |
343 // Create a 32-byte sound - fill it with byte 0x02 |
392 TBuf8<32> soundBuf; |
344 TBuf8<32> soundBuf; |
393 soundBuf.Fill(TChar(0x02), 32); |
345 soundBuf.Fill(TChar(0x02), 32); |
394 |
346 |
418 SendReceiveMsgL(*smsMessage); |
370 SendReceiveMsgL(*smsMessage); |
419 CleanupStack::PopAndDestroy(smsMessage); |
371 CleanupStack::PopAndDestroy(smsMessage); |
420 return TestStepResult(); |
372 return TestStepResult(); |
421 } |
373 } |
422 |
374 |
423 |
|
424 TVerdict CTestEmsUserPromptB::doTestStepL() |
375 TVerdict CTestEmsUserPromptB::doTestStepL() |
425 { |
376 { |
426 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
377 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
427 |
378 |
428 // Create a 32-byte sound - fill it with byte 0x02 |
379 // Create a 32-byte sound - fill it with byte 0x02 |
429 TBuf8<32> soundBuf; |
380 TBuf8<32> soundBuf; |
430 soundBuf.Fill(TChar(0x02), 32); |
381 soundBuf.Fill(TChar(0x02), 32); |
431 |
382 |
472 for (TInt i = 0; i < 4; ++i) |
423 for (TInt i = 0; i < 4; ++i) |
473 { |
424 { |
474 buf.Append(KBasicSmsText); |
425 buf.Append(KBasicSmsText); |
475 } |
426 } |
476 |
427 |
477 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf, aAlphabet); |
428 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, aAlphabet); |
478 |
429 |
479 // Create the format object |
430 // Create the format object |
480 CEmsFormatIE* format = CEmsFormatIE::NewL(); |
431 CEmsFormatIE* format = CEmsFormatIE::NewL(); |
481 format->SetStartPosition(30); |
432 format->SetStartPosition(30); |
482 format->SetFormatLength(70); |
433 format->SetFormatLength(70); |
505 // Send the message |
456 // Send the message |
506 SendSmsL(smsMessage, iSocket); |
457 SendSmsL(smsMessage, iSocket); |
507 CleanupStack::PopAndDestroy(smsMessage); |
458 CleanupStack::PopAndDestroy(smsMessage); |
508 } |
459 } |
509 |
460 |
510 |
|
511 TVerdict CTestEmsLongMessageA::doTestStepL() |
461 TVerdict CTestEmsLongMessageA::doTestStepL() |
512 { |
462 { |
513 StepWithCharSetL(TSmsDataCodingScheme::ESmsAlphabet8Bit); |
463 StepWithCharSetL(TSmsDataCodingScheme::ESmsAlphabet8Bit); |
514 return TestStepResult(); |
464 return TestStepResult(); |
515 } |
465 } |
516 |
466 |
517 |
|
518 TVerdict CTestEmsLongMessageB::doTestStepL() |
467 TVerdict CTestEmsLongMessageB::doTestStepL() |
519 { |
468 { |
520 StepWithCharSetL(TSmsDataCodingScheme::ESmsAlphabet7Bit); |
469 StepWithCharSetL(TSmsDataCodingScheme::ESmsAlphabet7Bit); |
521 return TestStepResult(); |
470 return TestStepResult(); |
522 } |
471 } |
523 |
472 |
524 |
|
525 TVerdict CTestEmsLongMessageC::doTestStepL() |
473 TVerdict CTestEmsLongMessageC::doTestStepL() |
526 { |
474 { |
527 StepWithCharSetL(TSmsDataCodingScheme::ESmsAlphabetUCS2); |
475 StepWithCharSetL(TSmsDataCodingScheme::ESmsAlphabetUCS2); |
528 return TestStepResult(); |
476 return TestStepResult(); |
529 } |
477 } |
530 |
|
531 |
478 |
532 TVerdict CTestEmsUnsupportedIE::doTestStepL() |
479 TVerdict CTestEmsUnsupportedIE::doTestStepL() |
533 { |
480 { |
534 TBuf<10> buf; |
481 TBuf<10> buf; |
535 buf.Fill('A', 10); |
482 buf.Fill('A', 10); |
536 |
483 |
537 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf); |
484 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
538 |
485 |
539 // Create a 4-byte sound - fill it with byte 0x02 |
486 // Create a 4-byte sound - fill it with byte 0x02 |
540 TBuf8<4> soundBuf; |
487 TBuf8<4> soundBuf; |
541 soundBuf.Fill(TChar(0x02), 4); |
488 soundBuf.Fill(TChar(0x02), 4); |
542 CEmsSoundIE* object = |
489 CEmsSoundIE* object = |
553 SendReceiveMsgL(*smsMessage); |
500 SendReceiveMsgL(*smsMessage); |
554 CleanupStack::PopAndDestroy(smsMessage); |
501 CleanupStack::PopAndDestroy(smsMessage); |
555 return TestStepResult(); |
502 return TestStepResult(); |
556 } |
503 } |
557 |
504 |
558 |
|
559 TVerdict CTestEmsUnsorted::doTestStepL() |
505 TVerdict CTestEmsUnsorted::doTestStepL() |
560 { |
506 { |
561 TBuf<10> buf; |
507 TBuf<10> buf; |
562 buf.Fill('A', 10); |
508 buf.Fill('A', 10); |
563 |
509 |
564 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf); |
510 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
565 |
511 |
566 // Create a 4-byte sound - fill it with byte 0x02 |
512 // Create a 4-byte sound - fill it with byte 0x02 |
567 TBuf8<4> soundBuf; |
513 TBuf8<4> soundBuf; |
568 soundBuf.Fill(TChar(0x02), 4); |
514 soundBuf.Fill(TChar(0x02), 4); |
569 CEmsSoundIE* sound = |
515 CEmsSoundIE* sound = |
613 SendReceiveMsgL(*smsMessage); |
559 SendReceiveMsgL(*smsMessage); |
614 CleanupStack::PopAndDestroy(smsMessage); |
560 CleanupStack::PopAndDestroy(smsMessage); |
615 return TestStepResult(); |
561 return TestStepResult(); |
616 } |
562 } |
617 |
563 |
618 |
|
619 TVerdict CTestEmsODIA::doTestStepL() |
564 TVerdict CTestEmsODIA::doTestStepL() |
620 { |
565 { |
621 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
566 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
622 |
567 |
623 // Create a 32-byte sound - fill it with byte 0x02 |
568 // Create a 32-byte sound - fill it with byte 0x02 |
624 TBuf8<32> soundBuf; |
569 TBuf8<32> soundBuf; |
625 soundBuf.Fill(TChar(0x02), 32); |
570 soundBuf.Fill(TChar(0x02), 32); |
626 |
571 |
650 SendReceiveMsgL(*smsMessage); |
595 SendReceiveMsgL(*smsMessage); |
651 CleanupStack::PopAndDestroy(smsMessage); |
596 CleanupStack::PopAndDestroy(smsMessage); |
652 return TestStepResult(); |
597 return TestStepResult(); |
653 } |
598 } |
654 |
599 |
655 |
|
656 TVerdict CTestEmsODIB::doTestStepL() |
600 TVerdict CTestEmsODIB::doTestStepL() |
657 { |
601 { |
658 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
602 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
659 |
603 |
660 // Create a 32-byte sound - fill it with byte 0x02 |
604 // Create a 32-byte sound - fill it with byte 0x02 |
661 TBuf8<32> soundBuf; |
605 TBuf8<32> soundBuf; |
662 soundBuf.Fill(TChar(0x02), 32); |
606 soundBuf.Fill(TChar(0x02), 32); |
663 |
607 |
693 SendReceiveMsgL(*smsMessage); |
637 SendReceiveMsgL(*smsMessage); |
694 CleanupStack::PopAndDestroy(smsMessage); |
638 CleanupStack::PopAndDestroy(smsMessage); |
695 return TestStepResult(); |
639 return TestStepResult(); |
696 } |
640 } |
697 |
641 |
698 |
|
699 TVerdict CTestEmsODIC::doTestStepL() |
642 TVerdict CTestEmsODIC::doTestStepL() |
700 { |
643 { |
701 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
644 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
702 |
645 |
703 // Create a 32-byte sound - fill it with byte 0x02 |
646 // Create a 32-byte sound - fill it with byte 0x02 |
704 TBuf8<32> soundBuf; |
647 TBuf8<32> soundBuf; |
705 soundBuf.Fill(TChar(0x02), 32); |
648 soundBuf.Fill(TChar(0x02), 32); |
706 |
649 |
750 SendReceiveMsgL(*smsMessage); |
693 SendReceiveMsgL(*smsMessage); |
751 CleanupStack::PopAndDestroy(smsMessage); |
694 CleanupStack::PopAndDestroy(smsMessage); |
752 return TestStepResult(); |
695 return TestStepResult(); |
753 } |
696 } |
754 |
697 |
755 |
|
756 TVerdict CTestEmsODID::doTestStepL() |
698 TVerdict CTestEmsODID::doTestStepL() |
757 { |
699 { |
758 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
700 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
759 |
701 |
760 // Create a 32-byte sound - fill it with byte 0x02 |
702 // Create a 32-byte sound - fill it with byte 0x02 |
761 TBuf8<32> soundBuf; |
703 TBuf8<32> soundBuf; |
762 soundBuf.Fill(TChar(0x02), 32); |
704 soundBuf.Fill(TChar(0x02), 32); |
763 |
705 |
786 SendReceiveMsgL(*smsMessage); |
728 SendReceiveMsgL(*smsMessage); |
787 CleanupStack::PopAndDestroy(smsMessage); |
729 CleanupStack::PopAndDestroy(smsMessage); |
788 return TestStepResult(); |
730 return TestStepResult(); |
789 } |
731 } |
790 |
732 |
791 |
|
792 TVerdict CTestEmsODIE::doTestStepL() |
733 TVerdict CTestEmsODIE::doTestStepL() |
793 { |
734 { |
794 TBuf<26*4> buf; |
735 TBuf<26*4> buf; |
795 |
736 |
796 // create a buffer based on KBasicSmsText |
737 // create a buffer based on KBasicSmsText |
797 for (TInt i = 0; i < 4; ++i) |
738 for (TInt i = 0; i < 4; ++i) |
798 { |
739 { |
799 buf.Append(KBasicSmsText); |
740 buf.Append(KBasicSmsText); |
800 } |
741 } |
801 |
742 |
802 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
743 CSmsMessage* smsMessage = CreateSmsMessageLC(buf, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
803 |
744 |
804 // Create the format object |
745 // Create the format object |
805 CEmsFormatIE* format = CEmsFormatIE::NewL(); |
746 CEmsFormatIE* format = CEmsFormatIE::NewL(); |
806 format->SetStartPosition(30); |
747 format->SetStartPosition(30); |
807 format->SetFormatLength(70); |
748 format->SetFormatLength(70); |
845 SendSmsL(smsMessage, iSocket); |
786 SendSmsL(smsMessage, iSocket); |
846 CleanupStack::PopAndDestroy(smsMessage); |
787 CleanupStack::PopAndDestroy(smsMessage); |
847 return TestStepResult(); |
788 return TestStepResult(); |
848 } |
789 } |
849 |
790 |
850 |
|
851 TVerdict CTestEmsODIF::doTestStepL() |
791 TVerdict CTestEmsODIF::doTestStepL() |
852 { |
792 { |
853 CSmsMessage* smsMessage = ConfigCreateSmsMessageLC(KBasicSmsText); |
793 CSmsMessage* smsMessage = CreateSmsMessageLC(KBasicSmsText, TSmsDataCodingScheme::ESmsAlphabet8Bit); |
854 |
794 |
855 // Create a 32-byte sound - fill it with byte 0x02 |
795 // Create a 32-byte sound - fill it with byte 0x02 |
856 TBuf8<32> soundBuf; |
796 TBuf8<32> soundBuf; |
857 soundBuf.Fill(TChar(0x02), 32); |
797 soundBuf.Fill(TChar(0x02), 32); |
858 |
798 |