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