epoc32/include/app/smscmds.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@4
    14
// smscmds.h
williamr@2
    15
//
williamr@4
    16
/**
williamr@4
    17
 * @file 
williamr@4
    18
 * @publishedAll
williamr@4
    19
 * @released
williamr@4
    20
 */
williamr@2
    21
#ifndef __SMSCMDS_H__
williamr@2
    22
#define __SMSCMDS_H__
williamr@2
    23
williamr@2
    24
#include <e32def.h>
williamr@2
    25
williamr@2
    26
/**
williamr@2
    27
Numeric value of the first SMS-specific command.
williamr@2
    28
williamr@2
    29
This is only used by TSmsMtmCommand.
williamr@2
    30
williamr@2
    31
@see	TSmsMtmCommand
williamr@2
    32
williamr@4
    33
@publishedAll 
williamr@2
    34
@released
williamr@2
    35
*/
williamr@2
    36
const TInt KMinCommandExpected = 10000;
williamr@2
    37
williamr@2
    38
/**
williamr@2
    39
The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL.
williamr@2
    40
williamr@2
    41
SMS messages can be stored in a medium other than the message store itself. For
williamr@2
    42
instance, SMS messages can be stored on the SIM card. This alternative storage
williamr@2
    43
is referred to as the phone store.
williamr@2
    44
williamr@2
    45
Some of the commands defined allow the contents of the phone store to accessed
williamr@2
    46
and manipulated.
williamr@2
    47
williamr@2
    48
@see	CSmsClientMtm::InvokeAsyncFunctionL
williamr@2
    49
@see	CSmsClientMtm::ReadSimParamsL
williamr@2
    50
@see	CSmsClientMtm::WriteSimParamsL
williamr@2
    51
@see	TSmsProgress 
williamr@2
    52
williamr@2
    53
@publishedAll
williamr@2
    54
@released
williamr@2
    55
*/
williamr@2
    56
