epoc32/include/mw/epos_cposlandmarkdatabaseextended.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  SDK/S60, Landmarks API
    15 *
    16 */
    17 
    18 
    19 #ifndef EPOS_CPOSLANDMARKDATABASEEXTENDED_H_
    20 #define EPOS_CPOSLANDMARKDATABASEEXTENDED_H_
    21 
    22 #include "epos_cposlandmarkdatabase.h"
    23 
    24 class CPosLmCategoryManager;
    25 
    26 /**
    27 *  Handle to a landmark database.
    28 *
    29 *  This class defines extensions to the functionality of @ref CPosLandmarkDatabase class.
    30 *
    31 *  @see CPosLandmarkDatabase
    32 *  @since S60 3.2
    33 *  @lib eposlandmarks.lib.
    34 */
    35 class CPosLandmarkDatabaseExtended :  public CPosLandmarkDatabase
    36     {
    37     public:
    38         
    39         /**
    40          * Opens the default landmark database.
    41          *
    42          * This method is the same as @ref CPosLandmarkDatabase::OpenL().
    43          *
    44          * The client takes ownership of the returned database handle.
    45          *
    46          * The database may have to be initialized before it can be used, see
    47          * @ref IsInitializingNeeded and @ref InitializeL.
    48          *
    49          * This function requires @p ReadUserData capability.
    50          *
    51          * @leave KErrNotSupported This extended interface is not supported
    52          *                         for default database.
    53          * @returns A handle to the open database.
    54          * @see CPosLandmarkDatabase::OpenL()
    55          */
    56         IMPORT_C static CPosLandmarkDatabaseExtended* OpenL();
    57 
    58         /**
    59          * Opens a specific landmark database.
    60          *
    61          * This method is the same as @ref CPosLandmarkDatabase::OpenL(const TDesC&).
    62          *
    63          * The client refers to a database by URI. The URI consists of a
    64          * protocol specifier and the database location: "protocol://location".
    65          * If the client does not specify a protocol, "file://" will be assumed.
    66          *
    67          * For local landmark databases, the URI consists of the drive and the
    68          * database file name, e.g. "c:landmarks.ldb". The path cannot be
    69          * specified by the client. The extension of the database file name must
    70          * be "ldb" otherwise the client will get the error @p KErrArgument.
    71          *
    72          * If the client specifies a local database and does not specify the
    73          * drive letter, e.g. "landmarks.ldb", default database drive will be assumed.
    74          *
    75          * The client takes ownership of the returned database handle.
    76          *
    77          * The database may have to be initialized before it can be used, see
    78          * @ref IsInitializingNeeded and @ref InitializeL.
    79          *
    80          * This function requires @p ReadUserData capability.
    81          *
    82          * @param[in] aDatabaseUri The URI of the database to open.
    83          * @returns A handle to the open database.
    84          *
    85          * @leave KErrArgument Extension of the local database name is not "ldb".
    86          * @leave KErrNotSupported This extended interface is not supported
    87          *                         for specified protocol.
    88          * @see CPosLandmarkDatabase::OpenL(const TDesC&)
    89          */
    90         IMPORT_C static CPosLandmarkDatabaseExtended* OpenL( const TDesC&  aDatabaseUri );
    91 
    92         /**
    93          * Destructor.
    94          */
    95         IMPORT_C virtual ~CPosLandmarkDatabaseExtended();
    96 
    97     public:
    98 
    99         /** Returns total amount of landmarks in the database.
   100          *  @return Number of landmarks in the database or negative error code:
   101          *      - KErrNotSupported if not supported in current database.
   102          *      - KErrPosLmNotInitialized if database is not yet initialized. */
   103         IMPORT_C TInt LandmarksCount();
   104 
   105         /** Returns total amount of landmark categories in the database.
   106          *  @return Number of landmark categories in the database or negative error code.
   107          *      - KErrNotSupported if not supported in current database.
   108          *      - KErrPosLmNotInitialized if database is not yet initialized. */
   109         IMPORT_C TInt CategoriesCount();
   110 
   111     public:
   112         
   113         /** Returns reference to category manager instance for this database. */
   114         virtual CPosLmCategoryManager& CategoryManager() = 0;
   115 
   116     protected:
   117 
   118         /** Returns pointer to extension interface. Type of the 
   119          *  requested extension interface is supplied by caller in aExtensionId.
   120          *
   121          *  Ownership of returned object is not transferred to caller, it is kept by
   122          *  implementation.
   123          *  
   124 		 *  @param[in] aExtensionUid Type of requested extension
   125 		 *  @return Pointer to extension implementation, or NULL if not supported.
   126 		 */
   127         virtual void* GetExtension( TUid aExtensionUid ) = 0;
   128 
   129     protected:
   130 
   131         // C++ constructor.
   132         IMPORT_C CPosLandmarkDatabaseExtended();
   133 
   134     private:
   135 
   136         // Prohibit copy constructor
   137         CPosLandmarkDatabaseExtended( const CPosLandmarkDatabaseExtended& );
   138         // Prohibit assigment operator
   139         CPosLandmarkDatabaseExtended& operator= ( const CPosLandmarkDatabaseExtended& );
   140         
   141     private:
   142         TInt8 reserved[32];    
   143     };
   144 
   145 
   146 #endif /*EPOS_CPOSLANDMARKDATABASEEXTENDED_H_*/