messagingappbase/smsmtm/clientmtm/inc/smscmds.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // smscmds.h
       
    15 //
       
    16 /**
       
    17  * @file 
       
    18  * @publishedAll
       
    19  * @released
       
    20  */
       
    21 #ifndef __SMSCMDS_H__
       
    22 #define __SMSCMDS_H__
       
    23 
       
    24 #include <e32def.h>
       
    25 
       
    26 /**
       
    27 Numeric value of the first SMS-specific command.
       
    28 
       
    29 This is only used by TSmsMtmCommand.
       
    30 
       
    31 @see	TSmsMtmCommand
       
    32 
       
    33 @publishedAll 
       
    34 @released
       
    35 */
       
    36 const TInt KMinCommandExpected = 10000;
       
    37 
       
    38 /**
       
    39 The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL.
       
    40 
       
    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.
       
    44 
       
    45 Some of the commands defined allow the contents of the phone store to accessed
       
    46 and manipulated.
       
    47 
       
    48 @see	CSmsClientMtm::InvokeAsyncFunctionL
       
    49 @see	CSmsClientMtm::ReadSimParamsL
       
    50 @see	CSmsClientMtm::WriteSimParamsL
       
    51 @see	TSmsProgress 
       
    52 
       
    53 @publishedAll
       
    54 @released
       
    55 */
       
    56 enum TSmsMtmCommand 
       
    57 	{
       
    58 /**
       
    59 Gets the service centre address (i.e. telephone number) from the GSM handset.
       
    60 
       
    61 The result may be retrieved from the iServiceCenterAddress member variable 
       
    62 in the TSmsProgress progress object for this operation. 
       
    63 
       
    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 
       
    66 ID. 
       
    67 
       
    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. 
       
    70 
       
    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.
       
    75 
       
    76 @removed	
       
    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.
       
    79 
       
    80 @see	CSmsClientMtm::ReadSimParamsL
       
    81 @see	TSmsProgress
       
    82 */
       
    83 	ESmsMtmCommandReadServiceCenter			= KMinCommandExpected,
       
    84 
       
    85 /** 
       
    86 Sets a new service centre address (i.e. telephone number) on the GSM handset. 
       
    87 
       
    88 The new telephone number is passed in aParameter as an 8-bit descriptor containing 
       
    89 a packaged TSmsServiceCenterAddress. 
       
    90 
       
    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. 
       
    93 
       
    94 @removed
       
    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.
       
    97 
       
    98 @see	CSmsClientMtm::WriteSimParamsL
       
    99 @see	TSmsServiceCenterAddress
       
   100 */
       
   101 	ESmsMtmCommandWriteServiceCenter,
       
   102 
       
   103 /**
       
   104 Schedules the selected SMS messages to be sent.
       
   105 
       
   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 
       
   108 happen.
       
   109 
       
   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.
       
   114 
       
   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.
       
   118 
       
   119 When the scheduled task occurs not only will the selected messages be sent but
       
   120 also any waiting SMS messages in the Outbox.
       
   121 
       
   122 If the messages are successfully sent by the scheduled task, then all the sent
       
   123 messages are moved to the Sent folder.
       
   124 
       
   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.
       
   128 
       
   129 The aParameter agrument is not used.
       
   130 
       
   131 @see	CMsvSession::TransferCommandL
       
   132 
       
   133 @see	CBaseMtm::InvokeAsyncCommandL
       
   134 
       
   135 */
       
   136 	ESmsMtmCommandScheduleCopy,
       
   137 
       
   138 /**
       
   139 Not supported by the SMS MTM.
       
   140 
       
   141 @publishedAll 
       
   142 */
       
   143 	ESmsMtmCommandScheduleMove,
       
   144 
       
   145 /**
       
   146 Removes all messages specified in aSelection from the task scheduler list.
       
   147 
       
   148 If successful, the messages will have their SendingState() set to KMsvSendStateSuspended 
       
   149 on completion of this operation. 
       
   150 
       
   151 The aParameter argument is not used by this function. 
       
   152 
       
   153 @see	TMsvEntry::SendingState() 
       
   154 */
       
   155 	ESmsMtmCommandDeleteSchedule,
       
   156 
       
   157 /** 
       
   158 Checks the current scheduled status of the messages specified by aSelection. 
       
   159 
       
   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. 
       
   162 
       
   163 The aParameter argument is not used by this function. 
       
   164 
       
   165 @see	TMsvEntry
       
   166 */
       
   167 	ESmsMtmCommandCheckSchedule,
       
   168 
       
   169 /**
       
   170 Starts sending the specified selection of SMS messages.
       
   171 
       
   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.
       
   174 
       
   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.
       
   179 
       
   180 When the scheduled task occurs not only will the selected messages be sent but
       
   181 also any waiting SMS messages in the Outbox.
       
   182 
       
   183 If the messages are successfully sent by the scheduled task, then all the sent
       
   184 messages are moved to the Sent folder.
       
   185 
       
   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.
       
   189 
       
   190 @publishedAll 
       
   191 */
       
   192 	ESmsMtmCommandSendScheduledCopy,
       
   193 
       
   194 /**
       
   195 Not supported by the SMS MTM.
       
   196 
       
   197 @publishedAll 
       
   198 */
       
   199 	ESmsMtmCommandSendScheduledMove,
       
   200 
       
   201 /**
       
   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. 
       
   204 
       
   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 
       
   207 store.
       
   208 
       
   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.
       
   213 
       
   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.
       
   217 
       
   218 This command must be called before using ESmsMtmCommandCopyFromPhoneStore, 
       
   219 ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore. 
       
   220 
       
   221 Pre v7.0, this was named ESmsMtmCommandEnumerateSim.
       
   222 
       
   223 @see	TSmsProgress
       
   224 */
       
   225 	ESmsMtmCommandEnumeratePhoneStores,
       
   226 
       
   227 /** 
       
   228 Moves the messages identified in aSelection to the folder identified in aParameter 
       
   229 (e.g. the inbox). 
       
   230 	
       
   231 The associated SMS messages are not deleted from the phone store.
       
   232 
       
   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. 
       
   237 
       
   238 The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
       
   239 this command. 
       
   240 
       
   241 Pre v7.0, this was named ESmsMtmCommandCopyFromSim.
       
   242 
       
   243 @see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
       
   244 */
       
   245 	ESmsMtmCommandCopyFromPhoneStore,  
       
   246 
       
   247 /**
       
   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. 
       
   250 
       
   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. 
       
   255 
       
   256 The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
       
   257 this command. 
       
   258 
       
   259 Pre v7.0, this was named ESmsMtmCommandMoveFromSim.
       
   260 
       
   261 @see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
       
   262 */
       
   263 	ESmsMtmCommandMoveFromPhoneStore,  
       
   264 
       
   265 /**
       
   266 Deletes the specified messages from the phone store.
       
   267 
       
   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.
       
   271 
       
   272 The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
       
   273 this command. 
       
   274 
       
   275 Pre v7.0, this was named ESmsMtmCommandDeleteFromSim.
       
   276 
       
   277 @see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
       
   278 */
       
   279 	ESmsMtmCommandDeleteFromPhoneStore,  
       
   280 
       
   281 /**
       
   282 Reads the SIM parameters.
       
   283 
       
   284 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
       
   285 CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters.
       
   286 
       
   287 @see	CSmsClientMtm::ReadSimParamsL
       
   288 
       
   289 @publishedAll 
       
   290 */
       
   291 	ESmsMtmCommandReadSimParams,
       
   292 
       
   293 /**
       
   294 Writes the specified SIM parameters.
       
   295 
       
   296 This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
       
   297 CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters.
       
   298 
       
   299 @see	CSmsClientMtm::WriteSimParamsL
       
   300 
       
   301 @publishedAll 
       
   302 */
       
   303 	ESmsMtmCommandWriteSimParams,
       
   304 
       
   305 /**
       
   306 Copies the SMS messages identified in aSelection to the phone store.
       
   307 
       
   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 multiple messages on SIM.
       
   313 
       
   314 
       
   315 Pre v7.0, this was named ESmsMtmCommandCopyToSim.
       
   316 */
       
   317 	ESmsMtmCommandCopyToPhoneStore,  
       
   318 
       
   319 /**
       
   320 Moves the SMS messages identified in aSelection to the phone store.
       
   321 
       
   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 multiple messages on SIM.
       
   327 
       
   328 
       
   329 Pre v7.0, this was named ESmsMtmCommandMoveToSim.
       
   330 */
       
   331 	ESmsMtmCommandMoveToPhoneStore
       
   332 	};
       
   333 
       
   334 #endif	// __SMSCMDS_H__