![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
Applications that use this class will not work correctly on a version of EPOC earlier than ER5.
CBase |
Abstract: CBase behaviour. |
cntdb.h
cntmodel.lib
When reading or opening a contact item using the CContactDatabase class, a view definition for the item may be specified to indicate which field data should be retrieved. See for instance CContactDatabase::ReadContactL().
A view definition for a contact item contains an array of field types, a use (CContactItemViewDef::TUse) and a mode (CContactItemViewDef::TMode). The use indicates whether the field types contained in the view definition should be included in or excluded from the view. The mode indicates whether fields with the hidden attribute should be included or excluded.
static CContactItemViewDef* NewL(TUse aUse, TMode aMode);
static CContactItemViewDef* NewLC(TUse aUse, TMode aMode);
Use these functions to allocate and construct a new CContactItemViewDef, specifying a use and a mode.
If the new view definition is successfully constructed, NewLC() leaves it on the cleanup stack.
TUse aUse |
Specifies whether to include or exclude specified fields. |
TMode aMode |
Specifies whether to include or exclude hidden fields. |
CContactItemViewDef* |
Pointer to the newly created view definition. |
TUid operator[](TInt aIndex) const;
Use this operator to return the field type located at position aIndex within the field type array.
TInt aIndex |
The position of the field type element within the array. 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. |
TUid |
The field type located at index aIndex within the array (this is equivalent to a TFieldType). |
TInt Find(const CContentType& aContentType) const;
Searches the current view definition for any field type contained in the specified content type.
const CContentType& aContentType |
Content type containing field types to find. |
TInt |
The index in the view definition of the first matching field type or KErrNotFound. |
TInt Find(TFieldType aFieldType) const;
Searches the current view definition for the specified field type.
TFieldType aFieldType |
The field type to find. |
TInt |
The index in the view definition of the matching field type or KErrNotFound. |
TInt Count() const;
Retrieves the number of field types in the current view definition.
TInt |
The number of field types in the CContactItemViewDef. |
TBool MatchesAll() const;
Tests whether the view definition contains a field type with the value KUidContactFieldMatchAll. If this is the case, all fields in the contact item are retrieved, regardless of the other field types specified in the view definition.
TBool |
ETrue if all field types are matched, EFalse if not. |
void AddL(TFieldType aFieldType);
Appends a field type to the view definition's array of field types.
TFieldType aFieldType |
The field type to append to the array of field types. |
void Remove(TFieldType aFieldType);
Removes a field type, identified by its field type UID.
TFieldType aFieldType |
The field type to remove from the list. This field type must be present in the CContactItemViewDef, or the function raises a panic. |
void Remove(TInt aIndex);
Remove a field type, identified by its index into the array of field types.
TInt aIndex |
The index of the element to delete. The position is relative to zero. This value must not be negative and must not be greater than the number of elements currently in the list, or the function raises a panic. |
void Reset();
Deletes all field types from the view definition's field type array.
TUse Use() const;
Returns the view definition's TUse setting.
The current TUse setting. |
void SetUse(TUse aUse);
Sets the view definition's TUse setting.
TUse aUse |
The new TUse setting. |
TMode Mode() const;
Returns the view definition's TMode setting.
TMode |
The current TMode setting. |
void SetMode(TMode aMode);
Sets the view definition's TMode setting.
TMode aMode |
The new TMode setting. |
Include specified fields in the view. |
|
Exclude specified fields from the view. |
Include hidden fields in the view. |
|
Exclude hidden fields from the view. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |