landmarks/locationlandmarks/internalservices/inc/EPos_CPosLmCompactDatabase.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005 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: Class compacting a landmark database in steps.
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPOSLMCOMPACTDATABASE_H
       
    21 #define CPOSLMCOMPACTDATABASE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <d32dbms.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPosLmLocalDbAccess;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 * Class compacting a landmark database in steps.
       
    33 */
       
    34 class CPosLmCompactDatabase : public CBase
       
    35     {
       
    36 
       
    37     public:  // Constructors and destructor
       
    38 
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         *
       
    42         * @param aDbAccess A database access.
       
    43         */
       
    44         IMPORT_C static CPosLmCompactDatabase* NewL(
       
    45         /* IN */        CPosLmLocalDbAccess& aDbAccess
       
    46         );
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CPosLmCompactDatabase();
       
    52 
       
    53     public: // New functions
       
    54 
       
    55         /**
       
    56         * Performs one step of the compact operation.
       
    57         *
       
    58         * @param aProgress Current progress.
       
    59         * @return ETrue if the compact is done, otherwise EFalse.
       
    60         */
       
    61         IMPORT_C TBool NextL(
       
    62         /* OUT */       TReal32& aProgress
       
    63         );
       
    64 
       
    65     private:
       
    66 
       
    67         /**
       
    68         * C++ default constructor.
       
    69         */
       
    70         CPosLmCompactDatabase();
       
    71 
       
    72         /**
       
    73         * By default Symbian 2nd phase constructor is private.
       
    74         *
       
    75         * @param aDbAccess A database access.
       
    76         */
       
    77         void ConstructL(
       
    78         /* IN */        CPosLmLocalDbAccess& aDbAccess
       
    79         );
       
    80 
       
    81     private: // Data
       
    82 
       
    83         RDbIncremental iDbIncremental;
       
    84 
       
    85         TInt iIncrementalStartValue;
       
    86 
       
    87         TInt iIncrementalStep;
       
    88 
       
    89     };
       
    90 
       
    91 #endif      // CPOSLMCOMPACTDATABASE_H
       
    92 
       
    93 // End of File