phonebookui/Phonebook2/UIControls/inc/CPbk2AdaptiveSearchGridWaiter.h
branchRCL_3
changeset 39 a6539d1e8e43
parent 35 4ae315f230bc
child 45 34879f5cfc63
equal deleted inserted replaced
35:4ae315f230bc 39:a6539d1e8e43
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Phonebook2 Adaptive Search Grid
       
    15 *               helper class
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2ADAPTIVESEARCHGRIDWAITER_H
       
    20 #define CPBK2ADAPTIVESEARCHGRIDWAITER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <AknProgressDialog.h>
       
    25 
       
    26 class CAknWaitDialog;
       
    27 
       
    28 /**
       
    29  * @internal Only Phonebook 2 internal use supported!
       
    30  */
       
    31 class MPbk2SearchGridWaiterObserver
       
    32     {
       
    33     public: // Interface
       
    34         /**
       
    35          * Grid delay complete
       
    36          */ 
       
    37         virtual void GridDelayCompleteL() = 0;
       
    38         
       
    39         virtual void WaitNoteDismissed() = 0;
       
    40     };
       
    41 
       
    42 /**
       
    43  * Utility class that implements the wait logic and
       
    44  * process decoration if needed.
       
    45  */
       
    46 NONSHARABLE_CLASS( CPbk2AdaptiveSearchGridWaiter ) :
       
    47         public CTimer,
       
    48         private MProgressDialogCallback
       
    49 
       
    50     {
       
    51     public: // Construction and destruction
       
    52 
       
    53         /**
       
    54          * Creates a new instance of this class.
       
    55          *
       
    56          * @return  A new instance of this class.
       
    57          */
       
    58         static CPbk2AdaptiveSearchGridWaiter* NewL( MPbk2SearchGridWaiterObserver& aObserver );
       
    59 
       
    60         /**
       
    61          * Destructor.
       
    62          */
       
    63         ~CPbk2AdaptiveSearchGridWaiter();
       
    64 
       
    65     public: // Interface
       
    66 
       
    67         void Start();
       
    68         void Stop();
       
    69         
       
    70     private: // From CTimer
       
    71         void RunL();
       
    72         TInt RunError( TInt aError );
       
    73 
       
    74     private: // From MProgressDialogCallback
       
    75         void DialogDismissedL( TInt aButtonId );
       
    76 
       
    77     private: // Implementation
       
    78         CPbk2AdaptiveSearchGridWaiter( MPbk2SearchGridWaiterObserver& aObserver );
       
    79         void ConstructL();
       
    80         void DismissWaitNote();
       
    81         
       
    82     private: // Data
       
    83         /// Own: Decorator for the process
       
    84         CAknWaitDialog*  iWaitNote;
       
    85         // Notifiy if wait note is on
       
    86         TBool iStarted;
       
    87         // Ref:
       
    88         MPbk2SearchGridWaiterObserver& iObserver;
       
    89     };
       
    90 
       
    91 #endif // CPBK2ADAPTIVESEARCHGRIDWAITER_H
       
    92             
       
    93 // End of File