messagingappbase/mce/inc/MceCancelSendingOperation.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 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:  
       
    15 *     CMceCancelSendingOperation.
       
    16 *     Cancels first sending of the message and then tries to delete or move it to drafts.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MCECANCELSENDINGOPERATION_H
       
    23 #define MCECANCELSENDINGOPERATION_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <MsvPrgReporter.h> // MMsvProgressDecoder
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  CMceCancelSendingOperation.
       
    32 *  Cancels first sending of the message and then tries to delete or move it to drafts.
       
    33 */
       
    34 class CMceCancelSendingOperation: public CMsvOperation
       
    35     {
       
    36     public:
       
    37         enum TCancelSendingType
       
    38             {
       
    39             ECancelOnly,
       
    40             ECancelAndMoveToDrafts,
       
    41             ECancelAndDelete
       
    42             };
       
    43         /**
       
    44         * Constructor.
       
    45         */
       
    46         static CMceCancelSendingOperation* NewL(
       
    47             CMsvSession& aMsvSession,
       
    48             TRequestStatus& aObserverRequestStatus,
       
    49             TMsvId aEntryId,
       
    50             TCancelSendingType aCancelType,
       
    51             CMtmStore& aMtmStore );
       
    52 
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CMceCancelSendingOperation();
       
    57 
       
    58         /**
       
    59         * From CMsvOperation
       
    60         */
       
    61         virtual const TDesC8& ProgressL();
       
    62 
       
    63     private:
       
    64         /**
       
    65         * Constructor.
       
    66         */
       
    67         CMceCancelSendingOperation(
       
    68             CMsvSession& aMsvSession,
       
    69             TRequestStatus& aObserverRequestStatus,
       
    70             TMsvId aEntryId,
       
    71             TCancelSendingType aCancelType,
       
    72             CMtmStore& aMtmStore );
       
    73 
       
    74         /**
       
    75         * Constructor.
       
    76         */
       
    77         void ConstructL();
       
    78 
       
    79         /**
       
    80         * From CActive
       
    81         */
       
    82         void DoCancel();
       
    83 
       
    84         /**
       
    85         * From CActive
       
    86         */
       
    87         void RunL();
       
    88 
       
    89         /**
       
    90         * Cancels sending
       
    91         */
       
    92         void CancelSendingL();
       
    93 
       
    94         /**
       
    95         * Moves or deletes message after it has been cancelled
       
    96         */
       
    97         void MoveOrDeleteEntryL();
       
    98 
       
    99     private:
       
   100         enum TCancelState
       
   101             {
       
   102             ECancelling,
       
   103             EDeletingOrMoving
       
   104             };
       
   105 
       
   106     private:
       
   107         CMtmStore&              iMtmStore;
       
   108         TCancelSendingType      iCancelType;
       
   109         TCancelState            iCancelState;
       
   110         CMsvOperation*          iOperation;
       
   111         CMsvEntry*              iEntry;
       
   112         CMsvEntrySelection*     iEntrySelection;
       
   113         TMsvId                  iEntryId;
       
   114         TBuf8<1>                iBlank;
       
   115     };
       
   116 
       
   117 
       
   118 
       
   119 #endif      // MCECANCELSENDINGOPERATION_H
       
   120 
       
   121 // End of File