msgfw_plat/send_ui_datautils_api/inc/SendUiOperationWait.h
branchRCL_3
changeset 22 d2c4c66342f3
parent 21 e5b3a2155e1a
child 23 d51193d814ea
equal deleted inserted replaced
21:e5b3a2155e1a 22:d2c4c66342f3
     1 /*
       
     2 * Copyright (c) 2002-2006 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:   Provides asyncronous waiter.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SENDUIOPERATIONWAIT_H
       
    21 #define SENDUIOPERATIONWAIT_H
       
    22 
       
    23 //  INCLUDES
       
    24 class CBaseMtm;
       
    25 class CAknInputBlock;
       
    26 
       
    27 /**
       
    28  *  CSendUiOperationWait
       
    29  *
       
    30  * We cannot use CMuiuOperationWait because it calls
       
    31  * CAknEnv::StopSchedulerWaitWithBusyMessage. When e.g. New message
       
    32  * pop-up is opened from Phone idle while we are waiting previous
       
    33  * editor launch completion, a Busy dialog is shown and it cannot
       
    34  * be closed at all.
       
    35  *
       
    36  *  This class is otherwise same as CMuiuOperationWait but iWait.AsyncStop
       
    37  *  is called instead of CAknEnv::StopSchedulerWaitWithBusyMessage.
       
    38  *
       
    39  *  @lib senduidatautils
       
    40  *  @since S60 S60 v3.0
       
    41  */
       
    42 
       
    43 NONSHARABLE_CLASS (CSendUiOperationWait) : public CActive
       
    44     {
       
    45 
       
    46 public:
       
    47   
       
    48     IMPORT_C static CSendUiOperationWait* NewLC(TInt aPriority = EPriorityStandard);
       
    49 
       
    50     virtual ~CSendUiOperationWait();
       
    51 
       
    52     /**
       
    53      * Starts active wait operation
       
    54      *
       
    55      * @since S60 v3.1
       
    56      * @param aOperation CActive derived operation, that is running
       
    57      * @return ETrue, if wait was not interrupted. Otherwise EFalse.
       
    58      */
       
    59     IMPORT_C TBool Start( CActive* aOperation );
       
    60 
       
    61     /**
       
    62      * Starts active wait operation
       
    63      *
       
    64      * @since S60 v3.1
       
    65      * @param aOperation CBaseMtmOperation derived operation, that is 
       
    66      *                   running
       
    67      * @return ETrue, if wait was not interrupted. Otherwise EFalse.
       
    68      */
       
    69     IMPORT_C TBool Start( CBaseMtm* aBaseMtmOperation );
       
    70     
       
    71     /**
       
    72      * Starts active wait operation
       
    73      *
       
    74      * Use this, if the operation to be waited can not be canceled.
       
    75      * Prefer using the above Start methods.
       
    76      *
       
    77      * @since S60 v3.0
       
    78      * @return ETrue, For compatibility returns always.
       
    79      */
       
    80     IMPORT_C TBool Start();
       
    81 
       
    82 protected: // from base class CActive
       
    83 
       
    84     CSendUiOperationWait(TInt aPriority);
       
    85 
       
    86     void RunL();
       
    87 
       
    88     void DoCancel();
       
    89 
       
    90 private:
       
    91 
       
    92     void ConstructL();
       
    93     
       
    94 protected:
       
    95 
       
    96     /**
       
    97      * Waiter
       
    98      */
       
    99     CActiveSchedulerWait iWait;
       
   100 
       
   101     /**
       
   102      * Inputblocker harvests exit events.
       
   103      * Own.
       
   104      */
       
   105     CAknInputBlock* iInputBlock;
       
   106 
       
   107 private:
       
   108 
       
   109     /**
       
   110      * This is ETrue, if operation has not been interrupted.
       
   111      */
       
   112     TBool iSuccess;
       
   113 
       
   114     /**
       
   115      * Operation, which can be canceled
       
   116      * Not own.
       
   117      */
       
   118     CActive* iOperation;
       
   119 
       
   120     /**
       
   121      * Operation, which can be canceled
       
   122      * Not own.
       
   123      */
       
   124     CBaseMtm* iBaseMtmOperation;
       
   125     };
       
   126 
       
   127 #endif
       
   128 
       
   129 // End of file