memspyui/include/MemSpyDeviceWideOperationDialog.h
branchRCL_3
changeset 21 b3cee849fa46
parent 20 48060abbbeaf
child 22 fad26422216a
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MEMSPYDEVICEWIDEOPERATIONDIALOG_H
       
    19 #define MEMSPYDEVICEWIDEOPERATIONDIALOG_H
       
    20 
       
    21 // System includes
       
    22 #include <AknProgressDialog.h>
       
    23 #include <AknWaitDialog.h>
       
    24 
       
    25 // Engine includes
       
    26 #include <memspy/engine/memspydevicewideoperations.h>
       
    27 
       
    28 // Classes referenced
       
    29 class CMemSpyEngine;
       
    30 
       
    31 class MMemSpyDeviceWideOperationDialogObserver
       
    32     {
       
    33 public:
       
    34     virtual void DWOperationStarted() = 0;
       
    35     virtual void DWOperationCancelled() = 0;
       
    36     virtual void DWOperationCompleted() = 0;
       
    37     };
       
    38 
       
    39 
       
    40 class CMemSpyDeviceWideOperationDialog : public CBase, public MProgressDialogCallback, public MMemSpyDeviceWideOperationsObserver
       
    41     {
       
    42 public:
       
    43     static void ExecuteLD( CMemSpyEngine& aEngine, MMemSpyDeviceWideOperationDialogObserver& aObserver, CMemSpyDeviceWideOperations::TOperation aOperation );
       
    44     ~CMemSpyDeviceWideOperationDialog();
       
    45 
       
    46 private:
       
    47     CMemSpyDeviceWideOperationDialog( CMemSpyEngine& aEngine, MMemSpyDeviceWideOperationDialogObserver& aObserver );
       
    48     void ExecuteL( CMemSpyDeviceWideOperations::TOperation aOperation );
       
    49 
       
    50 public: // API
       
    51     void Cancel();
       
    52 
       
    53 private: // From MProgressDialogCallback
       
    54     void DialogDismissedL( TInt aButtonId );
       
    55 
       
    56 private: // From MMemSpyDeviceWideOperationsObserver
       
    57     void HandleDeviceWideOperationEvent( TEvent aEvent, TInt aParam1, const TDesC& aParam2 );
       
    58 
       
    59 private: // Internal methods
       
    60     void SetDialogCaptionL( const TDesC& aText );
       
    61 
       
    62 private: // Member data
       
    63     CMemSpyEngine& iEngine;
       
    64     MMemSpyDeviceWideOperationDialogObserver& iObserver;
       
    65     TBool iForcedCancel;
       
    66     CEikProgressInfo* iProgressInfo;
       
    67     CAknProgressDialog* iProgressDialog;
       
    68     CMemSpyDeviceWideOperations* iOperation;
       
    69     };
       
    70 
       
    71 
       
    72 #endif