diff -r 000000000000 -r 72b543305e3a messagingappbase/mce/inc/MceCancelSendingOperation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingappbase/mce/inc/MceCancelSendingOperation.h Thu Dec 17 08:44:11 2009 +0200 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2002 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: +* CMceCancelSendingOperation. +* Cancels first sending of the message and then tries to delete or move it to drafts. +* +*/ + + + +#ifndef MCECANCELSENDINGOPERATION_H +#define MCECANCELSENDINGOPERATION_H + +// INCLUDES +#include // MMsvProgressDecoder + +// CLASS DECLARATION + +/** +* CMceCancelSendingOperation. +* Cancels first sending of the message and then tries to delete or move it to drafts. +*/ +class CMceCancelSendingOperation: public CMsvOperation + { + public: + enum TCancelSendingType + { + ECancelOnly, + ECancelAndMoveToDrafts, + ECancelAndDelete + }; + /** + * Constructor. + */ + static CMceCancelSendingOperation* NewL( + CMsvSession& aMsvSession, + TRequestStatus& aObserverRequestStatus, + TMsvId aEntryId, + TCancelSendingType aCancelType, + CMtmStore& aMtmStore ); + + /** + * Destructor. + */ + virtual ~CMceCancelSendingOperation(); + + /** + * From CMsvOperation + */ + virtual const TDesC8& ProgressL(); + + private: + /** + * Constructor. + */ + CMceCancelSendingOperation( + CMsvSession& aMsvSession, + TRequestStatus& aObserverRequestStatus, + TMsvId aEntryId, + TCancelSendingType aCancelType, + CMtmStore& aMtmStore ); + + /** + * Constructor. + */ + void ConstructL(); + + /** + * From CActive + */ + void DoCancel(); + + /** + * From CActive + */ + void RunL(); + + /** + * Cancels sending + */ + void CancelSendingL(); + + /** + * Moves or deletes message after it has been cancelled + */ + void MoveOrDeleteEntryL(); + + private: + enum TCancelState + { + ECancelling, + EDeletingOrMoving + }; + + private: + CMtmStore& iMtmStore; + TCancelSendingType iCancelType; + TCancelState iCancelState; + CMsvOperation* iOperation; + CMsvEntry* iEntry; + CMsvEntrySelection* iEntrySelection; + TMsvId iEntryId; + TBuf8<1> iBlank; + }; + + + +#endif // MCECANCELSENDINGOPERATION_H + +// End of File