MPbk2ContactNameFormatter Class Reference

#include <app/MPbk2ContactNameFormatter.h>

Link against: Pbk2Presentation.lib

class MPbk2ContactNameFormatter

Detailed Description

Abstract Phonebook 2 contact name formatter interface.

Member Enumeration Documentation

Enum TPbk2ContactTitleFormattingFlags

Flags.

EnumeratorValueDescription
EPreserveLeadingSpaces0x0001

Formatter preserves all leading spaces in the formatted title

EUseSeparator0x0002

Formatter uses custom separator for separating firstname and lastname

EReplaceNonGraphicChars0x0004

Formatter replaces all non-graphical characters with space character

EPreserveAllOriginalSpaces0x0008Formatter to retain all original space characters.
EDisableCompanyNameSeparator0x0010

Formatter by default uses coma separator for separating company name

Constructor & Destructor Documentation

~MPbk2ContactNameFormatter ( )

~MPbk2ContactNameFormatter()[inline, virtual]

Destructor.

Member Function Documentation

ActualTitleFieldsLC ( CVPbkFieldTypeRefsList &, const MVPbkBaseContactFieldCollection & )

CVPbkBaseContactFieldTypeListIterator *ActualTitleFieldsLC(CVPbkFieldTypeRefsList &aFieldTypeList,
const MVPbkBaseContactFieldCollection &aContactFields
)[pure virtual]

Return iterator that contains all fields that are used for making the formatted name.

ParameterDescription
aFieldTypeListField type list that is used to store field types for the iterator. The list will be resetted before use.
aContactFieldsField collection representing the data in a contact.

Returns: Iterator for fields that are used for the formated title.

ContactNameFormatterExtension ( TUid )

TAny *ContactNameFormatterExtension(TUid)[inline, virtual]

Returns an extension point for this interface or NULL.

Returns: Extension point.

GetContactTitle ( const MVPbkBaseContactFieldCollection &, TDes &, TUint32 )

voidGetContactTitle(const MVPbkBaseContactFieldCollection &aContactFields,
TDes &aTitle,
TUint32aFormattingFlags
)[pure virtual]

Returns the title text for a contact.

See also: TPbk2ContactTitleFormattingFlags

ParameterDescription
aContactFieldsField collection representing the data in a contact.
aTitleBuffer containing the formatted title.

GetContactTitleForFind ( const MVPbkBaseContactFieldCollection &, TDes &, TUint32 )

voidGetContactTitleForFind(const MVPbkBaseContactFieldCollection &aContactFields,
TDes &aTitle,
TUint32aFormattingFlags
)[pure virtual]

Returns the title text for a contact. Unlike GetContactTitle, this method will build the title using all the possible fields (not restricting the field count). Should not be used for regular name formatting needs.

See also: TPbk2ContactTitleFormattingFlags

ParameterDescription
aContactFieldsField collection representing the data in a contact.
aTitleBuffer containing the formatted title.

GetContactTitleL ( const MVPbkBaseContactFieldCollection &, TUint32 )

HBufC *GetContactTitleL(const MVPbkBaseContactFieldCollection &aContactFields,
TUint32aFormattingFlags
)[pure virtual]

Returns the title text for a contact.

ParameterDescription
aContactFieldsField collection representing the data in a contact.
aFormattingFlagsFormatting flags, see TPbk2ContactTitleFormattingFlags.

Returns: A buffer containing the formatted title, or the UnnamedText() method's result if no title can be created.

GetContactTitleOrNullL ( const MVPbkBaseContactFieldCollection &, TUint32 )

HBufC *GetContactTitleOrNullL(const MVPbkBaseContactFieldCollection &aContactFields,
TUint32aFormattingFlags
)[pure virtual]

Returns the title text for a contact.

See also: TPbk2ContactTitleFormattingFlags

ParameterDescription
aContactFieldsField collection representing the data in a contact.

Returns: A buffer containing the formatted title, NULL if no title can be created.

IsFindSeparatorChar ( TChar )

TBool IsFindSeparatorChar(TCharaCh)[pure virtual]

Checks whether the given character is a separator character.

Returns: ETrue if character is a separator character.

IsTitleField ( const MVPbkBaseContactField & )

TBool IsTitleField(const MVPbkBaseContactField &aContactField)const [pure virtual]

Returns ETrue if the given field is part of the fields used to build the contact title.

ParameterDescription
aContactFieldThe contact field to inspect.

Returns: ETrue if the given field is used when building contact titles.

IsTitleFieldType ( const MVPbkFieldType & )

TBool IsTitleFieldType(const MVPbkFieldType &aFieldType)const [pure virtual]

Returns ETrue if the given field is part of the fields used to build the contact title.

ParameterDescription
aFieldTypeType of the field to inspect.

Returns: ETrue if the given field type is used when building contact titles.

MaxTitleLength ( const MVPbkBaseContactFieldCollection &, const TUint32 )

TInt MaxTitleLength(const MVPbkBaseContactFieldCollection &aContactFields,
const TUint32aFormattingFlags
)[pure virtual]

Returns the length of the formatted name.

See also: TPbk2ContactTitleFormattingFlags

ParameterDescription
aContactFieldsField collection representing the data in a contact.

Returns: Length of the formatted name.

MaxTitleLengthForFind ( const MVPbkBaseContactFieldCollection &, const TUint32 )

TInt MaxTitleLengthForFind(const MVPbkBaseContactFieldCollection &aContactFields,
const TUint32aFormattingFlags
)[pure virtual]

Returns the length of the formatted name. Unlike MaxTitleLength, this method will count the length using all the possible fields (not restricting the field count). Should not be used for regular name formatting needs.

See also: TPbk2ContactTitleFormattingFlags

ParameterDescription
aContactFieldsField collection representing the data in a contact.

Returns: Length of the formatted name.

UnnamedText ( )

const TDesC &UnnamedText()const [pure virtual]

Returns the name text to be used for unnamed contacts.

Returns: Text used with unnamed contacts.