diff -r 000000000000 -r 8466d47a6819 emailuis/emailui/sendasmtm/fsmtms/server/inc/cfsservermtm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/emailui/sendasmtm/fsmtms/server/inc/cfsservermtm.h Thu Dec 17 08:39:21 2009 +0200 @@ -0,0 +1,142 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Definition of the class CFsServerMtm. +* +*/ + + +#ifndef CFSSERVERMTM_H +#define CFSSERVERMTM_H + +// INCLUDES +#include +// +// +#include "fsmtmsuids.h" +// +// + +// +#include +class CMsgConverter; +class CMsgActive; +enum TEasEmailMTMCmds + { + KEasEmailMTMReadEntry = KMtmFirstFreeMtmFunctionId, //from + KEasEmailMTMAddEmailAttachment, + KEasEmailMTMDeleteEntry, + // KEEP THIS ALWAYS LAST! + KEasEmailMTMLastCommand + }; +// + +/** + * Freestyle Email server side dll + * + * @since S60 3.1 + * @lib fsservermtm.lib +*/ +class CFsServerMtm : public CBaseServerMtm + { +public: // Construction and destruction + + /** + * Constructs new object. + * @return created object. + */ + IMPORT_C static CFsServerMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, + CMsvServerEntry* aEntry); + + /** + * Destructor. + */ + ~CFsServerMtm(); + +public: // From CBaseServerMtm + void CopyToLocalL(const CMsvEntrySelection& aSelection, + TMsvId aDestination, TRequestStatus& aStatus); + + void MoveToLocalL(const CMsvEntrySelection& aSelection, + TMsvId aDestination, TRequestStatus& aStatus); + + void CopyFromLocalL(const CMsvEntrySelection& aSelection, + TMsvId aDestination, TRequestStatus& aStatus); + + void MoveFromLocalL(const CMsvEntrySelection& aSelection, + TMsvId aDestination, TRequestStatus& aStatus); + + void CopyWithinServiceL(const CMsvEntrySelection& aSelection, + TMsvId aDestination, TRequestStatus& aStatus); + + void MoveWithinServiceL(const CMsvEntrySelection& aSelection, + TMsvId aDestination, TRequestStatus& aStatus); + + void DeleteAllL(const CMsvEntrySelection& aSelection, + TRequestStatus& aStatus); + + void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus); + + void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus); + + void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, + const TDesC8& aParameter, TRequestStatus& aStatus); + + TBool CommandExpected(); + + const TDesC8& Progress(); + // + void AddEmailAsAttachmentL( const TMsvId& aParentEmailId, const TDesC& aAttachmentPath ); + // + +protected: // From CBaseServerMtm + void DoCancel(); + + void DoRunL(); + + void DoComplete(TInt aError); + +private: // construction + /** + * Constructor. + * + * @param aRegisteredMtmDll To access self registry information. + * @param aInitialEntry + */ + CFsServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, + CMsvServerEntry* aInitialEntry); + + // + /** + * Tells if feature Email Attached In Email is ON or OFF. + * State is looked from cenrep. + */ + TBool iEmailAttachedInEmail; + + CMsvServerEntry* iMsvServerEntry; + TRequestStatus* iConvertToNestedEmailRequestStatus; + TBool iProcessingNestedEmail; + RLibrary iConvLibrary; + CMsgConverter* iConverter; + CMsgActive* iConvertToNestedEmail; + // + + /** + * Second phase constructor. + */ + void ConstructL(); + }; + +#endif //CFSSERVERMTM_H + +// End of File