epoc32/include/mw/mtclbase.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.
     1 // Copyright (c) 1998-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 // MTCLBASE.H
    15 //
    16 /**
    17  * @file 
    18  * @publishedAll
    19  * @released
    20  */
    21 
    22 #ifndef __MTCLBASE_H__
    23 #define __MTCLBASE_H__
    24 
    25 #include <e32base.h>		
    26 #include <badesca.h>
    27 #include <msvapi.h>
    28 
    29 #include <cmsvattachment.h>
    30 #include <msvstd.hrh>
    31 #include <cmsvrecipientlist.h>
    32 
    33 class CMsvAttachmentWaiter;
    34 
    35 /** Specifies one or more parts of a message in message-forwarding, message-reply, 
    36 and message-validation functions.
    37 
    38 Standard message parts are defined by the constants that can be added (or 
    39 bitwise-or'ed) together to specify multiple parts. Some message parts may 
    40 not be meaningful for some MTMs.
    41 
    42 Specifies find attributes which modify the behaviour of the search text utility 
    43 provided by the Global Find API. This does not apply to v5.1 nor to v5. */
    44 typedef TUint TMsvPartList;
    45 
    46 class CParaFormatLayer;
    47 class CCharFormatLayer;
    48 
    49 
    50 //
    51 // Prototype of expected factory function
    52 
    53 typedef CBaseMtm* MtmFactoryFunctionL(CRegisteredMtmDll&, CMsvSession&);
    54 
    55 
    56 /** Specifies function IDs for standard MTM functions.
    57 
    58 The function IDs are specified such that they do not coincide
    59 with the free area defined for MTM commands.
    60 
    61 If MTMs also offer their own equivalents of these functions,
    62 they may implement these function IDs by considering the
    63 two IDs to be the same in their client MTM.
    64 
    65 MTMs that support SendAs must support SendMessage.
    66 */
    67 enum TMtmStandardAsyncCommands
    68 	{
    69 	KMTMStandardFunctionsSendMessage = KMtmFirstFreeStandardMtmFunctionId
    70 	};
    71 
    72 
    73 /***********************************************
    74 ***********************************************/
    75 class CBaseMtm : public CBase, public MMsvEntryObserver
    76 /** Provides a high-level interface for accessing and manipulating a Message Server 
    77 entry. 
    78 
    79 Message client applications use the class to access such functionality polymorphically. 
    80 MTM implementers implement a derived class to provide such functionality for 
    81 their message protocol. 
    82 
    83 The following are some significant groups of functions:
    84 
    85 Context functions: the SetCurrentEntryL() and SwitchCurrentEntryL() functions 
    86 change the context - the entry on which later actions are performed. After 
    87 creating a new Client-side MTM object, a message client application should 
    88 set an initial context before using other functions. Note that: any changes 
    89 made to an existing context are not automatically saved: the message client 
    90 application should ensure this itself by calling SaveMessageL(); no message 
    91 data for the new context is retrieved from the Message Server, to retrieve 
    92 entry data, call LoadMessageL() after setting the context; calling Body() 
    93 immediately after setting the context returns an empty CRichText object: this 
    94 is because the private cache of context body text that the base class maintains 
    95 is re-initialised to an empty value. MTM implementers should note that the 
    96 virtual ContextEntrySwitched() is called from these functions to allow derived 
    97 classes to also clear any caches of MTM-specific entry data.
    98 
    99 Store and restore entry data functions: the changes that a message client 
   100 application makes to a message context through Client-side MTM functions, 
   101 such as altering the body text obtained through Body(), are, for efficiency, 
   102 cached in memory by a Client-side MTM. The message store and restore functions 
   103 are concerned with transferring data between that cache and committed storage. 
   104 Note that, unlike message contexts, message client applications are not expected 
   105 to manipulate directly service contexts. Instead, the corresponding User Interface 
   106 MTM will provide dialogs to allow the user to alter service settings, and 
   107 call Client-side MTM functions to handle their retrieval and storage. Symbian 
   108 OS v5 expects the base class functions to handle storage and retrieval for 
   109 both message and service contexts, and their implementations must detect what 
   110 the context is, and act accordingly. Post-v5, the API is clarified by restricting 
   111 the base class functions to handle message contexts only. To handle service 
   112 contexts, a Client-side MTM must define its own functions for the User Interface 
   113 MTM to call.
   114 
   115 Store and restore body text functions: the base class maintains a private 
   116 CRichText object cache to store the body text for the current context. This 
   117 can be accessed for reading and writing by message client applications through 
   118 Body(). StoreBodyL() and RestoreBodyL() encapsulate for implementers of derived 
   119 classes the retrieval and storage of this CRichText object to a CMsvStore.
   120 
   121 Address list functions: the format and storage of message addresses is MTM-specific. 
   122 AddresseeList(), AddAddresseeL(), and RemoveAddressee() are designed to allow 
   123 clients with no MTM-specific knowledge to access address information in a 
   124 generic way. The base class has a protected data member iAddresseeList, an 
   125 array of descriptors, which these functions manipulate. Implementations should 
   126 save the address information to the appropriate place in the message store 
   127 when the message is stored.
   128 
   129 MTM-specific functionality: MTM components can offer protocol-specific functionality 
   130 not provided by base class interface functions. MTM components define IDs 
   131 that correspond to each protocol-specific operation offered, and implement 
   132 the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients 
   133 to access these operations by passing in the appropriate ID. Two functions 
   134 are provided to allow the MTM component to offer both synchronous and asynchronous 
   135 functionality. Message client applications can dynamically add user-interface 
   136 features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). 
   137 MTM developers should document the IDs if they wish to make the operations 
   138 available to clients. 
   139 @publishedAll
   140 @released
   141 */
   142 	{
   143 public:
   144 	IMPORT_C ~CBaseMtm();
   145 	IMPORT_C TUid Type() const;
   146 	//
   147 	// context related
   148 	IMPORT_C void SetCurrentEntryL(CMsvEntry* aEntry);
   149 	IMPORT_C void SwitchCurrentEntryL(TMsvId aId);
   150 	IMPORT_C CMsvEntry& Entry() const;
   151 	IMPORT_C TBool HasContext() const;
   152 	//
   153 	//
   154 	/** Commits cached changes to the storage controlled by the Message Server.
   155 	
   156 	It can only be called on message contexts. It should be called in the following circumstances:
   157 	
   158 	1. to preserve changes when the context is changed, or when the Client-side MTM 
   159 	object is deleted 
   160 	
   161 	2. to enable other parts of the Messaging to access the updated entry, as required, 
   162 	for example, before sending a message 
   163 	
   164 	Requirements:
   165 	
   166 	An implementation must update the store and index entry relating to the message 
   167 	context. Typically, the message store should be opened for editing with CMsvEntry::EditStoreL(). 
   168 	It should be updated as follows:
   169 	
   170 	1. body text: call StoreBodyL() to update the store's body text stream
   171 	
   172 	2. address list: update the appropriate MTM-specific area of the store from the 
   173 	data in iAddresseeList
   174 	
   175 	3. subject: if supported, update the appropriate MTM-specific area of the store 
   176 	from the private cache set by SetSubjectL()
   177 	
   178 	Changes can then be committed to the store with CMsvStore::CommitL().
   179 	
   180 	The index entry should also be updated to reflect changes. Possible fields 
   181 	that may need updating include: Description (for subject changes); Details 
   182 	and Multiple Recipients (for recipient changes); and Size. Index entry changes 
   183 	are committed using CMsvEntry::ChangeL().
   184 	
   185 	The function should panic for non-message contexts. */
   186 	virtual void SaveMessageL()=0; 
   187 	/** Loads the cache with the message data for the current context.
   188 	
   189 	It can only be called on message contexts. 
   190 	
   191 	It is typically used after the context has been set with SetCurrentEntryL() 
   192 	or SwitchCurrentEntryL(). CBaseMtm functions to manipulate the entry can only 
   193 	be called after this function has been called.
   194 	
   195 	Requirements:
   196 	
   197 	An implementation must restore the store and index entry relating to the message 
   198 	context. Typically, the message store should be opened for reading with CMsvEntry::ReadStoreL(). 
   199 	It should be then be read to set the following:
   200 	
   201 	1. body text: call RestoreBodyL() to update the cached body text
   202 	
   203 	2. address list: read the appropriate MTM-specific area of the store to update 
   204 	iAddresseeList
   205 	
   206 	3. subject: if supported, read the appropriate MTM-specific area of the store 
   207 	and update the cache with SetSubjectL()
   208 	
   209 	The function should panic for non-message contexts. */
   210 	virtual void LoadMessageL()=0;
   211 	/** Validates the current message context. 
   212 	
   213 	The precise validation performed is specific to the MTM, but, typically, checks 
   214 	that the specified message parts are well-formed. 
   215 	
   216 	Requirements:
   217 	
   218 	Implementation of this function is highly protocol-specific. A minimum step 
   219 	is to check that the current context is a message.
   220 	
   221 	@param aPartList Indicates the message parts for which validation is requested 
   222 	
   223 	@return If valid, KErrNone If invalid, identifies the invalid part(s). The 
   224 	error value is the bitmask of the TMsvPartList IDs for each invalid part */
   225 	virtual TMsvPartList ValidateMessage(TMsvPartList aPartList)=0;
   226 	/** Searches the specified message part(s) for the plain-text version of the text 
   227 	to be found. 
   228 	
   229 	If the specified part list indicates a part that is not supported, or is not 
   230 	present in the current message, the function behaves as if the specified part 
   231 	exists but does not contain the required text.
   232 	
   233 	Requirements:
   234 	
   235 	The parts of the entry for which searching is allowed is implementation specific. 
   236 	If no searching is supported, always return 0.
   237 	
   238 	@param aTextToFind The plain-text version of the text to be found. 
   239 	@param aPartList Indicates the message parts which should be searched. 
   240 	@return If the text was not found, or searching is unsupported, 0. If the text 
   241 	was found, a bitmask of the TMsvPartList IDs for each part in which the text 
   242 	was present. */
   243 	virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList)=0;
   244 	//
   245 	//
   246 	/** Creates a reply message to the current message context. 
   247 	
   248 	Some MTMs may support inclusion of elements, specified by aPartlist, from 
   249 	the original message in the reply. The parent for the new entry is specified 
   250 	in aDestination. 
   251 	
   252 	The returned CMsvOperation object completes when creating the reply is complete. 
   253 	On completion, the context is set to the reply message.
   254 	
   255 	Requirements:
   256 	
   257 	A typical implementation for this function would include the following steps: 
   258 	
   259 	1. create a new message in the specified destination by calling CMsvEntry::CreateL()
   260 	
   261 	2. set the entry index values as appropriate
   262 	
   263 	3. set the properties of the message as required. The normal minimum is to set 
   264 	the address to the sender of the original message. An implementation may also 
   265 	follow the options specified in aPartlist to set other properties, for example, 
   266 	to include the original message text.
   267 	
   268 	4. set the context to the reply 
   269 	
   270 	5. return a CMsvOperation-derived object to provide asynchronous control and 
   271 	monitoring of the operation
   272 	
   273 	If message replies are not supported, implementations should leave with KErrNotSupported.
   274 	
   275 	The implementation of this function may be similar to that of ForwardL(), 
   276 	allowing opportunities for code sharing.
   277 	
   278 	@param aDestination The entry to which to assign the reply 
   279 	@param aPartlist Defines the parts that are to be copied from the original 
   280 	message into the reply 
   281 	@param aCompletionStatus The request status to be completed when the operation 
   282 	has finished 
   283 	@leave KErrNotSupported The Client-side MTM does not support reply operations 
   284 	@leave Other leave codes Dependent on implementation 
   285 	@return If successful, this is an asynchronously completing reply operation. 
   286 	If failed, this is a completed operation, with status set to the relevant 
   287 	error code. */
   288 	virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus)=0;
   289 	/** Creates a forwarded message from the current message context. 
   290 	
   291 	Some MTMs may 
   292 	support inclusion of elements, specified by aPartlist, from the original message 
   293 	in the forwarded message. The parent for the new entry is specified in aDestination. 
   294 	The returned CMsvOperation object completes when editing the forwarded message 
   295 	is complete. On completion, the context is set to the forwarded message.
   296 	
   297 	Requirements:
   298 	
   299 	A typical implementation for this function would include the following steps: 
   300 	
   301 	1. create a new message in the specified destination by calling CMsvEntry::CreateL()
   302 	
   303 	2. set the entry index values as appropriate
   304 	
   305 	3. set message content as required. The normal minimum is to include the text 
   306 	of the original message. An implementation may also follow the options specified 
   307 	in aPartlist to include other properties of the original message.
   308 	
   309 	4. set the context to the reply 
   310 	
   311 	5. return a CMsvOperation-derived object to provide asynchronous control and 
   312 	monitoring of the operation
   313 	
   314 	If forwarded messages are not supported, implementations should leave with 
   315 	KErrNotSupported.
   316 	
   317 	The implementation of this function may be similar to that of ReplyL(), allowing 
   318 	opportunities for code sharing.
   319 	
   320 	@param aDestination The entry to which to assign the forwarded message 
   321 	@param aPartList Defines the parts that are to be copied from the original 
   322 	message into the forwarded message 
   323 	@param aCompletionStatus The request status to be completed when the operation 
   324 	has finished 
   325 	@leave KErrNotSupported The Client-side MTM does not support creation of forwarded 
   326 	messages 
   327 	@leave Other leave codes Dependent on implementation 
   328 	@return If successful, this is an asynchronously completing forward message 
   329 	operation. If failed, this is a completed operation, with status set to the 
   330 	relevant error code. */
   331 	virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus)=0;
   332 	//
   333 	// addresssee list (used by objects with no MTM knowledge)
   334 	IMPORT_C const CMsvRecipientList& AddresseeList() const;
   335 
   336 	/** Adds an addressee for the current context.
   337 	
   338 	Addresses are not validated by checking their format by this function. Usually 
   339 	that is performed by calling ValidateMessage().
   340 	
   341 	Requirements:
   342 	
   343 	Implementations should append the address to the object's address cache 
   344 	in the protected iAddresseeList data member. Some implementations may also 
   345 	wish to store addresses in an internal data structure appropriate for the 
   346 	protocol, for example, a class holding message header information. 
   347 	
   348 	@param aRealAddress String representing an address to be added to the list 
   349 	for the current message 
   350 	@leave KErrNotSupported The message already has the maximum number of addressees 
   351 	
   352 	@leave Other leave codes Dependent on implementation */
   353 	virtual void AddAddresseeL(const TDesC& aRealAddress)=0;
   354 	/** Adds an addressee for the current context, and enables the client to specify 
   355 	an alias, which may be useful for some protocols. For example, for fax, if 
   356 	the address is the fax number, the alias could supply the recipient's name. 
   357 	
   358 	Addresses are not validated by checking their format by this function. Usually 
   359 	that is performed by calling ValidateMessage().
   360 	
   361 	Requirements:
   362 	
   363 	Implementations should append the address to the object's address cache 
   364 	in the protected iAddresseeList data member. Some implementations may also 
   365 	wish to store addresses in an internal data structure appropriate for the 
   366 	protocol, for example, a class holding message header information. 
   367 	
   368 	@param aRealAddress String representing an address to be added to the list 
   369 	for the current message 
   370 	@param aAlias Alias information 
   371 	@leave KErrNotSupported The message already has the maximum number of addressees 
   372 	
   373 	@leave Other leave codes Dependent on implementation */
   374 	virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias)=0;
   375 	
   376 	IMPORT_C virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress);
   377 	IMPORT_C virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress, const TDesC& aAlias);
   378 	
   379 	/** Removes an address from the current address list. The address is specified 
   380 	by a zero-based index into the address list. If the index is not known, applications 
   381 	can use AddresseeList() to retrieve the entire list to find the item.
   382 	
   383 	Requirements:
   384 	
   385 	Implementations should call iAddresseeList->Delete(aIndex) to remove the address 
   386 	from in the address list protected data member.
   387 	
   388 	@param aIndex Index of address to be removed */
   389 	virtual void RemoveAddressee(TInt aIndex)=0;
   390 	//
   391 	// standard data accessor/mutators
   392 	IMPORT_C CRichText& Body();
   393 	IMPORT_C const CRichText& Body() const;
   394 	IMPORT_C virtual void SetSubjectL(const TDesC& aSubject); // default leaves with KErrNotSupported
   395 	IMPORT_C virtual const TPtrC SubjectL() const; // default leaves with KErrNotSupported
   396 	//
   397 	// RTTI functions
   398 	IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); // default returns KErrNotSupported
   399 	/** Invokes synchronous protocol-specific operations. For asynchronous operations, 
   400 	a similar function, InvokeAsyncFunctionL(), is available.
   401 	
   402 	aSelection and aParameter allow data to be passed to the operation. 
   403 	
   404 	Requirements:
   405 	
   406 	For functionality that requires message transport access, such as making a 
   407 	connection, the implementation should pass the request onto the corresponding 
   408 	Server-side MTM. This is done through calling CMsvSession::TransferCommandL(). 
   409 	Implementations may also provide protocol-specific functions themselves if 
   410 	this is useful.
   411 	
   412 	@param aFunctionId ID of the requested operation 
   413 	@param aSelection Selection of message entries. This is used if the operation 
   414 	requires message entries to work on. 
   415 	@param aParameter Buffer containing input and output parameters. The format 
   416 	of this is specific to the operation. 
   417 	@leave KErrNotSupported aFunctionId is not a recognised operation ID 
   418 	@leave Other leave codes Dependent on implementation */
   419 	virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter)=0;
   420 	/** Invokes asynchronous protocol-specific operations. For synchronous operations, 
   421 	a similar function, InvokeSyncFunctionL(), is available.
   422 	
   423 	aSelection and aParameter allow data to be passed to the operation. The TRequestStatus 
   424 	and CMsvOperation objects are used as normal to control and monitor the operation.
   425 	
   426 	Requirements:
   427 	
   428 	For functionality that requires message transport access, such as making a 
   429 	connection, the implementation should pass the request onto the corresponding 
   430 	Server-side MTM. This is done through calling CMsvSession::TransferCommandL(). 
   431 	Implementations may also provide protocol-specific functions themselves if 
   432 	this is useful.
   433 	
   434 	InvokeAsyncFunctionL() should return a CMsvOperation-derived object to provide 
   435 	asynchronous control and monitoring of the operation. If CMsvSession::TransferCommandL() 
   436 	is called, this should be the CMsvOperation object returned by that function.
   437 	
   438 	@param aFunctionId ID of the requested operation 
   439 	@param aSelection Selection of message entries. This is used if the operation 
   440 	requires message entries to work on. 
   441 	@param aParameter Buffer containing input and output parameters. The format 
   442 	of this is specific to the operation. 
   443 	@param aCompletionStatus The request status to be completed when the operation 
   444 	has finished 
   445 	@leave KErrNotSupported aFunctionId is not a recognised operation ID 
   446 	@leave Other leave codes Dependent on implementation 
   447 	@return If successful, this is an asynchronously completing operation. If failed, 
   448 	this is a completed operation, with status set to the relevant error code. */
   449 	virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus)=0;
   450 	//
   451 	IMPORT_C CMsvSession& Session();
   452 
   453 	// Attachment functions to support the SendAs API
   454 	virtual inline void Filler1() {};
   455 	virtual inline void Filler2() {};
   456 	IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus);
   457 	IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus);
   458 	IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus);
   459 	IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus);
   460 	IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus);
   461 	IMPORT_C virtual void CancelAttachmentOperation();
   462 
   463 	IMPORT_C virtual void CreateMessageL(TMsvId aServiceId);
   464 
   465 	// BIO functions to support the SendAs API
   466 	// Entry().Entry().iBioType will be set by SendAs if this function does not leave.
   467 	// The default implementation in CBaseMtm is to do nothing.
   468 	IMPORT_C virtual void BioTypeChangedL(TUid aBioTypeUid);
   469 	
   470  	IMPORT_C virtual TMsvId DefaultServiceL() const;
   471  	IMPORT_C virtual void RemoveDefaultServiceL();
   472  	IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService);
   473  	
   474  	//For setting the character encoding value, options are 7-bit, 8-bit and 16-bit Unicode.
   475  	IMPORT_C TInt SetMessageCharacterSet(TUint aCharSet);
   476 	IMPORT_C void SetExtensionData(TAny* aSortData);
   477 	IMPORT_C TAny* GetExtensionData();
   478 	
   479 protected:
   480 	IMPORT_C CBaseMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession);
   481 	//
   482 	IMPORT_C void StoreBodyL(CMsvStore& aStore);
   483 	IMPORT_C void RestoreBodyL(CMsvStore& aStore);
   484 	//
   485 	/** Called by the base class functions SwitchCurrentEntryL() and SetCurrentEntryL() 
   486 	when the context is changed to another entry. 
   487 	
   488 	Client applications do not use this function. It is relevant only to implementers 
   489 	of derived classes.
   490 	
   491 	Requirements: 
   492 	
   493 	An implementation should clear:
   494 	
   495 	1. address data stored in iAddresseeList
   496 	
   497 	2. any caches of MTM-specific entry data relating to a previous context. For 
   498 	example, if the implementation has a private buffer storing a message subject, 
   499 	for access through Subject(), this buffer should be cleared. */
   500 	virtual void ContextEntrySwitched()=0; // called after the context of this instance has been changed to another entry
   501 	//
   502 	IMPORT_C void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
   503 
   504 	// Method used for extension: called by non virtual methods that need 
   505 	// to have a polymorphic behaviour.
   506 	IMPORT_C virtual TAny* GetInterface(TUid aUid);
   507 	
   508 	// From CBase
   509 	IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
   510 
   511 private:
   512 	void DeleteEntry();
   513 	
   514 	void AddFilePathAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, CMsvAttachment::TMsvAttachmentType aType, TRequestStatus& aStatus);
   515 	
   516 
   517 
   518 protected:
   519 	/** The current context. */
   520 	CMsvEntry*		iMsvEntry;
   521 	/** The address list for the current context. */
   522 	CMsvRecipientList* iAddresseeList;
   523 
   524 	/** Paragraph formatting applied to the CRichText object for the body text, as 
   525 	returned by Body(). This is set to an empty CParaFormatLayer instance whenever 
   526 	the context is set.
   527 	
   528 	Implementations can modify this if they wish to apply particular formatting 
   529 	to body text. */
   530 	CParaFormatLayer* iParaFormatLayer;
   531 	/** Character formatting applied to the CRichText object for the body text, as 
   532 	returned by Body().
   533 	
   534 	Implementations can modify this if they wish to apply particular formatting 
   535 	to body text. */
   536 	CCharFormatLayer* iCharFormatLayer;
   537 
   538 
   539 	
   540 private:
   541 	TMsvId	iEntryId;
   542 	CRichText* iRichTextBody;
   543 	CRegisteredMtmDll& iRegisteredMtmDll;
   544 	CMsvSession& iSession;
   545 	CMsvAttachmentWaiter* iAttachmentWaiter;
   546 
   547 	// Extra data member to allow for future extensions
   548 	TAny* iExtensionData;
   549 	};
   550 
   551 
   552 #endif // __MTCLBASE_H__