VPbkUtils

Public Member Functions
voidDoValidateFieldContentL(MVPbkStoreContactField &)
IMPORT_C TBoolIsFieldTypeIncludedInContactL(const MVPbkFieldTypeList &, const MVPbkBaseContact &, TResourceReader &)
IMPORT_C TBoolIsFieldTypeIncludedL(const MVPbkFieldTypeList &, const MVPbkBaseContactField &, TResourceReader &)
IMPORT_C const MVPbkFieldType *MatchFieldType(const MVPbkFieldTypeList &, const MVPbkBaseContactField &)
IMPORT_C TBoolVerifySyncronizationFieldL(RFs &, const MVPbkFieldTypeList &, MVPbkStoreContact &)

Utilities for contact management.

Member Function Documentation

DoValidateFieldContentL ( MVPbkStoreContactField & )

voidDoValidateFieldContentL(MVPbkStoreContactField &aSyncField)

IsFieldTypeIncludedInContactL ( const MVPbkFieldTypeList &, const MVPbkBaseContact &, TResourceReader & )

IMPORT_C TBoolIsFieldTypeIncludedInContactL(const MVPbkFieldTypeList &aFieldTypeList,
const MVPbkBaseContact &aContact,
TResourceReader &aResourceReader
)

Checks whether the contact contains a field that matches to given field type selector.

ParameterDescription
aFieldTypeListA field type list for matching aField.
aContactThe contact whose fields are cheked.
aResourceReaderA reader to VPBK_FIELD_TYPE_SELECTOR in VPbkFieldType.rh.

Returns: ETrue If field type is included.

IsFieldTypeIncludedL ( const MVPbkFieldTypeList &, const MVPbkBaseContactField &, TResourceReader & )

IMPORT_C TBoolIsFieldTypeIncludedL(const MVPbkFieldTypeList &aFieldTypeList,
const MVPbkBaseContactField &aField,
TResourceReader &aResourceReader
)

Checks if aField matches the required field type from aFieldTypeList and the field type of aField matches to field type selector.

ParameterDescription
aFieldTypeListA field type list for matching aField.
aFieldThe field whose type to check.
aResourceReaderA reader to VPBK_FIELD_TYPE_SELECTOR in VPbkFieldType.rh.

Returns: ETrue If field type is included.

MatchFieldType ( const MVPbkFieldTypeList &, const MVPbkBaseContactField & )

IMPORT_C const MVPbkFieldType *MatchFieldType(const MVPbkFieldTypeList &aFieldTypeList,
const MVPbkBaseContactField &aField
)

Returns the field type if aField matches one of the aFieldTypeList elements otherwise returns NULL.

ParameterDescription
aFieldTypeListThe field type list to use.
aFieldThe field whose type to match.

Returns: The matched field type.

VerifySyncronizationFieldL ( RFs &, const MVPbkFieldTypeList &, MVPbkStoreContact & )

IMPORT_C TBoolVerifySyncronizationFieldL(RFs &aFs,
const MVPbkFieldTypeList &aSupportedFieldTypeList,
MVPbkStoreContact &aContact
)

Verifies the existance of the syncronization field.

The data for the fields are defined in VPbkSyncConstants.h. Adds the field with the default value if not present. If the syncronization field is empty assigns a default value. If field contains invalid data default value is assigned.

ParameterDescription
aFsA handle to an open file handle.
aSupportedFieldTypeListField types supported by the store. See MVPbkContactStoreProperties::SupportedFields.
aContactA contact whose syncronization field and content is verified.