landmarksui/engine/inc/CLmkEncodeUnsavedLandmarksOp.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 -    This class provides functionality of encoding landmarks
       
    15 *                both saved and unsaved landmarks (In Landmarks DB).
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef CLMKENCODEUNSAVEDLANDMARKSOP_H
       
    27 #define CLMKENCODEUNSAVEDLANDMARKSOP_H
       
    28 
       
    29 //  INCLUDES
       
    30 #include "MLmkAOOperationObserver.h"
       
    31 #include <EPos_CPosLmOperation.h>
       
    32 #include <EPos_Landmarks.h>
       
    33 #include "CLmkParser.h"
       
    34 #include <EPos_CPosLandmarkEncoder.h>
       
    35 #include <EPos_CPosLandmarkDatabase.h>
       
    36 #include "CLmkLandmark.h"
       
    37 
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 * CLmkEncodeUnsavedLandmarksOp class.
       
    43 * This class does landmarks encoding operations.
       
    44 * Though there is already one operation's class which does this in the
       
    45 * landmarks engine framework, but that class does the encoding for only those
       
    46 * landmarks which existis in landmarks database, but this class is does not
       
    47 * requires any landmarks database assistance, it independently encodes the
       
    48 * landmarks to xml format.
       
    49 */
       
    50 class CLmkEncodeUnsavedLandmarksOp
       
    51 : public CPosLmOperation
       
    52     {
       
    53     public:  // Constructors and destructor
       
    54         /**
       
    55         * Creates CLmkEncodeUnsavedLandmarksOp
       
    56         * @param aLandmarkEncoder
       
    57         * @param aLandmarks
       
    58         * @param aTransferOptions
       
    59         * @return newly instantiated object
       
    60         */
       
    61         static CLmkEncodeUnsavedLandmarksOp* NewL(
       
    62                      CPosLandmarkEncoder&  aLandmarkEncoder,
       
    63                      const RPointerArray<CLmkLandmark>&  aLandmarks,
       
    64                      CPosLandmarkDatabase::TTransferOptions  aTransferOptions);
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         ~CLmkEncodeUnsavedLandmarksOp();
       
    69 
       
    70     public: // From CPosLmOperation
       
    71         void NextStep( TRequestStatus& aStatus, TReal32& aProgress );
       
    72         void ExecuteL();
       
    73 
       
    74     protected:  // Constructors and destructor
       
    75         /**
       
    76         * C++ constructor.
       
    77         */
       
    78         CLmkEncodeUnsavedLandmarksOp(
       
    79                       CPosLandmarkEncoder&  aLandmarkEncoder,
       
    80                       CPosLandmarkDatabase::TTransferOptions  aTransferOptions);
       
    81 
       
    82         /**
       
    83         * By default Symbian 2nd phase constructor is private.
       
    84         * @param aLandmarks
       
    85         */
       
    86         void ConstructL( const RPointerArray<CLmkLandmark>&  aLandmarks );
       
    87 
       
    88     private:    // Data
       
    89 
       
    90         ///Ref:
       
    91         TRequestStatus* iStatus;
       
    92 
       
    93         ///Ref:
       
    94         TReal32* iProgress;
       
    95 
       
    96         CPosLandmarkEncoder&  iEncoder;
       
    97 
       
    98         RPointerArray<CLmkLandmark> iLandmarks;
       
    99 
       
   100         CPosLandmarkDatabase::TTransferOptions iTransferOptions;
       
   101 
       
   102         TBool iCurrentIsLm;
       
   103 
       
   104         // Item list with categories to export.
       
   105         RArray<TPosLmItemId> iCategoryIdArray;
       
   106 
       
   107         // Item list with categories to export.
       
   108         RPointerArray<CPosLandmarkCategory> iCategories;
       
   109 
       
   110         // The current category handled in the id array.
       
   111         TInt iCurrentCategory;
       
   112 
       
   113         TInt iNrOfSubOperations;
       
   114 
       
   115         TInt iStatusFlag;
       
   116 
       
   117         TInt iCurrentLm;
       
   118     };
       
   119 
       
   120 #endif      // CLMKENCODEUNSAVEDLANDMARKSOP_H
       
   121 
       
   122 // End of File