landmarksui/engine/inc/CLmkIconOperation.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2004 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:    LandmarksUi Content File -    Handle icon operations
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CLMKICONOPERATION_H
       
    26 #define CLMKICONOPERATION_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "landmarks.hrh"
       
    30 #include <EPos_CPosLmOperation.h>
       
    31 #include <EPos_Landmarks.h>
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CPosLandmarkDatabase;
       
    35 class CPosLmCategoryManager;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 * CLmkIconOperation class
       
    41 */
       
    42 class CLmkIconOperation : public CPosLmOperation
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         /**
       
    46         * Create CLmkIconOpereation object
       
    47         * @param aDb
       
    48         * @param aIdArray
       
    49         * @param aItemsType
       
    50         * @param aMbmFileName
       
    51         * @param aIconIndex
       
    52         * @return newly instantiated object
       
    53         */
       
    54         static CLmkIconOperation* NewL( CPosLandmarkDatabase& aDb,
       
    55                             const RArray<TPosLmItemId>& aIdArray,
       
    56                             TLmkItemType aItemsType,
       
    57                             const TDesC& aMbmFileName,
       
    58                             TInt aIconIndex );
       
    59 
       
    60         /**
       
    61         * Destructor.
       
    62         */
       
    63         ~CLmkIconOperation();
       
    64 
       
    65     public: // New methods
       
    66         /**
       
    67         * Next step in AO operation
       
    68         * @param aStatus
       
    69         * @param aProgress
       
    70         */
       
    71         void NextStep( TRequestStatus& aStatus, TReal32& aProgress );
       
    72 
       
    73         /**
       
    74         * Execute AO operation
       
    75         */
       
    76         void ExecuteL();
       
    77 
       
    78     protected:  // Constructors and destructor
       
    79         /**
       
    80         * C++ constructor.
       
    81         * @param aDb
       
    82         * @param aItemsType
       
    83         * @param aIconIndex
       
    84         * @return newly instantiated object
       
    85         */
       
    86         CLmkIconOperation( CPosLandmarkDatabase& aDb,
       
    87                            TLmkItemType aItemsType,
       
    88                            TInt aIconIndex );
       
    89 
       
    90         /**
       
    91         * By default Symbian 2nd phase constructor is private.
       
    92         * @param aIdArray
       
    93         * @param aItemsType
       
    94         * @param aMbmFileName
       
    95         */
       
    96         void ConstructL( const RArray<TPosLmItemId>& aIdArray,
       
    97                          TLmkItemType aItemsType,
       
    98                          const TDesC& aMbmFileName );
       
    99 
       
   100     private: // From CPosLmOperation
       
   101         void DoLandmarkStepL( TPosLmItemId aId );
       
   102         void DoCategoryStepL( TPosLmItemId aId );
       
   103 
       
   104     private:    // Data
       
   105         ///Ref:
       
   106         CPosLandmarkDatabase& iDb;
       
   107 
       
   108         RArray<TPosLmItemId> iIdArray;
       
   109 
       
   110         TInt iCurrentIndex;
       
   111 
       
   112         // method pointer to DoLandmarkStepL or DoCategoryStepL
       
   113         void (CLmkIconOperation::*iStepMethodL)( TPosLmItemId aId );
       
   114 
       
   115         ///Own: icon file name
       
   116         HBufC* iMbmFileName;
       
   117 
       
   118         TInt iIconIndex ;
       
   119 
       
   120         ///Own:
       
   121         CPosLmCategoryManager* iCategoryMgr;
       
   122     };
       
   123 
       
   124 #endif      // CLMKICONOPERATION_H
       
   125 
       
   126 // End of File