epos_cposlmdisplayitem.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : EPos_CPosLmDisplayItem.h
00004 *  Part of     : Mobile Location Framework/Landmarks
00005 *  Interface   : SDK/S60, Landmarks Search API
00006 *  Description : CPosLmDisplayItem class
00007 *  Version     : %version: 2 % 
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 CPOSLMDISPLAYITEM_H
00022 #define CPOSLMDISPLAYITEM_H
00023 
00024 #include <e32base.h>
00025 
00026 class CPosLandmark;
00027 class CPosLandmarkCategory;
00028 
00029 
00044 class CPosLmDisplayItem : public CBase
00045     {
00046 
00047     public:
00048 
00052     enum TDisplayItemType
00053         {
00054         ELandmarkItem = 0       ,
00059         ECategoryItem           
00064         };
00065 
00066     public:
00067 
00076         IMPORT_C static CPosLmDisplayItem* NewL(
00077             CPosLandmark* aLandmark,
00078             TUint aDatabaseIndex = 0
00079         );
00080 
00089         IMPORT_C static CPosLmDisplayItem* NewL(
00090             CPosLandmarkCategory* aCategory,
00091             TUint aDatabaseIndex = 0
00092         );
00093 
00097         virtual ~CPosLmDisplayItem();
00098 
00099     public:
00100 
00106         IMPORT_C TDisplayItemType DisplayItemType() const;
00107 
00119         IMPORT_C TUint DatabaseIndex() const;
00120 
00129         IMPORT_C const CPosLandmarkCategory& Category() const;
00130 
00139         IMPORT_C const CPosLandmark& Landmark() const;
00140 
00150         IMPORT_C TInt GetDistance( TReal32& aDistance ) const;
00151 
00153         /* 
00154         * Sets the database index of this displayable item.
00155         *
00156         * @param aDatabaseIndex The database index.
00157         */
00158         void SetDatabaseIndex( TUint aDatabaseIndex );
00159 
00161         /*
00162         * Sets the distance to the position specified in the nearest criterion.
00163         *
00164         * @param aDistance Distance to the position.
00165         */
00166         void SetDistance( TReal32 aDistance );
00167 
00168     private:
00169 
00176         CPosLmDisplayItem(
00177             CPosLandmark* aLandmark,
00178             TUint aDatabaseIndex
00179         );
00180 
00187         CPosLmDisplayItem(
00188             CPosLandmarkCategory* aCategory,
00189             TUint aDatabaseIndex
00190         );
00191 
00192     private:
00193 
00194         TDisplayItemType iDisplayItemType;
00195 
00196         CPosLandmark* iLandmark;
00197 
00198         CPosLandmarkCategory* iCategory;
00199 
00200         TUint iDatabaseIndex;
00201 
00202         TReal32 iDistance;
00203 
00204         TBool iHasDistance;
00205 
00206     };
00207 
00208 // CPOSLMDISPLAYITEM_H
00209 #endif
00210 
00211 

Copyright © Nokia Corporation 2001-2008
Back to top