landmarks/locationlandmarks/converter/inc/EPos_CPosLmLmxEncoder.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2007 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: Implementation of CPosLmXmlEncoder for LMX format.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPOSLMLMXENCODER_H
       
    20 #define CPOSLMLMXENCODER_H
       
    21 
       
    22 #include "EPos_CPosLmXmlEncoder.h"
       
    23 
       
    24 /**
       
    25 *  Implementation of CPosLmXmlEncoder for LMX format.
       
    26 */
       
    27 class CPosLmLmxEncoder : public CPosLmXmlEncoder
       
    28     {
       
    29     public:  // Constructors and destructor
       
    30 
       
    31         /**
       
    32         * Two-phased constructor.
       
    33         *
       
    34         * @returns A new instance of this class.
       
    35         */
       
    36         static CPosLmLmxEncoder* NewL();
       
    37 
       
    38         /**
       
    39         * Destructor.
       
    40         */
       
    41         ~CPosLmLmxEncoder();
       
    42 
       
    43     protected: // From CPosLmXmlEncoder
       
    44       
       
    45         void WriteStartTagsL();
       
    46         
       
    47         void WriteCollectionDataL( 
       
    48             const HBufC* aCollectionName,
       
    49             const HBufC* aCollectionDescription );
       
    50         
       
    51         void WriteLandmarkL( 
       
    52             const CPosLandmark& aLandmark, 
       
    53             const RPointerArray<const CPosLandmarkCategory>& aCategories );
       
    54         
       
    55         void WriteFinalTagsL();
       
    56         
       
    57         TPtrC TagNameL( TPosXmlTagType aTagType );
       
    58 
       
    59     private:
       
    60 
       
    61         /** Writes coordinate tags */
       
    62         void WriteLmCoordinatesL( const TLocality&  aLocality );
       
    63 
       
    64         /** Writes address information tags */
       
    65         void WriteLmPositionFieldsL( const CPosLandmark&  aLandmark );
       
    66 
       
    67         /** Writes category tags */
       
    68         void WriteCategoryL( const CPosLandmarkCategory&  aCategory );
       
    69 
       
    70         /**
       
    71          * Get the tag type for the specified position field id.
       
    72          *
       
    73          * @param aPosFieldId The position field id.
       
    74          * @return The tag type.
       
    75          */
       
    76          static TPosXmlTagType XmlTagForPositionField( TPositionFieldId aPosFieldId );
       
    77 
       
    78     private:
       
    79 
       
    80         CPosLmLmxEncoder();
       
    81         // Prohibit copy constructor
       
    82         CPosLmLmxEncoder( const CPosLmLmxEncoder& );
       
    83         // Prohibit assigment operator
       
    84         CPosLmLmxEncoder& operator= ( const CPosLmLmxEncoder& );
       
    85 
       
    86     private: 
       
    87 
       
    88     };
       
    89 
       
    90 #endif      // CPOSLMLMXENCODER_H