browserui/browser/FeedsInc/FeedsWaitDialog.h
branchRCL_3
changeset 48 8e6fa1719340
parent 0 84ad3b177aa3
equal deleted inserted replaced
47:6385c4c93049 48:8e6fa1719340
       
     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 *  @lib FeedsEngine.lib
       
    42 *  @since 3.0
       
    43 */
       
    44 class MFeedsWaitDialogListener
       
    45     {
       
    46     public:
       
    47         /**
       
    48         * Called when the user presses the cancel button.
       
    49         *
       
    50         * @since 3.0
       
    51         * @return void.
       
    52         */
       
    53         virtual void DialogDismissedL() = 0;        
       
    54     };
       
    55 
       
    56 
       
    57 /**
       
    58 *  Encapsulates a wait or progress dialog.
       
    59 *  @lib FeedsEngine.lib
       
    60 *  @since 3.0
       
    61 */
       
    62 class CFeedsWaitDialog: public CBase, public MProgressDialogCallback
       
    63     {
       
    64     public:
       
    65         /**
       
    66         * Two-phased constructor.
       
    67         */
       
    68         static CFeedsWaitDialog* NewL(MFeedsWaitDialogListener& aListener);
       
    69         
       
    70         /**
       
    71         * Destructor.
       
    72         */        
       
    73         virtual ~CFeedsWaitDialog();
       
    74 
       
    75 
       
    76 	public: // From MProgressDialogCallback
       
    77         /**
       
    78         * Called when the user presses the cancel button.
       
    79         *
       
    80         * @since ?
       
    81         * @param aButtonId The id of the pressed button.
       
    82         * @return void.
       
    83         */
       
    84         virtual void DialogDismissedL(TInt aButtonId);
       
    85 
       
    86 
       
    87     public: // New methods
       
    88         /**
       
    89         * Displays a WaitDialog.
       
    90         *
       
    91         * @since 3.0
       
    92         * @param aLabelId The label's resource id.
       
    93         * @return void.
       
    94         */
       
    95         void ShowWaitDialogL(TInt aLabelId);
       
    96 
       
    97         /**
       
    98         * Displays a ProgressDialog.
       
    99         *
       
   100         * @since 3.0
       
   101         * @param aLabelId The label's resource id.
       
   102         * @return void.
       
   103         */
       
   104         void ShowProgressDialogL(TInt aLabelId);
       
   105 
       
   106         /**
       
   107         * Updates the dialog's label.
       
   108         *
       
   109         * @since 3.0
       
   110         * @param aLabelId The label's resource id.
       
   111         * @return void.
       
   112         */
       
   113         void UpdateLabelL(TInt aLabelId);
       
   114 
       
   115         /**
       
   116         * For progress dialogs this method set the max progress value.
       
   117         *
       
   118         * @since 3.0
       
   119         * @param aMaxValue The progress dialog's max value.
       
   120         * @return void.
       
   121         */
       
   122         void SetMaxProgressL(TInt aMaxValue);
       
   123 
       
   124         /**
       
   125         * For progress dialogs this method updates the progress.
       
   126         *
       
   127         * @since 3.0
       
   128         * @param aIncrement The amount the progress changed.
       
   129         * @return void.
       
   130         */
       
   131         void UpdateProgressL(TInt aIncrement);
       
   132 
       
   133         /**
       
   134         * Closes the dialog.
       
   135         *
       
   136         * @since 3.0
       
   137         * @return void.
       
   138         */
       
   139         void Close();
       
   140 
       
   141 
       
   142     private:
       
   143         /**
       
   144         * C++ default constructor.
       
   145         */
       
   146         CFeedsWaitDialog(MFeedsWaitDialogListener& aListener);
       
   147         
       
   148         /**
       
   149         * By default Symbian 2nd phase constructor is private.
       
   150         */
       
   151         void ConstructL();
       
   152         
       
   153         
       
   154     private:
       
   155         MFeedsWaitDialogListener&  iListener;
       
   156 
       
   157 	    CAknWaitDialog*       iWaitDialog;
       
   158 	    CAknProgressDialog*   iProgressDialog;
       
   159 	    CEikProgressInfo*     iProgressInfo;
       
   160     };
       
   161 
       
   162 #endif      // FEEDS_WAIT_DIALOG_H
       
   163             
       
   164 // End of File
       
   165