epoc32/include/mw/mtmuibas.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) 1998-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@2
    14
//
williamr@2
    15
williamr@2
    16
#if !defined(__MTMUIBAS_H__)
williamr@2
    17
#define __MTMUIBAS_H__
williamr@2
    18
williamr@2
    19
#if !defined(__MSVSTD_H__)
williamr@2
    20
#include <msvstd.h>
williamr@2
    21
#endif
williamr@2
    22
#if !defined(__MTCLBASE_H__)
williamr@2
    23
#include <mtclbase.h>
williamr@2
    24
#endif
williamr@2
    25
williamr@2
    26
// Forward references
williamr@2
    27
class CMsvSession;
williamr@2
    28
class CMsvOperation;
williamr@2
    29
class CCoeEnv;
williamr@2
    30
williamr@4
    31
//
williamr@2
    32
// CBaseMtmUi - MTMUi base API   //
williamr@4
    33
//
williamr@2
    34
class CBaseMtmUi : public CBase
williamr@2
    35
/** Provides MTM-specific user interaction, such as editing, viewing, deleting, 
williamr@2
    36
and copying of message entries. 
williamr@2
    37
williamr@2
    38
Message client applications use the class to access such functionality polymorphically. 
williamr@2
    39
MTM implementers implement a derived class to provide such functionality for 
williamr@2
    40
their message protocol.
williamr@2
    41
williamr@2
    42
The base class is largely an interface definition: it implements little important 
williamr@2
    43
functionality itself. For implementers, this documentation defines conditions 
williamr@2
    44
that any implementation must fulfil, plus suggested semantics for behaviour. 
williamr@2
    45
This still leaves many decisions in the hands of the implementer. A key design 
williamr@2
    46
time activity is to define how the particular characteristics of the implemented 
williamr@2
    47
protocol are best mapped to the interface. As this class is concerned with 
williamr@2
    48
user interfaces, implementers should be sensitive to the look and feel of 
williamr@2
    49
the target phone.
williamr@2
    50
williamr@2
    51
Many functions are required to return an instance of a CMsvOperation-derived 
williamr@2
    52
class to provide asynchronous control and monitoring to the caller of the 
williamr@2
    53
operation being performed. 
williamr@2
    54
williamr@2
    55
The following are some significant groups of functions:
williamr@2
    56
williamr@2
    57
Entry manipulation functions: OpenL(), CloseL(), EditL(), and ViewL() are 
williamr@2
    58
all available in two overloaded versions. The first version operates on the 
williamr@2
    59
current context. The second version operates upon groups of entries specified 
williamr@2
    60
by a CMsvEntrySelection argument. All entries must be in same folder and all 
williamr@2
    61
of the correct MTM type. The context may change after calling these functions. 
williamr@2
    62
Concrete User Interface MTMs can legally ignore any of the entries within 
williamr@2
    63
the selection - many may, for example, simply open the first entry.
williamr@2
    64
williamr@2
    65
Copying and moving functions: the CopyToL(), CopyFromL(), MoveToL(), and MoveFromL() 
williamr@2
    66
functions are concerned with copying and moving entries to and from remote 
williamr@2
    67
servers. MTMs can implement these functions to provide any user interaction 
williamr@2
    68
needed before copying or moving can proceed, such as dialogs to confirm settings; 
williamr@2
    69
and, any protocol-specific setup steps that can be done at this stage: for 
williamr@2
    70
example, a fax MTM could render messages into the required image format.
williamr@2
    71
williamr@2
    72
Progress information functions: DisplayProgressSummary() and GetProgress() 
williamr@2
    73
convert MTM-specific progress information about some asynchronous operation, 
williamr@2
    74
such as message sending, to a human-readable form. The progress information 
williamr@2
    75
to pass into these functions is, in general, obtained from an on-going CMsvOperation 
williamr@2
    76
by calling CMsvOperation::Progress(). The nature of any information provided 
williamr@2
    77
is MTM-specific. 
williamr@2
    78
williamr@2
    79
MTM-specific UI functions: MTM components can offer protocol-specific functionality 
williamr@2
    80
not provided by base class interface functions. MTM components define IDs 
williamr@2
    81
that correspond to each protocol-specific operation offered, and implement 
williamr@2
    82
the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients 
williamr@2
    83
to access these operations by passing in the appropriate ID. Two functions 
williamr@2
    84
are provided to allow the MTM component to offer both synchronous and asynchronous 
williamr@2
    85
functionality. Message client applications can dynamically add user-interface 
williamr@2
    86
features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). 
williamr@2
    87
MTM developers should document the IDs if they wish to make the operations 
williamr@2
    88
available to clients. 
williamr@2
    89
@publishedAll
williamr@2
    90
@released
williamr@2
    91
*/
williamr@2
    92
	{
williamr@2
    93
public:
williamr@2
    94
	//  --- enums ---
williamr@2
    95
	/** Progress information buffer length. */
williamr@2
    96
	enum {
williamr@2
    97
	/** Defines the maximum buffer length used in GetProgress() to hold progress information. */
williamr@2
    98
	EProgressStringMaxLen=255};
williamr@2
    99
	//
williamr@2
   100
	// --- Set up functionality ---
williamr@2
   101
	IMPORT_C void SetPreferences(TUint aFlags);
williamr@2
   102
	IMPORT_C TUint Preferences() const;
williamr@2
   103
	//
williamr@2
   104
	// --- Destruction ---
williamr@2
   105
	IMPORT_C virtual ~CBaseMtmUi();
williamr@2
   106
	//
williamr@2
   107
	// --- Accessor functions ---
williamr@2
   108
	IMPORT_C TUid Type() const;
williamr@2
   109
	IMPORT_C CBaseMtm& BaseMtm() const;
williamr@2
   110
	//
williamr@2
   111
	// --- Functions NOT dependent on the current context ---
williamr@2
   112
	IMPORT_C virtual CMsvOperation* CreateL(const TMsvEntry& aEntry, CMsvEntry& aParent, TRequestStatus& aStatus);
williamr@2
   113
	//
williamr@2
   114
	// --- Functions dependent on the current context ---
williamr@2
   115
	/** Opens an entry. 
williamr@2
   116
	
williamr@2
   117
	The behaviour that this implies is dependent on the current context:
williamr@2
   118
	
williamr@2
   119
	1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only 
williamr@2
   120
	messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific.
williamr@2
   121
	
williamr@2
   122
	2. for service contexts, the function may initiate a connection to obtain the 
williamr@2
   123
	service contents from the server, completing asynchronously
williamr@2
   124
	
williamr@2
   125
	3. for remote folder contexts, dependent on implementation, the function may 
williamr@2
   126
	initiate a connection to obtain the folder contents from the server, completing 
williamr@2
   127
	asynchronously
williamr@2
   128
	
williamr@2
   129
	The returned CMsvOperation object completes when opening is complete.
williamr@2
   130
	
williamr@2
   131
	Requirements:
williamr@2
   132
	
williamr@2
   133
	If opening entries is not supported, implementations should leave with KErrNotSupported. 
williamr@2
   134
	Otherwise, implementations should:
williamr@2
   135
	
williamr@2
   136
	1. check aEntry.iType.iUid to ensure that they can open the requested type of 
williamr@2
   137
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   138
	
williamr@2
   139
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   140
	monitoring of the operation
williamr@2
   141
	
williamr@2
   142
	3. for remote messages, typically, copy the messages to the Inbox
williamr@2
   143
	
williamr@2
   144
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   145
	
williamr@2
   146
	@leave KErrNotSupported The User Interface MTM does not support open operations, 
williamr@2
   147
	or opening is inappropriate to the current context 
williamr@2
   148
	@leave Other Dependent on implementation 
williamr@2
   149
	@return If successful, this is an asynchronously completing open operation. 
williamr@2
   150
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   151
	error code. */
williamr@2
   152
	virtual CMsvOperation* OpenL(TRequestStatus& aStatus) = 0; 
williamr@2
   153
	/** Closes an entry. The behaviour that this implies is dependent on the current 
williamr@2
   154
	context:
williamr@2
   155
	
williamr@2
   156
	1. for message contexts, this usually closes any launched editors or viewers
williamr@2
   157
	
williamr@2
   158
	2. for folder contexts, leaves with KErrNotSupported
williamr@2
   159
	
williamr@2
   160
	3. for service contexts, causes closure of a connection to a server
williamr@2
   161
	
williamr@2
   162
	The returned CMsvOperation object completes when closing is complete.
williamr@2
   163
	
williamr@2
   164
	Requirements:
williamr@2
   165
	
williamr@2
   166
	Implementations should:
williamr@2
   167
	
williamr@2
   168
	1. check aEntry.iType.iUid to ensure that they can close the requested type of 
williamr@2
   169
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   170
	
williamr@2
   171
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   172
	monitoring of the operation
williamr@2
   173
	
williamr@2
   174
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   175
	
williamr@2
   176
	@leave KErrNotSupported The User Interface MTM does not support close operations, 
williamr@2
   177
	or closing is inappropriate to the current context 
williamr@2
   178
	@leave Other Dependent on implementation 
williamr@2
   179
	@return If successful, this is an asynchronously completing close operation. 
williamr@2
   180
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   181
	error code. */
williamr@2
   182
	virtual CMsvOperation* CloseL(TRequestStatus& aStatus) = 0;
williamr@2
   183
	/** Edits an entry. 
williamr@2
   184
	
williamr@2
   185
	The behaviour that this implies is dependent on the current 
williamr@2
   186
	context:
williamr@2
   187
	
williamr@2
   188
	1. for message contexts, this usually launches the appropriate message editor, 
williamr@2
   189
	or returns status KErrReadOnly if the message is not editable
williamr@2
   190
	
williamr@2
   191
	2. for remote folder contexts, launches a settings dialog, for example to rename 
williamr@2
   192
	the folder, completing asynchronously
williamr@2
   193
	
williamr@2
   194
	3. for service contexts, launches a service settings dialog, completing asynchronously
williamr@2
   195
	
williamr@2
   196
	The returned CMsvOperation object completes when editing is complete.
williamr@2
   197
	
williamr@2
   198
	Requirements:
williamr@2
   199
	
williamr@2
   200
	Implementations should:
williamr@2
   201
	
williamr@2
   202
	1. check aEntry.iType.iUid to ensure that they can edit the requested type of 
williamr@2
   203
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   204
	
williamr@2
   205
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   206
	monitoring of the operation
williamr@2
   207
	
williamr@2
   208
	3. for remote messages, typically, copy the messages to the Inbox
williamr@2
   209
	
williamr@2
   210
	4. follow the leave protocols described in Leave considerations below
williamr@2
   211
	
williamr@2
   212
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   213
	@leave KErrNotSupported The User Interface MTM does not support edit operations, 
williamr@2
   214
	or editing is inappropriate to the current context 
williamr@2
   215
	@leave KErrReadOnly Context is read-only 
williamr@2
   216
	@leave Other Dependent on implementation 
williamr@2
   217
	@return If successful, this is an asynchronously completing edit operation. 
williamr@2
   218
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   219
	error code. */
williamr@2
   220
	virtual CMsvOperation* EditL(TRequestStatus& aStatus) = 0;// Launches editor/settings dialog as appropriate  
williamr@2
   221
	/** Views an entry. 
williamr@2
   222
	
williamr@2
   223
	For message contexts, this usually launches the appropriate 
williamr@2
   224
	message viewer. Other context types leave with KErrNotSupported. The returned 
williamr@2
   225
	CMsvOperation object completes when viewing is complete.
williamr@2
   226
	
williamr@2
   227
	Requirements:
williamr@2
   228
	
williamr@2
   229
	Implementations should:
williamr@2
   230
	
williamr@2
   231
	1. check aEntry.iType.iUid to ensure that they can view the requested type of 
williamr@2
   232
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   233
	
williamr@2
   234
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   235
	monitoring of the operation
williamr@2
   236
	
williamr@2
   237
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   238
	@leave KErrNotSupported The User Interface MTM does not support view operations, 
williamr@2
   239
	or viewing is inappropriate to the current context 
williamr@2
   240
	@leave Other Dependent on implementation 
williamr@2
   241
	@return If successful, this is an asynchronously completing view operation. 
williamr@2
   242
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   243
	error code. */
williamr@2
   244
	virtual CMsvOperation* ViewL(TRequestStatus& aStatus) = 0;// Launches viewer/settings dialog as appropriate  
williamr@2
   245
	//
williamr@2
   246
	// --- Actions upon message selections ---
williamr@2
   247
	// --- Selections must be in same folder and all of the correct MTM type ---
williamr@2
   248
	// --- Context may change after calling these functions ---
williamr@2
   249
	/** Opens a selection of entries. 
williamr@2
   250
	
williamr@2
   251
	The behaviour that this implies is dependent on the current context:
williamr@2
   252
	
williamr@2
   253
	1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only 
williamr@2
   254
	messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific.
williamr@2
   255
	
williamr@2
   256
	2. for service contexts, the function may initiate a connection to obtain the 
williamr@2
   257
	service contents from the server, completing asynchronously
williamr@2
   258
	
williamr@2
   259
	3. for remote folder contexts, dependent on implementation, the function may 
williamr@2
   260
	initiate a connection to obtain the folder contents from the server, completing 
williamr@2
   261
	asynchronously
williamr@2
   262
	
williamr@2
   263
	The returned CMsvOperation object completes when opening is complete.
williamr@2
   264
	
williamr@2
   265
	Requirements:
williamr@2
   266
	
williamr@2
   267
	If opening entries is not supported, implementations should leave with KErrNotSupported. 
williamr@2
   268
	Otherwise, implementations should:
williamr@2
   269
	
williamr@2
   270
	1. check aEntry.iType.iUid to ensure that they can open the requested type of 
williamr@2
   271
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   272
	
williamr@2
   273
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   274
	monitoring of the operation
williamr@2
   275
	
williamr@2
   276
	3. for remote messages, typically, copy the messages to the Inbox
williamr@2
   277
	
williamr@2
   278
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   279
	@param aSelection Selection of message entries 
williamr@2
   280
	@leave KErrNotSupported The User Interface MTM does not support open operations, 
williamr@2
   281
	or opening is inappropriate to the current context 
williamr@2
   282
	@leave Other Dependent on implementation 
williamr@2
   283
	@return If successful, this is an asynchronously completing open operation. 
williamr@2
   284
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   285
	error code. */
williamr@2
   286
	virtual CMsvOperation* OpenL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; 
williamr@2
   287
	/** Closes a selection of entries. 
williamr@2
   288
	
williamr@2
   289
	The behaviour that this implies is dependent on the current context:
williamr@2
   290
	
williamr@2
   291
	1. for message contexts, this usually closes any launched editors or viewers
williamr@2
   292
	
williamr@2
   293
	2. for folder contexts, leaves with KErrNotSupported
williamr@2
   294
	
williamr@2
   295
	3. for service contexts, causes closure of a connection to a server
williamr@2
   296
	
williamr@2
   297
	The returned CMsvOperation object completes when closing is complete.
williamr@2
   298
	
williamr@2
   299
	Requirements:
williamr@2
   300
	
williamr@2
   301
	Implementations should:
williamr@2
   302
	
williamr@2
   303
	1. check aEntry.iType.iUid to ensure that they can close the requested type of 
williamr@2
   304
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   305
	
williamr@2
   306
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   307
	monitoring of the operation
williamr@2
   308
	
williamr@2
   309
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   310
	@param aSelection Selection of message entries 
williamr@2
   311
	@leave KErrNotSupported The User Interface MTM does not support close operations, 
williamr@2
   312
	or closing is inappropriate to the current context 
williamr@2
   313
	@leave Other Dependent on implementation 
williamr@2
   314
	@return If successful, this is an asynchronously completing close operation. 
williamr@2
   315
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   316
	error code. */
williamr@2
   317
	virtual CMsvOperation* CloseL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;
williamr@2
   318
	/** Edits a selection of entries. 
williamr@2
   319
	
williamr@2
   320
	The behaviour that this implies is dependent on the current context:
williamr@2
   321
	
williamr@2
   322
	1. for message contexts, this usually launches the appropriate message editor, 
williamr@2
   323
	or returns status KErrReadOnly if the message is not editable
williamr@2
   324
	
williamr@2
   325
	2. for remote folder contexts, launches a settings dialog, for example to rename 
williamr@2
   326
	the folder, completing asynchronously
williamr@2
   327
	
williamr@2
   328
	3. for service contexts, launches a service settings dialog, completing asynchronously
williamr@2
   329
	
williamr@2
   330
	The returned CMsvOperation object completes when editing is complete.
williamr@2
   331
	
williamr@2
   332
	Requirements:
williamr@2
   333
	
williamr@2
   334
	Implementations should:
williamr@2
   335
	
williamr@2
   336
	1. check aEntry.iType.iUid to ensure that they can edit the requested type of 
williamr@2
   337
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   338
	
williamr@2
   339
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   340
	monitoring of the operation
williamr@2
   341
	
williamr@2
   342
	3. for remote messages, typically, copy the messages to the Inbox
williamr@2
   343
	
williamr@2
   344
	4. follow the leave protocols described in Leave considerations below
williamr@2
   345
	
williamr@2
   346
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   347
	@param aSelection Selection of message entries 
williamr@2
   348
	@leave KErrNotSupported The User Interface MTM does not support edit operations, 
williamr@2
   349
	or editing is inappropriate to the current context 
williamr@2
   350
	@leave KErrReadOnly Context is read-only 
williamr@2
   351
	@leave Other Dependent on implementation 
williamr@2
   352
	@return If successful, this is an asynchronously completing edit operation. 
williamr@2
   353
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   354
	error code. */
williamr@2
   355
	virtual CMsvOperation* EditL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches editor/settings dialog as appropriate  
williamr@2
   356
	/** Views a selection of entries. 
williamr@2
   357
	
williamr@2
   358
	For message contexts, this usually launches the appropriate 
williamr@2
   359
	message viewer. Other context types leave with KErrNotSupported. The returned 
williamr@2
   360
	CMsvOperation object completes when viewing is complete.
williamr@2
   361
	
williamr@2
   362
	Requirements:
williamr@2
   363
	
williamr@2
   364
	Implementations should:
williamr@2
   365
	
williamr@2
   366
	1. check aEntry.iType.iUid to ensure that they can view the requested type of 
williamr@2
   367
	entry and leave with code KErrNotSupported if they cannot
williamr@2
   368
	
williamr@2
   369
	2. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   370
	monitoring of the operation
williamr@2
   371
	
williamr@2
   372
	@param aStatus The request status to be completed when the operation has finished 
williamr@2
   373
	@param aSelection Selection of message entries 
williamr@2
   374
	@leave KErrNotSupported The User Interface MTM does not support view operations, 
williamr@2
   375
	or viewing is inappropriate to the current context 
williamr@2
   376
	@leave Other Dependent on implementation 
williamr@2
   377
	@return If successful, this is an asynchronously completing view operation. 
williamr@2
   378
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   379
	error code. */
williamr@2
   380
	virtual CMsvOperation* ViewL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches viewer/settings dialog as appropriate  
williamr@2
   381
	/** Cancels the sending of specified messages.
williamr@2
   382
	
williamr@2
   383
	@param aStatus The request status to be completed when the operation has finished 	
williamr@2
   384
	@param aSelection Selection of message entries 
williamr@2
   385
	@leave KErrNotSupported The User Interface MTM does not support cancel operations, 
williamr@2
   386
	or cancelling is inappropriate to the current context 
williamr@2
   387
	@leave Other Dependent on implementation 
williamr@2
   388
	@return If successful, this is an asynchronously completing cancel operation. 
williamr@2
   389
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   390
	error code. */
williamr@2
   391
	virtual CMsvOperation* CancelL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;
williamr@2
   392
	//
williamr@2
   393
	// --- Deletion ---
williamr@2
   394
	// --- Deletes entries from the current context, which must be a folder or service of the relevant MTM ---
williamr@2
   395
	IMPORT_C virtual CMsvOperation* DeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Deletes selection from current context
williamr@2
   396
	// --- Un-deletes entries from the current context, which must be a folder or service of the relevant MTM ---
williamr@2
   397
	IMPORT_C virtual CMsvOperation* UnDeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Un-deletes selection from current context
williamr@2
   398
	// --- Deletes service, which need not be the current context ---
williamr@2
   399
	IMPORT_C virtual CMsvOperation* DeleteServiceL(const TMsvEntry& aService, TRequestStatus& aStatus); // default implementation simply delegates to the server
williamr@2
   400
	//
williamr@2
   401
	// --- Message responding ---
williamr@2
   402
	/** Creates a reply message to the current message context, and allows the user 
williamr@2
   403
	to edit it through a message-type specific editor. 
williamr@2
   404
	
williamr@2
   405
	Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the reply. 
williamr@2
   406
	The parent for the new entry is specified in aDestination. The returned CMsvOperation 
williamr@2
   407
	object completes when editing the reply is complete. On completion, the context 
williamr@2
   408
	is set to the reply message.
williamr@2
   409
	
williamr@2
   410
	Requirements:
williamr@2
   411
	
williamr@2
   412
	A typical implementation for this function would include the following steps: 
williamr@2
   413
	
williamr@2
   414
	1. create a new reply entry by calling CBaseMtm::ReplyL()
williamr@2
   415
	
williamr@2
   416
	2. call EditL() allow the user to edit the reply
williamr@2
   417
	
williamr@2
   418
	3. return a CMsvOperation-derived object to provide asynchronous control and 
williamr@2
   419
	monitoring of the operation
williamr@2
   420
	
williamr@2
   421
	If message replies are not supported, implementations should leave with KErrNotSupported.
williamr@2
   422
	
williamr@2
   423
	@param aDestination The entry to which to assign the reply 
williamr@2
   424
	@param aPartlist Defines the parts which are to be copied from the original 
williamr@2
   425
	message into the reply. See CBaseMtm::ReplyL() for details. 
williamr@2
   426
	@param aCompletionStatus The request status to be completed when the operation 
williamr@2
   427
	has finished 
williamr@2
   428
	@leave KErrNotSupported The User Interface MTM does not support reply operations 
williamr@2
   429
	@leave Other Dependent on implementation 
williamr@2
   430
	@return If successful, this is an asynchronously completing reply operation. 
williamr@2
   431
	If failed, this is a completed operation, with status set to the relevant 
williamr@2
   432
	error code. */
williamr@2
   433
	virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus) = 0;
