landmarks/locationlandmarks/localaccess/inc/epos_cposlmlocaldbfastcounters.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2002-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: Fast counters for local database
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef EPOS_CPOSLMLOCALDBFASTCOUNTERS_H_
       
    21 #define EPOS_CPOSLMLOCALDBFASTCOUNTERS_H_
       
    22 
       
    23 #include <epos_cposlandmarkdatabaseextended.h>
       
    24 #include <EPos_CPosLandmarkEncoder.h>
       
    25 #include <EPos_CPosLandmarkParser.h>
       
    26 #include <epos_cposlmdiskutilities.h>
       
    27 #include <epos_mposlmdatabasefastcounters.h>
       
    28 
       
    29 class CPosLmLocalDbAccess;
       
    30 class CPosLandmark;
       
    31 
       
    32 /**
       
    33 * Fast counters for local database
       
    34 */
       
    35 
       
    36 class CPosLmLocalDbFastCounters : public CBase, public MPosLmDatabaseFastCounters
       
    37     {
       
    38 
       
    39     public: // Constructors and destructor
       
    40 
       
    41         static CPosLmLocalDbFastCounters* NewL( CPosLmLocalDbAccess& aDbAccess );
       
    42 
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         ~CPosLmLocalDbFastCounters();
       
    47         
       
    48     protected:
       
    49 
       
    50         CPosLmLocalDbFastCounters( CPosLmLocalDbAccess& aDbAccess );
       
    51         
       
    52     public: // from MPosLmDatabaseFastCounters
       
    53     
       
    54         /** Returns total amount of landmarks in the database.
       
    55          *  @return Number of landmarks in the database or negative error code:
       
    56          *      - KErrNotSupported if not supported in current database.
       
    57          *      - KErrPosLmNotInitialized if database is not yet initialized. */
       
    58         virtual TInt TotalLandmarksCount();
       
    59         
       
    60         /** Returns total amount of landmark categories in the database.
       
    61          *  @return Number of landmark categories in the database or negative error code:
       
    62          *      - KErrNotSupported if not supported in current database.
       
    63          *      - KErrPosLmNotInitialized if database is not yet initialized. */
       
    64         virtual TInt TotalCategoriesCount();
       
    65         
       
    66         /** Returns amount of categorized landmarks in the database.
       
    67          *  @return Number of categorized landmarks in the database or negative error code:
       
    68          *      - KErrNotSupported if not supported in current database.
       
    69          *      - KErrPosLmNotInitialized if database is not yet initialized. */
       
    70         virtual TInt CategorizedLandmarksCount();
       
    71     
       
    72         /** Returns total amount of referenced landmark categories in the database.
       
    73          *  @return Number of referenced landmark categories in the database 
       
    74          *          or negative error code:
       
    75          *      - KErrNotSupported if not supported in current database.
       
    76          *      - KErrPosLmNotInitialized if database is not yet initialized. */
       
    77         virtual TInt ReferencedCategoriesCount();
       
    78     
       
    79         /** Returns amount of uncategorized landmarks in the database.
       
    80          *  @return Number of uncategorized landmarks in the database or negative error code:
       
    81          *      - KErrNotSupported if not supported in current database.
       
    82          *      - KErrPosLmNotInitialized if database is not yet initialized. */
       
    83         virtual TInt UncategorizedLandmarksCount();
       
    84         
       
    85         /** Returns total amount of unreferenced landmark categories in the database.
       
    86          *  @return Number of unreferenced landmark categories in the database 
       
    87          *          or negative error code:
       
    88          *      - KErrNotSupported if not supported in current database.
       
    89          *      - KErrPosLmNotInitialized if database is not yet initialized. */
       
    90         virtual TInt UnreferencedCategoriesCount();
       
    91     
       
    92     private:
       
    93 
       
    94         CPosLmLocalDbAccess& iDbAccess;
       
    95 
       
    96     };
       
    97 
       
    98 #endif /*EPOS_CPOSLMLOCALDBFASTCOUNTERS_H_*/