messagingappbase/mcesettings/inc/MceSettingsMoveProgress.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 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 *     Starts copy/move message store progress dialog and transfer handler
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCESETTINGSMOVEPROGRESS_H
       
    22 #define MCESETTINGSMOVEPROGRESS_H
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include <MuiuMsvProgressReporterOperation.h> // CMsvProgressReporterOperation
       
    27 #include <MuiuMsvRemoteOperationProgress.h> // MMsvRemoteOperationProgressObserver
       
    28 #include "MceSettingsMovemsgs.h"            // MMceMsgTransHandlerObserver
       
    29 #include <AknProgressDialog.h>              // CAknProgressDialog
       
    30 #include <babackup.h>                       // CBaBackupSessionWrapper
       
    31 
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CMceGeneralSettingsDialog;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 
       
    39 
       
    40 class CMceMoveProgress: public CBase, 
       
    41                                        public MMsvRemoteOperationProgressObserver, 
       
    42                                        public MMceMsgTransHandlerObserver, 
       
    43                                        public MProgressDialogCallback
       
    44     {
       
    45 public:
       
    46 
       
    47     /**
       
    48     * Two-phased constructor.
       
    49     */
       
    50     static CMceMoveProgress* NewL(
       
    51             CMsvSession*& aSession, MMsvSessionObserver& aObserver,
       
    52             TInt& aSource, const TInt& aTarget, TBool aDeleteCopiedStore,
       
    53             CMceGeneralSettingsDialog& aGeneralSettings, TBool aDeleteOnly);
       
    54     
       
    55 
       
    56     /**
       
    57     * Destructor
       
    58     */
       
    59     ~CMceMoveProgress();
       
    60 
       
    61     /**
       
    62     * Constructor
       
    63     */
       
    64     void ConstructL();
       
    65 
       
    66     /**
       
    67     * Starts transferring message store
       
    68     */
       
    69     void InitializingL();
       
    70 
       
    71     /**
       
    72     * Starts message store transfer thread
       
    73     */
       
    74     void TransferingL();
       
    75 
       
    76     /**
       
    77     * Starts copy/move progress dialog
       
    78     */
       
    79     void   ExecuteLD();
       
    80 
       
    81     // MMsvRemoteOperationProgressObserver
       
    82     void UpdateRemoteOpProgressL();
       
    83 
       
    84       // from MMceMsgTransHandlerObserver
       
    85     void CopyCompleteL(TInt aErr);
       
    86     void TransferCompleteL(TInt aErr);
       
    87     void DisableCancelL();
       
    88 
       
    89     // from MProgressDialogCallback
       
    90     void DialogDismissedL( TInt aButtonId );
       
    91 
       
    92 private:
       
    93     /**
       
    94     * Constructor
       
    95     */
       
    96     CMceMoveProgress::CMceMoveProgress(
       
    97     	CMsvSession*& aSession, MMsvSessionObserver& aObserver,
       
    98     	TInt& aSource, const TInt& aTarget, TBool aDeleteCopiedStore,
       
    99     	CMceGeneralSettingsDialog& aGeneralSettings, TBool aDeleteOnly);
       
   100 
       
   101 private:
       
   102     CMsvSession*&               iSession;
       
   103     MMsvSessionObserver&        iObserver;
       
   104     TInt&                       iSource;
       
   105     const TInt&                iTarget;
       
   106     TBool                       iDeleteCopiedStore;
       
   107     TBool						iCopyOperation;
       
   108     CMceGeneralSettingsDialog&  iGeneralSettings;
       
   109     TBool                       iDeleteOnly;
       
   110 
       
   111     CMceMessageTransHandler*    iHandler;
       
   112     CAknProgressDialog*         iProgressDialog;
       
   113     CEikProgressInfo*           iProgressInfo;
       
   114     CMsvRemoteOperationProgress* iProgressTimer;
       
   115     };
       
   116 
       
   117 
       
   118 class CMceMoveProgressDialog : public CAknProgressDialog
       
   119     {
       
   120 public:
       
   121 
       
   122     /**
       
   123     * Constructor
       
   124     */
       
   125     CMceMoveProgressDialog( TInt aFinalValue,
       
   126                                             TInt anIncrement,
       
   127                                             TInt anInterval, 
       
   128                                             CEikDialog** aSelfPtr ) :
       
   129                             CAknProgressDialog(aFinalValue,anIncrement, anInterval, aSelfPtr ) {}
       
   130         
       
   131 
       
   132     /**
       
   133     * Constructor
       
   134     */
       
   135     CMceMoveProgressDialog( CEikDialog** aSelfPtr ) :
       
   136           CAknProgressDialog( aSelfPtr) {}
       
   137 
       
   138     /**
       
   139     * Constructor
       
   140     */
       
   141     CMceMoveProgressDialog( CEikDialog** aSelfPtr, TBool aVisibilityDelayOff ) :
       
   142          CAknProgressDialog( aSelfPtr,aVisibilityDelayOff ) {}
       
   143 
       
   144 public:
       
   145 
       
   146     /**
       
   147     * Disables Cancel button in copy/move progress dialog
       
   148     */
       
   149     void DisableCancelL();
       
   150     };
       
   151 
       
   152 
       
   153 
       
   154 #endif      // MCESETTINGSMOVEPROGRESS_H
       
   155 
       
   156 // End of File