sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __LOGADD_H__
|
sl@0
|
17 |
#define __LOGADD_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <logcli.h>
|
sl@0
|
20 |
#include <logcntmodel.h>
|
sl@0
|
21 |
|
sl@0
|
22 |
// Forward declarations
|
sl@0
|
23 |
class CLogDuplicate;
|
sl@0
|
24 |
class CLogServRecentList;
|
sl@0
|
25 |
class MLogServDatabaseTransactionInterface;
|
sl@0
|
26 |
class RLogEventDbTable;
|
sl@0
|
27 |
class CRepository;
|
sl@0
|
28 |
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
CLogAddEvent class controls the operations with LogEng database - adding/removing events.
|
sl@0
|
31 |
It uses the a plug-in to the contacts implementation when it needs to add
|
sl@0
|
32 |
a contact name to the LogEng record being prepared.
|
sl@0
|
33 |
There is no need to monitor contacts database events such as backup&restore events, because the
|
sl@0
|
34 |
contacts implementation environment will handle them for itself.
|
sl@0
|
35 |
@internalComponent
|
sl@0
|
36 |
*/
|
sl@0
|
37 |
class CLogAddEvent : public CLogActive
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
static CLogAddEvent* NewL(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
|
sl@0
|
41 |
~CLogAddEvent();
|
sl@0
|
42 |
|
sl@0
|
43 |
public:
|
sl@0
|
44 |
void StartL(CLogEvent& aEvent, const CLogServRecentList* aRecentList, TRequestStatus& aStatus, const RMessage2& aMessage);
|
sl@0
|
45 |
|
sl@0
|
46 |
private:
|
sl@0
|
47 |
CLogAddEvent(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
|
sl@0
|
48 |
void ConstructL();
|
sl@0
|
49 |
TBool PerformContactMatchL();
|
sl@0
|
50 |
|
sl@0
|
51 |
void DoRunL();
|
sl@0
|
52 |
|
sl@0
|
53 |
void DoAddEventL(RLogEventDbTable& aTbl, TLogTypeId aTypeId, TLogStringId aDirectionId, TLogStringId aStatusId);
|
sl@0
|
54 |
void DoComplete(TInt& aStatus);
|
sl@0
|
55 |
void DoCancel();
|
sl@0
|
56 |
|
sl@0
|
57 |
void OpenContactsL();
|
sl@0
|
58 |
void CloseContactsPlugin();
|
sl@0
|
59 |
|
sl@0
|
60 |
enum TLogState
|
sl@0
|
61 |
{
|
sl@0
|
62 |
ELogNone,
|
sl@0
|
63 |
ELogSetContactAndRemoteParty,
|
sl@0
|
64 |
ELogAddEvent,
|
sl@0
|
65 |
ELogPurgeRecent
|
sl@0
|
66 |
};
|
sl@0
|
67 |
|
sl@0
|
68 |
void SetEventContact();
|
sl@0
|
69 |
void SetRemoteParty();
|
sl@0
|
70 |
void GetConfigL();
|
sl@0
|
71 |
TLogTypeId SetDescriptionL();
|
sl@0
|
72 |
TBool DetectDuplicateEventsL();
|
sl@0
|
73 |
|
sl@0
|
74 |
private:
|
sl@0
|
75 |
MLogServDatabaseTransactionInterface& iDatabase;
|
sl@0
|
76 |
|
sl@0
|
77 |
TBool iEventAdded;
|
sl@0
|
78 |
CLogEvent* iEvent;
|
sl@0
|
79 |
TLogState iState;
|
sl@0
|
80 |
const CLogServRecentList* iRecentList;
|
sl@0
|
81 |
CLogFilter* iDuplicateFilter;
|
sl@0
|
82 |
TLogConfig iConfig;
|
sl@0
|
83 |
|
sl@0
|
84 |
CLogDuplicate* iDuplicate;
|
sl@0
|
85 |
CLogCntModel* iContactPlugin;
|
sl@0
|
86 |
|
sl@0
|
87 |
TInt iContactMatchCount;
|
sl@0
|
88 |
//iContactNameFormat gets its value from logserv resource file and determines the
|
sl@0
|
89 |
//order in the logs of {given_name,family_name} strings pair.
|
sl@0
|
90 |
TLogContactNameFormat iContactNameFormat;
|
sl@0
|
91 |
};
|
sl@0
|
92 |
|
sl@0
|
93 |
#endif
|