Update contrib.
1 // Copyright (c) 2002-2009 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.
20 #include <logcntmodel.h>
22 // Forward declarations
24 class CLogServRecentList;
25 class MLogServDatabaseTransactionInterface;
26 class RLogEventDbTable;
30 CLogAddEvent class controls the operations with LogEng database - adding/removing events.
31 It uses the a plug-in to the contacts implementation when it needs to add
32 a contact name to the LogEng record being prepared.
33 There is no need to monitor contacts database events such as backup&restore events, because the
34 contacts implementation environment will handle them for itself.
37 class CLogAddEvent : public CLogActive
40 static CLogAddEvent* NewL(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
44 void StartL(CLogEvent& aEvent, const CLogServRecentList* aRecentList, TRequestStatus& aStatus, const RMessage2& aMessage);
47 CLogAddEvent(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
49 TBool PerformContactMatchL();
53 void DoAddEventL(RLogEventDbTable& aTbl, TLogTypeId aTypeId, TLogStringId aDirectionId, TLogStringId aStatusId);
54 void DoComplete(TInt& aStatus);
58 void CloseContactsPlugin();
63 ELogSetContactAndRemoteParty,
68 void SetEventContact();
69 void SetRemoteParty();
71 TLogTypeId SetDescriptionL();
72 TBool DetectDuplicateEventsL();
75 MLogServDatabaseTransactionInterface& iDatabase;
80 const CLogServRecentList* iRecentList;
81 CLogFilter* iDuplicateFilter;
84 CLogDuplicate* iDuplicate;
85 CLogCntModel* iContactPlugin;
87 TInt iContactMatchCount;
88 //iContactNameFormat gets its value from logserv resource file and determines the
89 //order in the logs of {given_name,family_name} strings pair.
90 TLogContactNameFormat iContactNameFormat;