1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 Numeric value of the first SMS-specific command.
24 This is only used by TSmsMtmCommand.
31 const TInt KMinCommandExpected = 10000;
34 The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL.
36 SMS messages can be stored in a medium other than the message store itself. For
37 instance, SMS messages can be stored on the SIM card. This alternative storage
38 is referred to as the phone store.
40 Some of the commands defined allow the contents of the phone store to accessed
43 @see CSmsClientMtm::InvokeAsyncFunctionL
44 @see CSmsClientMtm::ReadSimParamsL
45 @see CSmsClientMtm::WriteSimParamsL
54 Gets the service centre address (i.e. telephone number) from the GSM handset.
56 The result may be retrieved from the iServiceCenterAddress member variable
57 in the TSmsProgress progress object for this operation.
59 The aSelection and aParameter arguments are not used by this command, except
60 that aSelection must contain at least one member, preferably the SMS Service
63 If the telephone handset is unable to supply the service centre address, then
64 the progress object for this operation will contain the error.
66 NOTE - ESmsMtmCommandReadServiceCenter should only be used if the telephone
67 handset or TSY module does not support reading the SMS parameters on the SIM.
68 ESmsMtmCommandReadServiceCenter should only be used if the operation
69 returned by CSmsClientMtm::ReadSimParamsL completes with KErrNotSupported.
72 This command is not supported from v7.0. The function CSmsClientMtm::ReadSimParamsL
73 should be used instead to obtain Service Centre number from the phone store.
75 @see CSmsClientMtm::ReadSimParamsL
78 ESmsMtmCommandReadServiceCenter = KMinCommandExpected,
81 Sets a new service centre address (i.e. telephone number) on the GSM handset.
83 The new telephone number is passed in aParameter as an 8-bit descriptor containing
84 a packaged TSmsServiceCenterAddress.
86 The aSelection parameter argument is not used by this command, except that
87 aSelection must contain at least one member, preferably the SMS Service ID.
90 This command is not supported from v7.0. The function CSmsClientMtm::WriteSimParamsL
91 should be used instead to write the Service Centre number to the phone store.
93 @see CSmsClientMtm::WriteSimParamsL
94 @see TSmsServiceCenterAddress
96 ESmsMtmCommandWriteServiceCenter,
99 Schedules the selected SMS messages to be sent.
101 The aSelection argument contains the TMsvId of the SMS messages to be sent. An
102 empty selection will cause a panic in debug mode. In release mode nothing will
105 The time that each message is scheduled to be sent is set by the date field in
106 the TMsvEntry for that message. Each message in the selection must have the same
107 scheduled time as the first message in the selection. A send task is scheduled
108 to occur at this time.
110 In debug mode a panic will occur if all the messages in the selection do not
111 have the safe scheduled time. In release mode, the scheduled time sending all
112 the messages in the selection will be that of the last message in the selection.
114 When the scheduled task occurs not only will the selected messages be sent but
115 also any waiting SMS messages in the Outbox.
117 If the messages are successfully sent by the scheduled task, then all the sent
118 messages are moved to the Sent folder.
120 If any message fails to be sent then the message is marked as failed. Also it
121 may be re-scheduled to be sent at a later time if that particular error has been
122 specified as a re-schedulable error. The message remains in its current folder.
124 The aParameter agrument is not used.
126 @see CMsvSession::TransferCommandL
128 @see CBaseMtm::InvokeAsyncCommandL
131 ESmsMtmCommandScheduleCopy,
134 Not supported by the SMS MTM.
138 ESmsMtmCommandScheduleMove,
141 Removes all messages specified in aSelection from the task scheduler list.
143 If successful, the messages will have their SendingState() set to KMsvSendStateSuspended
144 on completion of this operation.
146 The aParameter argument is not used by this function.
148 @see TMsvEntry::SendingState()
150 ESmsMtmCommandDeleteSchedule,
153 Checks the current scheduled status of the messages specified by aSelection.
155 If successful, the Scheduled() and iDate members of each TMsvEntry identified
156 in the selection will be changed to represent that messages's current status.
158 The aParameter argument is not used by this function.
162 ESmsMtmCommandCheckSchedule,
165 Starts sending the specified selection of SMS messages.
167 When a selection of SMS messages are scheduled to be sent using the ESmsMtmCommandScheduleCopy
168 command this is the actual command that is executed the scheduled time occurs.
170 The SMS server MTM creates a package contain this command. The package is passed
171 to the task scheduler who then passes it to the schedule send exe. The exe then
172 uses the package to ask the SMS server MTM to send the messages. As such this
173 command should not be used be external clients.
175 When the scheduled task occurs not only will the selected messages be sent but
176 also any waiting SMS messages in the Outbox.
178 If the messages are successfully sent by the scheduled task, then all the sent
179 messages are moved to the Sent folder.
181 If any message fails to be sent then the message is marked as failed. Also it
182 may be re-scheduled to be sent at a later time if that particular error has been
183 specified as a re-schedulable error. The message remains in its current folder.
187 ESmsMtmCommandSendScheduledCopy,
190 Not supported by the SMS MTM.
194 ESmsMtmCommandSendScheduledMove,
197 Reads the SMS messages on the phone store and creates a copy of those messages
198 in an invisible folder under the SMS service in the message store.
200 If successful, the iEnumerateFolder member of the operation's progress will
201 identify the invisible folder which contains the messages read from the phone
204 The aSelection argument must contain at least the SMS servive ID. The aParameter
205 argument can optionally be a TPckgC containing the ID of an existing folder to
206 use for the enumeration. The contents of this folder will be replaced with the
207 current messages in the phone store.
209 The operation will fail with KErrArgument if the ID in aParameter is one of the
210 following - KMsvRootIndexEntryId, KMsvLocalServiceIndexEntryId, KMsvGlobalInBoxIndexEntryId,
211 KMsvGlobalOutBoxIndexEntryId, KMsvDraftEntryId or KMsvSentEntryId.
213 This command must be called before using ESmsMtmCommandCopyFromPhoneStore,
214 ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore.
216 Pre v7.0, this was named ESmsMtmCommandEnumerateSim.
220 ESmsMtmCommandEnumeratePhoneStores,
223 Moves the messages identified in aSelection to the folder identified in aParameter
226 The associated SMS messages are not deleted from the phone store.
228 The first entry ID in aSelection must be the SMS service ID. All following
229 entry IDs in the selection must then represent each message to be transferred.
230 aParameter should contain a packaged TMsvId, which identifies the folder to
231 which the messages in aSelection will be moved.
233 The command ESmsMtmCommandEnumeratePhoneStores must be called before using
236 Pre v7.0, this was named ESmsMtmCommandCopyFromSim.
238 @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
240 ESmsMtmCommandCopyFromPhoneStore,
243 Moves the messages identified in aSelection to the folder identified in aParameter
244 (e.g. the inbox), and then deletes the messages from the phone store.
246 The first entry ID in aSelection must be the SMS service ID. All following
247 entry IDs in the selection must then represent each message to be transferred.
248 aParameter should contain a packaged TMsvId, which identifies the folder to
249 which the messages in aSelection will be moved.
251 The command ESmsMtmCommandEnumeratePhoneStores must be called before using
254 Pre v7.0, this was named ESmsMtmCommandMoveFromSim.
256 @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
258 ESmsMtmCommandMoveFromPhoneStore,
261 Deletes the specified messages from the phone store.
263 The first entry ID in aSelection must be the SMS service ID. All following
264 entry IDs in the selection must then represent each message to be deleted.
265 aParameter is not used.
267 The command ESmsMtmCommandEnumeratePhoneStores must be called before using
270 Pre v7.0, this was named ESmsMtmCommandDeleteFromSim.
272 @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
274 ESmsMtmCommandDeleteFromPhoneStore,
277 Reads the SIM parameters.
279 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
280 CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters.
282 @see CSmsClientMtm::ReadSimParamsL
286 ESmsMtmCommandReadSimParams,
289 Writes the specified SIM parameters.
291 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
292 CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters.
294 @see CSmsClientMtm::WriteSimParamsL
298 ESmsMtmCommandWriteSimParams,
301 Copies the SMS messages identified in aSelection to the phone store.
303 The first entry ID in aSelection must be the SMS service ID. All following
304 entry IDs in the selection must then represent each message to be copied.
305 Single message with multiple recipients is copied onto SIM as multiple messages,
306 one message for each recipient.Copy/Move from SIM will result in multiple messages,
307 single message will not be reformed out of the mutiple messages on SIM.
310 Pre v7.0, this was named ESmsMtmCommandCopyToSim.
312 ESmsMtmCommandCopyToPhoneStore,
315 Moves the SMS messages identified in aSelection to the phone store.
317 The first entry ID in aSelection must be the SMS service ID. All following
318 entry IDs in the selection must then represent each message to be moved.
319 SSingle message with multiple recipients is moved onto SIM as multiple messages,
320 one message for each recipient.Copy/Move from SIM will result in multiple messages,
321 single message will not be reformed out of the mutiple messages on SIM.
324 Pre v7.0, this was named ESmsMtmCommandMoveToSim.
326 ESmsMtmCommandMoveToPhoneStore
329 #endif // __SMSCMDS_H__