Update contrib.
1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __LOGCNTMODEL_H__
17 #define __LOGCNTMODEL_H__
19 #include <ecom/ecom.h>
20 #include "logcntdef.h"
23 /** Provides an interface to decouple the internal static dependency of LogEng on
26 Rather than statically linking against a specific contacts implementation dll
27 the log engine dynamically loads a plugin implementation of this class, to remove any need for
28 a direct dependency on a specific Contacts implementation.
30 The interface is provided to allow logeng to retrieve a string which contains contacts information
31 for a given phone number.
37 /** Opens the contacts DB.
38 @capability ReadUserData WriteUserData */
39 virtual void OpenContactsL()=0;
41 /** Closes the contacts DB.
43 virtual void CloseContacts()=0;
45 /** Attempts to find a contact item ID for the contact items which contains
46 the specified telephone number in a telephone, fax or SMS type field.
47 If more than one contact item contains the telephone number this should be
48 treated the same as no contact found.
50 @capability ReadUserData
51 @param aNumber Phone number string
52 @param aMatchLengthFromRight Number of digits from the right of the phone number to use
53 @return DB Id of the DB entry corresponding to the phone number, KLogNullContactId if none or more than one found */
54 virtual TLogContactItemId MatchPhoneNumberL(const TDesC& aNumber, TInt aMatchLengthFromRight)=0;
56 /** Gets the text data for the family and given name fields of a given contact Id.
58 @capability ReadUserData
59 @param aContactId Contact Id to find data for
60 @param aName On return contains a string holding the family and given name in the desired format if found, a 0 length string otherwise.
61 The buffer for aName is supplied by the client and should be of a length sufficent to hold a standard contact string.
62 @param aNameFormat Desired format of returned string - Chinese or Western format */
63 virtual void ReadContactNameL(TLogContactItemId aContactId, TDes& aName, TLogContactNameFormat aNameFormat)=0;
66 /** Interface UID to be used by all contacts model plugin's for log engine
69 const TUid KUidEComLogCntInterface = {0x20008030};
71 const TUid KUidEComLogCntInterface = {0x20008029};
73 /** Provides an interface for ECom plugins
75 class CLogCntModel: public CBase, public MLogCntModel
78 IMPORT_C static CLogCntModel* NewL();
79 IMPORT_C virtual ~CLogCntModel();
84 #endif // __LOGCNTMODEL_H__