cpbkfieldinfo.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : CPbkFieldInfo.h
00004 *  Part of  : PbkEng.dll
00005 *
00006 *  Description:
00007 *     Phonebook constant field type information
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 #ifndef __CPbkFieldInfo_H__
00023 #define __CPbkFieldInfo_H__
00024 
00025 //  INCLUDES
00026 #include    <e32std.h>
00027 #include    <cntdef.h>
00028 #include    "PbkFields.hrh"
00029 #include    "PbkIconId.hrh"
00030 
00031 // FORWARD DECLARATIONS
00032 class CContentType;
00033 class CContactItemField;
00034 class CContactItemViewDef;
00035 class CContactItemFieldDef;
00036 class CPbkFieldsInfo;
00037 class TResourceReader;
00038 class CPbkFieldInfoGroup;
00039 class CPbkFieldImportType;
00040 class TPbkContactItemFieldType;
00041 class TPbkVcardFieldType;
00042 class CPbkUidMap;
00043 class TPbkMatchPriorityLevel;
00044 
00045 // CLASS DECLARATION
00046 
00056 class CPbkFieldInfo :
00057         public CBase
00058         {
00059     public: // Interface
00064         IMPORT_C TPbkFieldId FieldId() const;
00065 
00070         IMPORT_C TStorageType FieldStorageType() const;
00071 
00077         IMPORT_C const CContentType& ContentType() const;
00078 
00083         IMPORT_C TInt Category() const;
00084 
00089         IMPORT_C const TDesC& FieldName() const;
00090 
00095         IMPORT_C TUint Flags() const;
00096 
00101         IMPORT_C TPbkFieldMultiplicity Multiplicity() const;
00102 
00109         IMPORT_C TInt MaxLength() const;
00110 
00115         IMPORT_C TPbkFieldEditMode EditMode() const;
00116 
00121         IMPORT_C TPbkFieldDefaultCase DefaultCase() const;
00122 
00127         IMPORT_C TPbkIconId IconId() const;
00128 
00133         IMPORT_C TPbkFieldCtrlType CtrlType() const;
00134 
00139         IMPORT_C TUint AddFlags() const;
00140 
00147         IMPORT_C TPbkAddItemOrdering AddItemOrdering() const;
00148 
00153         IMPORT_C TBool IsHidden() const;
00154 
00159         IMPORT_C TBool IsReadOnly() const;
00160 
00165         IMPORT_C TBool DoSynchronize() const;
00166 
00171         IMPORT_C TBool IsDisabled() const;
00172 
00177         IMPORT_C TBool NameField() const;
00178 
00184         IMPORT_C TBool TemplateField() const;
00185 
00191         IMPORT_C TBool UserCanAddField() const;
00192 
00199         IMPORT_C TBool IsEditable() const;
00200 
00205         IMPORT_C TBool NumericField() const;
00206 
00211         IMPORT_C TBool IsPhoneNumberField() const;
00212 
00218         IMPORT_C TBool IsEmailOverSmsField() const;
00219 
00224         IMPORT_C TBool IsEmailField() const;
00225 
00230         IMPORT_C TBool IsMmsField() const;
00231 
00236         IMPORT_C TBool IsImageField() const;
00237 
00242         IMPORT_C TBool IsPocField() const;
00243         
00248         IMPORT_C TBool IsVoipField() const;
00249 
00255         IMPORT_C TBool IsSame(const CPbkFieldInfo& aFieldInfo) const;
00256 
00262         IMPORT_C TBool Match(TPbkFieldId aFieldId) const;
00263 
00271         TBool Match(const TPbkContactItemFieldType& aFieldType) const;
00272 
00281         TBool Match
00282             (const TPbkContactItemFieldType& aFieldType,
00283             const TPbkMatchPriorityLevel& aMatchPriority) const;
00284 
00293         TBool Match
00294             (const TPbkVcardFieldType& aVcardType,
00295             const TPbkMatchPriorityLevel& aMatchPriority) const;
00296 
00308         IMPORT_C TBool Match(const CContactItemField& aField) const;
00309 
00315         IMPORT_C CContactItemField* CreateFieldL() const;
00316 
00322         TBool IsEqualLabel(const CContactItemField& aField) const;
00323 
00330         TBool IsEqualType(const CContactItemField& aField) const;
00331 
00339         IMPORT_C TBool IsEqualTo(const CContactItemField& aField) const;
00340 
00349         IMPORT_C TInt CompareOrdering(const CPbkFieldInfo& aOther) const;
00350 
00355         IMPORT_C const CPbkFieldInfoGroup* Group() const;
00356 
00361         IMPORT_C TPbkFieldLocation Location() const;
00362 
00367         IMPORT_C TPbkVersitStorageType VersitStorageType() const;
00368 
00374         IMPORT_C void AddToViewDefL(CContactItemViewDef& aViewDef) const;
00375 
00381         IMPORT_C void AddToFieldDefL(CContactItemFieldDef& aFieldDef) const;
00382 
00387         IMPORT_C const TDesC& AddItemText() const;
00388 
00393         IMPORT_C TBool IsReadingField() const;
00394 
00395     private: // Forward declaration of internal class
00396         class TPbkFieldInfoParams;
00397 
00398     private: // Constructors and destructor
00399         CPbkFieldInfo();
00400 
00401         static CPbkFieldInfo* NewLC(TResourceReader& aReaderStd, TResourceReader& aReaderAdd, 
00402             TPbkFieldInfoParams& aPbkFieldInfoParams);
00403 
00404         ~CPbkFieldInfo();
00405         void ReadCntModelFieldsL(TResourceReader& aReaderStd);
00406         void ReadAdditionalFieldsL(TResourceReader& aReaderAdd, 
00407             TPbkFieldInfoParams& aPbkFieldInfoParams);
00408         void ReadImportPropertiesL(TResourceReader& aReaderAdd);
00409         void ConstructFromResourceL
00410             (TResourceReader& aReaderStd, TResourceReader& aReaderAdd,
00411              TPbkFieldInfoParams& aPbkFieldInfoParams);
00412         TInt ImportPropertyCount() const;
00413         void UpdateTypeUidMapL(CPbkUidMap& aTypeUidMap) const;
00414         void CalculateTypeSignatures(const CPbkUidMap& aTypeUidMap);
00415         TBool IsEqualFlags(const CContactItemField& aField) const;
00416     
00417     private: // Structure
00418 
00419         struct TPbkFieldInfoParams
00420                 {
00422                 TInt iEditorMaxNumberLength;
00423                 };
00424                 
00425     private:  // Data
00430 
00431         TStorageType iFieldStorageType;         // LONG fieldStorageType
00433         CContentType* iContentType;                     // LONG contactFieldType,
00434                                                                                         // LONG vCardMapping,
00435                                                                                         // STRUCT extraMapping[]
00437         TInt iCategory;                                         // LONG category
00439         HBufC* iFieldName;                                      // LTEXT fieldName
00441         TUint iFlags;                                           // LONG flags
00442 
00447 
00448         HBufC* iAddItemText;                            // LTEXT AddItemText
00450         TUint iAddFlags;                                        // LONG Flags
00452         TInt16 iMaxLength;                                      // WORD MaxLength
00454         TInt8 iIconId;                                      // BYTE IconId
00456         TInt8 iFieldId;                     // BYTE Id
00458         TInt8 iMultiplicity;                // BYTE Multiplicity
00460         TInt8 iEditMode;                            // BYTE EditMode
00462         TInt8 iDefaultCase;                 // BYTE DefaultCase
00464         TInt8 iCtrlType;                    // BYTE CtrlType
00466         TInt8 iOrderingGroup;               // BYTE OrderingGroup
00468         TInt8 iOrderingItem;                    // BYTE OrderingItem
00470         TInt8 iAddItemOrdering;             // BYTE AddItemOrdering
00472         TInt8 iLocation;                            // BYTE Location
00473         // Own: data storage type in versit
00474         TInt8 iVersitStorageType;           // BYTE VersitStorageType
00475 
00477         CPbkFieldImportType* iImportType;
00478 
00479         union
00480             {
00482             TPbkFieldGroupId iGroupId;
00484             const CPbkFieldInfoGroup* iGroup;
00485             } iGroupLink;
00486         
00487     private: // Friend declarations
00488         friend class CPbkFieldsInfo;
00489         friend class PbkFieldInfoWrite;
00490         };
00491 
00492 // __CPbkFieldInfo_H__
00493 #endif
00494 
00495 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top