landmarks/locationlandmarks/converter/inc/EPos_CPosLmXmlEncoderOperation.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 10:20:18 +0300
branchRCL_3
changeset 42 02ba3f1733c6
parent 0 667063e416a2
permissions -rw-r--r--
Revision: 201030 Kit: 201033

/*
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Operation for finalizing an encoder.
*
*
*/


#ifndef CPOSLMXMLENCODEROPERATION_H
#define CPOSLMXMLENCODEROPERATION_H

//  INCLUDES
#include "EPos_CPosLmConverterOperation.h"

// CONSTANTS

// FORWARD DECLARATIONS
class CPosLmOutput;

// CLASS DECLARATION

/**
* Operation for finalizing an encoder. This operation can be either synchronous
* or asynchronous.
*
*  @lib eposconverter.lib
*/
class CPosLmXmlEncoderOperation : public CPosLmConverterOperation
    {

    public:  // Constructors and destructor

        /**
        * Two-phased constructor.
        * @param aEncoderOutput The output for the encoder. This class takes
        *   ownership of the output.
        * @returns A new instance of this class.
        */
        static CPosLmXmlEncoderOperation* NewL(
        /* IN */        CPosLmOutput* aEncoderOutput
        );

        /**
        * Destructor.
        */
        virtual ~CPosLmXmlEncoderOperation();

    public: // Functions from base classes

        /**
        * From CPosLmConverterOperation;
        *
        * @param aProgress Will be set to the progress of the operation when
        * the step has finished.
        * @return @p KPosLmOperationNotComplete if the step has completed but
        *   more steps are needed before the operation has finished,
        *   @p KErrNone if the operation has finished successfully.
        */
        TInt NextStepL(
        /* OUT */   TReal32& aProgress
        );

        /**
        * From CPosLmConverterOperation;
        *
        * @param aError An error code generated by NextStepL.
        */
        void HandleError(
        /* IN/OUT */    TInt& aError
        );

        /**
        * From CPosLmConverterOperation;
        *
        */
        void HandleOperationCompleted();

    private:

        /**
        * C++ default constructor.
        * @param aEncoderOutput The output for the encoder. This class takes
        *   ownership of the output.
        */
        CPosLmXmlEncoderOperation(
        /* IN */        CPosLmOutput* aEncoderOutput
        );

        /**
        * By default Symbian 2nd phase constructor is private.
        */
        void ConstructL();

        // Prohibit copy constructor if not deriving from CBase.
        CPosLmXmlEncoderOperation(const CPosLmXmlEncoderOperation&);
        // Prohibit assigment operator if not deriving from CBase.
        CPosLmXmlEncoderOperation& operator=(const CPosLmXmlEncoderOperation&);

    private:    // Data

        CPosLmOutput*       iEncoderOutput;

    };

#endif      // CPOSLMXMLENCODEROPERATION_H

// End of File