#include <app/cntdb.h>
class CContactItemViewDef : public CBase, public CBase |
Public Member Enumerations | |
---|---|
enum | TMode { EIncludeHiddenFields, EMaskHiddenFields } |
enum | TUse { EIncludeFields, EMaskFields } |
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) |
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.
Include or exclude hidden fields.
Enumerator | Value | Description |
---|---|---|
EIncludeHiddenFields |
Include hidden fields in the view. | |
EMaskHiddenFields |
Exclude hidden fields from the view. |
Include or exclude specified fields.
Enumerator | Value | Description |
---|---|---|
EIncludeFields |
Include specified fields in the view. | |
EMaskFields |
Exclude specified fields from the view. |
IMPORT_C void | AddL | ( | TFieldType | aFieldType | ) |
Appends a field type to the view definition's array of field types.
Parameters | |
---|---|
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.
Parameters | |
---|---|
aItem | The contact item to test. |
TInt | Count | ( | ) | const [inline] |
Gets the number of field types in the view definition.
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
aUse | Specifies whether to include or exclude specified fields. |
aMode | Specifies whether to include or exclude hidden fields. |
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.
Parameters | |
---|---|
aUse | Specifies whether to include or exclude specified fields. |
aMode | Specifies whether to include or exclude hidden fields. |
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.
Parameters | |
---|---|
aStream | RReadStream containing object to internalize. |
IMPORT_C void | Remove | ( | TFieldType | aFieldType | ) |
Removes a field type, identified by its UID.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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 | SetMode | ( | TMode | aMode | ) | [inline] |
Sets the view definition's mode.
Parameters | |
---|---|
aMode | The new TMode setting. |
Gets the field type located at a specified index position within the field type array.
Parameters | |
---|---|
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. |