epoc32/include/app/smscmds.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
2:2fe1408b6811 3:e1b950c65cb4
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SMSCMDS_H__
       
    17 #define __SMSCMDS_H__
       
    18 
       
    19 #include <e32def.h>
       
    20 
       
    21 /**
       
    22 Numeric value of the first SMS-specific command.
       
    23 
       
    24 This is only used by TSmsMtmCommand.
       
    25 
       
    26 @see	TSmsMtmCommand
       
    27 
       
    28 @internalComponent
       
    29 @released
       
    30 */
       
    31 const TInt KMinCommandExpected = 10000;
       
    32 
       
    33 /**
       
    34 The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL.
       
    35 
       
    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.
       
    39 
       
    40 Some of the commands defined allow the contents of the phone store to accessed
       
    41 and manipulated.
       
    42 
       
    43 @see	CSmsClientMtm::InvokeAsyncFunctionL
       
    44 @see	CSmsClientMtm::ReadSimParamsL
       
    45 @see	CSmsClientMtm::WriteSimParamsL
       
    46 @see	TSmsProgress 
       
    47 
       
    48 @publishedAll
       
    49 @released
       
    50 */
       
    51 enum TSmsMtmCommand 
       
    52 	{
       
    53 /**
       
    54 Gets the service centre address (i.e. telephone number) from the GSM handset.
       
    55 
       
    56 The result may be retrieved from the iServiceCenterAddress member variable 
       
    57 in the TSmsProgress progress object for this operation. 
       
    58 
       
    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 
       
    61 ID. 
       
    62 
       
    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. 
       
    65 
       
    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.
       
    70 
       
    71 @removed	
       
    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.
       
    74 
       
    75 @see	CSmsClientMtm::ReadSimParamsL
       
    76 @see	TSmsProgress
       
    77 */
       
    78 	ESmsMtmCommandReadServiceCenter			= KMinCommandExpected,
       
    79 
       
    80 /** 
       
    81 Sets a new service centre address (i.e. telephone number) on the GSM handset. 
       
    82 
       
    83 The new telephone number is passed in aParameter as an 8-bit descriptor containing 
       
    84 a packaged TSmsServiceCenterAddress. 
       
    85 
       
    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. 
       
    88 
       
    89 @removed
       
    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.
       
    92 
       
    93 @see	CSmsClientMtm::WriteSimParamsL
       
    94 @see	TSmsServiceCenterAddress
       
    95 */
       
    96 	ESmsMtmCommandWriteServiceCenter,
       
    97 
       
    98 /**
       
    99 Schedules the selected SMS messages to be sent.
       
   100 
       
   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 
       
   103 happen.
       
   104 
       
   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.
       
   109 
       
   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.
       
   113 
       
   114 When the scheduled task occurs not only will the selected messages be sent but
       
   115 also any waiting SMS messages in the Outbox.
       
   116 
       
   117 If the messages are successfully sent by the scheduled task, then all the sent
       
   118 messages are moved to the Sent folder.
       
   119 
       
   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.
       
   123 
       
   124 The aParameter agrument is not used.
       
   125 
       
   126 @see	CMsvSession::TransferCommandL
       
   127 
       
   128 @see	CBaseMtm::InvokeAsyncCommandL
       
   129 
       
   130 */
       
   131 	ESmsMtmCommandScheduleCopy,
       
   132 
       
   133 /**
       
   134 Not supported by the SMS MTM.
       
   135 
       
   136 @internalComponent
       
   137 */
       
   138 	ESmsMtmCommandScheduleMove,
       
   139 
       
   140 /**
       
   141 Removes all messages specified in aSelection from the task scheduler list.
       
   142 
       
   143 If successful, the messages will have their SendingState() set to KMsvSendStateSuspended 
       
   144 on completion of this operation. 
       
   145 
       
   146 The aParameter argument is not used by this function. 
       
   147 
       
   148 @see	TMsvEntry::SendingState() 
       
   149 */
       
   150 	ESmsMtmCommandDeleteSchedule,
       
   151 
       
   152 /** 
       
   153 Checks the current scheduled status of the messages specified by aSelection. 
       
   154 
       
   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. 
       
   157 
       
   158 The aParameter argument is not used by this function. 
       
   159 
       
   160 @see	TMsvEntry
       
   161 */
       
   162 	ESmsMtmCommandCheckSchedule,
       
   163 
       
   164 /**
       
   165 Starts sending the specified selection of SMS messages.
       
   166 
       
   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.
       
   169 
       
   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.
       
   174 
       
   175 When the scheduled task occurs not only will the selected messages be sent but
       
   176 also any waiting SMS messages in the Outbox.
       
   177 
       
   178 If the messages are successfully sent by the scheduled task, then all the sent
       
   179 messages are moved to the Sent folder.
       
   180 
       
   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.
       
   184 
       
   185 @internalComponent
       
   186 */
       
   187 	ESmsMtmCommandSendScheduledCopy,
       
   188 
       
   189 /**
       
   190 Not supported by the SMS MTM.
       
   191 
       
   192 @internalComponent
       
   193 */
       
   194 	ESmsMtmCommandSendScheduledMove,
       
   195 
       
   196 /**
       
   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. 
       
   199 
       
   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 
       
   202 store.
       
   203 
       
   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.
       
   208 
       
   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.
       
   212 
       
   213 This command must be called before using ESmsMtmCommandCopyFromPhoneStore, 
       
   214 ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore. 
       
   215 
       
   216 Pre v7.0, this was named ESmsMtmCommandEnumerateSim.
       
   217 
       
   218 @see	TSmsProgress
       
   219 */
       
   220 	ESmsMtmCommandEnumeratePhoneStores,
       
   221 
       
   222 /** 
       
   223 Moves the messages identified in aSelection to the folder identified in aParameter 
       
   224 (e.g. the inbox). 
       
   225 	
       
   226 The associated SMS messages are not deleted from the phone store.
       
   227 
       
   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. 
       
   232 
       
   233 The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
       
   234 this command. 
       
   235 
       
   236 Pre v7.0, this was named ESmsMtmCommandCopyFromSim.
       
   237 
       
   238 @see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
       
   239 */
       
   240 	ESmsMtmCommandCopyFromPhoneStore,  
       
   241 
       
   242 /**
       
   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. 
       
   245 
       
   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. 
       
   250 
       
   251 The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
       
   252 this command. 
       
   253 
       
   254 Pre v7.0, this was named ESmsMtmCommandMoveFromSim.
       
   255 
       
   256 @see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
       
   257 */
       
   258 	ESmsMtmCommandMoveFromPhoneStore,  
       
   259 
       
   260 /**
       
   261 Deletes the specified messages from the phone store.
       
   262 
       
   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.
       
   266 
       
   267 The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
       
   268 this command. 
       
   269 
       
   270 Pre v7.0, this was named ESmsMtmCommandDeleteFromSim.
       
   271 
       
   272 @see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
       
   273 */
       
   274 	ESmsMtmCommandDeleteFromPhoneStore,  
       
   275 
       
   276 /**
       
   277 Reads the SIM parameters.
       
   278 
       
   279 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
       
   280 CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters.
       
   281 
       
   282 @see	CSmsClientMtm::ReadSimParamsL
       
   283 
       
   284 @internalComponent
       
   285 */
       
   286 	ESmsMtmCommandReadSimParams,
       
   287 
       
   288 /**
       
   289 Writes the specified SIM parameters.
       
   290 
       
   291 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
       
   292 CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters.
       
   293 
       
   294 @see	CSmsClientMtm::WriteSimParamsL
       
   295 
       
   296 @internalComponent
       
   297 */
       
   298 	ESmsMtmCommandWriteSimParams,
       
   299 
       
   300 /**
       
   301 Copies the SMS messages identified in aSelection to the phone store.
       
   302 
       
   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.
       
   308 
       
   309 
       
   310 Pre v7.0, this was named ESmsMtmCommandCopyToSim.
       
   311 */
       
   312 	ESmsMtmCommandCopyToPhoneStore,  
       
   313 
       
   314 /**
       
   315 Moves the SMS messages identified in aSelection to the phone store.
       
   316 
       
   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.
       
   322 
       
   323 
       
   324 Pre v7.0, this was named ESmsMtmCommandMoveToSim.
       
   325 */
       
   326 	ESmsMtmCommandMoveToPhoneStore
       
   327 	};
       
   328 
       
   329 #endif	// __SMSCMDS_H__