2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: TPosLmDatabaseSettings class
20 #ifndef TPOSLMDATABASESETTINGS_H
21 #define TPOSLMDATABASESETTINGS_H
25 const TInt KPosLmDatabaseName = 64;
26 #define KPOSLMDATABASESETTINGSRESERVEDSIZE 31
28 typedef TBuf<KPosLmDatabaseName> TPosLmDatabaseName;
31 * @ref TPosLmDatabaseSettings encapsulates the attributes that can be set for
32 * a landmark database.
34 * The only available attribute is the displayable name.
36 * To set a new display name, create a @ref HPosLmDatabaseInfo object
37 * containing the URI of the database. Call @ref SetDatabaseName on the
38 * @ref TPosLmDatabaseSettings member in @ref HPosLmDatabaseInfo and then
39 * pass the @ref HPosLmDatabaseInfo to
40 * @ref CPosLmDatabaseManager::ModifyDatabaseSettingsL.
42 * When retrieving settings for a database, @ref IsAttributeSet can be used to
43 * find out whether display name is set for the database or not.
45 * @lib eposlmdbmanlib.lib
48 class TPosLmDatabaseSettings
53 * Enumeration of the attributes that can be set for a landmark
59 Displayable name for the landmark database */
65 * Default constructor.
67 IMPORT_C TPosLmDatabaseSettings();
73 * Checks whether a database attribute is set in this instance.
75 * @param aDbAttribute The database attribute to check.
76 * @return @p ETrue if the attribute is set, otherwise @p EFalse.
78 IMPORT_C TBool IsAttributeSet( TAttribute aDbAttribute ) const;
81 * Unset a database attribute.
83 * If an attribute is not set in this instance and the instance is
84 * passed as input to a function for modifying the settings for a
85 * database, e.g. @ref CPosLmDatabaseManager::ModifyDatabaseSettingsL,
86 * the attribute will be removed from the database.
88 * @param aDbAttribute The database attribute to unset.
90 IMPORT_C void UnsetAttribute( TAttribute aDbAttribute );
93 * Retrieves the displayable name for the database.
95 * If the @p EName attribute is not set, an empty descriptor is returned.
97 * @return A pointer to the name descriptor. This pointer is valid until
98 * the @ref TPosLmDatabaseSettings instance is destroyed.
100 IMPORT_C TPtrC DatabaseName() const;
103 * Set a displayable name for the database.
105 * If an empty descriptor is set, the database display name will be
106 * set to an empty string.
108 * @param[in] aDatabaseName The new name for the database.
110 IMPORT_C void SetDatabaseName( const TPosLmDatabaseName& aDatabaseName );
115 TPosLmDatabaseName iName;
116 TUint8 iReserved[KPOSLMDATABASESETTINGSRESERVEDSIZE];
120 #endif // TPOSLMDATABASESETTINGS_H