filemanager/App/inc/CFileManagerRestoreView.h
branchRCL_3
changeset 21 65326cf895ed
parent 0 6a9f87576119
equal deleted inserted replaced
20:491b3ed49290 21:65326cf895ed
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:  View for restore settings
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_FILEMANAGERRESTOREVIEW_H
       
    21 #define C_FILEMANAGERRESTOREVIEW_H
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <aknview.h>
       
    26 #include "CFileManagerViewBase.h"
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31  *  This class is used for restore settings view
       
    32  *
       
    33  *  @since S60 3.1
       
    34  */
       
    35 class CFileManagerRestoreView : public CFileManagerViewBase
       
    36     {
       
    37 
       
    38 public: // Custom Message IDs
       
    39     // Custom message for deleting backups
       
    40     static const TUid KDeleteBackups;
       
    41 
       
    42     // For custom messages
       
    43     enum TMessage
       
    44         {
       
    45         EDeleteBackups = 1
       
    46         };
       
    47 
       
    48 public:  // Constructors and destructor
       
    49     /**
       
    50      * Two-phased constructor.Leaves created view
       
    51      * to cleanup stack.
       
    52      *
       
    53      * @return Newly constructed view 
       
    54      */
       
    55     static CFileManagerRestoreView* NewLC();
       
    56     
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     ~CFileManagerRestoreView();
       
    61 
       
    62 public: // From CFileManagerViewBase
       
    63     /**
       
    64      * @see CFileManagerViewBase
       
    65      */
       
    66     void DirectoryChangedL();
       
    67 
       
    68     /**
       
    69      * @see CFileManagerViewBase
       
    70      */
       
    71     CFileManagerContainerBase* CreateContainerL();
       
    72 
       
    73     /**
       
    74      * @see CFileManagerViewBase
       
    75      */
       
    76     void NotifyForegroundStatusChange( TBool aForeground );
       
    77     
       
    78     /**
       
    79      * Updates cba
       
    80      */
       
    81     virtual void UpdateCbaL();
       
    82 
       
    83 private: // From CAknView
       
    84     /**
       
    85      * @see CAknView
       
    86      */
       
    87     void DoActivateL(
       
    88         const TVwsViewId& aPrevViewId,
       
    89         TUid aCustomMessageId,
       
    90         const TDesC8& aCustomMessage );
       
    91 
       
    92     /**
       
    93      * @see CAknView
       
    94      */
       
    95     void DoDeactivate();
       
    96 
       
    97     /**
       
    98      * @see CAknView
       
    99      */
       
   100     TUid Id() const;
       
   101 
       
   102     /**
       
   103      * @see CAknView
       
   104      */
       
   105     void HandleCommandL( TInt aCommand );
       
   106     
       
   107 public: // From MFileManagerProcessObserver
       
   108     /**
       
   109      * @see MFileManagerProcessObserver
       
   110      */
       
   111     void ProcessFinishedL( TInt aError, const TDesC& aName = KNullDesC );
       
   112 
       
   113 private: // New functions
       
   114     /**
       
   115      * Handles ok command
       
   116      */
       
   117     void CmdOkL();
       
   118 
       
   119     /**
       
   120      * Handles cancel command
       
   121      */
       
   122     void CmdCancelL();
       
   123 
       
   124     /**
       
   125      * Handles select command
       
   126      */
       
   127     void CmdSelectL();
       
   128 
       
   129     /**
       
   130      * Handles check mark command
       
   131      */
       
   132     void CmdCheckMarkL();
       
   133 
       
   134     /**
       
   135      * Refreshes all settings
       
   136      */
       
   137     void RefreshSettingsL();
       
   138 
       
   139     /**
       
   140      * Restores list selection after refresh
       
   141      */
       
   142     void RestoreSelectionL();
       
   143 
       
   144     /**
       
   145      * Updates cba according to list selection
       
   146      */
       
   147     void UpdateCbaFromSelectionL();
       
   148 
       
   149 private:
       
   150     /**
       
   151     * C++ default constructor.
       
   152     */
       
   153     CFileManagerRestoreView();
       
   154 
       
   155 private: // Data
       
   156     // Indicates if view is started into delete backup mode
       
   157     TBool iDeleteBackups;
       
   158 
       
   159     /**
       
   160      * For storing list selection during refresh
       
   161      */
       
   162     TUint64 iSelection;
       
   163 
       
   164     };
       
   165 
       
   166 #endif // C_FILEMANAGERRESTOREVIEW_H   
       
   167             
       
   168 // End of File