pushmtm/MtmUiInc/PushMessageInfoOp.h
changeset 51 48e827313edd
parent 37 481242ead638
child 53 f427d27b98d8
equal deleted inserted replaced
37:481242ead638 51:48e827313edd
     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 the License "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:  Declaration of CPushMessageInfoOp.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef PUSHMESSAGEINFOOP_H
       
    21 #define PUSHMESSAGEINFOOP_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 
       
    25 #include "PushMtmUiOperation.h"
       
    26 #include <e32base.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 class CPushMessageInfoDialog;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * This asynchronous operation is responsible for executing the Message Info 
       
    36 * dialog.
       
    37 */
       
    38 class CPushMessageInfoOp : public CPushMtmUiOperation
       
    39     {
       
    40     public: // Constructors and destructor
       
    41 
       
    42         /**
       
    43         * Constructor.
       
    44         * @param aSession Message Server Session to be used by this operation.
       
    45         * @param aEntryId Id of entry to operate on.
       
    46         * @param aDontShowNotification ETrue: don't show info notes.
       
    47         * @param aObserverStatus Observer's status.
       
    48         */
       
    49         CPushMessageInfoOp( CMsvSession& aSession, 
       
    50                             TMsvId aEntryId, 
       
    51                             TBool aDontShowNotification, 
       
    52                             TRequestStatus& aObserverStatus );
       
    53 
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         virtual ~CPushMessageInfoOp();
       
    58 
       
    59     public: // Functions from CPushMtmOperation
       
    60 
       
    61         /**
       
    62         * Start or restart the operation.
       
    63         * Current implementation calls Cancel and invokes RunL.
       
    64         * Derived classes may override this.
       
    65         */
       
    66         void StartL();
       
    67 
       
    68     protected: // New functions
       
    69 
       
    70         /**
       
    71         * Decide if content changed and act accordingly.
       
    72         */
       
    73         void HandleEntryChangeL();
       
    74 
       
    75         /**
       
    76         * Show information note and cancel the operation.
       
    77         */
       
    78         void NotifyAndCancelL( TInt aResId );
       
    79 
       
    80     protected: // Functions from base classes
       
    81 
       
    82         /**
       
    83         * TODO.
       
    84         */
       
    85         void RunL();
       
    86 
       
    87         /**
       
    88         * Cancel protocol implementation.
       
    89         */
       
    90         void DoCancel();
       
    91 
       
    92         /**
       
    93         * Leave handler protocol implementation: it is called when 
       
    94         * RunL leaves. The observer is signaled if a leave occures. 
       
    95         * The leave code is not forwarded to the scheduler.
       
    96         */
       
    97         TInt RunError( TInt aError );
       
    98 
       
    99         /**
       
   100         * Call-back for entry event handling.
       
   101         */
       
   102         void HandleEntryEventL( TMsvEntryEvent aEvent, 
       
   103                                 TAny* aArg1, TAny* aArg2, TAny* aArg3 );
       
   104 
       
   105     private: // Data
       
   106 
       
   107         CPushMessageInfoDialog* iDialog; ///< Owned.
       
   108         TBool iDontShowNotification;
       
   109         TBool iObserverCompleted;
       
   110         TBool* iDeletedFlag;
       
   111     };
       
   112 
       
   113 #endif // PUSHMESSAGEINFOOP_H
       
   114 
       
   115 // End of file.