Location:
cntfield.h
Link against: cntmodel.lib
CContentType
Supported from 5.0
A contact item field's content type. 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 types alone are 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.
|
Defined in CContentType
:
AddFieldTypeL()
, ContainsFieldType()
, FieldType()
, FieldTypeCount()
, Mapping()
, NewL()
, RemoveFieldType()
, SetMapping()
, SupportsMultipleLines()
, operator==()
, ~CContentType()
Inherited from CBase
:
operator new()
static CContentType* NewL();
static CContentType* NewL(TFieldType aFieldType,TUid aMapping=KNullUid);
static CContentType* NewL(const CContentType& aContentType);
Allocates and constructs a new
CContentType
— overloaded function. The object may
be constructed:
by default. The object has no field types and the mapping
is set to KNullUid
with a single field type and optionally a mapping
from another content type.
|
|
~CContentType();
The destructor frees all resources owned by the content type object, prior to its destruction.
void AddFieldTypeL(TFieldType aFieldType);
Appends a field type to the content type's list of field types.
|
void RemoveFieldType(TFieldType aFieldType);
Removes a field type from the list of field types.
|
TFieldType FieldType(TInt aIndex) const;
Gets the indexed field type.
|
|
TInt FieldTypeCount() const;
Gets the number of field types in the CContentType
's list of
field types.
|
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.
|
|
void SetMapping(TUid aMapping);
Sets the vCard mapping.
|
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
).
|
TBool operator==(const CContentType& aType) const;
Compares two content type objects for equality.
|
|