williamr@2
   434
	/**
williamr@2
   435
	Creates a forwarded message from the current message context, and allows the user to edit it through a message-type 
williamr@2
   436
	specific editor. 
williamr@2
   437
	
williamr@2
   438
	Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the 
williamr@2
   439
	forwarded message. The parent for the new entry is specified in aDestination. The returned CMsvOperation 
williamr@2
   440
	object completes when editing the forwarded message is complete. On completion, the context is set to the forwarded message.
williamr@2
   441
williamr@2
   442
	Requirements:
williamr@2
   443
williamr@2
   444
	A typical implementation for this function would include the following steps:
williamr@2
   445
williamr@2
   446
	1. create a new forwarded message entry by calling CBaseMtm::ForwardL()
williamr@2
   447
williamr@2
   448
	2. call EditL() allow the user to edit the forwarded message
williamr@2
   449
williamr@2
   450
	3. return a CMsvOperation-derived object to provide asynchronous control and monitoring of the operation
williamr@2
   451
williamr@2
   452
	If forwarded messages are not supported, implementations should leave with KErrNotSupported.
williamr@2
   453
williamr@2
   454
	@return	If successful, this is an asynchronously completing forward message operation. If failed, 
williamr@2
   455
	this is a completed operation, with status set to the relevant error code. 	
williamr@2
   456
	@param aDestination The entry to which to assign the forwarded message 
williamr@2
   457
	@param aPartList Defines the parts which are to be copied from the original message into the forwarded message 
williamr@2
   458
	@param aCompletionStatus The request status to be completed when the operation has finished 
williamr@2
   459
	@leave KErrNotSupported The User Interface MTM does not support message forwarding operations 
williamr@2
   460
	@leave Other Dependent on implementation 
williamr@2
   461
	*/
