Location:
CNTFIELD.H
Link against: cntmodel.lib
class CContentType : public CBase;
The content type for a contact item field.
The content type identifies the field's type and the vCard property which the field maps to. It is owned by the field. Field types are defined as UIDs in cntdef.h.
The vCard mapping is optional. It should be specified if the field type alone is not enough to identify the mapping. The possible values for the vCard mapping are defined as UIDs in cntdef.h.
Each field is uniquely identified by the combination of UIDs contained in the content type.
CBase
- Base class for all classes to be instantiated on the heap
CContentType
- The content type for a contact item field
Defined in CContentType
:
AddFieldTypeL()
, ContainsFieldType()
, FieldType()
, FieldTypeCount()
, IsEqual()
, IsEqualForSyncUpdate()
, Mapping()
, NewL()
, NewL()
, NewL()
, RemoveFieldType()
, SetMapping()
, SupportsMultipleLines()
, operator==()
, ~CContentType()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
IMPORT_C ~CContentType();
Frees all resources owned by the content type object, prior to its destruction.
static IMPORT_C CContentType *NewL();
Allocates and constructs a new default CContentType.
The object has no field types and the mapping is set to KNullUid
|
static IMPORT_C CContentType *NewL(TFieldType aFieldType, TUid aMapping=TUid::Null());
Allocates and constructs a new CContentType with a single field type and a mapping.
|
|
static IMPORT_C CContentType *NewL(const CContentType &aContentType);
Allocates and constructs a new CContentType based on another one.
|
|
IMPORT_C void SetMapping(TUid aMapping);
Sets the vCard mapping.
|
IMPORT_C void AddFieldTypeL(TFieldType aFieldType);
Appends a field type to the content type's list of field types.
Note that certain combinations of field types are not valid and should not be used.
|
IMPORT_C void RemoveFieldType(TFieldType aFieldType);
Removes a field type from the list of field types.
|
IMPORT_C TFieldType FieldType(TInt aIndex) const;
Gets the indexed field type.
|
|
IMPORT_C TInt FieldTypeCount() const;
Gets the number of field types in the content type's list of field types.
|
IMPORT_C TUid Mapping() const;
Gets the vCard mapping.
|
IMPORT_C TBool ContainsFieldType(TFieldType aFieldType) const;
Tests whether the content type object contains the specified field type UID either as the mapping value or in its list of field types.
|
|
IMPORT_C TBool SupportsMultipleLines() const;
Tests whether the content type supports multiple lines of text. 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. Examples of such field types are address fields (type KUidContactFieldAddress) and note fields (type KUidContactFieldNote).
|
IMPORT_C TBool operator==(const CContentType &aType) const;
Compares two content type objects for equality. Two content type objects are equal according to this method if all following conditions are met:
vCard property mapping matches
same number of field types
main field type matches
additional field types and vCard property parameter mappings match
|
|
IMPORT_C TBool IsEqualForSyncUpdate(const CContentType &aType) const;
Tests whether the content types are suitable to match for synchronisation purpose.
|
|
IMPORT_C TBool IsEqual(const CContentType &aType) const;
Compares two content type objects for equality. Two content type objects are equal according to this method if all following conditions are met:
vCard property mapping matches
same number of field types
main field type matches
additional field types and vCard property parameter mappings match
|
|