emailuis/emailui/sendasmtm/fsmtms/server/inc/cfsservermtm.h
branchRCL_3
changeset 25 3533d4323edc
parent 0 8466d47a6819
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Definition of the class CFsServerMtm.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CFSSERVERMTM_H
       
    20 #define CFSSERVERMTM_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <mtsr.h>
       
    24 //<cmail>
       
    25 //<cmail>
       
    26 #include "fsmtmsuids.h"
       
    27 //</cmail>
       
    28 //</cmail>
       
    29 
       
    30 //<cmail>
       
    31 #include <msvstd.hrh>
       
    32 class CMsgConverter;
       
    33 class CMsgActive;
       
    34 enum TEasEmailMTMCmds
       
    35 	{
       
    36 	KEasEmailMTMReadEntry = KMtmFirstFreeMtmFunctionId, //from <msvstd.hrh>
       
    37 	KEasEmailMTMAddEmailAttachment,
       
    38 	KEasEmailMTMDeleteEntry,
       
    39 	// KEEP THIS ALWAYS LAST!
       
    40 	KEasEmailMTMLastCommand
       
    41 	};
       
    42 //</cmail>
       
    43 
       
    44 /**
       
    45  * Freestyle Email server side dll
       
    46  *
       
    47  * @since S60 3.1
       
    48  * @lib fsservermtm.lib
       
    49 */
       
    50 class CFsServerMtm : public CBaseServerMtm
       
    51     {
       
    52 public: // Construction and destruction 
       
    53 
       
    54     /**
       
    55      * Constructs new object.
       
    56      * @return created object.
       
    57     */
       
    58     IMPORT_C static CFsServerMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, 
       
    59         CMsvServerEntry*  aEntry);
       
    60     
       
    61     /**
       
    62      * Destructor.
       
    63     */
       
    64     ~CFsServerMtm();
       
    65 
       
    66 public: // From CBaseServerMtm    
       
    67     void CopyToLocalL(const CMsvEntrySelection& aSelection,
       
    68             TMsvId aDestination, TRequestStatus& aStatus);
       
    69     
       
    70     void MoveToLocalL(const CMsvEntrySelection& aSelection,
       
    71         TMsvId aDestination, TRequestStatus& aStatus);
       
    72     
       
    73     void CopyFromLocalL(const CMsvEntrySelection& aSelection,
       
    74         TMsvId aDestination, TRequestStatus& aStatus);
       
    75     
       
    76     void MoveFromLocalL(const CMsvEntrySelection& aSelection,
       
    77         TMsvId aDestination, TRequestStatus& aStatus);
       
    78     
       
    79     void CopyWithinServiceL(const CMsvEntrySelection& aSelection,
       
    80         TMsvId aDestination, TRequestStatus& aStatus);
       
    81     
       
    82     void MoveWithinServiceL(const CMsvEntrySelection& aSelection,
       
    83         TMsvId aDestination, TRequestStatus& aStatus);
       
    84     
       
    85     void DeleteAllL(const CMsvEntrySelection& aSelection, 
       
    86         TRequestStatus& aStatus);
       
    87     
       
    88     void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
       
    89     
       
    90     void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus);
       
    91     
       
    92     void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand,             
       
    93            const TDesC8& aParameter, TRequestStatus& aStatus);
       
    94     
       
    95     TBool CommandExpected();
       
    96     
       
    97     const TDesC8& Progress();
       
    98     //<cmail>
       
    99     void AddEmailAsAttachmentL( const TMsvId& aParentEmailId, const TDesC& aAttachmentPath );
       
   100     //</cmail>
       
   101 
       
   102 protected: // From CBaseServerMtm   
       
   103     void DoCancel();
       
   104     
       
   105     void DoRunL();
       
   106     
       
   107     void DoComplete(TInt aError);
       
   108 
       
   109 private: // construction
       
   110     /**
       
   111      * Constructor.
       
   112      *
       
   113      * @param aRegisteredMtmDll  To access self registry information.
       
   114      * @param aInitialEntry
       
   115      */
       
   116     CFsServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, 
       
   117         CMsvServerEntry* aInitialEntry);
       
   118 
       
   119 	// <cmail>
       
   120     /**
       
   121      * Tells if feature Email Attached In Email is ON or OFF.
       
   122      * State is looked from cenrep.
       
   123      */
       
   124 	TBool 				iEmailAttachedInEmail;
       
   125 	
       
   126 	CMsvServerEntry*    iMsvServerEntry;
       
   127 	TRequestStatus*		iConvertToNestedEmailRequestStatus;
       
   128 	TBool               iProcessingNestedEmail;
       
   129 	RLibrary 			iConvLibrary;
       
   130 	CMsgConverter* 		iConverter;
       
   131 	CMsgActive*       	iConvertToNestedEmail; 
       
   132 	// </cmail>
       
   133 
       
   134     /**
       
   135      * Second phase constructor.
       
   136      */
       
   137     void ConstructL();
       
   138     };
       
   139 
       
   140 #endif //CFSSERVERMTM_H     
       
   141 
       
   142 // End of File