#include <app/MPbk2ContactNameFormatter.h>
class MPbk2ContactNameFormatter |
Public Member Enumerations | |
---|---|
enum | TPbk2ContactTitleFormattingFlags { EPreserveLeadingSpaces, EUseSeparator, EReplaceNonGraphicChars, EPreserveAllOriginalSpaces, EDisableCompanyNameSeparator } |
Public Member Functions | |
---|---|
virtual | ~MPbk2ContactNameFormatter() |
pure virtual CVPbkBaseContactFieldTypeListIterator * | ActualTitleFieldsLC(CVPbkFieldTypeRefsList &, const MVPbkBaseContactFieldCollection &) |
virtual TAny * | ContactNameFormatterExtension(TUid) |
pure virtual void | GetContactTitle(const MVPbkBaseContactFieldCollection &, TDes &, TUint32) |
pure virtual void | GetContactTitleForFind(const MVPbkBaseContactFieldCollection &, TDes &, TUint32) |
pure virtual HBufC * | GetContactTitleL(const MVPbkBaseContactFieldCollection &, TUint32) |
pure virtual HBufC * | GetContactTitleOrNullL(const MVPbkBaseContactFieldCollection &, TUint32) |
pure virtual TBool | IsFindSeparatorChar(TChar) |
pure virtual TBool | IsTitleField(const MVPbkBaseContactField &) |
pure virtual TBool | IsTitleFieldType(const MVPbkFieldType &) |
pure virtual TInt | MaxTitleLength(const MVPbkBaseContactFieldCollection &, const TUint32) |
pure virtual TInt | MaxTitleLengthForFind(const MVPbkBaseContactFieldCollection &, const TUint32) |
pure virtual const TDesC & | UnnamedText() |
Abstract Phonebook 2 contact name formatter interface.
Flags.
CVPbkBaseContactFieldTypeListIterator * | ActualTitleFieldsLC | ( | CVPbkFieldTypeRefsList & | aFieldTypeList, |
const MVPbkBaseContactFieldCollection & | aContactFields | |||
) | [pure virtual] |
Return iterator that contains all fields that are used for making the formatted name.
Parameter | Description |
---|---|
aFieldTypeList | Field type list that is used to store field types for the iterator. The list will be resetted before use. |
aContactFields | Field collection representing the data in a contact. |
Returns: Iterator for fields that are used for the formated title.
void | GetContactTitle | ( | const MVPbkBaseContactFieldCollection & | aContactFields, |
TDes & | aTitle, | |||
TUint32 | aFormattingFlags | |||
) | [pure virtual] |
Returns the title text for a contact.
See also: TPbk2ContactTitleFormattingFlags
Parameter | Description |
---|---|
aContactFields | Field collection representing the data in a contact. |
aTitle | Buffer containing the formatted title. |
void | GetContactTitleForFind | ( | const MVPbkBaseContactFieldCollection & | aContactFields, |
TDes & | aTitle, | |||
TUint32 | aFormattingFlags | |||
) | [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
Parameter | Description |
---|---|
aContactFields | Field collection representing the data in a contact. |
aTitle | Buffer containing the formatted title. |
HBufC * | GetContactTitleL | ( | const MVPbkBaseContactFieldCollection & | aContactFields, |
TUint32 | aFormattingFlags | |||
) | [pure virtual] |
Returns the title text for a contact.
Parameter | Description |
---|---|
aContactFields | Field collection representing the data in a contact. |
aFormattingFlags | Formatting flags, see TPbk2ContactTitleFormattingFlags. |
Returns: A buffer containing the formatted title, or the UnnamedText() method's result if no title can be created.
HBufC * | GetContactTitleOrNullL | ( | const MVPbkBaseContactFieldCollection & | aContactFields, |
TUint32 | aFormattingFlags | |||
) | [pure virtual] |
Returns the title text for a contact.
See also: TPbk2ContactTitleFormattingFlags
Parameter | Description |
---|---|
aContactFields | Field collection representing the data in a contact. |
Returns: A buffer containing the formatted title, NULL if no title can be created.
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.
Parameter | Description |
---|---|
aContactField | The contact field to inspect. |
Returns: ETrue if the given field is used when building contact titles.
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.
Parameter | Description |
---|---|
aFieldType | Type of the field to inspect. |
Returns: ETrue if the given field type is used when building contact titles.
TInt | MaxTitleLength | ( | const MVPbkBaseContactFieldCollection & | aContactFields, |
const TUint32 | aFormattingFlags | |||
) | [pure virtual] |
Returns the length of the formatted name.
See also: TPbk2ContactTitleFormattingFlags
Parameter | Description |
---|---|
aContactFields | Field collection representing the data in a contact. |
Returns: Length of the formatted name.
TInt | MaxTitleLengthForFind | ( | const MVPbkBaseContactFieldCollection & | aContactFields, |
const TUint32 | aFormattingFlags | |||
) | [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
Parameter | Description |
---|---|
aContactFields | Field collection representing the data in a contact. |
Returns: Length of the formatted name.
const TDesC & | UnnamedText | ( | ) | const [pure virtual] |
Returns the name text to be used for unnamed contacts.
Returns: Text used with unnamed contacts.