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