messagingappbase/mce/inc/MceUtilsIdleClass.h
branchRCL_3
changeset 60 7fdbb852d323
parent 0 72b543305e3a
equal deleted inserted replaced
57:ebe688cedc25 60:7fdbb852d323
       
     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 *   Active object to count messages background for mainview.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCEUTILSIDLECLASS_H
       
    22 #define MCEUTILSIDLECLASS_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 #include <bldvariant.hrh>
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 class MMceUtilsIdleClassObserver
       
    35     {
       
    36     public:
       
    37     /**
       
    38     * return ETrue if wanted to be called again
       
    39     * EFalse if operation is ended.
       
    40     */
       
    41     virtual TBool MMceUtilsIdleClassStepL() = 0;
       
    42     };
       
    43 
       
    44 
       
    45 
       
    46 
       
    47 
       
    48 /**
       
    49 *  CMceUtilsIdleClass
       
    50 *
       
    51 *
       
    52 */
       
    53 class CMceUtilsIdleClass : public CActive
       
    54     {
       
    55     public:  // Constructors and destructor
       
    56     
       
    57         /**
       
    58         *
       
    59         */
       
    60         static CMceUtilsIdleClass* NewL(
       
    61             MMceUtilsIdleClassObserver& aObserver );
       
    62 
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66         virtual ~CMceUtilsIdleClass();
       
    67 
       
    68     public: // New functions
       
    69 
       
    70         /**
       
    71         * Starts
       
    72         */
       
    73         void StartL();
       
    74 
       
    75         /**
       
    76         * Complete synchronously. 
       
    77         */
       
    78         void ForceFinishL();
       
    79 
       
    80 
       
    81     private:  // Functions from CActive
       
    82         /**
       
    83         * From CActive
       
    84         */
       
    85         virtual void DoCancel();
       
    86 
       
    87         /**
       
    88         * From CActive
       
    89         */
       
    90         virtual void RunL();
       
    91 
       
    92         /**
       
    93         * From CActive
       
    94         */
       
    95 	    virtual TInt RunError(TInt aError);
       
    96 	    
       
    97     private: // New functions
       
    98     
       
    99         /**
       
   100         * C++ constructor.
       
   101         */
       
   102         CMceUtilsIdleClass( MMceUtilsIdleClassObserver& aObserver );
       
   103 
       
   104         /**
       
   105         * Requests next operation.
       
   106         */
       
   107         void QueueNextL();
       
   108 
       
   109     private: //Data
       
   110         MMceUtilsIdleClassObserver& iObserver;
       
   111     };
       
   112 
       
   113 #endif
       
   114 
       
   115 // End of file