enum TSmsMtmCommand 
williamr@2
    57
	{
williamr@2
    58
/**
williamr@2
    59
Gets the service centre address (i.e. telephone number) from the GSM handset.
williamr@2
    60
williamr@2
    61
The result may be retrieved from the iServiceCenterAddress member variable 
williamr@2
    62
in the TSmsProgress progress object for this operation. 
williamr@2
    63
williamr@2
    64
The aSelection and aParameter arguments are not used by this command, except 
williamr@2
    65
that aSelection must contain at least one member, preferably the SMS Service 
williamr@2
    66
ID. 
williamr@2
    67
williamr@2
    68
If the telephone handset is unable to supply the service centre address, then 
williamr@2
    69
the progress object for this operation will contain the error. 
williamr@2
    70
williamr@2
    71
NOTE - ESmsMtmCommandReadServiceCenter should only be used if the telephone 
williamr@2
    72
handset or TSY module does not support reading the SMS parameters on the SIM. 
williamr@2
    73
ESmsMtmCommandReadServiceCenter should only be used if the operation 
williamr@2
    74
returned by CSmsClientMtm::ReadSimParamsL completes with KErrNotSupported.
williamr@2
    75
williamr@2
    76
@removed	
williamr@2
    77
This command is not supported from v7.0. The function CSmsClientMtm::ReadSimParamsL
williamr@2
    78
should be used instead to obtain Service Centre number from the phone store.
williamr@2
    79
williamr@2
    80
@see	CSmsClientMtm::ReadSimParamsL
williamr@2
    81
@see	TSmsProgress
williamr@2
    82
*/
williamr@2
    83
	ESmsMtmCommandReadServiceCenter			= KMinCommandExpected,
williamr@2
    84
williamr@2
    85
/** 
williamr@2
    86
Sets a new service centre address (i.e. telephone number) on the GSM handset. 
williamr@2
    87
williamr@2
    88
The new telephone number is passed in aParameter as an 8-bit descriptor containing 
williamr@2
    89
a packaged TSmsServiceCenterAddress. 
williamr@2
    90
williamr@2
    91
The aSelection parameter argument is not used by this command, except that 
williamr@2
    92
aSelection must contain at least one member, preferably the SMS Service ID. 
williamr@2
    93
williamr@2
    94
@removed
williamr@2
    95
This command is not supported from v7.0. The function CSmsClientMtm::WriteSimParamsL
williamr@2
    96
should be used instead to write the Service Centre number to the phone store.
williamr@2
    97
williamr@2
    98
@see	CSmsClientMtm::WriteSimParamsL
williamr@2
    99
@see	TSmsServiceCenterAddress
williamr@2
   100
*/
williamr@2
   101
	ESmsMtmCommandWriteServiceCenter,
williamr@2
   102
williamr@2
   103
/**
williamr@2
   104
Schedules the selected SMS messages to be sent.
williamr@2
   105
williamr@2
   106
The aSelection argument contains the TMsvId of the SMS messages to be sent. An 
williamr@2
   107
empty selection will cause a panic in debug mode. In release mode nothing will 
williamr@2
   108
happen.
williamr@2
   109
williamr@2
   110
The time that each message is scheduled to be sent is set by the date field in
williamr@2
   111
the TMsvEntry for that message. Each message in the selection must have the same
williamr@2
   112
scheduled time as the first message in the selection. A send task is scheduled 
williamr@2
   113
to occur at this time.
williamr@2
   114
williamr@2
   115
In debug mode a panic will occur if all the messages in the selection do not 
williamr@2
   116
have the safe scheduled time. In release mode, the scheduled time sending all 
williamr@2
   117
the messages in the selection will be that of the last message in the selection.
williamr@2
   118
williamr@2
   119
When the scheduled task occurs not only will the selected messages be sent but
williamr@2
   120
also any waiting SMS messages in the Outbox.
williamr@2
   121
williamr@2
   122
If the messages are successfully sent by the scheduled task, then all the sent
williamr@2
   123
messages are moved to the Sent folder.
williamr@2
   124
williamr@2
   125
If any message fails to be sent then the message is marked as failed. Also it
williamr@2
   126
may be re-scheduled to be sent at a later time if that particular error has been
williamr@2
   127
specified as a re-schedulable error. The message remains in its current folder.
williamr@2
   128
williamr@2
   129
The aParameter agrument is not used.
williamr@2
   130
williamr@2
   131
@see	CMsvSession::TransferCommandL
williamr@2
   132
williamr@2
   133
@see	CBaseMtm::InvokeAsyncCommandL
williamr@2
   134
williamr@2
   135
*/
williamr@2
   136
	ESmsMtmCommandScheduleCopy,
williamr@2
   137
williamr@2
   138
/**
williamr@2
   139
Not supported by the SMS MTM.
williamr@2
   140
williamr@4
   141
@publishedAll 
williamr@2
   142
*/
williamr@2
   143
	ESmsMtmCommandScheduleMove,
williamr@2
   144
williamr@2
   145
/**
williamr@2
   146
Removes all messages specified in aSelection from the task scheduler list.
williamr@2
   147
williamr@2
   148
If successful, the messages will have their SendingState() set to KMsvSendStateSuspended 
williamr@2
   149
on completion of this operation. 
williamr@2
   150
williamr@2
   151
The aParameter argument is not used by this function. 
williamr@2
   152
williamr@2
   153
@see	TMsvEntry::SendingState() 
williamr@2
   154
*/
williamr@2
   155
	ESmsMtmCommandDeleteSchedule,
williamr@2
   156
williamr@2
   157
/** 
williamr@2
   158
Checks the current scheduled status of the messages specified by aSelection. 
williamr@2
   159
williamr@2
   160
If successful, the Scheduled() and iDate members of each TMsvEntry identified 
williamr@2
   161
in the selection will be changed to represent that messages's current status. 
williamr@2
   162
williamr@2
   163
The aParameter argument is not used by this function. 
williamr@2
   164
williamr@2
   165
@see	TMsvEntry
williamr@2
   166
*/
williamr@2
   167
	ESmsMtmCommandCheckSchedule,
williamr@2
   168
williamr@2
   169
/**
williamr@2
   170
Starts sending the specified selection of SMS messages.
williamr@2
   171
williamr@2
   172
When a selection of SMS messages are scheduled to be sent using the ESmsMtmCommandScheduleCopy
williamr@2
   173
command this is the actual command that is executed the scheduled time occurs.
williamr@2
   174
williamr@2
   175
The SMS server MTM creates a package contain this command. The package is passed
williamr@2
   176
to the task scheduler who then passes it to the schedule send exe. The exe then
williamr@2
   177
uses the package to ask the SMS server MTM to send the messages. As such this
williamr@2
   178
command should not be used be external clients.
williamr@2
   179
williamr@2
   180
When the scheduled task occurs not only will the selected messages be sent but
williamr@2
   181
also any waiting SMS messages in the Outbox.
williamr@2
   182
williamr@2
   183
If the messages are successfully sent by the scheduled task, then all the sent
williamr@2
   184
messages are moved to the Sent folder.
williamr@2
   185
williamr@2
   186
If any message fails to be sent then the message is marked as failed. Also it
williamr@2
   187
may be re-scheduled to be sent at a later time if that particular error has been
williamr@2
   188
specified as a re-schedulable error. The message remains in its current folder.
williamr@2
   189
williamr@4
   190
@publishedAll 
williamr@2
   191
*/
williamr@2
   192
	ESmsMtmCommandSendScheduledCopy,
williamr@2
   193
williamr@2
   194
/**
williamr@2
   195
Not supported by the SMS MTM.
williamr@2
   196
williamr@4
   197
@publishedAll 
williamr@2
   198
*/
williamr@2
   199
	ESmsMtmCommandSendScheduledMove,
williamr@2
   200
williamr@2
   201
/**
williamr@2
   202
Reads the SMS messages on the phone store and creates a copy of those messages
williamr@2
   203
in an invisible folder under the SMS service in the message store. 
williamr@2
   204
williamr@2
   205
If successful, the iEnumerateFolder member of the operation's progress will 
williamr@2
   206
identify the invisible folder which contains the messages read from the phone 
williamr@2
   207
store.
williamr@2
   208
williamr@2
   209
The aSelection argument must contain at least the SMS servive ID. The aParameter 
williamr@2
   210
argument can optionally be a TPckgC containing the ID of an existing folder to
williamr@2
   211
use for the enumeration. The contents of this folder will be replaced with the
williamr@2
   212
current messages in the phone store.
williamr@2
   213
williamr@2
   214
The operation will fail with KErrArgument if the ID in aParameter is one of the
williamr@2
   215
following - KMsvRootIndexEntryId, KMsvLocalServiceIndexEntryId, KMsvGlobalInBoxIndexEntryId,
williamr@2
   216
KMsvGlobalOutBoxIndexEntryId, KMsvDraftEntryId or KMsvSentEntryId.
williamr@2
   217
williamr@2
   218
This command must be called before using ESmsMtmCommandCopyFromPhoneStore, 
williamr@2
   219
ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore. 
williamr@2
   220
williamr@2
   221
Pre v7.0, this was named ESmsMtmCommandEnumerateSim.
williamr@2
   222
williamr@2
   223
@see	TSmsProgress
williamr@2
   224
*/
williamr@2
   225
	ESmsMtmCommandEnumeratePhoneStores,
williamr@2
   226
williamr@2
   227
/** 
williamr@2
   228
Moves the messages identified in aSelection to the folder identified in aParameter 
williamr@2
   229
(e.g. the inbox). 
williamr@2
   230
	
williamr@2
   231
The associated SMS messages are not deleted from the phone store.
williamr@2
   232
williamr@2
   233
The first entry ID in aSelection must be the SMS service ID. All following 
williamr@2
   234
entry IDs in the selection must then represent each message to be transferred. 
williamr@2
   235
aParameter should contain a packaged TMsvId, which identifies the folder to 
williamr@2
   236
which the messages in aSelection will be moved. 
williamr@2
   237
williamr@2
   238
The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
williamr@2
   239
this command. 
williamr@2
   240
williamr@2
   241
Pre v7.0, this was named ESmsMtmCommandCopyFromSim.
williamr@2
   242
williamr@2
   243
@see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
williamr@2
   244
*/
williamr@2
   245
	ESmsMtmCommandCopyFromPhoneStore,  
williamr@2
   246
williamr@2
   247
/**
williamr@2
   248
Moves the messages identified in aSelection to the folder identified in aParameter 
williamr@2
   249
(e.g. the inbox), and then deletes the messages from the phone store. 
williamr@2
   250
williamr@2
   251
The first entry ID in aSelection must be the SMS service ID. All following 
williamr@2
   252
entry IDs in the selection must then represent each message to be transferred. 
williamr@2
   253
aParameter should contain a packaged TMsvId, which identifies the folder to 
williamr@2
   254
which the messages in aSelection will be moved. 
williamr@2
   255
williamr@2
   256
The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
williamr@2
   257
this command. 
williamr@2
   258
williamr@2
   259
Pre v7.0, this was named ESmsMtmCommandMoveFromSim.
williamr@2
   260
williamr@2
   261
@see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
williamr@2
   262
*/
williamr@2
   263
	ESmsMtmCommandMoveFromPhoneStore,  
williamr@2
   264
williamr@2
   265
/**
williamr@2
   266
Deletes the specified messages from the phone store.
williamr@2
   267
williamr@2
   268
The first entry ID in aSelection must be the SMS service ID. All following 
williamr@2
   269
entry IDs in the selection must then represent each message to be deleted. 
williamr@2
   270
aParameter is not used.
williamr@2
   271
williamr@2
   272
The command ESmsMtmCommandEnumeratePhoneStores must be called before using 
williamr@2
   273
this command. 
williamr@2
   274
williamr@2
   275
Pre v7.0, this was named ESmsMtmCommandDeleteFromSim.
williamr@2
   276
williamr@2
   277
@see	TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores
williamr@2
   278
*/
williamr@2
   279
	ESmsMtmCommandDeleteFromPhoneStore,  
williamr@2
   280
williamr@2
   281
/**
williamr@2
   282
Reads the SIM parameters.
williamr@2
   283
williamr@2
   284
This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
williamr@2
   285
CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters.
williamr@2
   286
williamr@2
   287
@see	CSmsClientMtm::ReadSimParamsL
williamr@2
   288
williamr@4
   289
@publishedAll 
williamr@2
   290
*/
williamr@2
   291
	ESmsMtmCommandReadSimParams,
williamr@2
   292
williamr@2
   293
/**
williamr@2
   294
Writes the specified SIM parameters.
williamr@2
   295
williamr@2
   296
This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The
williamr@2
   297
CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters.
williamr@2
   298
williamr@2
   299
@see	CSmsClientMtm::WriteSimParamsL
williamr@2
   300
williamr@4
   301
@publishedAll 
williamr@2
   302
*/
williamr@2
   303
	ESmsMtmCommandWriteSimParams,
williamr@2
   304
williamr@2
   305
/**
williamr@2
   306
Copies the SMS messages identified in aSelection to the phone store.
williamr@2
   307
williamr@2
   308
The first entry ID in aSelection must be the SMS service ID. All following 
williamr@2
   309
entry IDs in the selection must then represent each message to be copied.
williamr@2
   310
Single message with multiple recipients is copied onto SIM as multiple messages,
williamr@2
   311
one message for each recipient.Copy/Move from SIM will result in multiple messages,
williamr@2
   312
single message will not be reformed out of the mutiple messages on SIM.
williamr@2
   313
williamr@2
   314
williamr@2
   315
Pre v7.0, this was named ESmsMtmCommandCopyToSim.
williamr@2
   316
*/
williamr@2
   317
	ESmsMtmCommandCopyToPhoneStore,  
williamr@2
   318
williamr@2
   319
/**
williamr@2
   320
Moves the SMS messages identified in aSelection to the phone store.
williamr@2
   321
williamr@2
   322
The first entry ID in aSelection must be the SMS service ID. All following 
williamr@2
   323
entry IDs in the selection must then represent each message to be moved.
williamr@2
   324
SSingle message with multiple recipients is moved onto SIM as multiple messages,
williamr@2
   325
one message for each recipient.Copy/Move from SIM will result in multiple messages,
williamr@2
   326
single message will not be reformed out of the mutiple messages on SIM.
williamr@2
   327
williamr@2
   328
williamr@2
   329
Pre v7.0, this was named ESmsMtmCommandMoveToSim.
williamr@2
   330
*/
williamr@2
   331
	ESmsMtmCommandMoveToPhoneStore
williamr@2
   332
	};
williamr@2
   333
williamr@2
   334
#endif	// __SMSCMDS_H__