epos_hposlmdatabaseinfo.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : EPos_HPosLmDatabaseInfo.h
00004 *  Part of     : Mobile Location Framework/Landmarks
00005 *  Interface   : SDK/S60, Landmarks API
00006 *  Description : HPosLmDatabaseInfo class
00007 *  Version     : %version: bh1cfloc#4 % 
00008 *
00009 *  Copyright © 2005-2006 Nokia.  All rights reserved.
00010 *  This material, including documentation and any related computer
00011 *  programs, is protected by copyright controlled by Nokia.  All
00012 *  rights are reserved.  Copying, including reproducing, storing,
00013 *  adapting or translating, any or all of this material requires the
00014 *  prior written consent of Nokia.  This material also contains
00015 *  confidential information which may not be disclosed to others
00016 *  without the prior written consent of Nokia.
00017 * ============================================================================
00018 * Template version: 4.0
00019 */
00020 
00021 #ifndef HPOSLMDATABASEINFO_H
00022 #define HPOSLMDATABASEINFO_H
00023 
00024 #include <e32base.h>
00025 #include <f32file.h>
00026 #include "epos_tposlmdatabasesettings.h"
00027 
00034 class HPosLmDatabaseInfo
00035     {
00036     public:
00037 
00044         IMPORT_C static HPosLmDatabaseInfo* NewLC( const TDesC& aDatabaseUri );
00045 
00052         IMPORT_C static HPosLmDatabaseInfo* NewL( const TDesC& aDatabaseUri );
00053 
00060         IMPORT_C static HPosLmDatabaseInfo* NewLC(
00061             const HPosLmDatabaseInfo& aDatabaseInfo
00062         );
00063 
00070         IMPORT_C static HPosLmDatabaseInfo* NewL(
00071             const HPosLmDatabaseInfo& aDatabaseInfo
00072         );
00073 
00074 
00075     public:
00076 
00083         IMPORT_C TPtrC DatabaseUri() const;
00084 
00097         IMPORT_C TPtrC Protocol() const;
00098 
00113         IMPORT_C TBool IsDefault() const;
00114 
00129         IMPORT_C TMediaType DatabaseMedia() const;
00130 
00149         IMPORT_C TChar DatabaseDrive() const;
00150 
00158         IMPORT_C const TPosLmDatabaseSettings& Settings() const;
00159 
00167         IMPORT_C TPosLmDatabaseSettings& Settings();
00168 
00174         IMPORT_C TInt Size() const;
00175 
00178         /*
00179         * Sets the default database indicator flag.
00180         * This flag is used to indicate if the database described by the
00181         * object is the default database.
00182         *
00183         * @param[in] aIsDefault @p ETrue if the database is the default database,
00184         * otherwise @p ETrue.
00185         */
00186         void SetDefault( TBool aIsDefault );
00187 
00190         /*
00191         * Sets the database media type.
00192         *
00193         * @param[in] aMediaType The media type.
00194         */
00195         void SetMediaType( TMediaType aMediaType );
00196 
00199         /*
00200         * Sets the database drive.
00201         *
00202         * @param[in] aDatabaseDrive The database drive letter.
00203         */
00204         void SetDatabaseDrive( TChar aDatabaseDrive );
00205 
00206    private:
00207 
00208         // C++ constructor.
00209         HPosLmDatabaseInfo(const TDesC& aDatabaseUri);
00210 
00211         // C++ copy constructor.
00212         HPosLmDatabaseInfo(const HPosLmDatabaseInfo& aDatabaseInfo);
00213 
00214         // Allocates memory for URI descriptor during construction.
00215         static TAny* AllocateL(const TDesC& aDatabaseUri);
00216 
00217         // Sets URI descriptor during construction.
00218         void SetDatabaseUri(const TDesC& aDatabaseUri);
00219 
00220         // Calculates buffer offset so that buffer is 4-byte aligned
00221         static TInt BufferOffset();
00222 
00223         // Prohibit assigment operator
00224         HPosLmDatabaseInfo& operator= ( const HPosLmDatabaseInfo& );
00225 
00226     private:
00227 
00228         TPosLmDatabaseSettings iSettings;
00229         TMediaType iDatabaseMedia;
00230         TChar iDatabaseDrive;
00231         TBool iIsDefault;
00232         TUint8 iBuffer[1];  // Must be at end of class
00233 
00234     };
00235 
00236 // HPOSLMDATABASEINFO_H
00237 #endif
00238 
00239 

Copyright © Nokia Corporation 2001-2008
Back to top