williamr@2
   462
	virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus) = 0;
williamr@2
   463
williamr@2
   464
	//
williamr@2
   465
	// --- Copy and move functions ---
williamr@2
   466
	// --- Context should be set to folder or entry of this MTM ---
williamr@2
   467
	// --- Default implementations imply call the relevant CMsvEntry functions ---
williamr@2
   468
	IMPORT_C virtual CMsvOperation* CopyToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to copy to
williamr@2
   469
	IMPORT_C virtual CMsvOperation* MoveToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to move to
williamr@2
   470
	IMPORT_C virtual CMsvOperation* CopyFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to copy from
williamr@2
   471
	IMPORT_C virtual CMsvOperation* MoveFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to move from
williamr@2
   472
	//
williamr@2
   473
	// --- Interpret transfer progress ---
williamr@2
   474
	IMPORT_C virtual TInt DisplayProgressSummary(const TDesC8& aProgress) const;// Used for display operation summary (usually completed operations). Default implementation returns KErrNotSupported. 
williamr@2
   475
	IMPORT_C virtual TInt GetProgress(const TDesC8& aProgress, TBuf<EProgressStringMaxLen>& aReturnString, TInt& aTotalEntryCount, TInt& aEntriesDone,
williamr@2
   476
		TInt& aCurrentEntrySize, TInt& aCurrentBytesTrans) const;// Default implementation returns KErrNotSupported
