epoc32/include/mw/mtclbase.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     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
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
       
    14 // MTCLBASE.H
    14 //
    15 //
    15 
    16 /**
       
    17  * @file 
       
    18  * @publishedAll
       
    19  * @released
       
    20  */
    16 
    21 
    17 #ifndef __MTCLBASE_H__
    22 #ifndef __MTCLBASE_H__
    18 #define __MTCLBASE_H__
    23 #define __MTCLBASE_H__
    19 
    24 
    20 #include <e32base.h>		
    25 #include <e32base.h>		
    23 
    28 
    24 #include <cmsvattachment.h>
    29 #include <cmsvattachment.h>
    25 #include <msvstd.hrh>
    30 #include <msvstd.hrh>
    26 #include <cmsvrecipientlist.h>
    31 #include <cmsvrecipientlist.h>
    27 
    32 
    28 /**
       
    29 UId for 8-bit/16-bit Character set mechanism.
       
    30 @internalTechnology
       
    31 @prototype
       
    32 */
       
    33 const TInt KUIDCharacterSet = 999; 
       
    34 
       
    35 class CMsvAttachmentWaiter;
    33 class CMsvAttachmentWaiter;
    36 
       
    37 
    34 
    38 /** Specifies one or more parts of a message in message-forwarding, message-reply, 
    35 /** Specifies one or more parts of a message in message-forwarding, message-reply, 
    39 and message-validation functions.
    36 and message-validation functions.
    40 
    37 
    41 Standard message parts are defined by the constants that can be added (or 
    38 Standard message parts are defined by the constants that can be added (or 
    46 provided by the Global Find API. This does not apply to v5.1 nor to v5. */
    43 provided by the Global Find API. This does not apply to v5.1 nor to v5. */
    47 typedef TUint TMsvPartList;
    44 typedef TUint TMsvPartList;
    48 
    45 
    49 class CParaFormatLayer;
    46 class CParaFormatLayer;
    50 class CCharFormatLayer;
    47 class CCharFormatLayer;
       
    48 
       
    49 
       
    50 //
       
    51 // Prototype of expected factory function
       
    52 
       
    53 typedef CBaseMtm* MtmFactoryFunctionL(CRegisteredMtmDll&, CMsvSession&);
    51 
    54 
    52 
    55 
    53 /** Specifies function IDs for standard MTM functions.
    56 /** Specifies function IDs for standard MTM functions.
    54 
    57 
    55 The function IDs are specified such that they do not coincide
    58 The function IDs are specified such that they do not coincide
    63 */
    66 */
    64 enum TMtmStandardAsyncCommands
    67 enum TMtmStandardAsyncCommands
    65 	{
    68 	{
    66 	KMTMStandardFunctionsSendMessage = KMtmFirstFreeStandardMtmFunctionId
    69 	KMTMStandardFunctionsSendMessage = KMtmFirstFreeStandardMtmFunctionId
    67 	};
    70 	};
    68 
       
    69 
       
    70 ////////////////////////////////////////////////////////
       
    71 // Prototype of expected factory function
       
    72 
       
    73 typedef CBaseMtm* MtmFactoryFunctionL(CRegisteredMtmDll&, CMsvSession&);
       
    74 
    71 
    75 
    72 
    76 /***********************************************
    73 /***********************************************
    77 ***********************************************/
    74 ***********************************************/
    78 class CBaseMtm : public CBase, public MMsvEntryObserver
    75 class CBaseMtm : public CBase, public MMsvEntryObserver
   474  	IMPORT_C virtual void RemoveDefaultServiceL();
   471  	IMPORT_C virtual void RemoveDefaultServiceL();
   475  	IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService);
   472  	IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService);
   476  	
   473  	
   477  	//For setting the character encoding value, options are 7-bit, 8-bit and 16-bit Unicode.
   474  	//For setting the character encoding value, options are 7-bit, 8-bit and 16-bit Unicode.
   478  	IMPORT_C TInt SetMessageCharacterSet(TUint aCharSet);
   475  	IMPORT_C TInt SetMessageCharacterSet(TUint aCharSet);
   479 
   476 	IMPORT_C void SetExtensionData(TAny* aSortData);
       
   477 	IMPORT_C TAny* GetExtensionData();
       
   478 	
   480 protected:
   479 protected:
   481 	IMPORT_C CBaseMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession);
   480 	IMPORT_C CBaseMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession);
   482 	//
   481 	//
   483 	IMPORT_C void StoreBodyL(CMsvStore& aStore);
   482 	IMPORT_C void StoreBodyL(CMsvStore& aStore);
   484 	IMPORT_C void RestoreBodyL(CMsvStore& aStore);
   483 	IMPORT_C void RestoreBodyL(CMsvStore& aStore);
   507 	IMPORT_C virtual TAny* GetInterface(TUid aUid);
   506 	IMPORT_C virtual TAny* GetInterface(TUid aUid);
   508 	
   507 	
   509 	// From CBase
   508 	// From CBase
   510 	IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
   509 	IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
   511 
   510 
   512 
       
   513 private:
   511 private:
   514 	void DeleteEntry();
   512 	void DeleteEntry();
   515 	
   513 	
   516 	void AddFilePathAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, CMsvAttachment::TMsvAttachmentType aType, TRequestStatus& aStatus);
   514 	void AddFilePathAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, CMsvAttachment::TMsvAttachmentType aType, TRequestStatus& aStatus);
       
   515 	
       
   516 
   517 
   517 
   518 protected:
   518 protected:
   519 	/** The current context. */
   519 	/** The current context. */
   520 	CMsvEntry*		iMsvEntry;
   520 	CMsvEntry*		iMsvEntry;
   521 	/** The address list for the current context. */
   521 	/** The address list for the current context. */
   532 	returned by Body().
   532 	returned by Body().
   533 	
   533 	
   534 	Implementations can modify this if they wish to apply particular formatting 
   534 	Implementations can modify this if they wish to apply particular formatting 
   535 	to body text. */
   535 	to body text. */
   536 	CCharFormatLayer* iCharFormatLayer;
   536 	CCharFormatLayer* iCharFormatLayer;
       
   537 
       
   538 
   537 	
   539 	
   538 private:
   540 private:
   539 	TMsvId	iEntryId;
   541 	TMsvId	iEntryId;
   540 	CRichText* iRichTextBody;
   542 	CRichText* iRichTextBody;
   541 	CRegisteredMtmDll& iRegisteredMtmDll;
   543 	CRegisteredMtmDll& iRegisteredMtmDll;