epos_cposlandmarkcategory.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : EPos_CPosLandmarkCategory.h
00004 *  Part of     : Mobile Location Framework/Landmarks
00005 *  Interface   : SDK/S60, Landmarks API
00006 *  Description : CPosLandmarkCategory class
00007 *  Version     : %version: bh1cfloc#3 % 
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 CPOSLANDMARKCATEGORY_H
00022 #define CPOSLANDMARKCATEGORY_H
00023 
00024 #include <e32base.h>
00025 #include "epos_landmarks.h"
00026 
00027 
00047 class CPosLandmarkCategory : public CBase
00048     {
00049     public:
00050 
00055         typedef TUint32 TAttributes;
00056 
00060         enum _TAttributes
00061             {
00062             ENoAttribute        = 0x0000  ,
00064             ECategoryName       = 0x0001  ,
00066             EIcon               = 0x0010  ,
00068             EAllAttributes      = 0xFFFF  
00070             };
00071 
00072     public:
00073 
00078         IMPORT_C static CPosLandmarkCategory* NewLC();
00079 
00084         IMPORT_C static CPosLandmarkCategory* NewL();
00085 
00092         IMPORT_C static CPosLandmarkCategory* NewLC(
00093                const CPosLandmarkCategory&  aCategory
00094         );
00095 
00102         IMPORT_C static CPosLandmarkCategory* NewL(
00103                const CPosLandmarkCategory&  aCategory
00104         );
00105 
00109         virtual ~CPosLandmarkCategory();
00110 
00111     public:
00112 
00120         IMPORT_C TPosLmItemId CategoryId() const;
00121 
00131         IMPORT_C TPosLmGlobalCategory GlobalCategory() const;
00132 
00135         /*
00136         * Sets the category to be global (i.e. not only defined in one
00137         * database).
00138         *
00139         * Global categories enable a uniform categorization across multiple
00140         * databases.
00141         *
00142         * @param[in] aGlobalCategory The global category ID or
00143         *   @p KPosLmNullGlobalCategory if the category should not be global.
00144         */
00145         void SetGlobalCategory(
00146                TPosLmGlobalCategory  aGlobalCategory
00147         );
00148 
00156         IMPORT_C TInt GetCategoryName(
00157                TPtrC&  aCategoryName
00158         ) const;
00159 
00168         IMPORT_C void SetCategoryNameL(
00169                const TDesC&  aCategoryName
00170         );
00171 
00192         IMPORT_C void SetIconL(
00193                const TDesC&  aIconFileName,
00194                TInt  aIconIndex,
00195                TInt  aIconMaskIndex
00196         );
00197 
00217         IMPORT_C TInt GetIcon(
00218                TPtrC& aIconFileName,
00219                TInt& aIconIndex,
00220                TInt& aIconMaskIndex
00221         ) const;
00222 
00229         IMPORT_C void RemoveCategoryAttributes(
00230                TAttributes aAttributes
00231         );
00232 
00235         /*
00236         * Sets the category ID to the landmark category.
00237         *
00238         * @param[in] aId The category ID to set.
00239         */
00240         void SetCategoryIdL(
00241                TPosLmItemId aId
00242         );
00243 
00244     private:
00245 
00246         // C++ constructor
00247         CPosLandmarkCategory();
00248 
00249         void ConstructL();
00250         void ConstructL(const CPosLandmarkCategory& aCategory);
00251 
00252         // Prohibit copy constructor
00253         CPosLandmarkCategory(const CPosLandmarkCategory&);
00254 
00255         // Prohibit assigment operator
00256         CPosLandmarkCategory& operator= (const CPosLandmarkCategory&);
00257 
00258     private:
00259 
00260         // Category ID
00261         TPosLmItemId iId;
00262 
00263         // Global category
00264         TPosLmGlobalCategory iGlobalCategory;
00265 
00266         // Category label
00267         HBufC* iCategoryName;
00268 
00269         // Category icon filename
00270         HBufC* iIconFileName;
00271 
00272         // Category icon index
00273         TInt iIconIndex;
00274 
00275         // Category icon mask index
00276         TInt iIconMaskIndex;
00277     };
00278 
00279 // CPOSLANDMARKCATEGORY_H
00280 #endif
00281 
00282 

Copyright © Nokia Corporation 2001-2008
Back to top