williamr@2
   477
	//	
williamr@2
   478
	// --- RTTI functions ---
williamr@2
   479
	IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse);
williamr@2
   480
	IMPORT_C virtual void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter);
williamr@2
   481
	IMPORT_C virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TRequestStatus& aCompletionStatus, 
williamr@2
   482
		TDes8& aParameter);
williamr@2
   483
williamr@2
   484
protected:
williamr@2
   485
	// --- Construction ---
williamr@2
   486
	IMPORT_C CBaseMtmUi(CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll);
williamr@2
   487
	IMPORT_C virtual void ConstructL();
williamr@2
   488
	/** Sets the full path and name of the resource file associated with the User Interface MTM. 
williamr@2
   489
	
williamr@2
   490
	Client applications do not use this function. It is relevant only to implementers of derived classes.
williamr@2
   491
	
williamr@2
   492
	Requirements:
williamr@2
   493
	
williamr@2
   494
	The function is called by CBaseMtmUi::ConstructL(), which then loads the resource 
williamr@2
   495
	file.
williamr@2
   496
	
williamr@2
   497
	@param aFileName Filename buffer to be filled with the resource file path 
williamr@2
   498
	and name */
williamr@2
   499
	virtual void GetResourceFileName(TFileName& aFileName) const = 0;
