williamr@2: // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __SMSCMDS_H__ williamr@2: #define __SMSCMDS_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: /** williamr@2: Numeric value of the first SMS-specific command. williamr@2: williamr@2: This is only used by TSmsMtmCommand. williamr@2: williamr@2: @see TSmsMtmCommand williamr@2: williamr@2: @internalComponent williamr@2: @released williamr@2: */ williamr@2: const TInt KMinCommandExpected = 10000; williamr@2: williamr@2: /** williamr@2: The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL. williamr@2: williamr@2: SMS messages can be stored in a medium other than the message store itself. For williamr@2: instance, SMS messages can be stored on the SIM card. This alternative storage williamr@2: is referred to as the phone store. williamr@2: williamr@2: Some of the commands defined allow the contents of the phone store to accessed williamr@2: and manipulated. williamr@2: williamr@2: @see CSmsClientMtm::InvokeAsyncFunctionL williamr@2: @see CSmsClientMtm::ReadSimParamsL williamr@2: @see CSmsClientMtm::WriteSimParamsL williamr@2: @see TSmsProgress williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TSmsMtmCommand williamr@2: { williamr@2: /** williamr@2: Gets the service centre address (i.e. telephone number) from the GSM handset. williamr@2: williamr@2: The result may be retrieved from the iServiceCenterAddress member variable williamr@2: in the TSmsProgress progress object for this operation. williamr@2: williamr@2: The aSelection and aParameter arguments are not used by this command, except williamr@2: that aSelection must contain at least one member, preferably the SMS Service williamr@2: ID. williamr@2: williamr@2: If the telephone handset is unable to supply the service centre address, then williamr@2: the progress object for this operation will contain the error. williamr@2: williamr@2: NOTE - ESmsMtmCommandReadServiceCenter should only be used if the telephone williamr@2: handset or TSY module does not support reading the SMS parameters on the SIM. williamr@2: ESmsMtmCommandReadServiceCenter should only be used if the operation williamr@2: returned by CSmsClientMtm::ReadSimParamsL completes with KErrNotSupported. williamr@2: williamr@2: @removed williamr@2: This command is not supported from v7.0. The function CSmsClientMtm::ReadSimParamsL williamr@2: should be used instead to obtain Service Centre number from the phone store. williamr@2: williamr@2: @see CSmsClientMtm::ReadSimParamsL williamr@2: @see TSmsProgress williamr@2: */ williamr@2: ESmsMtmCommandReadServiceCenter = KMinCommandExpected, williamr@2: williamr@2: /** williamr@2: Sets a new service centre address (i.e. telephone number) on the GSM handset. williamr@2: williamr@2: The new telephone number is passed in aParameter as an 8-bit descriptor containing williamr@2: a packaged TSmsServiceCenterAddress. williamr@2: williamr@2: The aSelection parameter argument is not used by this command, except that williamr@2: aSelection must contain at least one member, preferably the SMS Service ID. williamr@2: williamr@2: @removed williamr@2: This command is not supported from v7.0. The function CSmsClientMtm::WriteSimParamsL williamr@2: should be used instead to write the Service Centre number to the phone store. williamr@2: williamr@2: @see CSmsClientMtm::WriteSimParamsL williamr@2: @see TSmsServiceCenterAddress williamr@2: */ williamr@2: ESmsMtmCommandWriteServiceCenter, williamr@2: williamr@2: /** williamr@2: Schedules the selected SMS messages to be sent. williamr@2: williamr@2: The aSelection argument contains the TMsvId of the SMS messages to be sent. An williamr@2: empty selection will cause a panic in debug mode. In release mode nothing will williamr@2: happen. williamr@2: williamr@2: The time that each message is scheduled to be sent is set by the date field in williamr@2: the TMsvEntry for that message. Each message in the selection must have the same williamr@2: scheduled time as the first message in the selection. A send task is scheduled williamr@2: to occur at this time. williamr@2: williamr@2: In debug mode a panic will occur if all the messages in the selection do not williamr@2: have the safe scheduled time. In release mode, the scheduled time sending all williamr@2: the messages in the selection will be that of the last message in the selection. williamr@2: williamr@2: When the scheduled task occurs not only will the selected messages be sent but williamr@2: also any waiting SMS messages in the Outbox. williamr@2: williamr@2: If the messages are successfully sent by the scheduled task, then all the sent williamr@2: messages are moved to the Sent folder. williamr@2: williamr@2: If any message fails to be sent then the message is marked as failed. Also it williamr@2: may be re-scheduled to be sent at a later time if that particular error has been williamr@2: specified as a re-schedulable error. The message remains in its current folder. williamr@2: williamr@2: The aParameter agrument is not used. williamr@2: williamr@2: @see CMsvSession::TransferCommandL williamr@2: williamr@2: @see CBaseMtm::InvokeAsyncCommandL williamr@2: williamr@2: */ williamr@2: ESmsMtmCommandScheduleCopy, williamr@2: williamr@2: /** williamr@2: Not supported by the SMS MTM. williamr@2: williamr@2: @internalComponent williamr@2: */ williamr@2: ESmsMtmCommandScheduleMove, williamr@2: williamr@2: /** williamr@2: Removes all messages specified in aSelection from the task scheduler list. williamr@2: williamr@2: If successful, the messages will have their SendingState() set to KMsvSendStateSuspended williamr@2: on completion of this operation. williamr@2: williamr@2: The aParameter argument is not used by this function. williamr@2: williamr@2: @see TMsvEntry::SendingState() williamr@2: */ williamr@2: ESmsMtmCommandDeleteSchedule, williamr@2: williamr@2: /** williamr@2: Checks the current scheduled status of the messages specified by aSelection. williamr@2: williamr@2: If successful, the Scheduled() and iDate members of each TMsvEntry identified williamr@2: in the selection will be changed to represent that messages's current status. williamr@2: williamr@2: The aParameter argument is not used by this function. williamr@2: williamr@2: @see TMsvEntry williamr@2: */ williamr@2: ESmsMtmCommandCheckSchedule, williamr@2: williamr@2: /** williamr@2: Starts sending the specified selection of SMS messages. williamr@2: williamr@2: When a selection of SMS messages are scheduled to be sent using the ESmsMtmCommandScheduleCopy williamr@2: command this is the actual command that is executed the scheduled time occurs. williamr@2: williamr@2: The SMS server MTM creates a package contain this command. The package is passed williamr@2: to the task scheduler who then passes it to the schedule send exe. The exe then williamr@2: uses the package to ask the SMS server MTM to send the messages. As such this williamr@2: command should not be used be external clients. williamr@2: williamr@2: When the scheduled task occurs not only will the selected messages be sent but williamr@2: also any waiting SMS messages in the Outbox. williamr@2: williamr@2: If the messages are successfully sent by the scheduled task, then all the sent williamr@2: messages are moved to the Sent folder. williamr@2: williamr@2: If any message fails to be sent then the message is marked as failed. Also it williamr@2: may be re-scheduled to be sent at a later time if that particular error has been williamr@2: specified as a re-schedulable error. The message remains in its current folder. williamr@2: williamr@2: @internalComponent williamr@2: */ williamr@2: ESmsMtmCommandSendScheduledCopy, williamr@2: williamr@2: /** williamr@2: Not supported by the SMS MTM. williamr@2: williamr@2: @internalComponent williamr@2: */ williamr@2: ESmsMtmCommandSendScheduledMove, williamr@2: williamr@2: /** williamr@2: Reads the SMS messages on the phone store and creates a copy of those messages williamr@2: in an invisible folder under the SMS service in the message store. williamr@2: williamr@2: If successful, the iEnumerateFolder member of the operation's progress will williamr@2: identify the invisible folder which contains the messages read from the phone williamr@2: store. williamr@2: williamr@2: The aSelection argument must contain at least the SMS servive ID. The aParameter williamr@2: argument can optionally be a TPckgC containing the ID of an existing folder to williamr@2: use for the enumeration. The contents of this folder will be replaced with the williamr@2: current messages in the phone store. williamr@2: williamr@2: The operation will fail with KErrArgument if the ID in aParameter is one of the williamr@2: following - KMsvRootIndexEntryId, KMsvLocalServiceIndexEntryId, KMsvGlobalInBoxIndexEntryId, williamr@2: KMsvGlobalOutBoxIndexEntryId, KMsvDraftEntryId or KMsvSentEntryId. williamr@2: williamr@2: This command must be called before using ESmsMtmCommandCopyFromPhoneStore, williamr@2: ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore. williamr@2: williamr@2: Pre v7.0, this was named ESmsMtmCommandEnumerateSim. williamr@2: williamr@2: @see TSmsProgress williamr@2: */ williamr@2: ESmsMtmCommandEnumeratePhoneStores, williamr@2: williamr@2: /** williamr@2: Moves the messages identified in aSelection to the folder identified in aParameter williamr@2: (e.g. the inbox). williamr@2: williamr@2: The associated SMS messages are not deleted from the phone store. williamr@2: williamr@2: The first entry ID in aSelection must be the SMS service ID. All following williamr@2: entry IDs in the selection must then represent each message to be transferred. williamr@2: aParameter should contain a packaged TMsvId, which identifies the folder to williamr@2: which the messages in aSelection will be moved. williamr@2: williamr@2: The command ESmsMtmCommandEnumeratePhoneStores must be called before using williamr@2: this command. williamr@2: williamr@2: Pre v7.0, this was named ESmsMtmCommandCopyFromSim. williamr@2: williamr@2: @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores williamr@2: */ williamr@2: ESmsMtmCommandCopyFromPhoneStore, williamr@2: williamr@2: /** williamr@2: Moves the messages identified in aSelection to the folder identified in aParameter williamr@2: (e.g. the inbox), and then deletes the messages from the phone store. williamr@2: williamr@2: The first entry ID in aSelection must be the SMS service ID. All following williamr@2: entry IDs in the selection must then represent each message to be transferred. williamr@2: aParameter should contain a packaged TMsvId, which identifies the folder to williamr@2: which the messages in aSelection will be moved. williamr@2: williamr@2: The command ESmsMtmCommandEnumeratePhoneStores must be called before using williamr@2: this command. williamr@2: williamr@2: Pre v7.0, this was named ESmsMtmCommandMoveFromSim. williamr@2: williamr@2: @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores williamr@2: */ williamr@2: ESmsMtmCommandMoveFromPhoneStore, williamr@2: williamr@2: /** williamr@2: Deletes the specified messages from the phone store. williamr@2: williamr@2: The first entry ID in aSelection must be the SMS service ID. All following williamr@2: entry IDs in the selection must then represent each message to be deleted. williamr@2: aParameter is not used. williamr@2: williamr@2: The command ESmsMtmCommandEnumeratePhoneStores must be called before using williamr@2: this command. williamr@2: williamr@2: Pre v7.0, this was named ESmsMtmCommandDeleteFromSim. williamr@2: williamr@2: @see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores williamr@2: */ williamr@2: ESmsMtmCommandDeleteFromPhoneStore, williamr@2: williamr@2: /** williamr@2: Reads the SIM parameters. williamr@2: williamr@2: This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The williamr@2: CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters. williamr@2: williamr@2: @see CSmsClientMtm::ReadSimParamsL williamr@2: williamr@2: @internalComponent williamr@2: */ williamr@2: ESmsMtmCommandReadSimParams, williamr@2: williamr@2: /** williamr@2: Writes the specified SIM parameters. williamr@2: williamr@2: This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The williamr@2: CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters. williamr@2: williamr@2: @see CSmsClientMtm::WriteSimParamsL williamr@2: williamr@2: @internalComponent williamr@2: */ williamr@2: ESmsMtmCommandWriteSimParams, williamr@2: williamr@2: /** williamr@2: Copies the SMS messages identified in aSelection to the phone store. williamr@2: williamr@2: The first entry ID in aSelection must be the SMS service ID. All following williamr@2: entry IDs in the selection must then represent each message to be copied. williamr@2: Single message with multiple recipients is copied onto SIM as multiple messages, williamr@2: one message for each recipient.Copy/Move from SIM will result in multiple messages, williamr@2: single message will not be reformed out of the mutiple messages on SIM. williamr@2: williamr@2: williamr@2: Pre v7.0, this was named ESmsMtmCommandCopyToSim. williamr@2: */ williamr@2: ESmsMtmCommandCopyToPhoneStore, williamr@2: williamr@2: /** williamr@2: Moves the SMS messages identified in aSelection to the phone store. williamr@2: williamr@2: The first entry ID in aSelection must be the SMS service ID. All following williamr@2: entry IDs in the selection must then represent each message to be moved. williamr@2: SSingle message with multiple recipients is moved onto SIM as multiple messages, williamr@2: one message for each recipient.Copy/Move from SIM will result in multiple messages, williamr@2: single message will not be reformed out of the mutiple messages on SIM. williamr@2: williamr@2: williamr@2: Pre v7.0, this was named ESmsMtmCommandMoveToSim. williamr@2: */ williamr@2: ESmsMtmCommandMoveToPhoneStore williamr@2: }; williamr@2: williamr@2: #endif // __SMSCMDS_H__