#include <app/cntfield.h>
class CContentType : public CBase |
Public Member Functions | |
---|---|
~CContentType() | |
IMPORT_C void | AddFieldTypeL(TFieldType) |
IMPORT_C TBool | ContainsFieldType(TFieldType) |
void | ExternalizeL(RWriteStream &) |
IMPORT_C TFieldType | FieldType(TInt) |
IMPORT_C TInt | FieldTypeCount() |
void | InternalizeAdditionalUidsL(TInt, RReadStream &) |
void | InternalizeL(RReadStream &) |
IMPORT_C TBool | IsEqual(const CContentType &) |
IMPORT_C TBool | IsEqualForSyncUpdate(const CContentType &) |
IMPORT_C TUid | Mapping() |
IMPORT_C CContentType * | NewL() |
IMPORT_C CContentType * | NewL(TFieldType, TUid) |
IMPORT_C CContentType * | NewL(const CContentType &) |
CContentType * | NewLC(RReadStream &) |
IMPORT_C void | RemoveFieldType(TFieldType) |
void | Reset() |
IMPORT_C void | SetMapping(TUid) |
IMPORT_C TBool | SupportsMultipleLines() |
IMPORT_C TBool | operator==(const CContentType &) |
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.
IMPORT_C | ~CContentType | ( | ) |
Frees all resources owned by the content type object, prior to its destruction.
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.
Parameter | Description |
---|---|
aFieldType | The field type to append to the list of field types. |
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.
Parameter | Description |
---|---|
aFieldType | The field type of interest. |
Returns: ETrue if the CContentType contains the specified field type. EFalse if not.
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises a CContentType object to a write stream.
Parameter | Description |
---|---|
aStream | Stream to which the object should be externalised. |
IMPORT_C TFieldType | FieldType | ( | TInt | aIndex | ) | const |
Gets the indexed field type.
Parameter | Description |
---|---|
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. |
Returns: The indexed field type.
IMPORT_C TInt | FieldTypeCount | ( | ) | const |
Gets the number of field types in the content type's list of field types.
Returns: The number of field types in the content type.
void | InternalizeAdditionalUidsL | ( | TInt | aCount, |
RReadStream & | aStream | |||
) |
void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises a CContentType object from a read stream.
Parameter | Description |
---|---|
aStream | Stream from which the object should be internalised. |
IMPORT_C TBool | IsEqual | ( | const CContentType & | aType | ) | const |
vCard property mapping matches
same number of field types
main field type matches
additional field types and vCard property parameter mappings match
Parameter | Description |
---|---|
aType | The content type to compare with this CContentType. |
Returns: ETrue if aType is equal with current content type.
IMPORT_C TBool | IsEqualForSyncUpdate | ( | const CContentType & | aType | ) | const |
Tests whether the content types are suitable to match for synchronisation purpose.
Parameter | Description |
---|---|
aType | The content type to compare with this CContentType. |
Returns: ETrue if aType is an identical content type
IMPORT_C CContentType * | NewL | ( | ) | [static] |
Allocates and constructs a new default CContentType.
The object has no field types and the mapping is set to KNullUid
Returns: Pointer to the newly created content type object.
IMPORT_C CContentType * | NewL | ( | TFieldType | aFieldType, |
TUid | aMapping = KNullUid | |||
) | [static] |
Allocates and constructs a new CContentType with a single field type and a mapping.
Parameter | Description |
---|---|
aFieldType | The field type to add to the content type. |
aMapping | The mapping. |
Returns: Pointer to the newly created content type object.
IMPORT_C CContentType * | NewL | ( | const CContentType & | aContentType | ) | [static] |
Allocates and constructs a new CContentType based on another one.
Parameter | Description |
---|---|
aContentType | The CContentType on which to base the new one. |
Returns: Pointer to the newly created content type object.
CContentType * | NewLC | ( | RReadStream & | aStream | ) | [static] |
Constructs a new content type based on a RReadStream.
Parameter | Description |
---|---|
aStream | RReadStream containing object to internalize. |
Returns: Pointer to the newly created CContentType. This is left on the cleanup stack.
IMPORT_C void | RemoveFieldType | ( | TFieldType | aFieldType | ) |
Removes a field type from the list of field types.
Parameter | Description |
---|---|
aFieldType | The field type to remove from the list of field types. |
IMPORT_C void | SetMapping | ( | TUid | aMapping | ) |
Sets the vCard mapping.
Parameter | Description |
---|---|
aMapping | The new vCard mapping for the content type. |
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).
Returns: ETrue if the CContentType supports multiple lines of text. EFalse if not.
IMPORT_C TBool | operator== | ( | const CContentType & | aType | ) | const |
vCard property mapping matches
same number of field types
main field type matches
additional field types and vCard property parameter mappings match
Parameter | Description |
---|---|
aType | The content type to compare with this CContentType. + |
Returns: ETrue if aType is equal with current content type.