applicationmanagement/server/inc/AppMgmtProgDialog.h
changeset 0 3ce708148e4d
child 57 6757f1e2efd2
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Implementation of applicationmanagement components
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include <eikprogi.h>
       
    20 #include <AknWaitDialog.h> 
       
    21 #include <AknProgressDialog.h>
       
    22 
       
    23 #include <coemain.h>
       
    24 
       
    25 class MDLProgressDlgObserver
       
    26     {
       
    27 public:
       
    28 
       
    29     /**
       
    30      * Called when the dialog is going to be closed.
       
    31      *
       
    32      * @since S60 v3.1
       
    33      * @param aButtonId    Id of the button, which was used to cancel 
       
    34      *                       the dialog.
       
    35      */
       
    36     virtual void HandleDLProgressDialogExitL(TInt aButtonId) = 0;
       
    37     };
       
    38 
       
    39 class CAppMgmtProgDialog : public CBase, public MProgressDialogCallback
       
    40     {
       
    41 public:
       
    42 
       
    43     CAppMgmtProgDialog(MDLProgressDlgObserver *iCallback);
       
    44     ~CAppMgmtProgDialog();
       
    45 
       
    46     void StartProgressNoteL();
       
    47     void UpdateProcessL(TInt aProgress);
       
    48 
       
    49     void SetFinalValueL(TInt32 aFinalvalue);
       
    50 
       
    51     /**
       
    52      * Offers key event for progress dialog.
       
    53      *
       
    54      * @since S60 v3.1
       
    55      * @param aKeyEvent             Key event
       
    56      * @param aType                 Event type
       
    57      * @return None
       
    58      */
       
    59     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    60 
       
    61 public:
       
    62     // from base classes
       
    63 
       
    64 
       
    65     /**
       
    66      * From CEikDialog, respond to softkey inputs.
       
    67      *
       
    68      * @since S60 v3.1
       
    69      * @para aButtonId, type of pressed Button or Softkey
       
    70      * @return TBool, ETrue if exit the dialog, otherwise EFalse.
       
    71      */
       
    72     TBool OkToExitL(TInt aButtonId);
       
    73 
       
    74     void ProgressCompletedL();
       
    75 
       
    76 public:
       
    77 
       
    78 protected:
       
    79     // other system interface functions
       
    80     void DialogDismissedL(TInt aButtonId);
       
    81 
       
    82 private:
       
    83 
       
    84     CAknProgressDialog* iProgressDialog;
       
    85     CEikProgressInfo* iProgressInfo;
       
    86 
       
    87     MDLProgressDlgObserver* iDlgObserver;
       
    88 
       
    89     };