landmarks/locationlandmarks/localaccess/inc/EPos_CPosLmLocalCompactingOp.h
changeset 0 667063e416a2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarks/locationlandmarks/localaccess/inc/EPos_CPosLmLocalCompactingOp.h	Tue Feb 02 01:06:48 2010 +0200
@@ -0,0 +1,118 @@
+/*
+* 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 compacting a landmarks database.
+*
+*
+*/
+
+
+#ifndef CPOSLMLOCALCOMPACTINGOP_H
+#define CPOSLMLOCALCOMPACTINGOP_H
+
+//  INCLUDES
+#include "EPos_CPosLmLocalOperation.h"
+
+// FORWARD DECLARATIONS
+class CPosLmLocalDatabase;
+class CPosLmCompactDatabase;
+
+// CLASS DECLARATION
+
+/**
+* Operation for compacting a landmarks database. This operation can be
+* either synchronous or asynchronous.
+*
+*  @lib eposlmlocalaccess.lib
+*/
+NONSHARABLE_CLASS(CPosLmLocalCompactingOp) : public CPosLmLocalOperation
+    {
+
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        * @param aDb A database.
+        */
+        static CPosLmLocalCompactingOp* NewL(
+        /* IN */        CPosLmLocalDatabase& aDb
+        );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CPosLmLocalCompactingOp();
+
+    public: // Functions from base classes
+
+        /**
+        * From CPosLmLocalOperation
+        * Synchronous incremental execution of the operation. Performs a single
+        * step of the operation synchronously.
+        *
+        * Leaves with an error code if something goes wrong.
+        *
+        * @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 CPosLmLocalOperation
+        * Handles any error generated by NextStepL. Will be called when
+        * NextStepL leaves. The error code is allowed to be changed, if
+        * necessary.
+        *
+        * @param aError An error code generated by NextStepL.
+        */
+        void HandleError(
+        /* IN/OUT */    TInt& aError
+        );
+
+    private:
+
+        /**
+        * C++ default constructor.
+        * @param aDb A database.
+        */
+        CPosLmLocalCompactingOp(
+        /* IN */        CPosLmLocalDatabase& aDb
+        );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        // Prohibit copy constructor if not deriving from CBase.
+        CPosLmLocalCompactingOp(const CPosLmLocalCompactingOp&);
+        // Prohibit assigment operator if not deriving from CBase.
+        CPosLmLocalCompactingOp& operator=(const CPosLmLocalCompactingOp&);
+
+    private:    // Data
+
+        CPosLmCompactDatabase* iCompactDb;
+
+        // Status flag. Holding the current status.
+        TInt iStatusFlag;
+
+    };
+
+#endif      // CPOSLMLOCALCOMPACTINGOP_H
+
+// End of File