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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
27 Numeric value of the first SMS-specific command.
29 This is only used by TSmsMtmCommand.
36 const TInt KMinCommandExpected = 10000;
39 The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL.
41 SMS messages can be stored in a medium other than the message store itself. For
42 instance, SMS messages can be stored on the SIM card. This alternative storage
43 is referred to as the phone store.
45 Some of the commands defined allow the contents of the phone store to accessed
48 @see CSmsClientMtm::InvokeAsyncFunctionL
49 @see CSmsClientMtm::ReadSimParamsL
50 @see CSmsClientMtm::WriteSimParamsL
59 Gets the service centre address (i.e. telephone number) from the GSM handset.
61 The result may be retrieved from the iServiceCenterAddress member variable
62 in the TSmsProgress progress object for this operation.
64 The aSelection and aParameter arguments are not used by this command, except
65 that aSelection must contain at least one member, preferably the SMS Service
68 If the telephone handset is unable to supply the service centre address, then
69 the progress object for this operation will contain the error.
71 NOTE - ESmsMtmCommandReadServiceCenter should only be used if the telephone
72 handset or TSY module does not support reading the SMS parameters on the SIM.
73 ESmsMtmCommandReadServiceCenter should only be used if the operation
74 returned by CSmsClientMtm::ReadSimParamsL completes with KErrNotSupported.
77 This command is not supported from v7.0. The function CSmsClientMtm::ReadSimParamsL
78 should be used instead to obtain Service Centre number from the phone store.
80 @see CSmsClientMtm::ReadSimParamsL
83 ESmsMtmCommandReadServiceCenter = KMinCommandExpected,
86 Sets a new service centre address (i.e. telephone number) on the GSM handset.
88 The new telephone number is passed in aParameter as an 8-bit descriptor containing
89 a packaged TSmsServiceCenterAddress.
91 The aSelection parameter argument is not used by this command, except that
92 aSelection must contain at least one member, preferably the SMS Service ID.
95 This command is not supported from v7.0. The function CSmsClientMtm::WriteSimParamsL
96 should be used instead to write the Service Centre number to the phone store.
98 @see CSmsClientMtm::WriteSimParamsL
99 @see TSmsServiceCenterAddress
101 ESmsMtmCommandWriteServiceCenter,
104 Schedules the selected SMS messages to be sent.
106 The aSelection argument contains the TMsvId of the SMS messages to be sent. An
107 empty selection will cause a panic in debug mode. In release mode nothing will
110 The time that each message is scheduled to be sent is set by the date field in
111 the TMsvEntry for that message. Each message in the selection must have the same
112 scheduled time as the first message in the selection. A send task is scheduled
113 to occur at this time.
115 In debug mode a panic will occur if all the messages in the selection do not
116 have the safe scheduled time. In release mode, the scheduled time sending all
117 the messages in the selection will be that of the last message in the selection.
119 When the scheduled task occurs not only will the selected messages be sent but
120 also any waiting SMS messages in the Outbox.
122 If the messages are successfully sent by the scheduled task, then all the sent
123 messages are moved to the Sent folder.
125 If any message fails to be sent then the message is marked as failed. Also it
126 may be re-scheduled to be sent at a later time if that particular error has been
127 specified as a re-schedulable error. The message remains in its current folder.
129 The aParameter agrument is not used.
131 @see CMsvSession::TransferCommandL
133 @see CBaseMtm::InvokeAsyncCommandL
136 ESmsMtmCommandScheduleCopy,
139 Not supported by the SMS MTM.
143 ESmsMtmCommandScheduleMove,
146 Removes all messages specified in aSelection from the task scheduler list.
148 If successful, the messages will have their SendingState() set to KMsvSendStateSuspended
149 on completion of this operation.
151 The aParameter argument is not used by this function.
153 @see TMsvEntry::SendingState()
155 ESmsMtmCommandDeleteSchedule,
158 Checks the current scheduled status of the messages specified by aSelection.
160 If successful, the Scheduled() and iDate members of each TMsvEntry identified
161 in the selection will be changed to represent that messages's current status.
163 The aParameter argument is not used by this function.
167 ESmsMtmCommandCheckSchedule,
170 Starts sending the specified selection of SMS messages.
172 When a selection of SMS messages are scheduled to be sent using the ESmsMtmCommandScheduleCopy
173 command this is the actual command that is executed the scheduled time occurs.
175 The SMS server MTM creates a package contain this command. The package is passed
176 to the task scheduler who then passes it to the schedule send exe. The exe then
177 uses the package to ask the SMS server MTM to send the messages. As such this
178 command should not be used be external clients.
180 When the scheduled task occurs not only will the selected messages be sent but
181 also any waiting SMS messages in the Outbox.
183 If the messages are successfully sent by the scheduled task, then all the sent
184 messages are moved to the Sent folder.
186 If any message fails to be sent then the message is marked as failed. Also it
187 may be re-scheduled to be sent at a later time if that particular error has been
188 specified as a re-schedulable error. The message remains in its current folder.
192 ESmsMtmCommandSendScheduledCopy,
195 Not supported by the SMS MTM.
199 ESmsMtmCommandSendScheduledMove,
202 Reads the SMS messages on the phone store and creates a copy of those messages
203 in an invisible folder under the SMS service in the message store.
205 If successful, the iEnumerateFolder member of the operation's progress will
206 identify the invisible folder which contains the messages read from the phone
209 The aSelection argument must contain at least the SMS servive ID. The aParameter
210 argument can optionally be a TPckgC containing the ID of an existing folder to
211 use for the enumeration. The contents of this folder will be replaced with the
212 current messages in the phone store.
214 The operation will fail with KErrArgument if the ID in aParameter is one of the
215 following - KMsvRootIndexEntryId, KMsvLocalServiceIndexEntryId, KMsvGlobalInBoxIndexEntryId,
216 KMsvGlobalOutBoxIndexEntryId, KMsvDraftEntryId or KMsvSentEntryId.
218 This command must be called before using ESmsMtmCommandCopyFromPhoneStore,
219 ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore.
221 Pre v7.0, this was named ESmsMtmCommandEnumerateSim.
225 ESmsMtmCommandEnumeratePhoneStores,
228 Moves the messages identified in aSelection to the folder identified in aParameter
231 The associated SMS messages are not deleted from the phone store.
233 The first entry ID in aSelection must be the SMS service ID. All following
234 entry IDs in the selection must then represent each message to be transferred.
235 aParameter should contain a packaged TMsvId, which identifies the folder to
236 which the messages in aSelection will be moved.
238 The command ESmsMtmCommandEnumeratePhoneStores must be called before using
241 Pre v7.0, this was named ESmsMtmCommandCopyFromSim.
243 @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
245 ESmsMtmCommandCopyFromPhoneStore,
248 Moves the messages identified in aSelection to the folder identified in aParameter
249 (e.g. the inbox), and then deletes the messages from the phone store.
251 The first entry ID in aSelection must be the SMS service ID. All following
252 entry IDs in the selection must then represent each message to be transferred.
253 aParameter should contain a packaged TMsvId, which identifies the folder to
254 which the messages in aSelection will be moved.
256 The command ESmsMtmCommandEnumeratePhoneStores must be called before using
259 Pre v7.0, this was named ESmsMtmCommandMoveFromSim.
261 @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
263 ESmsMtmCommandMoveFromPhoneStore,
266 Deletes the specified messages from the phone store.
268 The first entry ID in aSelection must be the SMS service ID. All following
269 entry IDs in the selection must then represent each message to be deleted.
270 aParameter is not used.
272 The command ESmsMtmCommandEnumeratePhoneStores must be called before using
275 Pre v7.0, this was named ESmsMtmCommandDeleteFromSim.
277 @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
279 ESmsMtmCommandDeleteFromPhoneStore,
282 Reads the SIM parameters.
284 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
285 CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters.
287 @see CSmsClientMtm::ReadSimParamsL
291 ESmsMtmCommandReadSimParams,
294 Writes the specified SIM parameters.
296 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
297 CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters.
299 @see CSmsClientMtm::WriteSimParamsL
303 ESmsMtmCommandWriteSimParams,
306 Copies the SMS messages identified in aSelection to the phone store.
308 The first entry ID in aSelection must be the SMS service ID. All following
309 entry IDs in the selection must then represent each message to be copied.
310 Single message with multiple recipients is copied onto SIM as multiple messages,
311 one message for each recipient.Copy/Move from SIM will result in multiple messages,
312 single message will not be reformed out of the mutiple messages on SIM.
315 Pre v7.0, this was named ESmsMtmCommandCopyToSim.
317 ESmsMtmCommandCopyToPhoneStore,
320 Moves the SMS messages identified in aSelection to the phone store.
322 The first entry ID in aSelection must be the SMS service ID. All following
323 entry IDs in the selection must then represent each message to be moved.
324 SSingle message with multiple recipients is moved onto SIM as multiple messages,
325 one message for each recipient.Copy/Move from SIM will result in multiple messages,
326 single message will not be reformed out of the mutiple messages on SIM.
329 Pre v7.0, this was named ESmsMtmCommandMoveToSim.
331 ESmsMtmCommandMoveToPhoneStore
334 #endif // __SMSCMDS_H__