![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
Applications that use this class will not work correctly on a version of EPOC earlier than ER5.
CBase |
Abstract: CBase behaviour. |
cntfield.h
cntmodel.lib
Each field (CContactItemField) owns a content type. The content type specifies one or more field types (defined as UIDs in cntdef.h
see the KUidContactField* values) and optionally a mapping. A mapping should be specified if the field type alone is not enough to identify which vCard property the field type maps to. The possible values for this vCard mapping are defined as UIDs in cntdef.h
see the KUidContactFieldVCardMap* values.
For instance, if the field type indicates a telephone number, the vCard mapping can be used to indicate whether it is a home (KUidContactFieldVCardMapHOME) or a work (KUidContactFieldVCardMapWORK) number.
Each field is uniquely identified by the combination of UIDs contained in the content type.
A field's content type can be retrieved using CContactItemField::ContentType().
static CContentType* NewL();
Allocate and construct a new, empty CContentType. The mapping is set to KNullUid.
CContentType* |
Pointer to the newly created content type object. |
static CContentType* NewL(TFieldType aFieldType,TUid aMapping=KNullUid);
Create a new CContentType, adding a single field type and optionally setting the mapping.
TFieldType aFieldType |
The field type to add to the content type. |
TUid aMapping=KNullUid |
The mapping. Defaults to KNullUid. |
CContentType* |
Pointer to the newly created content type object. |
static CContentType* NewL(const CContentType& aContentType);
Create a new CContentType copying the contents from aContentType.
const CContentType& aContentType |
Content type object whose vCard mapping and field types are copied. |
CContentType* |
Pointer to the newly created content type. |
void AddFieldTypeL(TFieldType aFieldType);
Append a field type to the content type's list of field types.
TFieldType aFieldType |
The field type to append to the list of field types. |
void RemoveFieldType(TFieldType aFieldType);
Remove a field type from the list of field types.
TFieldType aFieldType |
The field type to remove from the list of field types. |
TFieldType FieldType(TInt aIndex) const;
Return the indexed field type.
TInt aIndex |
Index into the list of field types. The position is relative to zero; i.e. zero implies the first element in the array. This value must be non-negative and less than the number of objects currently within the array otherwise the operator raises a panic. |
TFieldType |
The indexed field type. |
TInt FieldTypeCount() const;
Return the number of field types in the CContentType's list of field types.
TInt |
The number of field types in the content type. |
TBool ContainsFieldType(TFieldType aFieldType) const;
Test whether the content type object contains the specified field type UID either as the mapping value or in its list of field types.
TFieldType aFieldType |
The field type of interest. |
TBool |
ETrue if the CContentType contains the specified field type. EFalse if not. |
void SetMapping(TUid aMapping);
Set the vCard mapping.
TUid aMapping |
The new vCard mapping for the CContentType. |
TUid Mapping() const;
Retrieve the vCard mapping.
TUid |
The vCard mapping. |
TBool SupportsMultipleLines() const;
Certain field types can support multiple lines of text (for example Address fields of type KUidContactFieldAddress and Note fields of type KUidContactFieldNote). If the content type object contains a field type which supports this, either in its list of field types, or as its mapping, the function returns ETrue.
TBool |
ETrue if the CContentType supports multiple lines of text. EFalse if not. |
TBool operator==(const CContentType& aType) const;
Use this operator to test whether the current content type is the same as another.
const CContentType& aType |
The content type to compare with this CContentType. |
TBool |
ETrue if aType is an identical content type. Field types do not need to be in the same order in the list of field types for a match to be made. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |