williamr@2
|
1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@4
|
14 |
// SMUTSET.H
|
williamr@2
|
15 |
//
|
williamr@4
|
16 |
/**
|
williamr@4
|
17 |
* @file
|
williamr@4
|
18 |
* @publishedAll
|
williamr@4
|
19 |
* @released
|
williamr@4
|
20 |
*/
|
williamr@2
|
21 |
#ifndef __SMUTSET_H__
|
williamr@2
|
22 |
#define __SMUTSET_H__
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#include <gsmumsg.h>
|
williamr@2
|
25 |
#include <msvrcpt.h>
|
williamr@2
|
26 |
#include <msvstore.h>
|
williamr@2
|
27 |
#include <logwrap.h>
|
williamr@2
|
28 |
|
williamr@2
|
29 |
class CSmsServiceCenter;
|
williamr@2
|
30 |
class CSmsEmailFields;
|
williamr@2
|
31 |
|
williamr@2
|
32 |
// Both the recipient's number and SC number (TP-Destination-Address and RP-Destination-Address)
|
williamr@2
|
33 |
// can be 12 octets which means that there can be 21 characters (including + sign) in the number string.
|
williamr@2
|
34 |
|
williamr@2
|
35 |
/**
|
williamr@2
|
36 |
The maximum length of recipient's number.
|
williamr@2
|
37 |
|
williamr@2
|
38 |
The number returned by CSmsNumber::Address() and CSmsServiceCenter::Address() is limited this maximum length.
|
williamr@2
|
39 |
|
williamr@2
|
40 |
@see CSmsNumber::Address
|
williamr@2
|
41 |
@see CSmsServiceCenter::Address
|
williamr@2
|
42 |
|
williamr@2
|
43 |
@publishedAll
|
williamr@2
|
44 |
@released
|
williamr@2
|
45 |
*/
|
williamr@2
|
46 |
const TInt KSmcmSmsNumberMaxNumberLength = 21;
|
williamr@2
|
47 |
|
williamr@2
|
48 |
/**
|
williamr@2
|
49 |
The maximum length of recipient's name.
|
williamr@2
|
50 |
|
williamr@2
|
51 |
The number returned by CSmsNumber::Name() and CSmsServiceCenter::Name() is limited this maximum length.
|
williamr@2
|
52 |
|
williamr@2
|
53 |
@see CSmsNumber::Name
|
williamr@2
|
54 |
@see CSmsServiceCenter::Name
|
williamr@2
|
55 |
|
williamr@2
|
56 |
@publishedAll
|
williamr@2
|
57 |
@released
|
williamr@2
|
58 |
*/
|
williamr@2
|
59 |
const TInt KSmcmSmsNumberMaxNameLength = 256;
|
williamr@2
|
60 |
|
williamr@2
|
61 |
/**
|
williamr@2
|
62 |
Defines the possible forms in which an SMS message should be delivered to the
|
williamr@2
|
63 |
recipient by the service centre.
|
williamr@2
|
64 |
|
williamr@2
|
65 |
The specified format may or may not actually be supported by the service centre.
|
williamr@2
|
66 |
Note that the format of the recipient address(es) may need to be different
|
williamr@2
|
67 |
to a normal telephone number if the conversion is set to any other value than
|
williamr@2
|
68 |
ESmsConvPIDNone, ESmsConvFax, ESmsConvPaging or ESmsConvErmes.
|
williamr@2
|
69 |
|
williamr@2
|
70 |
@publishedAll
|
williamr@2
|
71 |
@released
|
williamr@2
|
72 |
*/
|
williamr@2
|
73 |
enum TSmsPIDConversion
|
williamr@2
|
74 |
{
|
williamr@2
|
75 |
/**
|
williamr@2
|
76 |
No conversion (i.e. use SMS itself).
|
williamr@2
|
77 |
*/
|
williamr@2
|
78 |
ESmsConvPIDNone = TSmsProtocolIdentifier::ESmsNoTelematicDevice,
|
williamr@2
|
79 |
/**
|
williamr@2
|
80 |
Convert to fax.
|
williamr@2
|
81 |
*/
|
williamr@2
|
82 |
ESmsConvFax = TSmsProtocolIdentifier::ESmsGroup3TeleFax,
|
williamr@2
|
83 |
/**
|
williamr@2
|
84 |
Convert to X.400.
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
ESmsConvX400 = TSmsProtocolIdentifier::ESmsX400MessageHandlingSystem,
|
williamr@2
|
87 |
/**
|
williamr@2
|
88 |
Convert to pager message.
|
williamr@2
|
89 |
*/
|
williamr@2
|
90 |
ESmsConvPaging = TSmsProtocolIdentifier::ESmsNationalPagingSystem,
|
williamr@2
|
91 |
/**
|
williamr@2
|
92 |
Convert to Internet email.
|
williamr@2
|
93 |
*/
|
williamr@2
|
94 |
ESmsConvMail = TSmsProtocolIdentifier::ESmsInternetElectronicMail,
|
williamr@2
|
95 |
/**
|
williamr@2
|
96 |
Convert to ERMES paging.
|
williamr@2
|
97 |
*/
|
williamr@2
|
98 |
ESmsConvErmes = TSmsProtocolIdentifier::ESmsERMES,
|
williamr@2
|
99 |
/**
|
williamr@2
|
100 |
Convert to sppech.
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
ESmsConvSpeech = TSmsProtocolIdentifier::ESmsVoiceTelephone
|
williamr@2
|
103 |
};
|
williamr@2
|
104 |
|
williamr@2
|
105 |
/**
|
williamr@2
|
106 |
Defines the set of possible validity periods for mobile originated messages.
|
williamr@2
|
107 |
|
williamr@2
|
108 |
Mobile originated messages have a PDU type of SMS-SUBMIT.
|
williamr@2
|
109 |
|
williamr@2
|
110 |
@publishedAll
|
williamr@2
|
111 |
@released
|
williamr@2
|
112 |
*/
|
williamr@2
|
113 |
enum TSmcmValidityPeriod
|
williamr@2
|
114 |
{
|
williamr@2
|
115 |
/**
|
williamr@2
|
116 |
Validity period of an hour.
|
williamr@2
|
117 |
*/
|
williamr@2
|
118 |
ESmsVPHour = TSmsValidityPeriod::EHalfHourUnitInMinutes*2,
|
williamr@2
|
119 |
/**
|
williamr@2
|
120 |
Validity period of six hours.
|
williamr@2
|
121 |
*/
|
williamr@2
|
122 |
ESmsVPSixHours = TSmsValidityPeriod::EHalfHourUnitInMinutes*12,
|
williamr@2
|
123 |
/**
|
williamr@2
|
124 |
Validity period of 24 hours.
|
williamr@2
|
125 |
*/
|
williamr@2
|
126 |
ESmsVP24Hours = TSmsValidityPeriod::EOneDayUnitInMinutes,
|
williamr@2
|
127 |
/**
|
williamr@2
|
128 |
Validity period of a week.
|
williamr@2
|
129 |
*/
|
williamr@2
|
130 |
ESmsVPWeek = TSmsValidityPeriod::EOneWeekUnitInMinutes,
|
williamr@2
|
131 |
/**
|
williamr@2
|
132 |
The maximum validity period - currently set as 63 weeks.
|
williamr@2
|
133 |
*/
|
williamr@2
|
134 |
ESmsVPMaximum = TSmsValidityPeriod::EOneWeekUnitInMinutes*63,
|
williamr@2
|
135 |
/**
|
williamr@2
|
136 |
An enum that specifies that a validity period is not supported.
|
williamr@2
|
137 |
*/
|
williamr@2
|
138 |
ESmsVPNotSupported = KErrNotSupported,
|
williamr@2
|
139 |
/**
|
williamr@2
|
140 |
The default validy period - currently set to a week.
|
williamr@2
|
141 |
*/
|
williamr@2
|
142 |
ESmsVPDefault = ESmsVPWeek
|
williamr@2
|
143 |
};
|
williamr@2
|
144 |
|
williamr@2
|
145 |
/**
|
williamr@2
|
146 |
Defines options for the preferred default sending schedule type of a new message
|
williamr@2
|
147 |
created using the SMS client MTM.
|
williamr@2
|
148 |
|
williamr@2
|
149 |
The option has no direct effect on the SMS MTM. When it is sending an SMS
|
williamr@2
|
150 |
message it automatically appends other SMS messages in the outbox whose send
|
williamr@2
|
151 |
states are marked as KMsvSendStatewaiting or KMsvSendSateUnknown.
|
williamr@2
|
152 |
|
williamr@2
|
153 |
Therefore it is the responsibility of the messaging client to set the correct
|
williamr@2
|
154 |
send state of new SMS messages correctly given the preferred sending schedule.
|
williamr@2
|
155 |
|
williamr@2
|
156 |
@publishedAll
|
williamr@2
|
157 |
@released
|
williamr@2
|
158 |
*/
|
williamr@2
|
159 |
enum TSmsDelivery
|
williamr@2
|
160 |
{
|
williamr@2
|
161 |
/**
|
williamr@2
|
162 |
Send message immediately. The message send state should be set to KMsvSendStateWaiting.
|
williamr@2
|
163 |
*/
|
williamr@2
|
164 |
ESmsDeliveryImmediately,
|
williamr@2
|
165 |
/**
|
williamr@2
|
166 |
Send message when client requests. The message send state should be set to KMsvSendStateUponRequest.
|
williamr@2
|
167 |
*/
|
williamr@2
|
168 |
ESmsDeliveryUponRequest,
|
williamr@2
|
169 |
/**
|
williamr@2
|
170 |
Send message at scheduled time. The message send state should be set to KMsvSendStateScheduled.
|
williamr@2
|
171 |
*/
|
williamr@2
|
172 |
ESmsDeliveryScheduled
|
williamr@2
|
173 |
};
|
williamr@2
|
174 |
|
williamr@2
|
175 |
/**
|
williamr@2
|
176 |
Defines the flags and masks for some of the message settings.
|
williamr@2
|
177 |
|
williamr@2
|
178 |
The settings classes CSmsMessageSettings and CSmsSettings use these flags to
|
williamr@2
|
179 |
store the specified information.
|
williamr@2
|
180 |
|
williamr@4
|
181 |
@publishedAll
|
williamr@2
|
182 |
@released
|
williamr@2
|
183 |
*/
|
williamr@2
|
184 |
enum TSmsSettingsFlags
|
williamr@2
|
185 |
{
|
williamr@2
|
186 |
/**
|
williamr@2
|
187 |
Mask that resets the flags.
|
williamr@2
|
188 |
*/
|
williamr@4
|
189 |
ESmsSettingsNoFlags =0x00000000,
|
williamr@2
|
190 |
/**
|
williamr@2
|
191 |
Flag that indicates if messages can be concatenated.
|
williamr@2
|
192 |
|
williamr@2
|
193 |
If true, the UI should pass a long message in one piece to the MTM. If false,
|
williamr@2
|
194 |
it should split the message manually into 140 byte parts. The value of this
|
williamr@2
|
195 |
flag does not affect the behaviour of the SMS MTM.
|
williamr@2
|
196 |
*/
|
williamr@2
|
197 |
ESmsSettingsCanConcatenate =0x00000001,
|
williamr@2
|
198 |
/**
|
williamr@2
|
199 |
Flag that indicates whether the original message should be included in relpy
|
williamr@2
|
200 |
messages.
|
williamr@2
|
201 |
|
williamr@2
|
202 |
If true, the received message should be quoted at the beginning of the reply
|
williamr@2
|
203 |
message. If false, reply messages should be initially empty.
|
williamr@2
|
204 |
*/
|
williamr@2
|
205 |
ESmsSettingsReplyQuoted =0x00000002,
|
williamr@2
|
206 |
/**
|
williamr@2
|
207 |
Flag that indicates whether duplicate messages should be rejected.
|
williamr@2
|
208 |
*/
|
williamr@2
|
209 |
ESmsSettingsRejectDuplicate =0x00000004,
|
williamr@2
|
210 |
/**
|
williamr@2
|
211 |
Flag that indicates if a status report (TP-SRR in GSM spec 03.40) should be
|
williamr@2
|
212 |
requested from the Service Centre.
|
williamr@2
|
213 |
*/
|
williamr@2
|
214 |
ESmsSettingsDeliveryReport =0x00000008,
|
williamr@2
|
215 |
/**
|
williamr@2
|
216 |
Flag that indicates if the reply path (Service Centre address) should be included
|
williamr@2
|
217 |
in the delivered message (TP-RP in GSM spec 03.40).
|
williamr@2
|
218 |
*/
|
williamr@2
|
219 |
ESmsSettingsReplyPathRequested =0x00000010,
|
williamr@2
|
220 |
/**
|
williamr@2
|
221 |
Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment
|
williamr@2
|
222 |
should be requested from the Service Centre.
|
williamr@2
|
223 |
*/
|
williamr@2
|
224 |
ESmsSettingsLastSegmentDeliveryReport =0x00000020 ,
|
williamr@2
|
225 |
|
williamr@2
|
226 |
/**
|
williamr@2
|
227 |
Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment
|
williamr@2
|
228 |
is not requested from the Service Centre.
|
williamr@2
|
229 |
*/
|
williamr@2
|
230 |
ENoSmsSettingsLastSegmentDeliveryReport =0x00000040,
|
williamr@2
|
231 |
/**
|
williamr@2
|
232 |
Flag that indicates that the service center time stamp should be used for the date
|
williamr@2
|
233 |
field in any TMsvEntry that corresponds to a SMS message.
|
williamr@2
|
234 |
*/
|
williamr@2
|
235 |
ESmsSettingsUseServiceCenterTimeStamp =0x00000080,
|
williamr@2
|
236 |
/**
|
williamr@4
|
237 |
Flag that indicates if message received from unknown port,
|
williamr@4
|
238 |
discard the message without indicating the user.
|
williamr@4
|
239 |
*/
|
williamr@4
|
240 |
ESmsSettingsDiscardUnknownPortMsgs =0x00000100,
|
williamr@4
|
241 |
/**
|
williamr@2
|
242 |
Mask for the set of flags defined.
|
williamr@2
|
243 |
*/
|
williamr@2
|
244 |
ESmsSettingsMask =0x000000FF,
|
williamr@2
|
245 |
};
|
williamr@2
|
246 |
|
williamr@2
|
247 |
|
williamr@2
|
248 |
/**
|
williamr@2
|
249 |
Defines the types of acknowledgements that can be received from recipients.
|
williamr@2
|
250 |
*/
|
williamr@2
|
251 |
enum TSmsAckType
|
williamr@2
|
252 |
{
|
williamr@2
|
253 |
/**
|
williamr@2
|
254 |
Acknowlwdgement of delivery to a recipient.
|
williamr@2
|
255 |
*/
|
williamr@2
|
256 |
ESmsAckTypeDelivery =0
|
williamr@2
|
257 |
};
|
williamr@2
|
258 |
|
williamr@2
|
259 |
/**
|
williamr@2
|
260 |
Progress information for SMS MTM operations.
|
williamr@2
|
261 |
|
williamr@2
|
262 |
This information is returned by CMsvOperation::ProgressL() in a TSmsProgressBuf
|
williamr@2
|
263 |
package.
|
williamr@2
|
264 |
|
williamr@2
|
265 |
@see CMsvOperation::ProgressL
|
williamr@2
|
266 |
|
williamr@2
|
267 |
@publishedAll
|
williamr@2
|
268 |
@released
|
williamr@2
|
269 |
*/
|
williamr@2
|
270 |
class TSmsProgress
|
williamr@2
|
271 |
{
|
williamr@2
|
272 |
public:
|
williamr@2
|
273 |
/**
|
williamr@2
|
274 |
Defines type of operation for which progress information is being given.
|
williamr@2
|
275 |
|
williamr@2
|
276 |
These types correspond to the commands defined in TSmsMtmCommand.
|
williamr@2
|
277 |
|
williamr@2
|
278 |
@see TSmsMtmCommand
|
williamr@2
|
279 |
*/
|
williamr@2
|
280 |
enum TSmsProgressType
|
williamr@2
|
281 |
{
|
williamr@2
|
282 |
/**
|
williamr@2
|
283 |
The default operation type - no operation.
|
williamr@2
|
284 |
*/
|
williamr@2
|
285 |
ESmsProgressTypeDefault,
|
williamr@2
|
286 |
/**
|
williamr@2
|
287 |
Reading SIM parameters.
|
williamr@2
|
288 |
|
williamr@2
|
289 |
Pre v7.0, this was named ESmsProgressTypeReadingServiceCenterAddress.
|
williamr@2
|
290 |
*/
|
williamr@2
|
291 |
ESmsProgressTypeReadSimParams,
|
williamr@2
|
292 |
/**
|
williamr@2
|
293 |
Writing SIM parameters.
|
williamr@2
|
294 |
|
williamr@2
|
295 |
Pre v7.0 this was named ESmsProgressTypeWritingServiceCenterAddress.
|
williamr@2
|
296 |
*/
|
williamr@2
|
297 |
ESmsProgressTypeWriteSimParams,
|
williamr@2
|
298 |
/**
|
williamr@2
|
299 |
Sending messages.
|
williamr@2
|
300 |
*/
|
williamr@2
|
301 |
ESmsProgressTypeSending,
|
williamr@2
|
302 |
/**
|
williamr@2
|
303 |
Scheduling sending messages.
|
williamr@2
|
304 |
*/
|
williamr@2
|
305 |
ESmsProgressTypeScheduling,
|
williamr@2
|
306 |
/**
|
williamr@2
|
307 |
Enumerating phone stores.
|
williamr@2
|
308 |
|
williamr@2
|
309 |
Pre v7.0, this was named ESmsProgressTypeEnumeratingSim.
|
williamr@2
|
310 |
*/
|
williamr@2
|
311 |
ESmsProgressTypeEnumeratingPhoneStores,
|
williamr@2
|
312 |
/**
|
williamr@2
|
313 |
Copying messages from phone stores.
|
williamr@2
|
314 |
|
williamr@2
|
315 |
Pre v7.0, this was named ESmsProgressTypeCopyFromSim.
|
williamr@2
|
316 |
*/
|
williamr@2
|
317 |
ESmsProgressTypeCopyFromPhoneStore,
|
williamr@2
|
318 |
/**
|
williamr@2
|
319 |
Moving messages from phone stores.
|
williamr@2
|
320 |
|
williamr@2
|
321 |
Pre v7.0, this was named ESmsProgressTypeMoveFromSim.
|
williamr@2
|
322 |
*/
|
williamr@2
|
323 |
ESmsProgressTypeMoveFromPhoneStore,
|
williamr@2
|
324 |
/**
|
williamr@2
|
325 |
Deleting messages from phone stores.
|
williamr@2
|
326 |
|
williamr@2
|
327 |
Pre v7.0, this was named ESmsProgressTypeDeleteFromSim.
|
williamr@2
|
328 |
*/
|
williamr@2
|
329 |
ESmsProgressTypeDeleteFromPhoneStore,
|
williamr@2
|
330 |
/**
|
williamr@2
|
331 |
Removing all messages from the task scheduler list.
|
williamr@2
|
332 |
*/
|
williamr@2
|
333 |
ESmsProgressTypeDeleteSchedule,
|
williamr@2
|
334 |
/**
|
williamr@2
|
335 |
Checking the current scheduled status of the messages.
|
williamr@2
|
336 |
*/
|
williamr@2
|
337 |
ESmsProgressTypeCheckSchedule,
|
williamr@2
|
338 |
/**
|
williamr@2
|
339 |
Recursively deleting messages.
|
williamr@2
|
340 |
*/
|
williamr@2
|
341 |
ESmsProgressTypeDeleteAll,
|
williamr@2
|
342 |
/**
|
williamr@2
|
343 |
Copying messages to a phone store.
|
williamr@2
|
344 |
|
williamr@2
|
345 |
Pre v7.0, this was named ESmsProgressTypeCopyToSim.
|
williamr@2
|
346 |
*/
|
williamr@2
|
347 |
ESmsProgressTypeCopyToPhoneStore,
|
williamr@2
|
348 |
/**
|
williamr@2
|
349 |
Moving messages to a phone store.
|
williamr@2
|
350 |
|
williamr@2
|
351 |
Pre v7.0, this was named ESmsProgressTypeMoveToSim.
|
williamr@2
|
352 |
*/
|
williamr@2
|
353 |
ESmsProgressTypeMoveToPhoneStore,
|
williamr@2
|
354 |
/**
|
williamr@2
|
355 |
Moving message entries.
|
williamr@2
|
356 |
|
williamr@2
|
357 |
This is the second part of ESmsProgressTypeMoveFromPhoneStore. The first part
|
williamr@2
|
358 |
deletes the messages from the phone storageSIM. This second part moves the
|
williamr@2
|
359 |
messages from the folder that represents the phone storage to the specified
|
williamr@2
|
360 |
destination.
|
williamr@2
|
361 |
*/
|
williamr@2
|
362 |
ESmsProgressTypeMovingEntries
|
williamr@2
|
363 |
};
|
williamr@2
|
364 |
|
williamr@2
|
365 |
inline TSmsProgress(TSmsProgressType aType = ESmsProgressTypeDefault);
|
williamr@2
|
366 |
|
williamr@2
|
367 |
public:
|
williamr@2
|
368 |
|
williamr@2
|
369 |
/**
|
williamr@2
|
370 |
The error code.
|
williamr@2
|
371 |
*/
|
williamr@2
|
372 |
TInt iError;
|
williamr@2
|
373 |
/**
|
williamr@2
|
374 |
The type of operation.
|
williamr@2
|
375 |
|
williamr@2
|
376 |
@see TSmsProgress::TSmsProgressType
|
williamr@2
|
377 |
*/
|
williamr@2
|
378 |
TSmsProgressType iType;
|
williamr@2
|
379 |
/**
|
williamr@2
|
380 |
The state of the operation.
|
williamr@2
|
381 |
*/
|
williamr@2
|
382 |
TInt iState;
|
williamr@2
|
383 |
/**
|
williamr@2
|
384 |
The number of recipients processed so far for the current message.
|
williamr@2
|
385 |
*/
|
williamr@2
|
386 |
TInt iRcpDone;
|
williamr@2
|
387 |
/**
|
williamr@2
|
388 |
The total number of recipients in the current message.
|
williamr@2
|
389 |
*/
|
williamr@2
|
390 |
TInt iRcpCount;
|
williamr@2
|
391 |
/**
|
williamr@2
|
392 |
The nmber of messages processed so far for the current operation.
|
williamr@2
|
393 |
*/
|
williamr@2
|
394 |
TInt iMsgDone;
|
williamr@2
|
395 |
/**
|
williamr@2
|
396 |
The total number of messages for the current operation.
|
williamr@2
|
397 |
*/
|
williamr@2
|
398 |
TInt iMsgCount;
|
williamr@2
|
399 |
/**
|
williamr@2
|
400 |
The Service Centre address.
|
williamr@2
|
401 |
|
williamr@2
|
402 |
This is set by the command ESmsMtmCommandReadServiceCenter.
|
williamr@2
|
403 |
|
williamr@2
|
404 |
@removed
|
williamr@2
|
405 |
This is no longer used since v7.0.
|
williamr@2
|
406 |
*/
|
williamr@2
|
407 |
TBuf<14> iServiceCenterAddress;
|
williamr@2
|
408 |
/**
|
williamr@2
|
409 |
The invisible folder that contains the messages read from the SIM by the command
|
williamr@2
|
410 |
ESmsMtmCommandEnumeratePhoneStores.
|
williamr@2
|
411 |
*/
|
williamr@2
|
412 |
TMsvId iEnumerateFolder;
|
williamr@2
|
413 |
};
|
williamr@2
|
414 |
|
williamr@2
|
415 |
/**
|
williamr@2
|
416 |
Package buffer for TSmsProgress.
|
williamr@2
|
417 |
|
williamr@2
|
418 |
@see TSmsProgress
|
williamr@2
|
419 |
|
williamr@2
|
420 |
@publishedAll
|
williamr@2
|
421 |
@released
|
williamr@2
|
422 |
*/
|
williamr@2
|
423 |
typedef TPckgBuf<TSmsProgress> TSmsProgressBuf;
|
williamr@2
|
424 |
|
williamr@2
|
425 |
|
williamr@2
|
426 |
/**
|
williamr@2
|
427 |
The SMS settings that are relevant on a per message basis.
|
williamr@2
|
428 |
|
williamr@2
|
429 |
Each SMS message has its own settings. Initially they have a default set of
|
williamr@2
|
430 |
values derived from the SMS service settings. They can be changed on an
|
williamr@2
|
431 |
individual message basis. For instance, a messaging application may allow a
|
williamr@2
|
432 |
user to specify/not specify status reports individually for each message.
|
williamr@2
|
433 |
|
williamr@2
|
434 |
These settings are only relevant to mobile originated messages - those of
|
williamr@2
|
435 |
SMS-SUBMIT type.
|
williamr@2
|
436 |
|
williamr@2
|
437 |
@publishedAll
|
williamr@2
|
438 |
@released
|
williamr@2
|
439 |
*/
|
williamr@4
|
440 |
NONSHARABLE_CLASS(CSmsMessageSettings): public CBase
|
williamr@2
|
441 |
{
|
williamr@2
|
442 |
public:
|
williamr@2
|
443 |
IMPORT_C virtual void InternalizeL(RReadStream& aReadStream);
|
williamr@2
|
444 |
IMPORT_C virtual void ExternalizeL(RWriteStream& aWriteStream) const;
|
williamr@2
|
445 |
|
williamr@2
|
446 |
inline const TTimeIntervalMinutes& ValidityPeriod() const;
|
williamr@2
|
447 |
inline void SetValidityPeriod(TTimeIntervalMinutes);
|
williamr@2
|
448 |
|
williamr@2
|
449 |
inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat);
|
williamr@2
|
450 |
inline const TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const;
|
williamr@2
|
451 |
|
williamr@2
|
452 |
inline TBool RejectDuplicate() const;
|
williamr@2
|
453 |
inline void SetRejectDuplicate(TBool);
|
williamr@2
|
454 |
|
williamr@2
|
455 |
inline TBool DeliveryReport() const;
|
williamr@2
|
456 |
inline void SetDeliveryReport(TBool);
|
williamr@2
|
457 |
|
williamr@2
|
458 |
inline TBool ReplyPath() const;
|
williamr@2
|
459 |
inline void SetReplyPath(TBool);
|
williamr@2
|
460 |
|
williamr@2
|
461 |
inline TSmsPIDConversion MessageConversion() const;
|
williamr@2
|
462 |
inline void SetMessageConversion(TSmsPIDConversion);
|
williamr@2
|
463 |
|
williamr@2
|
464 |
inline TBool CanConcatenate() const;
|
williamr@2
|
465 |
inline void SetCanConcatenate(TBool);
|
williamr@2
|
466 |
|
williamr@2
|
467 |
inline enum TSmsDataCodingScheme::TSmsAlphabet CharacterSet() const;
|
williamr@2
|
468 |
inline void SetCharacterSet(TSmsDataCodingScheme::TSmsAlphabet);
|
williamr@2
|
469 |
|
williamr@2
|
470 |
IMPORT_C virtual void CopyL(const CSmsMessageSettings& aSettings);
|
williamr@2
|
471 |
|
williamr@2
|
472 |
TUint32 MessageFlags() const;
|
williamr@2
|
473 |
void SetMessageFlags(TUint32 aMsgFlags);
|
williamr@2
|
474 |
inline TBool LastSegmentDeliveryReport() const;
|
williamr@2
|
475 |
inline void SetLastSegmentDeliveryReport(TBool);
|
williamr@2
|
476 |
|
williamr@2
|
477 |
inline void SetUseServiceCenterTimeStampForDate(TBool aUseServiceCenterTimestamp);
|
williamr@2
|
478 |
inline TBool UseServiceCenterTimeStampForDate() const;
|
williamr@2
|
479 |
|
williamr@2
|
480 |
protected:
|
williamr@2
|
481 |
|
williamr@2
|
482 |
CSmsMessageSettings();
|
williamr@2
|
483 |
|
williamr@2
|
484 |
private:
|
williamr@2
|
485 |
|
williamr@2
|
486 |
TUint32 iMsgFlags;
|
williamr@2
|
487 |
TSmsPIDConversion iMessageConversion;
|
williamr@2
|
488 |
TSmsDataCodingScheme::TSmsAlphabet iAlphabet;
|
williamr@2
|
489 |
TTimeIntervalMinutes iValidityPeriod;
|
williamr@2
|
490 |
TSmsFirstOctet::TSmsValidityPeriodFormat iValidityPeriodFormat;
|
williamr@2
|
491 |
};
|
williamr@2
|
492 |
|
williamr@2
|
493 |
/**
|
williamr@2
|
494 |
The SMS Service settings.
|
williamr@2
|
495 |
|
williamr@2
|
496 |
An SMS service entry stores an object of this type in its message store. These
|
williamr@2
|
497 |
settings define the default settings for mobile originated messages (SMS-SUBMIT
|
williamr@2
|
498 |
type messages). They also provide some global settings that are applied to all
|
williamr@2
|
499 |
messages, both outward going and received messages.
|
williamr@2
|
500 |
|
williamr@2
|
501 |
The SMS service also uses this class to store the set of avilable Servive Centre
|
williamr@2
|
502 |
numbers. The default Service Centre is defined from this set.
|
williamr@2
|
503 |
|
williamr@2
|
504 |
@publishedAll
|
williamr@2
|
505 |
@released
|
williamr@2
|
506 |
*/
|
williamr@4
|
507 |
NONSHARABLE_CLASS(CSmsSettings): public CSmsMessageSettings
|
williamr@2
|
508 |
{
|
williamr@2
|
509 |
public:
|
williamr@2
|
510 |
|
williamr@2
|
511 |
/**
|
williamr@2
|
512 |
Defines the ways in which status reports that are received by the watcher may
|
williamr@2
|
513 |
be handled.
|
williamr@2
|
514 |
|
williamr@2
|
515 |
This can be applied to both SMS-STATUS-REPORT type messages and Special Messages
|
williamr@2
|
516 |
(e.g. Voice Mail Indication messages).
|
williamr@2
|
517 |
*/
|
williamr@2
|
518 |
enum TSmsReportHandling
|
williamr@2
|
519 |
{
|
williamr@2
|
520 |
/**
|
williamr@2
|
521 |
The reports are put in the inbox and made invisible.
|
williamr@2
|
522 |
*/
|
williamr@2
|
523 |
EMoveReportToInboxInvisible,
|
williamr@2
|
524 |
/**
|
williamr@2
|
525 |
The reports are put in the inbox and made visible.
|
williamr@2
|
526 |
*/
|
williamr@2
|
527 |
EMoveReportToInboxVisible,
|
williamr@2
|
528 |
/**
|
williamr@2
|
529 |
The reports are deleted.
|
williamr@2
|
530 |
*/
|
williamr@2
|
531 |
EDiscardReport,
|
williamr@2
|
532 |
/**
|
williamr@2
|
533 |
Not supported.
|
williamr@2
|
534 |
*/
|
williamr@2
|
535 |
EDoNotWatchForReport,
|
williamr@2
|
536 |
/**
|
williamr@2
|
537 |
Reports are put in the inbox and made invisible. The status report
|
williamr@2
|
538 |
is matched against the sent mesasge and its summary info updated.
|
williamr@2
|
539 |
*/
|
williamr@2
|
540 |
EMoveReportToInboxInvisibleAndMatch,
|
williamr@2
|
541 |
/**
|
williamr@2
|
542 |
Reports are put in the inbox and made visible. The status report
|
williamr@2
|
543 |
is matched against the sent mesasge and its summary info updated.
|
williamr@2
|
544 |
*/
|
williamr@2
|
545 |
EMoveReportToInboxVisibleAndMatch,
|
williamr@2
|
546 |
/**
|
williamr@2
|
547 |
Reports are deleted. The status report is matched against the sent
|
williamr@2
|
548 |
mesasge and its summary info updated.
|
williamr@2
|
549 |
*/
|
williamr@2
|
550 |
EDiscardReportAndMatch
|
williamr@2
|
551 |
};
|
williamr@2
|
552 |
|
williamr@2
|
553 |
/**
|
williamr@2
|
554 |
Sets whether the service settings should be used to update the communications
|
williamr@2
|
555 |
database.
|
williamr@2
|
556 |
|
williamr@2
|
557 |
If the update is specified, it is done when the Service settings are stored into
|
williamr@2
|
558 |
the message store.
|
williamr@2
|
559 |
*/
|
williamr@2
|
560 |
enum TSmsSettingsCommDbAction
|
williamr@2
|
561 |
{
|
williamr@2
|
562 |
/**
|
williamr@2
|
563 |
The comms database should not be updated.
|
williamr@2
|
564 |
*/
|
williamr@2
|
565 |
ENone,
|
williamr@2
|
566 |
/**
|
williamr@2
|
567 |
Use the Service settings to update the comms datebase.
|
williamr@2
|
568 |
*/
|
williamr@2
|
569 |
EStoreToCommDb
|
williamr@2
|
570 |
};
|
williamr@2
|
571 |
|
williamr@2
|
572 |
/** Defines the SMS bearer.
|
williamr@2
|
573 |
Modes: GSM */
|
williamr@2
|
574 |
enum TMobileSmsBearer
|
williamr@2
|
575 |
{
|
williamr@2
|
576 |
/** SMS messages will only be sent over a packet-switched (GPRS) network. */
|
williamr@2
|
577 |
ESmsBearerPacketOnly,
|
williamr@2
|
578 |
/** SMS messages will only be sent over a circuit-switched (GSM) network. */
|
williamr@2
|
579 |
ESmsBearerCircuitOnly,
|
williamr@2
|
580 |
/** SMS messages will be sent over the packet-switched (GPRS) network if possible,
|
williamr@2
|
581 |
otherwise over circuit-switched (GSM) network. */
|
williamr@2
|
582 |
ESmsBearerPacketPreferred,
|
williamr@2
|
583 |
/** SMS messages will be sent over the circuit-switched (GSM) network if possible,
|
williamr@2
|
584 |
otherwise over packet-switched (GPRS) network. */
|
williamr@2
|
585 |
ESmsBearerCircuitPreferred
|
williamr@2
|
586 |
};
|
williamr@2
|
587 |
|
williamr@2
|
588 |
public:
|
williamr@2
|
589 |
|
williamr@2
|
590 |
IMPORT_C static CSmsSettings* NewL();
|
williamr@2
|
591 |
IMPORT_C static CSmsSettings* NewLC();
|
williamr@2
|
592 |
IMPORT_C virtual ~CSmsSettings();
|
williamr@2
|
593 |
|
williamr@2
|
594 |
IMPORT_C TInt ServiceCenterCount() const;
|
williamr@2
|
595 |
IMPORT_C CSmsServiceCenter& GetServiceCenter(TInt aIndex) const;
|
williamr@2
|
596 |
IMPORT_C void AddServiceCenterL(const TDesC& aName,const TDesC& aNumber);
|
williamr@2
|
597 |
IMPORT_C void RemoveServiceCenter(TInt aIndex);
|
williamr@2
|
598 |
IMPORT_C TInt DefaultServiceCenter() const;
|
williamr@2
|
599 |
IMPORT_C void SetDefaultServiceCenter(TInt aDefaultSC);
|
williamr@2
|
600 |
inline TSmsDelivery Delivery() const;
|
williamr@2
|
601 |
inline void SetDelivery(TSmsDelivery);
|
williamr@2
|
602 |
|
williamr@2
|
603 |
inline TBool ReplyQuoted() const;
|
williamr@2
|
604 |
inline void SetReplyQuoted(TBool);
|
williamr@2
|
605 |
|
williamr@2
|
606 |
IMPORT_C void CopyL(const CSmsSettings& aSmsSettings);
|
williamr@2
|
607 |
|
williamr@2
|
608 |
inline TSmsReportHandling StatusReportHandling() const;
|
williamr@2
|
609 |
inline void SetStatusReportHandling(TSmsReportHandling aStatusReportHandling);
|
williamr@2
|
610 |
inline TSmsReportHandling SpecialMessageHandling() const;
|
williamr@2
|
611 |
inline void SetSpecialMessageHandling(TSmsReportHandling aSpecialMessageHandling);
|
williamr@2
|
612 |
|
williamr@2
|
613 |
inline void SetCommDbAction(TSmsSettingsCommDbAction aCommDbAction);
|
williamr@2
|
614 |
inline TSmsSettingsCommDbAction CommDbAction() const;
|
williamr@2
|
615 |
|
williamr@2
|
616 |
inline void SetSmsBearerAction(TSmsSettingsCommDbAction aSmsBearerAction);
|
williamr@2
|
617 |
inline TSmsSettingsCommDbAction SmsBearerAction() const;
|
williamr@2
|
618 |
|
williamr@2
|
619 |
inline void SetSmsBearer(TMobileSmsBearer aSmsBearer);
|
williamr@2
|
620 |
inline TMobileSmsBearer SmsBearer() const;
|
williamr@2
|
621 |
|
williamr@2
|
622 |
inline void SetClass2Folder(TMsvId aId);
|
williamr@2
|
623 |
inline TMsvId Class2Folder() const;
|
williamr@2
|
624 |
|
williamr@2
|
625 |
inline void SetDescriptionLength(TInt aLength);
|
williamr@2
|
626 |
inline TInt DescriptionLength() const;
|
williamr@2
|
627 |
|
williamr@4
|
628 |
inline TBool DiscardUnknownPortMessage() const;
|
williamr@4
|
629 |
inline void SetDiscardUnknownPortMessage(TBool aDeleteMessage);
|
williamr@2
|
630 |
TUint32 SettingsFlags() const;
|
williamr@2
|
631 |
void SetSettingsFlags(TUint32 aSetFlags);
|
williamr@2
|
632 |
|
williamr@2
|
633 |
void RemoveSCAddresses();
|
williamr@2
|
634 |
void StoreToCommDbL() const;
|
williamr@2
|
635 |
|
williamr@2
|
636 |
private:
|
williamr@2
|
637 |
|
williamr@2
|
638 |
CSmsSettings();
|
williamr@2
|
639 |
void ConstructL();
|
williamr@2
|
640 |
|
williamr@2
|
641 |
private:
|
williamr@2
|
642 |
|
williamr@2
|
643 |
TUint32 iSetFlags;
|
williamr@2
|
644 |
CArrayPtrFlat<CSmsServiceCenter> *iServiceCenters;
|
williamr@2
|
645 |
TSmsDelivery iDelivery;
|
williamr@2
|
646 |
TInt iDefaultSC;
|
williamr@2
|
647 |
TSmsReportHandling iStatusReportHandling;
|
williamr@2
|
648 |
TSmsReportHandling iSpecialMessageHandling;
|
williamr@2
|
649 |
TSmsSettingsCommDbAction iCommDbAction;
|
williamr@2
|
650 |
TSmsSettingsCommDbAction iSmsBearerAction;
|
williamr@2
|
651 |
TMobileSmsBearer iSmsBearer;
|
williamr@2
|
652 |
TMsvId iClass2Folder;
|
williamr@2
|
653 |
TInt iDescriptionLength;
|
williamr@2
|
654 |
};
|
williamr@2
|
655 |
|
williamr@2
|
656 |
/**
|
williamr@2
|
657 |
Recipient information for an SMS message.
|
williamr@2
|
658 |
|
williamr@2
|
659 |
A SMS-SUBMIT message may have several recipients
|
williamr@2
|
660 |
|
williamr@2
|
661 |
@publishedAll
|
williamr@2
|
662 |
@released
|
williamr@2
|
663 |
*/
|
williamr@4
|
664 |
NONSHARABLE_CLASS(CSmsNumber): public CMsvRecipient
|
williamr@2
|
665 |
{
|
williamr@2
|
666 |
public:
|
williamr@2
|
667 |
|
williamr@2
|
668 |
/**
|
williamr@2
|
669 |
Defines the status of an acknowledgement for a recipient.
|
williamr@2
|
670 |
*/
|
williamr@2
|
671 |
enum TSmsAckStatus
|
williamr@2
|
672 |
{
|
williamr@2
|
673 |
/**
|
williamr@2
|
674 |
An acknowledgement for this recipient has not been requested.
|
williamr@2
|
675 |
*/
|
williamr@2
|
676 |
ENoAckRequested = 0,
|
williamr@2
|
677 |
/**
|
williamr@2
|
678 |
The delivery status for this recipient has been requested, but the status report
|
williamr@2
|
679 |
has not yet been received.
|
williamr@2
|
680 |
*/
|
williamr@2
|
681 |
EPendingAck,
|
williamr@2
|
682 |
/**
|
williamr@2
|
683 |
A successful acknowledgement for this recipient has been received.
|
williamr@2
|
684 |
*/
|
williamr@2
|
685 |
EAckSuccessful,
|
williamr@2
|
686 |
/**
|
williamr@2
|
687 |
A failed acknowledgement for this recipient has been received.
|
williamr@2
|
688 |
*/
|
williamr@2
|
689 |
EAckError
|
williamr@2
|
690 |
};
|
williamr@2
|
691 |
|
williamr@2
|
692 |
public:
|
williamr@2
|
693 |
|
williamr@2
|
694 |
IMPORT_C static CSmsNumber* NewL();
|
williamr@2
|
695 |
IMPORT_C static CSmsNumber* NewL(const CSmsNumber& aSmsNumber);
|
williamr@2
|
696 |
IMPORT_C virtual ~CSmsNumber();
|
williamr@2
|
697 |
|
williamr@2
|
698 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
williamr@2
|
699 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
williamr@2
|
700 |
|
williamr@2
|
701 |
IMPORT_C TPtrC Address() const;
|
williamr@2
|
702 |
IMPORT_C void SetAddressL(const TDesC& aAddress);
|
williamr@2
|
703 |
void SetEmailAddressL(const TDesC& aAddress, CSmsEmailFields* aEmailFields, const TDesC& aAlias);
|
williamr@2
|
704 |
|
williamr@2
|
705 |
IMPORT_C TPtrC Name() const;
|
williamr@2
|
706 |
IMPORT_C void SetNameL(const TDesC& aName);
|
williamr@2
|
707 |
|
williamr@2
|
708 |
inline TLogId LogId() const;
|
williamr@2
|
709 |
inline void SetLogId(TLogId aLogId);
|
williamr@2
|
710 |
|
williamr@2
|
711 |
IMPORT_C CSmsNumber& CopyL(const CSmsNumber& aSmsNumber);
|
williamr@2
|
712 |
|
williamr@2
|
713 |
IMPORT_C TSmsAckStatus AckStatus(TSmsAckType aAckType) const;
|
williamr@2
|
714 |
IMPORT_C void SetAckStatus(TSmsAckType aAckType, TSmsAckStatus aAckStatus);
|
williamr@2
|
715 |
|
williamr@2
|
716 |
private:
|
williamr@2
|
717 |
|
williamr@2
|
718 |
CSmsNumber();
|
williamr@2
|
719 |
TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const;
|
williamr@2
|
720 |
|
williamr@2
|
721 |
private:
|
williamr@2
|
722 |
|
williamr@2
|
723 |
HBufC* iNumber;
|
williamr@2
|
724 |
HBufC* iName;
|
williamr@2
|
725 |
TLogId iLogId;
|
williamr@2
|
726 |
TSmsAckStatus iDeliveryStatus;
|
williamr@2
|
727 |
};
|
williamr@2
|
728 |
|
williamr@2
|
729 |
/**
|
williamr@2
|
730 |
Used to store Service Centre numbers and their associated name.
|
williamr@2
|
731 |
|
williamr@2
|
732 |
@publishedAll
|
williamr@2
|
733 |
@released
|
williamr@2
|
734 |
*/
|
williamr@4
|
735 |
NONSHARABLE_CLASS (CSmsServiceCenter) : public CBase
|
williamr@2
|
736 |
{
|
williamr@2
|
737 |
public:
|
williamr@2
|
738 |
IMPORT_C static CSmsServiceCenter* NewL();
|
williamr@2
|
739 |
IMPORT_C static CSmsServiceCenter* NewL(const CSmsServiceCenter& aSmsSC);
|
williamr@2
|
740 |
IMPORT_C ~CSmsServiceCenter();
|
williamr@2
|
741 |
|
williamr@2
|
742 |
IMPORT_C TPtrC Address() const;
|
williamr@2
|
743 |
IMPORT_C void SetAddressL(const TDesC& aAddress);
|
williamr@2
|
744 |
|
williamr@2
|
745 |
IMPORT_C TPtrC Name() const;
|
williamr@2
|
746 |
IMPORT_C void SetNameL(const TDesC& aName);
|
williamr@2
|
747 |
|
williamr@2
|
748 |
IMPORT_C CSmsServiceCenter& CopyL(const CSmsServiceCenter& aSmsSc);
|
williamr@2
|
749 |
|
williamr@2
|
750 |
private:
|
williamr@2
|
751 |
CSmsServiceCenter();
|
williamr@2
|
752 |
TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const;
|
williamr@2
|
753 |
|
williamr@2
|
754 |
private:
|
williamr@2
|
755 |
HBufC* iNumber;
|
williamr@2
|
756 |
HBufC* iName;
|
williamr@2
|
757 |
};
|
williamr@2
|
758 |
|
williamr@2
|
759 |
#include <smutset.inl>
|
williamr@2
|
760 |
|
williamr@2
|
761 |
#endif // __SMUTSET_H__
|