fotaapplication/fotaserver/FotaServer/inc/DevEncProgressDlg.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     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 "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:   header file fot CDevEncProgressDlg class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __DEVENCPROGRESSDLG_H__
       
    21 #define __DEVENCPROGRESSDLG_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <stringresourcereader.h>
       
    25 #include <AknGlobalNote.h>
       
    26 
       
    27 // Set to progress bar, when download starts
       
    28 const TInt  KInitialDEProgressFinalValue( 100 );
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CAknGlobalProgressDialog;
       
    32 // CLASS DECLARATION
       
    33 
       
    34 
       
    35 /**
       
    36  *  Dialog observer interface
       
    37  *
       
    38  *  @lib    fotaserver
       
    39  *  @since  S60 v3.1
       
    40  */
       
    41 class MDEProgressDlgObserver
       
    42     {
       
    43 public:
       
    44     
       
    45     /**
       
    46     * Called when the dialog is going to be closed.
       
    47     *
       
    48     * @since S60 v3.1
       
    49     * @param aButtonId    Id of the button, which was used to cancel 
       
    50     *                       the dialog.
       
    51     * @return TBool Can dlg be exited
       
    52     */
       
    53     virtual TBool HandleDEProgressDialogExitL( TInt aButtonId ) = 0;    
       
    54     };
       
    55 
       
    56 
       
    57 /**
       
    58  *  Progress dialog for download.
       
    59  *
       
    60  *  @lib    fotaserver.exe
       
    61  *  @since  S60 v3.1
       
    62  */
       
    63 NONSHARABLE_CLASS(CDevEncProgressDlg) : public CActive
       
    64     {
       
    65 
       
    66 public:
       
    67 
       
    68     IMPORT_C static CDevEncProgressDlg* NewL(MDEProgressDlgObserver* aObserver, TInt aResource);
       
    69     IMPORT_C static CDevEncProgressDlg* NewLC(MDEProgressDlgObserver* aObserver, TInt aResource);
       
    70 
       
    71     virtual ~CDevEncProgressDlg();
       
    72 
       
    73 
       
    74 public: // from base classes
       
    75     
       
    76 
       
    77     void ShowProgressDialogL();
       
    78     
       
    79     void UpdateProgressDialogL(TInt aValue, TInt aFinalValue);
       
    80     
       
    81     void ProgressFinished();
       
    82 
       
    83 private:
       
    84     void ConstructL(TInt aResource);
       
    85     
       
    86     virtual void RunL();
       
    87     
       
    88     virtual void DoCancel();
       
    89     
       
    90     CDevEncProgressDlg(MDEProgressDlgObserver* aObserver);
       
    91 
       
    92 private: // data
       
    93 
       
    94    
       
    95     CAknGlobalProgressDialog* iProgressDialog;
       
    96     
       
    97     HBufC* iStringResource;
       
    98     
       
    99     
       
   100     /**
       
   101      * Progress dialog observer. Not owned.
       
   102      */
       
   103     MDEProgressDlgObserver* iObserver;
       
   104 
       
   105     };
       
   106 
       
   107 #endif // __DEVENCPROGRESSDLG_H__
       
   108 
       
   109 // End of file