MLogCntModel Class Reference

class MLogCntModel

Provides an interface to decouple the internal static dependency of LogEng on Contacts.

Rather than statically linking against a specific contacts implementation dll the log engine dynamically loads a plugin implementation of this class, to remove any need for a direct dependency on a specific Contacts implementation.

The interface is provided to allow logeng to retrieve a string which contains contacts information for a given phone number.

Member Functions Documentation

CloseContacts()

voidCloseContacts()[pure virtual]
Closes the contacts DB.
capability
None

MatchPhoneNumberL(const TDesC &, TInt)

TLogContactItemId MatchPhoneNumberL(const TDesC &aNumber,
TIntaMatchLengthFromRight
)[pure virtual]

Attempts to find a contact item ID for the contact items which contains the specified telephone number in a telephone, fax or SMS type field. If more than one contact item contains the telephone number this should be treated the same as no contact found.

capability
ReadUserData

Parameters

const TDesC & aNumberPhone number string
TInt aMatchLengthFromRightNumber of digits from the right of the phone number to use

OpenContactsL()

voidOpenContactsL()[pure virtual]
Opens the contacts DB.
capability
ReadUserData WriteUserData

ReadContactNameL(TLogContactItemId, TDes &, TLogContactNameFormat)

voidReadContactNameL(TLogContactItemIdaContactId,
TDes &aName,
TLogContactNameFormataNameFormat
)[pure virtual]

Gets the text data for the family and given name fields of a given contact Id.

capability
ReadUserData

Parameters

TLogContactItemId aContactIdContact Id to find data for
TDes & aNameOn return contains a string holding the family and given name in the desired format if found, a 0 length string otherwise. The buffer for aName is supplied by the client and should be of a length sufficent to hold a standard contact string.
TLogContactNameFormat aNameFormatDesired format of returned string - Chinese or Western format