browserutilities/feedsengine/FeedsUI/TestHarness/inc/FeedsWaitDialog.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Encapsulates a wait or progress dialog.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef FEEDS_WAIT_DIALOG_H
       
    19 #define FEEDS_WAIT_DIALOG_H
       
    20 
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknwaitnotewrapper.h> 
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 
       
    39 /**
       
    40 *  Observer interface for the WaitDialog
       
    41 *
       
    42 *  \b Library: FeedsEngine.lib
       
    43 *
       
    44 *  @since 3.0
       
    45 */
       
    46 class MFeedsWaitDialogListener
       
    47     {
       
    48     public:
       
    49         /**
       
    50         * Called when the user presses the cancel button.
       
    51         *
       
    52         * @since 3.0
       
    53         * @return void.
       
    54         */
       
    55         virtual void DialogDismissedL() = 0;        
       
    56     };
       
    57 
       
    58 
       
    59 /**
       
    60 *  Encapsulates a wait or progress dialog.
       
    61 *
       
    62 *  \b Library: FeedsEngine.lib
       
    63 *
       
    64 *  @since 3.0
       
    65 */
       
    66 class CFeedsWaitDialog: public CBase, public MProgressDialogCallback
       
    67     {
       
    68     public:
       
    69         /**
       
    70         * Two-phased constructor.
       
    71         */
       
    72         static CFeedsWaitDialog* NewL(MFeedsWaitDialogListener& aListener);
       
    73         
       
    74         /**
       
    75         * Destructor.
       
    76         */        
       
    77         virtual ~CFeedsWaitDialog();
       
    78 
       
    79 
       
    80 	public: // From MProgressDialogCallback
       
    81         /**
       
    82         * Called when the user presses the cancel button.
       
    83         *
       
    84         * @since ?
       
    85         * @param aButtonId The id of the pressed button.
       
    86         * @return void.
       
    87         */
       
    88         virtual void DialogDismissedL(TInt aButtonId);
       
    89 
       
    90 
       
    91     public: // New methods
       
    92         /**
       
    93         * Displays a WaitDialog.
       
    94         *
       
    95         * @since 3.0
       
    96         * @param aLabelId The label's resource id.
       
    97         * @return void.
       
    98         */
       
    99         void ShowWaitDialogL(TInt aLabelId);
       
   100 
       
   101         /**
       
   102         * Displays a ProgressDialog.
       
   103         *
       
   104         * @since 3.0
       
   105         * @param aLabelId The label's resource id.
       
   106         * @return void.
       
   107         */
       
   108         void ShowProgressDialogL(TInt aLabelId);
       
   109 
       
   110         /**
       
   111         * Updates the dialog's label.
       
   112         *
       
   113         * @since 3.0
       
   114         * @param aLabelId The label's resource id.
       
   115         * @return void.
       
   116         */
       
   117         void UpdateLabelL(TInt aLabelId);
       
   118 
       
   119         /**
       
   120         * For progress dialogs this method set the max progress value.
       
   121         *
       
   122         * @since 3.0
       
   123         * @param aMaxValue The progress dialog's max value.
       
   124         * @return void.
       
   125         */
       
   126         void SetMaxProgressL(TInt aMaxValue);
       
   127 
       
   128         /**
       
   129         * For progress dialogs this method updates the progress.
       
   130         *
       
   131         * @since 3.0
       
   132         * @param aIncrement The amount the progress changed.
       
   133         * @return void.
       
   134         */
       
   135         void UpdateProgressL(TInt aIncrement);
       
   136 
       
   137         /**
       
   138         * Closes the dialog.
       
   139         *
       
   140         * @since 3.0
       
   141         * @return void.
       
   142         */
       
   143         void Close();
       
   144 
       
   145 
       
   146     private:
       
   147         /**
       
   148         * C++ default constructor.
       
   149         */
       
   150         CFeedsWaitDialog(MFeedsWaitDialogListener& aListener);
       
   151         
       
   152         /**
       
   153         * By default Symbian 2nd phase constructor is private.
       
   154         */
       
   155         void ConstructL();
       
   156         
       
   157         
       
   158     private:
       
   159         MFeedsWaitDialogListener&  iListener;
       
   160 
       
   161 	    CAknWaitDialog*       iWaitDialog;
       
   162 	    CAknProgressDialog*   iProgressDialog;
       
   163 	    CEikProgressInfo*     iProgressInfo;
       
   164     };
       
   165 
       
   166 #endif      // FEEDS_WAIT_DIALOG_H
       
   167             
       
   168 // End of File
       
   169