class CContactItemViewDef : public CBase |
A view definition for a contact item.
When reading or opening a contact item using the CContactDatabase class, a view definition 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.
Public Member Functions | |
---|---|
IMPORT_C void | AddL ( TFieldType ) |
IMPORT_C TBool | Contains (const CContactItem &) |
TInt | Count () |
IMPORT_C void | ExternalizeL ( RWriteStream &) |
IMPORT_C TInt | Find (const CContentType &) |
IMPORT_C TInt | Find ( TFieldType ) |
IMPORT_C void | InternalizeL ( RReadStream &) |
IMPORT_C TBool | MatchesAll () |
TMode | Mode () |
IMPORT_C CContactItemViewDef * | NewL ( TUse , TMode ) |
IMPORT_C CContactItemViewDef * | NewLC ( TUse , TMode ) |
CContactItemViewDef * | NewLC ( RReadStream &) |
IMPORT_C void | Remove ( TFieldType ) |
IMPORT_C void | Remove ( TInt ) |
void | Reset () |
void | SetMode ( TMode ) |
void | SetUse ( TUse ) |
TUse | Use () |
TUid | operator[] ( TInt ) |
Private Member Functions | |
---|---|
CContactItemViewDef ( TUse , TMode ) |
Public Member Enumerations | |
---|---|
enum | TMode { EIncludeHiddenFields , EMaskHiddenFields } |
enum | TUse { EIncludeFields , EMaskFields } |
Private Attributes | |
---|---|
CArrayFixFlat < TUid > | iFieldTypes |
TMode | iMode |
TUse | iUse |
IMPORT_C 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. |
IMPORT_C TBool | Contains | ( | const CContactItem & | aItem | ) |
Tests whether a contact item complies with the view definition.
This indicates whether or not the item will be included in the view.
const CContactItem & aItem | The contact item to test. |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises the item view definition to a write stream. The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.
RWriteStream & aStream | Stream to which the item view definition should be externalised. |
IMPORT_C TInt | Find | ( | const CContentType & | aContentType | ) | const |
Searches the view definition for any field type contained in the specified content type.
const CContentType & aContentType | Content type containing the field types to search for. |
IMPORT_C TInt | Find | ( | TFieldType | aFieldType | ) | const |
Searches the view definition for the specified field type.
TFieldType aFieldType | The field type to search for. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises the item view definition from a read stream. The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class.
RReadStream & aStream | Stream from which the item view definition should be internalised. |
IMPORT_C 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.
IMPORT_C CContactItemViewDef * | NewL | ( | TUse | aUse, |
TMode | aMode | |||
) | [static] |
Allocates and constructs a new CContactItemViewDef , with a use and a mode.
IMPORT_C CContactItemViewDef * | NewLC | ( | TUse | aUse, |
TMode | aMode | |||
) | [static] |
Allocates and constructs a new CContactItemViewDef , specifying a use and a mode, leaving the object on the cleanup stack.
CContactItemViewDef * | NewLC | ( | RReadStream & | aStream | ) | [static] |
Allocates and constructs a new CContactItemViewDef based on a RReadStream , specifying a use and a mode, leaving the object on the cleanup stack.
RReadStream & aStream | RReadStream containing object to internalize. |
IMPORT_C void | Remove | ( | TFieldType | aFieldType | ) |
Removes a field type, identified by its UID.
TFieldType aFieldType | The field type to remove from the list. This must be present in the CContactItemViewDef object, or the function raises a panic. |
IMPORT_C void | Remove | ( | TInt | aIndex | ) |
Removes 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 | ( | ) | [inline] |
Deletes all field types from the view definition's field type array.
void | SetMode | ( | TMode | aMode | ) | [inline] |
Sets the view definition's mode.
TMode aMode | The new TMode setting. |
void | SetUse | ( | TUse | aUse | ) | [inline] |
Sets the view definition's use.
TUse aUse | The new TUse setting. |
TUid | operator[] | ( | TInt | aIndex | ) | const [inline] |
Gets the field type located at a specified index position within the field type array.
TInt aIndex | The position of the field type in the array, relative to zero. It must be non-negative and less than the number of objects in the array otherwise the function raises a panic. |
Include or exclude hidden fields.
EIncludeHiddenFields |
Include hidden fields in the view. |
EMaskHiddenFields |
Exclude hidden fields from the view. |
Include or exclude specified fields.
EIncludeFields |
Include specified fields in the view. |
EMaskFields |
Exclude specified fields from the view. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.