cpbkfieldsinfo.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : CPbkFieldsInfo.h
00004 *  Part of  : PbkEng.dll
00005 *
00006 *  Description:
00007 *     Phonebook field types collection class
00008 *  Version:
00009 *
00010 *  Copyright (C) 2002 Nokia Corporation.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia Corporation. All rights are reserved. Copying, 
00014 *  including reproducing, storing,  adapting or translating, any 
00015 *  or all of this material requires the prior written consent of 
00016 *  Nokia Corporation. This material also contains confidential 
00017 *  information which may not be disclosed to others without the 
00018 *  prior written consent of Nokia Corporation.
00019 * ============================================================================
00020 */
00021 
00022 
00023 #ifndef __CPbkFieldsInfo_H__
00024 #define __CPbkFieldsInfo_H__
00025 
00026 //  INCLUDES
00027 #include <e32base.h>
00028 // This include is not absolutely needed,  but this class is very rarely used 
00029 // without class CPbkFieldInfo.
00030 #include "CPbkFieldInfo.h"
00031 
00032 //  FORWARD DECLARATIONS
00033 class CContactItem;
00034 class CContactItemField;
00035 class CContactItemViewDef;
00036 class RResourceFile;
00037 class CPbkUidMap;
00038 class CPbkFieldInfo;
00039 class CPbkFieldInfoGroup;
00040 class MPbkVcardProperty;
00041 class TPbkMatchPriorityLevel;
00042 
00043 
00044 //  CLASS DECLARATION 
00045 
00053 class CPbkFieldsInfo : 
00054         public CBase
00055         {
00056         public: // interface
00064         static CPbkFieldsInfo* NewL
00065             (RResourceFile& aPbkResFile, RResourceFile& aCntModelResFile);
00066 
00070         ~CPbkFieldsInfo();
00071 
00080         IMPORT_C CPbkFieldInfo* Find(TPbkFieldId aFieldId) const;
00081 
00090         IMPORT_C CPbkFieldInfo* Find
00091                         (TPbkFieldId aFieldId, TPbkFieldLocation aLocation) const;
00092 
00101         IMPORT_C CPbkFieldInfo* Find
00102                         (const CContactItemField& aContactItemField) const;
00103 
00109         IMPORT_C TPbkMatchPriorityLevel CreateMatchPriority() const;
00110 
00122         CPbkFieldInfo* Match
00123             (const CContactItemField& aContactItemField,
00124             const TPbkMatchPriorityLevel& aMatchPriority) const;
00125 
00137         IMPORT_C CPbkFieldInfo* Match
00138             (const MPbkVcardProperty& aVcardProperty,
00139             const TPbkMatchPriorityLevel& aMatchPriority) const;
00140         
00145         IMPORT_C TInt Count() const;
00146 
00153         IMPORT_C CPbkFieldInfo* operator[](TInt aIndex) const;
00154 
00159         IMPORT_C TInt GroupCount() const;
00160 
00165         IMPORT_C const CPbkFieldInfoGroup& GroupAt(TInt aIndex) const;
00166 
00174         IMPORT_C CContactItemViewDef* CreateContactItemViewDefLC
00175             (const CPbkFieldIdArray& aFieldTypes) const;
00176 
00188         IMPORT_C CContactItemFieldDef* CreateContactItemFieldDefLC
00189             (const CPbkFieldIdArray* aFieldTypes) const;
00190 
00203         void AddFieldTypesFromResourceL
00204             (TResourceReader& aPbkResReader, 
00205             TResourceReader& aCntModelResReader,
00206             RArray<const CPbkFieldInfo*>* aAddedFieldTypes);
00207 
00208     private:  // Implementation
00209         CPbkFieldsInfo();
00210         CPbkFieldInfoGroup* FindGroup(TPbkFieldGroupId aGroupId);
00211         void LinkGroupsL();
00212         void ReadGroupsInfoL(RResourceFile& aResFile);
00213         void ConstructFromResourceL
00214             (RResourceFile& aPbkResFile, RResourceFile& aCntModelResFile);
00215         void ReadFieldInfoParamsL();
00216 
00217     private: // data
00219         RPointerArray<CPbkFieldInfo> iEntries;
00221         RPointerArray<CPbkFieldInfoGroup> iGroups;
00223         CPbkUidMap* iTypeUidMap;
00225         TInt iHighestMatchPriorityLevel;
00227         CPbkFieldInfo::TPbkFieldInfoParams* iPbkFieldInfoParams;
00228     };
00229 
00230 // __CPbkFieldsInfo_H__
00231 #endif
00232 
00233 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top