00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __CPbkFieldsInfo_H__
00024 #define __CPbkFieldsInfo_H__
00025
00026
00027 #include <e32base.h>
00028
00029
00030 #include "CPbkFieldInfo.h"
00031
00032
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
00045
00053 class CPbkFieldsInfo :
00054 public CBase
00055 {
00056 public:
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:
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:
00219 RPointerArray<CPbkFieldInfo> iEntries;
00221 RPointerArray<CPbkFieldInfoGroup> iGroups;
00223 CPbkUidMap* iTypeUidMap;
00225 TInt iHighestMatchPriorityLevel;
00227 CPbkFieldInfo::TPbkFieldInfoParams* iPbkFieldInfoParams;
00228 };
00229
00230
00231 #endif
00232
00233