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()

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

MatchPhoneNumberL(const TDesC &, TInt)

TLogContactItemId MatchPhoneNumberL ( const TDesC & aNumber,
TInt aMatchLengthFromRight
) [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 & aNumber Phone number string
TInt aMatchLengthFromRight Number of digits from the right of the phone number to use

OpenContactsL()

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

ReadContactNameL(TLogContactItemId, TDes &, TLogContactNameFormat)

void ReadContactNameL ( TLogContactItemId aContactId,
TDes & aName,
TLogContactNameFormat aNameFormat
) [pure virtual]

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

capability
ReadUserData

Parameters

TLogContactItemId aContactId Contact Id to find data for
TDes & aName On 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 aNameFormat Desired format of returned string - Chinese or Western format