phonebookui/Phonebook2/remotecontactlookup/contactactionservice/inc/CFscFieldProperty.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: This file defines class CFscFieldProperty.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CFSCFIELDPROPERTY_H
       
    20 #define CFSCFIELDPROPERTY_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 #include <MPbk2FieldProperty.h>
       
    25 #include <TPbk2IconId.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class TResourceReader;
       
    29 class MVPbkFieldTypeList;
       
    30 class CFscFieldOrderingManager;
       
    31 
       
    32 /**
       
    33  * Phonebook 2 field property.
       
    34  * Field property for a Phonebook 2 field type.
       
    35  * Field property contains data for contact field presentation
       
    36  * in the UI.
       
    37  */
       
    38 NONSHARABLE_CLASS(CFscFieldProperty) : public CBase,
       
    39 public MPbk2FieldProperty
       
    40     {
       
    41 public: // Construction and destruction
       
    42 
       
    43     /**
       
    44      * Creates a new instance of this class.
       
    45      *
       
    46      * @param aReader                   Resource reader pointed to a
       
    47      *                                  PHONEBOOK2_FIELD_PROPERTY
       
    48      *                                  structure.
       
    49      * @param aSupportedFieldTypeList   List of supported field types.
       
    50      * @param aFieldOrderingManager     Field ordering manager.
       
    51      * @return  A new instance of this class.
       
    52      */
       
    53     static CFscFieldProperty* NewLC(
       
    54             TResourceReader& aReader,
       
    55             const MVPbkFieldTypeList& aSupportedFieldTypeList,
       
    56             CFscFieldOrderingManager& aFieldOrderingManager );
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     ~CFscFieldProperty();
       
    62 
       
    63 public: // Interface
       
    64 
       
    65     /**
       
    66      * @return ETrue if the property was mapped to the field type
       
    67      */
       
    68     TBool IsSupported() const;
       
    69 
       
    70 public: // From MPbk2FieldProperty
       
    71     TBool IsSame(
       
    72             const MPbk2FieldProperty& aOther ) const;
       
    73     const MVPbkFieldType& FieldType() const;
       
    74     TPbk2FieldMultiplicity Multiplicity() const;
       
    75     TInt MaxLength() const;
       
    76     TPbk2FieldEditMode EditMode() const;
       
    77     TPbk2FieldDefaultCase DefaultCase() const;
       
    78     const TPbk2IconId& IconId() const;
       
    79     TPbk2FieldCtrlType CtrlType() const;
       
    80     TUint Flags() const;
       
    81     TInt OrderingItem() const;
       
    82     TInt AddItemOrdering() const;
       
    83     const TDesC& AddItemText() const;
       
    84     TPbk2FieldLocation Location() const;
       
    85     TPbk2FieldGroupId GroupId() const;
       
    86     const TDesC& DefaultLabel() const;
       
    87 
       
    88 private: // Implementation
       
    89     CFscFieldProperty();
       
    90     void ConstructL(
       
    91             TResourceReader& aReader,
       
    92             const MVPbkFieldTypeList& aSupportedFieldTypeList,
       
    93             CFscFieldOrderingManager& aFieldOrderingManager );
       
    94 
       
    95 private: // Data
       
    96     /// Ref: Field type
       
    97     const MVPbkFieldType* iFieldType;
       
    98     /// Own: Assorted flags for the field type
       
    99     TUint iFlags; // LONG flags
       
   100     /// Own: Entry add item label text
       
   101     HBufC* iAddItemText; // LTEXT addItemText
       
   102     /// Own: Default label for the field
       
   103     HBufC* iDefaultLabel; // LTEXT defaultLabel
       
   104     /// Own: Maximum length in characters
       
   105     TInt16 iMaxLength; // WORD maxLength
       
   106     /// Own: Allowed multiplicity (one/many)
       
   107     TInt8 iMultiplicity; // BYTE multiplicity
       
   108     /// Own: Default editing mode
       
   109     TInt8 iEditMode; // BYTE editMode
       
   110     /// Own: Default character case
       
   111     TInt8 iDefaultCase; // BYTE defaultCase
       
   112     /// Own: Index of an icon
       
   113     TPbk2IconId iIconId; // STRUCT iconId
       
   114     /// Own: Editor UI control type
       
   115     TInt8 iCtrlType; // BYTE ctrlType        
       
   116     /// Own: Entry item group item ordering
       
   117     TInt8 iOrderingItem; // BYTE orderingItem
       
   118     /// Own: Entry add item ordering
       
   119     TInt8 iAddItemOrdering; // BYTE addItemOrdering
       
   120     /// Own; The group id of this field
       
   121     TInt8 iGroupId; // BYTE groupId
       
   122     /// Own: Entry item location (none/home/work)
       
   123     TInt8 iLocation; // BYTE location
       
   124     };
       
   125 
       
   126 #endif // CFSCFIELDPROPERTY_H
       
   127 // End of File