0
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Spesific class for SMS tests
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef SMS_H
|
|
22 |
#define SMS_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include "core.h"
|
|
26 |
|
|
27 |
#include <ctsy/serviceapi/cmmsmsutility.h>
|
|
28 |
#include <stiflogger.h>
|
|
29 |
#include <testscripterinternal.h>
|
|
30 |
#include <stiftestmodule.h>
|
|
31 |
|
|
32 |
#if ( NCP_COMMON_S60_VERSION_SUPPORT == S60_VERSION_32 )
|
|
33 |
#include "cmmsmstsy.h"
|
|
34 |
#include <mmmmesshandlerbase.h>
|
|
35 |
#else
|
|
36 |
#include "cmmsmstsy_export_to_roots.h"
|
|
37 |
#endif
|
|
38 |
|
|
39 |
// Logging path
|
|
40 |
_LIT( KSMSLogPath, "\\logs\\testframework\\SMS\\" );
|
|
41 |
// Log file
|
|
42 |
_LIT( KSMSLogFile, "SMS.txt" );
|
|
43 |
|
|
44 |
_LIT(KIscControlTestCaseFileSMS, "nokiatsy_sms.xml");
|
|
45 |
|
|
46 |
// CONSTANTS
|
|
47 |
|
|
48 |
const TUint TKGsmLibConvertToGsmFormat = 1;
|
|
49 |
const TUint TKGsmLibConvertToNmpFormat = 2;
|
|
50 |
|
|
51 |
//Maximum amount of digits in address data
|
|
52 |
const TUint8 KMaxLengthOfAddressData = 10;
|
|
53 |
|
|
54 |
// The number of codes that exist in
|
|
55 |
// both character sets (GSM <--> NMP),
|
|
56 |
// i.e. bidirectional conversions.
|
|
57 |
const TUint8 TKGsmLibBidirTableSize = 34;
|
|
58 |
|
|
59 |
// The number of all conversion pairs,
|
|
60 |
// both GSM <--> NMP and NMP --> substitute.
|
|
61 |
const TUint8 TKGsmLibConvTableSize = 86;
|
|
62 |
|
|
63 |
|
|
64 |
const TUint TKGsmLibAToNTableSize = 41;
|
|
65 |
|
|
66 |
typedef struct
|
|
67 |
{
|
|
68 |
TUint8 iSmsChar;
|
|
69 |
TUint8 iHandsetChar;
|
|
70 |
} GsmLibConv;
|
|
71 |
|
|
72 |
typedef struct
|
|
73 |
{
|
|
74 |
TUint8 iGsmChar;
|
|
75 |
TUint16 iUnicodeChar;
|
|
76 |
} TGsmLibConv;
|
|
77 |
|
|
78 |
// This table is used when a sms message is being unpacked.
|
|
79 |
static const TUint TKGsmLibSmsUnpackMaskTable[ 8 ] =
|
|
80 |
{ 0x7F, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F };
|
|
81 |
|
|
82 |
// This table is used when a sms message is being unpacked.
|
|
83 |
static const TUint KGsmLibSmsUnpackMaskTable[ 8 ] =
|
|
84 |
{ 0x7F, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F };
|
|
85 |
|
|
86 |
const TUint8 TKGsmExtensionConvTableSize = 8;
|
|
87 |
|
|
88 |
|
|
89 |
static const GsmLibConv TKGsmExtensionConvTable[
|
|
90 |
TKGsmExtensionConvTableSize ] =
|
|
91 |
{
|
|
92 |
/*1*/ { 0x3C, 0x5B }, // [ //
|
|
93 |
/*2*/ { 0x2F, 0x5C }, // \ //
|
|
94 |
/*3*/ { 0x3E, 0x5D }, // ] //
|
|
95 |
/*4*/ { 0x14, 0x5E }, // ^ //
|
|
96 |
/*5*/ { 0x28, 0x7B }, // { //
|
|
97 |
/*6*/ { 0x40, 0x7C }, // | //
|
|
98 |
/*7*/ { 0x29, 0x7D }, // } //
|
|
99 |
/*8*/ { 0x3D, 0x7E } // ~ //
|
|
100 |
};
|
|
101 |
|
|
102 |
|
|
103 |
const TUint8 KGsmExtensionConvTableSize = 10;
|
|
104 |
const TUint8 KGsmLibConvTableSize = 92;
|
|
105 |
|
|
106 |
static const TGsmLibConv KGsmExtensionConvTable[
|
|
107 |
KGsmExtensionConvTableSize ] =
|
|
108 |
{
|
|
109 |
{ 0x0A, 0x000A }, /* Convert Page Break to Line Feed*/
|
|
110 |
{ 0x3C, 0x005B }, /* [ */
|
|
111 |
{ 0x2F, 0x005C }, /* \ */
|
|
112 |
{ 0x3E, 0x005D }, /* ] */
|
|
113 |
{ 0x14, 0x005E }, /* ^ */
|
|
114 |
{ 0x28, 0x007B }, /* { */
|
|
115 |
{ 0x40, 0x007C }, /* | */
|
|
116 |
{ 0x29, 0x007D }, /* } */
|
|
117 |
{ 0x3D, 0x007E }, /* ~ */
|
|
118 |
{ 0x65, 0x20AC } /* Euro currency symbol */
|
|
119 |
};
|
|
120 |
|
|
121 |
|
|
122 |
static const TGsmLibConv KGsmLibConvTable[ KGsmLibConvTableSize ] =
|
|
123 |
{
|
|
124 |
{ 0x20, 0x0020 },
|
|
125 |
// SPACE, this pair must be here at index #1 to avoid
|
|
126 |
// converting NMP(space) to GSM(0x11) or to GSM(0x1B)
|
|
127 |
// - see indeces 16 and 17 in the table below.
|
|
128 |
|
|
129 |
{ 0x00, 0x0040 }, /* @ */
|
|
130 |
{ 0x01, 0x00A3 }, /* £ */
|
|
131 |
{ 0x02, 0x0024 }, /* $ */
|
|
132 |
{ 0x03, 0x00A5 }, /* ¥ */
|
|
133 |
{ 0x04, 0x00E8 }, /* è */
|
|
134 |
{ 0x05, 0x00E9 }, /* é */
|
|
135 |
{ 0x06, 0x00F9 }, /* ù */
|
|
136 |
{ 0x07, 0x00EC }, /* ì */
|
|
137 |
{ 0x08, 0x00F2 }, /* ò */
|
|
138 |
{ 0x09, 0x00C7 }, /* Ç */
|
|
139 |
{ 0x0A, 0x000A }, /* LF */
|
|
140 |
{ 0x0B, 0x00D8 }, /* Ø */
|
|
141 |
{ 0x0C, 0x00F8 }, /* ø */
|
|
142 |
{ 0x0D, 0x000D }, /* CR */
|
|
143 |
{ 0x0E, 0x00C5 }, /* Å */
|
|
144 |
{ 0x0F, 0x00E5 }, /* å */
|
|
145 |
{ 0x10, 0x0394 }, /* Greek: DELTA */
|
|
146 |
{ 0x11, 0x005F }, /* _ */
|
|
147 |
{ 0x12, 0x03A6 }, /* Greek: PHI */
|
|
148 |
{ 0x13, 0x0393 }, /* Greek: GAMMA */
|
|
149 |
{ 0x14, 0x039B }, /* Greek: LAMDA */
|
|
150 |
{ 0x15, 0x03A9 }, /* Greek: OMEGA */
|
|
151 |
{ 0x16, 0x03A0 }, /* Greek: PI */
|
|
152 |
{ 0x17, 0x03A8 }, /* Greek: PSI */
|
|
153 |
{ 0x18, 0x03A3 }, /* Greek: SIGMA */
|
|
154 |
{ 0x19, 0x0398 }, /* Greek: THETA */
|
|
155 |
{ 0x1A, 0x039E }, /* Greek: XI */
|
|
156 |
/*0x1B Extension code */
|
|
157 |
{ 0x1C, 0x00C6 }, /* Æ */
|
|
158 |
{ 0x1D, 0x00E6 }, /* æ */
|
|
159 |
{ 0x1E, 0x00DF }, /* beta */
|
|
160 |
{ 0x1F, 0x00C9 }, /* É */
|
|
161 |
/*0x20 SPACE */
|
|
162 |
{ 0x21, 0x0021 }, /* ! */
|
|
163 |
{ 0x22, 0x0022 }, /* " */
|
|
164 |
{ 0x23, 0x0023 }, /* # */
|
|
165 |
{ 0x24, 0x00A4 }, /* ¤ */
|
|
166 |
/*0x25 - 0x3F: Unicode and GSM sets are similar */
|
|
167 |
{ 0x40, 0x00A1 }, /* ¡ */
|
|
168 |
/*0x41 - 0x5A: A..Z */
|
|
169 |
{ 0x5B, 0x00C4 }, /* Ä */
|
|
170 |
{ 0x5C, 0x00D6 }, /* Ö */
|
|
171 |
{ 0x5D, 0x00D1 }, /* Ñ */
|
|
172 |
{ 0x5E, 0x00DC }, /* Ü */
|
|
173 |
{ 0x5F, 0x00A7 }, /* § */
|
|
174 |
{ 0x60, 0x00BF }, /* ¿ */
|
|
175 |
/*0x61 - 0x7A: a..z */
|
|
176 |
{ 0x7B, 0x00E4 }, /* ä */
|
|
177 |
{ 0x7C, 0x00F6 }, /* ö */
|
|
178 |
{ 0x7D, 0x00F1 }, /* ñ */
|
|
179 |
{ 0x7E, 0x00FC }, /* ü */
|
|
180 |
{ 0x7F, 0x00E0 }, /* à */
|
|
181 |
|
|
182 |
//The characters in the list below can be found from 8bit Unicode set
|
|
183 |
//but not from GSM character set. Part of them are changed to spaces,
|
|
184 |
//part of them to the 'nearest' equivalent (by removing the acute/grave/
|
|
185 |
//tilde/etc. marks.
|
|
186 |
|
|
187 |
{ 0x63, 0x00A2 }, /* Unicode: ¢, GSM: c */
|
|
188 |
/* 0x5B-0x5E These chars can be found GSM extension table: [\]^ */
|
|
189 |
{ 0x20, 0x0060 }, /* Unicode: ', GSM: using SPACE */
|
|
190 |
/* 0x7B-0x7E These chars can be found GSM extension table: {|}~ */
|
|
191 |
{ 0x20, 0x007F }, /* Unicode: DEL, GSM: using SPACE */
|
|
192 |
/* 0x80...0xBF: see conversion methods */
|
|
193 |
{ 0x41, 0x00C0 }, /* Unicode: À, GSM: A */
|
|
194 |
{ 0x41, 0x00C1 }, /* Unicode: Á, GSM: A */
|
|
195 |
{ 0x41, 0x00C2 }, /* Unicode: Â, GSM: A */
|
|
196 |
{ 0x41, 0x00C3 }, /* Unicode: Ã, GSM: A */
|
|
197 |
/* 0xC4: Ä */
|
|
198 |
/* 0xC5: Å */
|
|
199 |
/* 0xC6: Æ */
|
|
200 |
/* 0xC7: Ç */
|
|
201 |
{ 0x45, 0x00C8 }, /* Unicode: È, GSM: E */
|
|
202 |
/* 0xC9: É */
|
|
203 |
{ 0x45, 0x00CA }, /* Unicode: Ê, GSM: E */
|
|
204 |
{ 0x45, 0x00CB }, /* Unicode: Ë, GSM: E */
|
|
205 |
{ 0x49, 0x00CC }, /* Unicode: Ì, GSM: I */
|
|
206 |
{ 0x49, 0x00CD }, /* Unicode: Í, GSM: I */
|
|
207 |
{ 0x49, 0x00CE }, /* Unicode: Î, GSM: I */
|
|
208 |
{ 0x49, 0x00CF }, /* Unicode: Ï, GSM: I */
|
|
209 |
{ 0x44, 0x00D0 }, /* Unicode: D with line, GSM: D */
|
|
210 |
/* 0xD1: Ñ */
|
|
211 |
{ 0x4F, 0x00D2 }, /* Unicode: Ò, GSM: O */
|
|
212 |
{ 0x4F, 0x00D3 }, /* Unicode: Ó, GSM: O */
|
|
213 |
{ 0x4F, 0x00D4 }, /* Unicode: Ô, GSM: O */
|
|
214 |
{ 0x4F, 0x00D5 }, /* Unicode: Õ, GSM: O */
|
|
215 |
/* 0xD6: Ö */
|
|
216 |
{ 0x78, 0x00D7 }, /* Unicode: ×, GSM: x */
|
|
217 |
/* 0xD8: Ø */
|
|
218 |
{ 0x55, 0x00D9 }, /* Unicode: Ù, GSM: U */
|
|
219 |
{ 0x55, 0x00DA }, /* Unicode: Ú, GSM: U */
|
|
220 |
{ 0x55, 0x00DB }, /* Unicode: Û, GSM: U */
|
|
221 |
/* 0xDC: Ü */
|
|
222 |
{ 0x59, 0x00DD }, /* Unicode: Y with ', GSM: Y */
|
|
223 |
{ 0x20, 0x00DE }, /* Unicode: Latin capital thorn, GSM: using SPACE */
|
|
224 |
/* 0xDF: beta */
|
|
225 |
/* 0xE0: à */
|
|
226 |
{ 0x61, 0x00E1 }, /* Unicode: á, GSM: a */
|
|
227 |
{ 0x61, 0x00E2 }, /* Unicode: â, GSM: a */
|
|
228 |
{ 0x61, 0x00E3 }, /* Unicode: ã, GSM: a */
|
|
229 |
/* 0xE4: ä */
|
|
230 |
/* 0xE5: å */
|
|
231 |
/* 0xE6: æ */
|
|
232 |
{ 0x63, 0x00E7 }, /* Unicode: ç, GSM: c */
|
|
233 |
/* 0xE8: è */
|
|
234 |
/* 0xE9: é */
|
|
235 |
{ 0x65, 0x00EA }, /* Unicode: ê, GSM: e */
|
|
236 |
{ 0x65, 0x00EB }, /* Unicode: e with two dots, GSM: e */
|
|
237 |
/* 0xEC: ì */
|
|
238 |
{ 0x69, 0x00ED }, /* Unicode: í, GSM: i */
|
|
239 |
{ 0x69, 0x00EE }, /* Unicode: î, GSM: i */
|
|
240 |
{ 0x69, 0x00EF }, /* Unicode: ï, GSM: i */
|
|
241 |
{ 0x20, 0x00F0 }, /* Unicode: Latin small eth, GSM: using SPACE */
|
|
242 |
/* 0xF1: ñ */
|
|
243 |
/* 0xF2: ò */
|
|
244 |
{ 0x6F, 0x00F3 }, /* NMP: ó, GSM: o */
|
|
245 |
{ 0x6F, 0x00F4 }, /* NMP: ô, GSM: o */
|
|
246 |
{ 0x6F, 0x00F5 }, /* NMP: õ, GSM: o */
|
|
247 |
/* 0xF6: ö */
|
|
248 |
{ 0x20, 0x00F7 }, /* Unicode: ÷, GSM: using SPACE */
|
|
249 |
/* 0xF8: ø */
|
|
250 |
/* 0xF9: ù */
|
|
251 |
{ 0x75, 0x00FA }, /* Unicode: ú, GSM: u */
|
|
252 |
{ 0x75, 0x00FB }, /* Unicode: û, GSM: u */
|
|
253 |
/* 0xFC: ü */
|
|
254 |
{ 0x79, 0x00FD }, /* Unicode: y with ', GSM: y */
|
|
255 |
{ 0x20, 0x00FE }, /* Unicode: Latin small thorn, GSM: using SPACE */
|
|
256 |
{ 0x79, 0x00FF } /* Unicode: y with two dots, GSM: y */
|
|
257 |
};
|
|
258 |
|
|
259 |
|
|
260 |
static const GsmLibConv TKGsmLibConvTable[ TKGsmLibConvTableSize ] =
|
|
261 |
{
|
|
262 |
/*1*/ { 0x20, 0x20 },
|
|
263 |
// SPACE, this pair must be here at index #1 to avoid
|
|
264 |
// converting NMP(space) to GSM(0x11) or to GSM(0x1B)
|
|
265 |
// - see indeces 16 and 17 in the table below.
|
|
266 |
|
|
267 |
/*2*/ { 0x00, 0x40 }, /* @ */
|
|
268 |
/*3*/ { 0x01, 0x1C }, /* £ */
|
|
269 |
/*4*/ { 0x02, 0x24 }, /* $ */
|
|
270 |
/*5*/ { 0x03, 0x5C }, /* ¥ */
|
|
271 |
/*6*/ { 0x04, 0xE8 }, /* è */
|
|
272 |
/*7*/ { 0x05, 0xE9 }, /* é */
|
|
273 |
/*8*/ { 0x06, 0xF9 }, /* ù */
|
|
274 |
/*9*/ { 0x07, 0xEC }, /* ì */
|
|
275 |
/*10*/ { 0x08, 0xF2 }, /* ò */
|
|
276 |
/*11*/ { 0x09, 0xC7 }, /* Ç */
|
|
277 |
/* 0x0A: LF */
|
|
278 |
/*12*/ { 0x0B, 0xD8 }, /* Ø */
|
|
279 |
/*13*/ { 0x0C, 0xF8 }, /* ø */
|
|
280 |
/* 0x0D: CR */
|
|
281 |
/*14*/ { 0x0E, 0xC5 }, /* Å */
|
|
282 |
/*15*/ { 0x0F, 0xE5 }, /* å */
|
|
283 |
/* 0x10: NMP and GSM: delta */
|
|
284 |
/*16*/ { 0x11, 0x5F }, /* Underscore */
|
|
285 |
/*17*/ { 0x1B, 0x7B }, /* */
|
|
286 |
/* 0x12 - 0x1A: NMP and GSM: greek letters */
|
|
287 |
/*18*/ { 0x1C, 0xC6 }, /* Æ */
|
|
288 |
/*19*/ { 0x1D, 0xE6 }, /* æ */
|
|
289 |
/*20*/ { 0x1E, 0xDF }, /* beta */
|
|
290 |
/*21*/ { 0x1F, 0xC9 }, /* É */
|
|
291 |
/* 0x20: space */
|
|
292 |
/* 0x21: ! */
|
|
293 |
/* 0x22: " */
|
|
294 |
/* 0x23: # */
|
|
295 |
/*22*/ { 0x24, 0x1F }, /* ¨ */
|
|
296 |
/* 0x25 - 0x3F: NMP and GSM sets are similar */
|
|
297 |
/*23*/ { 0x40, 0x11 }, /* ¡ */
|
|
298 |
/* 0x41 - 0x5A: A..Z */
|
|
299 |
/*24*/ { 0x5B, 0xC4 }, /* Ä */
|
|
300 |
/*25*/ { 0x5C, 0xD6 }, /* Ö */
|
|
301 |
/*26*/ { 0x5D, 0xD1 }, /* Ñ */
|
|
302 |
/*27*/ { 0x5E, 0xDC }, /* Ü */
|
|
303 |
/*28*/ { 0x5F, 0x1B }, /* § */
|
|
304 |
/*29*/ { 0x60, 0x1D }, /* ¿ */
|
|
305 |
/* 0x61 - 0x7A: a..z */
|
|
306 |
/*30*/ { 0x7B, 0xE4 }, /* ä */
|
|
307 |
/*31*/ { 0x7C, 0xF6 }, /* ö */
|
|
308 |
/*32*/ { 0x7D, 0xF1 }, /* ñ */
|
|
309 |
/*33*/ { 0x7E, 0xFC }, /* ü */
|
|
310 |
/*34*/ { 0x7F, 0xE0 }, /* à */
|
|
311 |
|
|
312 |
// The characters in the list below exist in NMP character set
|
|
313 |
// but not in GSM character set. Part of them are changed to spaces,
|
|
314 |
// part of them to the 'nearest' equivalent (by removing the acute/grave/
|
|
315 |
// tilde/etc. marks.
|
|
316 |
|
|
317 |
/*35*/ { 0x63, 0x1E }, /* NMP: ¢, GSM: c */
|
|
318 |
/*36*/ { 0x20, 0x5B }, /* no equivalent in GSM char set, using SPACE */
|
|
319 |
/*37*/ { 0x20, 0x5D }, /* no equivalent in GSM char set, using SPACE */
|
|
320 |
/*38*/ { 0x10, 0x5E },
|
|
321 |
/* NMP: filled triangle, GSM: delta (unfilled triangle)*/
|
|
322 |
/*39*/ { 0x20, 0x5F }, /* NMP: _, GSM: SPACE */
|
|
323 |
/*40*/ { 0x20, 0x60 }, /* no equivalent in GSM char set, using SPACE*/
|
|
324 |
/*41*/ { 0x20, 0x7B }, /* no equivalent in GSM char set, using SPACE */
|
|
325 |
/*42*/ { 0x20, 0x7C }, /* no equivalent in GSM char set, using SPACE */
|
|
326 |
/*43*/ { 0x20, 0x7D }, /* no equivalent in GSM char set, using SPACE */
|
|
327 |
/*44*/ { 0x20, 0x7E }, /* no equivalent in GSM char set, using SPACE */
|
|
328 |
/*45*/ { 0x20, 0x7F }, /* no equivalent in GSM char set, using SPACE */
|
|
329 |
/* 0x20, 0x80...0xBF: see line *3000* in the function. */
|
|
330 |
/*46*/ { 0x41, 0xC0 }, /* NMP: À, GSM: A */
|
|
331 |
/*47*/ { 0x41, 0xC1 }, /* NMP: Á, GSM: A */
|
|
332 |
/*48*/ { 0x41, 0xC2 }, /* NMP: Â, GSM: A */
|
|
333 |
/*49*/ { 0x41, 0xC3 }, /* NMP: Ã, GSM: A */
|
|
334 |
/* 0xC4: Ä */
|
|
335 |
/* 0xC5: Å */
|
|
336 |
/* 0xC6: Æ */
|
|
337 |
/* 0xC7: Ç */
|
|
338 |
/*50*/ { 0x45, 0xC8 }, /* NMP: È, GSM: E */
|
|
339 |
/* 0xC9: É */
|
|
340 |
/*51*/ { 0x45, 0xCA }, /* NMP: Ê, GSM: E */
|
|
341 |
/*52*/ { 0x45, 0xCB }, /* NMP: Ë, GSM: E */
|
|
342 |
/*53*/ { 0x49, 0xCC }, /* NMP: Ì, GSM: I */
|
|
343 |
/*54*/ { 0x49, 0xCD }, /* NMP: Í, GSM: I */
|
|
344 |
/*55*/ { 0x49, 0xCE }, /* NMP: Î, GSM: I */
|
|
345 |
/*56*/ { 0x49, 0xCF }, /* NMP: Ï, GSM: I */
|
|
346 |
/*57*/ { 0x45, 0xD0 }, /* NMP: E with tilde, GSM: E */
|
|
347 |
/* 0xD1: Ñ */
|
|
348 |
/*58*/ { 0x4F, 0xD2 }, /* NMP: Ò, GSM: O */
|
|
349 |
/*59*/ { 0x4F, 0xD3 }, /* NMP: Ó, GSM: O */
|
|
350 |
/*60*/ { 0x4F, 0xD4 }, /* NMP: Ô, GSM: O */
|
|
351 |
/*61*/ { 0x4F, 0xD5 }, /* NMP: Õ, GSM: O */
|
|
352 |
/* 0xD6: Ö */
|
|
353 |
/*62*/ { 0x4F, 0xD7 }, /* NMP: ×, GSM: O */
|
|
354 |
/* 0xD8: Ø */
|
|
355 |
/*63*/ { 0x55, 0xD9 }, /* NMP: Ù, GSM: U */
|
|
356 |
/*64*/ { 0x55, 0xDA }, /* NMP: Ú, GSM: U */
|
|
357 |
/*65*/ { 0x55, 0xDB }, /* NMP: Û, GSM: U */
|
|
358 |
/* 0xDC: Ü */
|
|
359 |
/*66*/ { 0x20, 0xDD },
|
|
360 |
/* (dotted cursor) no equivalent in GSM, SPACE used */
|
|
361 |
/*67*/ { 0x77, 0xDE }, /* NMP: w with caret (^), GSM: w */
|
|
362 |
/* 0xDF: lower case beta */
|
|
363 |
/* 0xE0: à */
|
|
364 |
/*68*/ { 0x61, 0xE1 }, /* NMP: á, GSM: a */
|
|
365 |
/*69*/ { 0x61, 0xE2 }, /* NMP: â, GSM: a */
|
|
366 |
/*70*/ { 0x61, 0xE3 }, /* NMP: ã, GSM: a */
|
|
367 |
/* 0xE4: ä */
|
|
368 |
/* 0xE5: å */
|
|
369 |
/* 0xE6: æ */
|
|
370 |
/*71*/ { 0x63, 0xE7 }, /* NMP: ç, GSM: c */
|
|
371 |
/* 0xE8: è */
|
|
372 |
/* 0xE9: é */
|
|
373 |
/*72*/ { 0x65, 0xEA }, /* NMP: ê, GSM: e */
|
|
374 |
/*73*/ { 0x65, 0xEB }, /* NMP: e with two dots, GSM: e */
|
|
375 |
/* 0xEC: ì */
|
|
376 |
/*74*/ { 0x69, 0xED }, /* NMP: í, GSM: i */
|
|
377 |
/*75*/ { 0x69, 0xEE }, /* NMP: î, GSM: i */
|
|
378 |
/*76*/ { 0x69, 0xEF }, /* NMP: ï, GSM: i */
|
|
379 |
/*77*/ { 0x65, 0xF0 }, /* NMP: e with tidle (~), GSM: e */
|
|
380 |
/* 0xF1: ñ */
|
|
381 |
/* 0xF2: ò */
|
|
382 |
/*78*/ { 0x6F, 0xF3 }, /* NMP: ó, GSM: o */
|
|
383 |
/*79*/ { 0x6F, 0xF4 }, /* NMP: ô, GSM: o */
|
|
384 |
/*80*/ { 0x6F, 0xF5 }, /* NMP: õ, GSM: o */
|
|
385 |
/* 0xF6: ö */
|
|
386 |
/*81*/ { 0x6F, 0xF7 }, /* NMP: ÷, GSM: o */
|
|
387 |
/* 0xF8: ø */
|
|
388 |
/* 0xF9: ù */
|
|
389 |
/*82*/ { 0x75, 0xFA }, /* NMP: ú, GSM: u */
|
|
390 |
/*83*/ { 0x75, 0xFB }, /* NMP: û, GSM: u */
|
|
391 |
/* 0xFC: ü */
|
|
392 |
/*84*/ { 0x79, 0xFD }, /* NMP: y with ', GSM: y */
|
|
393 |
/*85*/ { 0x79, 0xFE }, /* NMP: y with ^, GSM: y */
|
|
394 |
/*86*/ { 0x79, 0xFF } /* NMP: ý, GSM: y */
|
|
395 |
};
|
|
396 |
|
|
397 |
// ENUMERATIONS
|
|
398 |
// Test case enumerations can be used for defining parameter checks for
|
|
399 |
// certain test cases. Can be set by function SetSmsParameterCheck.
|
|
400 |
enum TTestCase
|
|
401 |
{
|
|
402 |
ETestCaseNotDefined = 0,
|
|
403 |
ETestCaseSms001 = 1,
|
|
404 |
ETestCaseSms008 = 8,
|
|
405 |
ETestCaseSms019 = 19
|
|
406 |
};
|
|
407 |
|
|
408 |
// FORWARD DECLARATIONS
|
|
409 |
class CSMS;
|
|
410 |
class CCore;
|
|
411 |
class RMobileSmsMessaging;
|
|
412 |
class TDataPackage;
|
|
413 |
class CMmDataPackage;
|
|
414 |
class RMobilePhone;
|
|
415 |
class CMessageRouterBase;
|
|
416 |
|
|
417 |
|
|
418 |
// CLASS DECLARATION
|
|
419 |
|
|
420 |
class CSMS : public CCore
|
|
421 |
{
|
|
422 |
public: // Constructors and destructor
|
|
423 |
|
|
424 |
/**
|
|
425 |
* Two-phased constructor.
|
|
426 |
*/
|
|
427 |
static CSMS* NewL( CTestModuleIf& aTestModuleIf );
|
|
428 |
|
|
429 |
/**
|
|
430 |
* Destructor.
|
|
431 |
*/
|
|
432 |
virtual ~CSMS();
|
|
433 |
|
|
434 |
|
|
435 |
protected: // New functions
|
|
436 |
|
|
437 |
/**
|
|
438 |
* Set SMS parameter check ON/OFF and test case number
|
|
439 |
* @since Series60_ver 5.0
|
|
440 |
* @param aItem Script line containing method name and parameters
|
|
441 |
* @return Symbian OS error code.
|
|
442 |
*/
|
|
443 |
TInt SetSmsParameterCheck( CStifItemParser& aItem );
|
|
444 |
|
|
445 |
/**
|
|
446 |
* Set SMS reference parameters for parameter checking
|
|
447 |
* @since Series60_ver 5.0
|
|
448 |
* @param aItem Script line containing method name and parameters
|
|
449 |
* @return Symbian OS error code.
|
|
450 |
*/
|
|
451 |
TInt SetSmsReferenceParameters( CStifItemParser& aItem );
|
|
452 |
|
|
453 |
/**
|
|
454 |
* Updates SMS settings
|
|
455 |
* @param aItem Script line containing method name and parameters
|
|
456 |
* @return Symbian OS error code.
|
|
457 |
*/
|
|
458 |
TInt SmsSettingsUpdate( CStifItemParser& aItem );
|
|
459 |
|
|
460 |
/**
|
|
461 |
* Send SMS Message
|
|
462 |
* @since Series60_ver 2.8
|
|
463 |
* @param aItem Script line containing method name and parameters
|
|
464 |
* @return Symbian OS error code.
|
|
465 |
*/
|
|
466 |
TInt SendSMSMessageL(CStifItemParser& aItem);
|
|
467 |
|
|
468 |
/**
|
|
469 |
* Complete Send SMS Message
|
|
470 |
* @since Series60_ver 2.8
|
|
471 |
* @param aItem Script line containing method name and parameters
|
|
472 |
* @return None
|
|
473 |
*/
|
|
474 |
void CompleteSendSMSMessage( TInt aResult );
|
|
475 |
|
|
476 |
/**
|
|
477 |
* Complete Send SMS Message
|
|
478 |
* @since Series60_ver 2.8
|
|
479 |
* @param aItem Script line containing method name and parameters
|
|
480 |
* @return None
|
|
481 |
*/
|
|
482 |
void CompleteSendSMSMessage( TInt aResult, CMmDataPackage* aDataPackage );
|
|
483 |
|
|
484 |
/**
|
|
485 |
* Send Two SMS Messages
|
|
486 |
* @since Series60_ver 2.8
|
|
487 |
* @param aItem Script line containing method name and parameters
|
|
488 |
* @return Symbian OS error code.
|
|
489 |
*/
|
|
490 |
TInt SendTwoSMSMessagesL(CStifItemParser& aItem);
|
|
491 |
|
|
492 |
/**
|
|
493 |
* Read SMS Message
|
|
494 |
* @since Series60_ver 2.8
|
|
495 |
* @param aItem Script line containing method name and parameters
|
|
496 |
* @return Symbian OS error code.
|
|
497 |
*/
|
|
498 |
TInt ReadSMSMessageL(CStifItemParser& aItem);
|
|
499 |
|
|
500 |
/**
|
|
501 |
* Complete Read SMS Message
|
|
502 |
* @since Series60_ver 2.8
|
|
503 |
* @param aItem Script line containing method name and parameters
|
|
504 |
* @return None
|
|
505 |
*/
|
|
506 |
void CompleteReadSMSMessage( TInt aResult,CMmDataPackage* aDataPackage );
|
|
507 |
|
|
508 |
/**
|
|
509 |
* Delete SMS Message
|
|
510 |
* @since Series60_ver 2.8
|
|
511 |
* @param aItem Script line containing method name and parameters
|
|
512 |
* @return Symbian OS error code.
|
|
513 |
*/
|
|
514 |
TInt DeleteSMSMessageL( CStifItemParser& aItem );
|
|
515 |
|
|
516 |
/**
|
|
517 |
* Complete Delete SMS Message
|
|
518 |
* @since Series60_ver 2.8
|
|
519 |
* @param aItem Script line containing method name and parameters
|
|
520 |
* @return None
|
|
521 |
*/
|
|
522 |
void CompleteDeleteSMSMessage( TInt aResult );
|
|
523 |
|
|
524 |
/**
|
|
525 |
* Delete All SMS Messages
|
|
526 |
* @since Series60_ver 2.8
|
|
527 |
* @param aItem Script line containing method name and parameters
|
|
528 |
* @return Symbian OS error code.
|
|
529 |
*/
|
|
530 |
TInt DeleteAllSMSMessagesL( CStifItemParser& );
|
|
531 |
|
|
532 |
/**
|
|
533 |
* Complete Delete All SMS Messages
|
|
534 |
* @since Series60_ver 2.8
|
|
535 |
* @param aItem Script line containing method name and parameters
|
|
536 |
* @return None
|
|
537 |
*/
|
|
538 |
void CompleteDeleteAllSMSMessages( TInt aResult );
|
|
539 |
|
|
540 |
/**
|
|
541 |
* Set MO SMS Bearer
|
|
542 |
* @param aItem Script line containing method name and parameters
|
|
543 |
* @return Symbian OS error code.
|
|
544 |
*/
|
|
545 |
TInt SetMoSmsBearerL( CStifItemParser& aItem );
|
|
546 |
|
|
547 |
/**
|
|
548 |
* Complete Set MO SMS Bearer
|
|
549 |
* @param TInt aResult Error code
|
|
550 |
* @return None
|
|
551 |
*/
|
|
552 |
void CompleteSetMoSmsBearer( TInt aResult );
|
|
553 |
|
|
554 |
/**
|
|
555 |
* Write SMS Message
|
|
556 |
* @since Series60_ver 2.8
|
|
557 |
* @param aItem Script line containing method name and parameters
|
|
558 |
* @return Symbian OS error code.
|
|
559 |
*/
|
|
560 |
TInt WriteSMSMessageL(CStifItemParser& aItem);
|
|
561 |
|
|
562 |
/**
|
|
563 |
* Complete Write SMS Message
|
|
564 |
* @since Series60_ver 2.8
|
|
565 |
* @param aItem Script line containing method name and parameters
|
|
566 |
* @return None
|
|
567 |
*/
|
|
568 |
void CompleteWriteSMSMessage( TInt aResult,CMmDataPackage* aDataPackage );
|
|
569 |
|
|
570 |
/**
|
|
571 |
* Receive SMS Message
|
|
572 |
* @since Series60_ver 2.8
|
|
573 |
* @param aItem Script line containing method name and parameters
|
|
574 |
* @return Symbian OS error code.
|
|
575 |
*/
|
|
576 |
TInt ReceiveSMSMessageL(CStifItemParser& aItem);
|
|
577 |
|
|
578 |
/**
|
|
579 |
* Complete Receive SMS Message
|
|
580 |
* @since Series60_ver 2.8
|
|
581 |
* @param aItem Script line containing method name and parameters
|
|
582 |
* @return None
|
|
583 |
*/
|
|
584 |
void CompleteReceiveSMSMessage( TInt aResult, CMmDataPackage* aDataPackage);
|
|
585 |
|
|
586 |
|
|
587 |
/**
|
|
588 |
* Activate SMS Routing
|
|
589 |
* @since Series60_ver 2.8
|
|
590 |
* @param aItem Script line containing method name and parameters
|
|
591 |
* @return Symbian OS error code.
|
|
592 |
*/
|
|
593 |
TInt ActivateSMSRoutingL( CStifItemParser& );
|
|
594 |
|
|
595 |
/**
|
|
596 |
* Complete Activate SMS Routing
|
|
597 |
* @since Series60_ver 2.8
|
|
598 |
* @param aItem Script line containing method name and parameters
|
|
599 |
* @return None
|
|
600 |
*/
|
|
601 |
void CompleteActivateSMSRouting( TInt aResult );
|
|
602 |
|
|
603 |
/**
|
|
604 |
* Complete Activate SMS Routing
|
|
605 |
* @param aResult Error code to be completed
|
|
606 |
* @param aDataPackage Data package containing reception status
|
|
607 |
* @return None
|
|
608 |
*/
|
|
609 |
void CompleteActivateSMSRouting(
|
|
610 |
TInt aResult,
|
|
611 |
CMmDataPackage* aDataPackage );
|
|
612 |
|
|
613 |
|
|
614 |
/**
|
|
615 |
* Acknowledge SMS message
|
|
616 |
* @since Series60_ver 2.8
|
|
617 |
* @param aItem Script line containing method name and parameters
|
|
618 |
* @return Symbian OS error code.
|
|
619 |
*/
|
|
620 |
TInt AckSMSL( CStifItemParser& );
|
|
621 |
|
|
622 |
/**
|
|
623 |
* Complete Acknowledge SMS message
|
|
624 |
* @since Series60_ver 2.8
|
|
625 |
* @param aItem Script line containing method name and parameters
|
|
626 |
* @return None
|
|
627 |
*/
|
|
628 |
void CompleteAckSMS( TInt aResult );
|
|
629 |
|
|
630 |
/**
|
|
631 |
* Deactivate SMS Routing
|
|
632 |
* @since Series60_ver 2.8
|
|
633 |
* @param aItem Script line containing method name and parameters
|
|
634 |
* @return Symbian OS error code
|
|
635 |
*/
|
|
636 |
TInt DeactivateSMSRoutingL( CStifItemParser& );
|
|
637 |
|
|
638 |
/**
|
|
639 |
* Complete Deactivate SMS Routing
|
|
640 |
* @param aResult Error code to be completed
|
|
641 |
* @return None
|
|
642 |
*/
|
|
643 |
void CompleteDeactivateSMSRouting( TInt aResult );
|
|
644 |
|
|
645 |
/**
|
|
646 |
* Complete Deactivate SMS Routing
|
|
647 |
* @param aResult Error code to be completed
|
|
648 |
* @param aDataPackage Data package containing reception status
|
|
649 |
* @return None
|
|
650 |
*/
|
|
651 |
void CompleteDeactivateSMSRouting(
|
|
652 |
TInt aResult,
|
|
653 |
CMmDataPackage* aDataPackage );
|
|
654 |
|
|
655 |
/**
|
|
656 |
* Resume SMS
|
|
657 |
* @since Series60_ver 2.8
|
|
658 |
* @param aItem Script line containing method name and parameters
|
|
659 |
* @return Symbian OS error code.
|
|
660 |
*/
|
|
661 |
TInt ResumeSMSL( CStifItemParser& );
|
|
662 |
|
|
663 |
/**
|
|
664 |
* Complete Resume SMS
|
|
665 |
* @since Series60_ver 2.8
|
|
666 |
* @param aItem Script line containing method name and parameters
|
|
667 |
* @return None
|
|
668 |
*/
|
|
669 |
void CompleteResumeSMS( TInt aResult );
|
|
670 |
|
|
671 |
/**
|
|
672 |
* Read All SMS Message
|
|
673 |
* @since Series60_ver 2.8
|
|
674 |
* @param aItem Script line containing method name and parameters
|
|
675 |
* @return Symbian OS error code.
|
|
676 |
*/
|
|
677 |
TInt ReadAllSMSMessageL( CStifItemParser& aItem );
|
|
678 |
|
|
679 |
/**
|
|
680 |
* Complete Read All SMS Message
|
|
681 |
* @since Series60_ver 2.8
|
|
682 |
* @param aItem Script line containing method name and parameters
|
|
683 |
* @return None
|
|
684 |
*/
|
|
685 |
void CompleteReadAllSMSMessage( TInt aResult,CMmDataPackage* aDataPackage );
|
|
686 |
|
|
687 |
/**
|
|
688 |
* Non Acknowledge SMS message
|
|
689 |
* @since Series60_ver 2.8
|
|
690 |
* @param aItem Script line containing method name and parameters
|
|
691 |
* @return Symbian OS error code
|
|
692 |
*/
|
|
693 |
TInt NackSMSL( CStifItemParser& aItem);
|
|
694 |
|
|
695 |
/**
|
|
696 |
* Complete Non Acknowledge SMS message
|
|
697 |
* @since Series60_ver 2.8
|
|
698 |
* @param aItem Script line containing method name and parameters
|
|
699 |
* @return None
|
|
700 |
*/
|
|
701 |
void CompleteNackSMS( TInt aResult );
|
|
702 |
|
|
703 |
/**
|
|
704 |
* Get SMS Store Info
|
|
705 |
* @since Series60_ver 2.8
|
|
706 |
* @param aItem Script line containing method name and parameters
|
|
707 |
* @return Symbian OS error code
|
|
708 |
*/
|
|
709 |
TInt SIMMsgStorageInfoL(CStifItemParser& aItem);
|
|
710 |
|
|
711 |
/**
|
|
712 |
* Complete SIMMsgStorageInfo
|
|
713 |
* @param aItem Script line containing method name and parameters
|
|
714 |
* @return None
|
|
715 |
*/
|
|
716 |
void CompleteSIMMsgStorageInfo( TInt aResult,CMmDataPackage* aDataPackage );
|
|
717 |
|
|
718 |
|
|
719 |
/**
|
|
720 |
* Read SMS Parameters
|
|
721 |
* @return Symbian OS error code.
|
|
722 |
*/
|
|
723 |
TInt ReadSmsParametersL( CStifItemParser& aItem );
|
|
724 |
|
|
725 |
/**
|
|
726 |
* Complete Read SMS Parameters
|
|
727 |
* @param TInt aResult Error code
|
|
728 |
* @param CMmDataPackage* aDataPackage SMS Parameters
|
|
729 |
* @return None
|
|
730 |
*/
|
|
731 |
void CompleteReadSmsParameters( TInt aResult, CMmDataPackage* aDataPackage );
|
|
732 |
|
|
733 |
/**
|
|
734 |
* Store SMS Parameters
|
|
735 |
* @param aItem SMS parameters from script
|
|
736 |
* @return Symbian OS error code.
|
|
737 |
*/
|
|
738 |
TInt StoreSmsParametersL( CStifItemParser& aItem );
|
|
739 |
|
|
740 |
/**
|
|
741 |
* Complete Store SMS Parameters
|
|
742 |
* @param TInt aResult Error code
|
|
743 |
* @return None
|
|
744 |
*/
|
|
745 |
void CompleteStoreSmsParameters( TInt aResult );
|
|
746 |
|
|
747 |
/**
|
|
748 |
* SMS cache initialization
|
|
749 |
* @param aItem SMS parameters from script
|
|
750 |
* @return Symbian OS error code.
|
|
751 |
*/
|
|
752 |
TInt SMSCacheInitializationL( CStifItemParser& aItem );
|
|
753 |
|
|
754 |
/**
|
|
755 |
* Complete SMS cache initialization
|
|
756 |
* @param TInt aResult Error code
|
|
757 |
* @return None
|
|
758 |
*/
|
|
759 |
void CompleteSMSCacheInitialization( TInt aResult );
|
|
760 |
|
|
761 |
/**
|
|
762 |
* Complete Mobile Phone Store Get Info
|
|
763 |
* @param TInt aResult Error code
|
|
764 |
* @return None
|
|
765 |
*/
|
|
766 |
void CompleteMobilePhoneStoreGetInfo( TInt aResult );
|
|
767 |
|
|
768 |
private:
|
|
769 |
|
|
770 |
// These functions are mainly taken from
|
|
771 |
// Nokia DOS TSY / mmsmsiface
|
|
772 |
// CMmSmsGsmAddress.h
|
|
773 |
|
|
774 |
/**
|
|
775 |
* Build gsm 0340 address
|
|
776 |
* @since Series60_ver 2.8
|
|
777 |
* @param TUint8 aTon: Type of number
|
|
778 |
* @param TUint8 aNpi: Numbering plan identification
|
|
779 |
* @param TDes8 &aDest: Service center address
|
|
780 |
* @param TDesC16 &aSource: Telephone number
|
|
781 |
* @return: None
|
|
782 |
*/
|
|
783 |
void GsmConvUnicodeTo0340Addr(
|
|
784 |
TUint8 aTon, //Type of number
|
|
785 |
TUint8 aNpi, //Numbering plan identification
|
|
786 |
TDes8 &aDest, //Service center address
|
|
787 |
TDesC16 &aSource //Telephone number
|
|
788 |
);
|
|
789 |
|
|
790 |
/**
|
|
791 |
* Character conversion
|
|
792 |
* @since Series60_ver 2.8
|
|
793 |
* @param &dest: Packed message
|
|
794 |
* @param &src: Unpacked message
|
|
795 |
* @param byte_count number of bytes
|
|
796 |
* @return: unsigned index
|
|
797 |
*/
|
|
798 |
TUint16 GsmLibSmsPackMessage(
|
|
799 |
TDes8 &aDest,
|
|
800 |
TDes8 &aSrc,
|
|
801 |
TUint16 aByte_count
|
|
802 |
);
|
|
803 |
|
|
804 |
|
|
805 |
/**
|
|
806 |
* Convert GSM 0340 or 0411 address to Unicode address
|
|
807 |
* @since Series60_ver 2.8
|
|
808 |
* @param TDes &aDest: Unicode address will be constructed to here
|
|
809 |
* @param TDesC8 &aSource: 03.40 or 04.11 address
|
|
810 |
* @param TUint8 aTon: Type of number will be set to here
|
|
811 |
* @param TUint8 aNpi: Numbering plan identification will be set to here
|
|
812 |
* @param TBool a0340Address: Address type is 0340 if TRUE
|
|
813 |
* @return: void: None
|
|
814 |
*/
|
|
815 |
void GsmConvAddrToUnicode(
|
|
816 |
TDes &aDest, //Service center address
|
|
817 |
TDesC8 &aSource, //Telephone number
|
|
818 |
RMobilePhone::TMobileTON& aTon, //Type of number
|
|
819 |
RMobilePhone::TMobileNPI& aNpi, //Telephone number
|
|
820 |
TBool a0340Address //GSM 03.40 address
|
|
821 |
);
|
|
822 |
|
|
823 |
/**
|
|
824 |
* Convert Unicode address to GSM 0340 or 0411 address
|
|
825 |
* @since Series60_ver 2.8
|
|
826 |
* @param TUint8 aTon: Type of number
|
|
827 |
* @param TUint8 aNpi: Numbering plan identification
|
|
828 |
* @param TDes8 &aDest: 03.40 or 04.11 will be constructed to here
|
|
829 |
* @param TDesC16 &aSource: Telephone number
|
|
830 |
* @param TBool a0340Address: Address type is 0340 if TRUE
|
|
831 |
* @return:None
|
|
832 |
*/
|
|
833 |
void GsmConvUnicodeToAddr(
|
|
834 |
TUint8 aTon, //Type of number
|
|
835 |
TUint8 aNpi, //Numbering plan identification
|
|
836 |
TDes8 &aDest, //Service center address
|
|
837 |
TDesC16 &aSource, //Telephone number
|
|
838 |
TBool a0340Address //GSM 03.40 address
|
|
839 |
);
|
|
840 |
|
|
841 |
/**
|
|
842 |
* Construct alphanumeric address data from Unicode address
|
|
843 |
* @since Series60_ver 2.8
|
|
844 |
* @param TDesC16& aSource: Source data
|
|
845 |
* @param TDes8& aDestination: Destination data
|
|
846 |
* @param TUint8& aAmountOfSemiOctets: Amount of used semi-octets in
|
|
847 |
* address data
|
|
848 |
* @return None
|
|
849 |
*/
|
|
850 |
void GsmUnicodeAddrToAlphanumericAddr(
|
|
851 |
TDesC16& aSource, // Source address data
|
|
852 |
TDes8& aDestination, // Destination data
|
|
853 |
TUint8& aAmountOfSemiOctets // Amount of semi-octets
|
|
854 |
);
|
|
855 |
|
|
856 |
/**
|
|
857 |
* Fint out type of number and numbering plan identification
|
|
858 |
* @param TUint8 typeOfAddress: Type of address
|
|
859 |
* @param RMobilePhone::TMobileTON* ton: Type of number
|
|
860 |
* @param RMobilePhone::TMobileNPI* npi: Numbering plan identification
|
|
861 |
* @return None
|
|
862 |
*/
|
|
863 |
void GsmFindOutTonAndNpi(
|
|
864 |
TUint8 typeOfAddress, //Type of address
|
|
865 |
RMobilePhone::TMobileTON* ton, //Type of number
|
|
866 |
RMobilePhone::TMobileNPI* npi //Numbering plan identification
|
|
867 |
);
|
|
868 |
|
|
869 |
/**
|
|
870 |
* Construct Unicode address data from alphanumeric address
|
|
871 |
* @since Series60_ver 2.8
|
|
872 |
* @param TDesC8& aSource: Source data
|
|
873 |
* @param TUint& aAmountOfChars: Amount of characters in address data
|
|
874 |
* @param TDes16& aDestination: Destination data
|
|
875 |
* @return None
|
|
876 |
*/
|
|
877 |
void GsmAlphanumericAddrToUnicodeAddr(
|
|
878 |
TDesC8& aSource, // Source address data
|
|
879 |
TUint& aAmountOfChars, // Amount of characters in address data
|
|
880 |
TDes16& aDestination // Destination data
|
|
881 |
);
|
|
882 |
|
|
883 |
/**
|
|
884 |
* Packs a given text string consisting of 7-bit characters
|
|
885 |
* into 8 bit bytes.
|
|
886 |
* @since Series60_ver 2.8
|
|
887 |
* @param TDes8 &dest: Packed message
|
|
888 |
* @param TDes8 &src: Unpacked message
|
|
889 |
* @return TUint8: Amount of packed characters
|
|
890 |
*/
|
|
891 |
TUint8 GsmLibPackAlphanumericAddress(
|
|
892 |
TDes8 &aDest, // Packed address
|
|
893 |
TDes8 &aSource // Unpacked address
|
|
894 |
);
|
|
895 |
|
|
896 |
/**
|
|
897 |
* Decodes a address that has been coded using the algorithm described
|
|
898 |
* in GSM 03.40 annex 2.
|
|
899 |
* @since Series60_ver 2.8
|
|
900 |
* @param TDes8 &aSource: Unpacked message
|
|
901 |
* @param TUint aAmountOfChars: Amount of characters in address data
|
|
902 |
* @param TDes8 &dest: Packed message
|
|
903 |
* @return None
|
|
904 |
*/
|
|
905 |
void GsmLibUnpackAlphanumericAddress(
|
|
906 |
TDesC8 &aSource, // Packed address data
|
|
907 |
TUint aAmountOfChars, // Amount of characters in address data
|
|
908 |
TDes8 &aDest // Unpacked address data
|
|
909 |
);
|
|
910 |
|
|
911 |
|
|
912 |
public:
|
|
913 |
|
|
914 |
/**
|
|
915 |
* From CScriptBase Runs a script line.
|
|
916 |
* @since Series60_version
|
|
917 |
* @param aItem Script line containing method name and parameters
|
|
918 |
* @return Symbian OS error code
|
|
919 |
*/
|
|
920 |
virtual TInt RunMethodL( CStifItemParser& aItem );
|
|
921 |
|
|
922 |
|
|
923 |
/**
|
|
924 |
* Completes a request or notification via the specific Tsy object,
|
|
925 |
* based on IPC number and data package
|
|
926 |
* @since Series60_ver 2.8
|
|
927 |
* @param aIpc: IPC number
|
|
928 |
* aDataPackage: Data package
|
|
929 |
* aResult: result
|
|
930 |
* @return None
|
|
931 |
*/
|
|
932 |
IMPORT_C virtual void RouteCompletion(
|
|
933 |
TInt aIpc,
|
|
934 |
CMmDataPackage* aDataPackage,
|
|
935 |
TInt aResult );
|
|
936 |
|
|
937 |
|
|
938 |
/**
|
|
939 |
* Character conversion
|
|
940 |
* @since Series60_ver 2.8
|
|
941 |
* @param aDirection
|
|
942 |
* @param aString
|
|
943 |
* @param aLength Packed message
|
|
944 |
* @return None
|
|
945 |
*/
|
|
946 |
void GsmLibCharConversion(
|
|
947 |
TUint aDirection,
|
|
948 |
TDes8& aString,
|
|
949 |
TUint16 aLength
|
|
950 |
);
|
|
951 |
|
|
952 |
|
|
953 |
protected:
|
|
954 |
|
|
955 |
/**
|
|
956 |
* C++ default constructor.
|
|
957 |
*/
|
|
958 |
CSMS( CTestModuleIf& aTestModuleIf );
|
|
959 |
|
|
960 |
/**
|
|
961 |
* By default Symbian 2nd phase constructor is private.
|
|
962 |
*/
|
|
963 |
void ConstructL();
|
|
964 |
|
|
965 |
/**
|
|
966 |
* Frees all resources allocated from test methods.
|
|
967 |
* @since Series60_version
|
|
968 |
*/
|
|
969 |
void Delete();
|
|
970 |
|
|
971 |
private: // Data
|
|
972 |
/**
|
|
973 |
* By default Symbian 2nd phase constructor is private.
|
|
974 |
*/
|
|
975 |
CStifLogger* iSMSLog;
|
|
976 |
|
|
977 |
/**
|
|
978 |
* By default Symbian 2nd phase constructor is private.
|
|
979 |
*/
|
|
980 |
TRequestStatus iStatus;
|
|
981 |
|
|
982 |
/**
|
|
983 |
* RMobileSmsMessaging object
|
|
984 |
*/
|
|
985 |
RMobileSmsMessaging iSmsMessaging;
|
|
986 |
|
|
987 |
/**
|
|
988 |
*H olds Sms attributes variable
|
|
989 |
*/
|
|
990 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 iMsgAttrib;
|
|
991 |
|
|
992 |
/**
|
|
993 |
* Holds Sms Gsm Tdpu variable
|
|
994 |
*/
|
|
995 |
RMobileSmsMessaging::TMobileSmsGsmTpdu iGsmMes;
|
|
996 |
|
|
997 |
/**
|
|
998 |
* Holds Sms attributes package holding iMsgAttrib
|
|
999 |
*/
|
|
1000 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg iMsgAttribPckg;
|
|
1001 |
|
|
1002 |
/**
|
|
1003 |
* Holds Sms caps package holding iSmsCaps
|
|
1004 |
*/
|
|
1005 |
RMobileSmsMessaging::TMobileSmsCapsV1Pckg iSmsCapsPckg;
|
|
1006 |
|
|
1007 |
/**
|
|
1008 |
* Holds Sms caps variable
|
|
1009 |
*/
|
|
1010 |
RMobileSmsMessaging::TMobileSmsCapsV1 iSmsCaps;
|
|
1011 |
|
|
1012 |
/*@see RMobilePhone::TMobileAddress */
|
|
1013 |
RMobilePhone::TMobileAddress iServiceCentre;
|
|
1014 |
|
|
1015 |
/** The GSM 03.40 TPDU.
|
|
1016 |
Modes: GSM/WCDMA
|
|
1017 |
@see RMobileSmsMessaging::TMobileSmsGsmTpdu */
|
|
1018 |
RMobileSmsMessaging::TMobileSmsGsmTpdu iMsgData;
|
|
1019 |
|
|
1020 |
TBool iSecondMessage;
|
|
1021 |
|
|
1022 |
// Write SMS message pointer
|
|
1023 |
TAny* iWriteSmsEntryPtr;
|
|
1024 |
|
|
1025 |
// A pointer to send message attributes
|
|
1026 |
TDes8* iSendMessageMsgAttrPckgPtr;
|
|
1027 |
|
|
1028 |
// Wait for unstored message pointer
|
|
1029 |
TDes8* iReceiveMessagePduPtr;
|
|
1030 |
|
|
1031 |
// Wait for unstored message pointer
|
|
1032 |
TAny* iReceiveMessageParamsPtr;
|
|
1033 |
|
|
1034 |
//For answering only to requests from scripts
|
|
1035 |
TBool iSMSMsgStorageRequestOngoing;
|
|
1036 |
|
|
1037 |
//For comparison SMS class type (class 1 or 2)
|
|
1038 |
TBool iReceivedSmsClass2;
|
|
1039 |
|
|
1040 |
// For parameter checking
|
|
1041 |
TBool iSmsParameterCheck;
|
|
1042 |
|
|
1043 |
// Test case number for parameter checking
|
|
1044 |
TTestCase iTestCaseNumber;
|
|
1045 |
|
|
1046 |
// Reference parameters for parameter checking
|
|
1047 |
TUint16 iMsgRef;
|
|
1048 |
|
|
1049 |
TBuf8<RMobileSmsMessaging::KGsmTpduSize> iPdu;
|
|
1050 |
|
|
1051 |
CArrayPtrFlat<TSmsParameters>* iSmspListArray;
|
|
1052 |
|
|
1053 |
TInt iNumOfSmspSets;
|
|
1054 |
|
|
1055 |
TSmsMsg iSmsMsg;
|
|
1056 |
};
|
|
1057 |
|
|
1058 |
#endif // SMS_H
|
|
1059 |
|
|
1060 |
// End of File |