williamr@2
   500
	//
williamr@2
   501
	// --- Utility functions ---
williamr@2
   502
	IMPORT_C CMsvSession& Session() const;
williamr@2
   503
williamr@2
   504
	// Method used for extension: called by non virtual methods that need 
williamr@2
   505
	// to have a polymorphic behaviour.
williamr@2
   506
	IMPORT_C virtual TAny* GetInterface(TUid aUid);
williamr@2
   507
williamr@2
   508
protected:
williamr@2
   509
	// --- Data ---
williamr@2
   510
	/** The CBaseMtm-derived object (Client-side MTM) that requested the User Interface 
williamr@2
   511
	MTM. It is set by the constructor. */
williamr@2
   512
	CBaseMtm&			iBaseMtm;
williamr@2
   513
	/** Control environment object. It is set by the constructor. */
williamr@2
   514
	CCoeEnv*			iCoeEnv;
williamr@2
   515
	/** This flag records the preferences as set by SetPreferences(). */
williamr@2
   516
	TUint				iFlags;
williamr@2
   517
williamr@2
   518
private:
williamr@2
   519
	// --- Data ---
williamr@2
   520
	CRegisteredMtmDll&	iRegisteredMtmDll;
williamr@2
   521
	TInt				iResourceFileOffset;
williamr@2
   522
	// Extra data member to allow for future extensions
williamr@2
   523
	TAny* iExtensionData;
williamr@2
   524
	};
williamr@2
   525
williamr@2
   526
williamr@2
   527
#endif // __MTMUIBAS_H__