browserui/browser/FavouritesInc/BrowserFavouritesIncrementalMove.h
branchRCL_3
changeset 64 6385c4c93049
parent 63 4baee4f15982
child 65 8e6fa1719340
equal deleted inserted replaced
63:4baee4f15982 64:6385c4c93049
     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 the License "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 *      Declaration of class CWmlBrowserFavouritesIncrementalMove.
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BROWSER_FAVOURITES_INCREMENTAL_MOVE
       
    22 #define BROWSER_FAVOURITES_INCREMENTAL_MOVE
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include "BrowserFavouritesIncrementalOp.h"
       
    27 
       
    28 // FORWARD DECLARATION
       
    29 
       
    30 class CFavouritesItem;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * Incremental move operation.
       
    36 */
       
    37 class CBrowserFavouritesIncrementalMove:
       
    38                                     public CBrowserFavouritesIncrementalOp
       
    39     {
       
    40     public:     // construct / destruct
       
    41 
       
    42         /**
       
    43         * Two phased constructor. Leaves on failure.
       
    44         * @param aModel Data model.
       
    45         * @param aUids Uids to move. Ownership not taken, must remain
       
    46         * intact during operation.
       
    47         * @param aUnmovableUids Uids of items which could not be moved (due to
       
    48         * any other reason than name conflict) will be appended to this list.
       
    49         * Ownership not taken, must remain intact during operation.
       
    50         * @param aConflictingNameUids Uids of items which could not be moved
       
    51         * (due to name conflict) will be appended to this list.
       
    52         * Ownership not taken, must remain intact during operation.
       
    53         * @param aPriority Active Object priority.
       
    54         * @param aTargetFolder Uid of the target folder. Nothing is checked.
       
    55         * @return The constructed incremental move operation.
       
    56         */
       
    57         static CBrowserFavouritesIncrementalMove* NewL
       
    58             (
       
    59             CBrowserFavouritesModel& aModel,
       
    60             CArrayFix<TInt>& aUids,
       
    61             CArrayFix<TInt>& aUnmovableUids,
       
    62             CArrayFix<TInt>& aConflictingNameUids,
       
    63             TInt aTargetFolder,
       
    64             TInt aPriority = CActive::EPriorityStandard
       
    65             );
       
    66 
       
    67         /**
       
    68         * Destructor.
       
    69         */
       
    70         virtual ~CBrowserFavouritesIncrementalMove();
       
    71 
       
    72     protected:  // construct / destruct
       
    73 
       
    74         /**
       
    75         * Constructor.
       
    76         * @param aModel Data model.
       
    77         * @param aUids Uids to move. Ownership not taken, must remain
       
    78         * intact during operation.
       
    79         * @param aUnmovableUids Uids of items which could not be moved (due to
       
    80         * any other reason than name conflict) will be appended to this list.
       
    81         * Ownership not taken, must remain intact during operation.
       
    82         * @param aConflictingNameUids Uids of items which could not be moved
       
    83         * (due to name conflict) will be appended to this list.
       
    84         * Ownership not taken, must remain intact during operation.
       
    85         * @param aTargetFolder Uid of the target folder. Nothing is checked.
       
    86         * @param aPriority Active Object priority.
       
    87         */
       
    88         CBrowserFavouritesIncrementalMove
       
    89             (
       
    90             CBrowserFavouritesModel& aModel,
       
    91             CArrayFix<TInt>& aUids,
       
    92             CArrayFix<TInt>& aUnmovableUids,
       
    93             CArrayFix<TInt>& aConflictingNameUids,
       
    94             TInt aTargetFolder,
       
    95             TInt aPriority = CActive::EPriorityStandard
       
    96             );
       
    97 
       
    98         /**
       
    99         * Second phase constructor.
       
   100         */
       
   101         void ConstructL();
       
   102 
       
   103     protected:  // from WmlBrowserFavouritesIncrementalOp
       
   104 
       
   105         /**
       
   106         * Perform next step (move one item).
       
   107         * @return Number of steps to come (0 if done).
       
   108         */
       
   109         TInt StepL();
       
   110 
       
   111         /**
       
   112         * Create and prepare the wait note.
       
   113         */
       
   114         void CreateWaitNoteLC();
       
   115 
       
   116     private:    // data
       
   117 
       
   118         /// Uids to delete. Not owned.
       
   119         CArrayFix<TInt>* iUids;
       
   120         /// Unmovable uids. Not owned.
       
   121         CArrayFix<TInt>* iUnmovableUids;
       
   122         /// Conflicting name uids. Not owned.
       
   123         CArrayFix<TInt>* iConflictingNameUids;
       
   124         /// Target folder Uid.
       
   125         TInt iTargetFolder;
       
   126         /// Favourites item used in database updates. Owned.
       
   127         CFavouritesItem* iItem;
       
   128         /// Index of item being moved.
       
   129         TInt iIndex;
       
   130 
       
   131     };
       
   132 
       
   133 #endif
       
   134 // End of File