browserui/browser/FavouritesInc/BrowserFavouritesIncrementalDelete.h
branchRCL_3
changeset 65 8e6fa1719340
parent 0 84ad3b177aa3
equal deleted inserted replaced
64:6385c4c93049 65:8e6fa1719340
       
     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 CWmlBrowserFavouritesIncrementalDelete.
       
    16 *       
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BROWSER_FAVOURITES_INCREMENTAL_DELETE
       
    22 #define BROWSER_FAVOURITES_INCREMENTAL_DELETE
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include "BrowserFavouritesIncrementalOp.h"
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Incremental delete operation. One step deletes one bookmark. Before deleting
       
    32 * a folder, its contents are deleted manually one-by-one. (Using DeleteL of
       
    33 * Bookmark Engine for a full folder would delete the folder along with its
       
    34 * contents in one call. This can be too long if the folder contains many items.
       
    35 * Therefore this operation deletes the folder contents manually before deleting
       
    36 * the (already emptied) folder, to keep one StepL short.)
       
    37 */
       
    38 class CBrowserFavouritesIncrementalDelete:
       
    39                                     public CBrowserFavouritesIncrementalOp
       
    40     {
       
    41     public:     // construct / destruct
       
    42 
       
    43         /**
       
    44         * Two phased constructor. Leaves on failure.
       
    45         * @param aModel Data model.
       
    46         * @param aUids Uids to delete. Ownership not taken, must remain
       
    47         * intact during operation.
       
    48         * @param aNotDeletedUids Uids of items which could not be deleted
       
    49         * will be appended to this list. Ownership not taken, must remain
       
    50         * intact during operation.
       
    51         * @param aPriority Active Object priority.
       
    52         * @return The constructed incremental delete operation.
       
    53         */
       
    54         static CBrowserFavouritesIncrementalDelete* NewL
       
    55             (
       
    56             CBrowserFavouritesModel& aModel,
       
    57             CArrayFix<TInt>& aUids,
       
    58             CArrayFix<TInt>& aNotDeletedUids,
       
    59             TInt aPriority = CActive::EPriorityStandard
       
    60             );
       
    61 
       
    62         /**
       
    63         * Destructor.
       
    64         */
       
    65         virtual ~CBrowserFavouritesIncrementalDelete();
       
    66 
       
    67     protected:  // construct / destruct
       
    68 
       
    69         /**
       
    70         * Constructor.
       
    71         * @param aModel Data model.
       
    72         * @param aUids Uids to delete. Ownership not taken, must remain
       
    73         * intact during operation.
       
    74         * @param aNotDeletedUids Uids of items which could not be deleted
       
    75         * will be appended to this list. Ownership not taken, must remain
       
    76         * intact during operation.
       
    77         * @param aPriority Active Object priority.
       
    78         */
       
    79         CBrowserFavouritesIncrementalDelete
       
    80             (
       
    81             CBrowserFavouritesModel& aModel,
       
    82             CArrayFix<TInt>& aUids,
       
    83             CArrayFix<TInt>& aNotDeletedUids,
       
    84             TInt aPriority
       
    85             );
       
    86 
       
    87         /**
       
    88         * Second phase constructor.
       
    89         */
       
    90         void ConstructL();
       
    91 
       
    92     protected:  // from WmlBrowserFavouritesIncrementalOp
       
    93 
       
    94         /**
       
    95         * Perform next step (delete one item).
       
    96         * @return Number of steps to come (0 if done).
       
    97         */
       
    98         TInt StepL();
       
    99 
       
   100         /**
       
   101         * Create and prepare the wait note.
       
   102         */
       
   103         void CreateWaitNoteLC();
       
   104 
       
   105     private:    // data
       
   106 
       
   107         /// Uids to delete. Not owned.
       
   108         CArrayFix<TInt>* iUids;
       
   109         /// Not deleted uids. Not owned.
       
   110         CArrayFix<TInt>* iNotDeletedUids;
       
   111         /// Uids from folder being deleted. Owned.
       
   112         CArrayFix<TInt>* iFolderContents;
       
   113         /// ETrue if deleting folder contents (the folder itself comes next).
       
   114         TBool iFolderPending;
       
   115         /// Index of item being deleted.
       
   116         TInt iIndex;
       
   117 
       
   118     };
       
   119 
       
   120 #endif
       
   121 // End of File