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 __LOGSERVDATABASEDRIVER_H__
|
sl@0
|
17 |
#define __LOGSERVDATABASEDRIVER_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32base.h>
|
sl@0
|
20 |
#include "LogServTaskInterface.h"
|
sl@0
|
21 |
#include "LogServBackupObserver.h"
|
sl@0
|
22 |
|
sl@0
|
23 |
// Classes referenced
|
sl@0
|
24 |
class CLogEvent;
|
sl@0
|
25 |
class CLogEventType;
|
sl@0
|
26 |
class CLogAddEvent;
|
sl@0
|
27 |
class CLogMaintenance;
|
sl@0
|
28 |
class CLogChangeEvent;
|
sl@0
|
29 |
class CLogGetEvent;
|
sl@0
|
30 |
class CLogDeleteEvent;
|
sl@0
|
31 |
class CLogChangeConfig;
|
sl@0
|
32 |
class MLogServDatabaseTransactionInterface;
|
sl@0
|
33 |
class MLogServBackupInterface;
|
sl@0
|
34 |
class CLogServRecentListManager;
|
sl@0
|
35 |
class CLogServResourceInterpreter;
|
sl@0
|
36 |
class CLogServViewWindowFetcher;
|
sl@0
|
37 |
|
sl@0
|
38 |
/**
|
sl@0
|
39 |
Implements MLogServTaskInterface and MLogServBackupObserver.
|
sl@0
|
40 |
Maintains a list of hitters, i.e. objects that will execute the requested by the client operation - add event, etc.
|
sl@0
|
41 |
Every time, when one of the implemented TaskEventAddL(), TaskEventChangeL() etc. methods is called, that method
|
sl@0
|
42 |
will read the client data and call the StartL() method of the hitter suitable for that operation.
|
sl@0
|
43 |
|
sl@0
|
44 |
@see MLogServTaskInterface
|
sl@0
|
45 |
@see MLogServBackupObserver
|
sl@0
|
46 |
@see CLogAddEvent;
|
sl@0
|
47 |
@see CLogGetEvent;
|
sl@0
|
48 |
@see CLogChangeEvent;
|
sl@0
|
49 |
@see CLogDeleteEvent;
|
sl@0
|
50 |
@see CLogChangeConfig;
|
sl@0
|
51 |
@see CLogMaintenance;
|
sl@0
|
52 |
|
sl@0
|
53 |
@internalComponent
|
sl@0
|
54 |
*/
|
sl@0
|
55 |
class CLogServDatabaseDriver : public CBase, public MLogServTaskInterface, public MLogServBackupObserver
|
sl@0
|
56 |
{
|
sl@0
|
57 |
public:
|
sl@0
|
58 |
static CLogServDatabaseDriver* NewL(MLogServBackupInterface& aBackupInterface, MLogServDatabaseTransactionInterface& aDatabase, CLogServResourceInterpreter& aResourceInterface, CLogServRecentListManager& aRecentListManager, TInt aHitterPriorities);
|
sl@0
|
59 |
~CLogServDatabaseDriver();
|
sl@0
|
60 |
|
sl@0
|
61 |
private:
|
sl@0
|
62 |
CLogServDatabaseDriver(MLogServBackupInterface& aBackupInterface, MLogServDatabaseTransactionInterface& aDatabase, CLogServResourceInterpreter& aResourceInterface, CLogServRecentListManager& aRecentListManager, TInt aHitterPriorities);
|
sl@0
|
63 |
void ConstructL();
|
sl@0
|
64 |
|
sl@0
|
65 |
private: // FROM MLogServBackupObserver
|
sl@0
|
66 |
void BOHandleEventL(TLogServBackupEvent aEvent);
|
sl@0
|
67 |
|
sl@0
|
68 |
private: // FROM MLogServTaskInterface
|
sl@0
|
69 |
void TaskEventAddL(TRequestStatus& aStatus, CLogEvent& aEvent, const RMessage2& aMessage);
|
sl@0
|
70 |
void TaskEventChangeL(TRequestStatus& aStatus, const CLogEvent& aEvent, const RMessage2& aMessage);
|
sl@0
|
71 |
void TaskEventGetL(TRequestStatus& aStatus, CLogEvent& aEvent, const RMessage2& aMessage);
|
sl@0
|
72 |
void TaskEventDeleteL(TRequestStatus& aStatus, TLogId aId, const RMessage2& aMessage);
|
sl@0
|
73 |
//
|
sl@0
|
74 |
void TaskEventTypeAddL(TRequestStatus& aStatus, const CLogEventType& aEventType);
|
sl@0
|
75 |
void TaskEventTypeGetL(TRequestStatus& aStatus, const CLogEventType*& aEventType, TUid aUid);
|
sl@0
|
76 |
void TaskEventTypeChangeL(TRequestStatus& aStatus, const CLogEventType& aEventType);
|
sl@0
|
77 |
void TaskEventTypeDeleteL(TRequestStatus& aStatus, TUid aType);
|
sl@0
|
78 |
//
|
sl@0
|
79 |
void TaskConfigGetL(TRequestStatus& aStatus, TLogConfig& aConfig);
|
sl@0
|
80 |
void TaskConfigChangeL(TRequestStatus& aStatus, const TLogConfig& aConfig);
|
sl@0
|
81 |
//
|
sl@0
|
82 |
void TaskClearLogL(TRequestStatus& aStatus, const TTime& aDate
|
sl@0
|
83 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
84 |
, TSimId aSimId
|
sl@0
|
85 |
#endif
|
sl@0
|
86 |
);
|
sl@0
|
87 |
void TaskClearRecentL(TRequestStatus& aStatus, TInt aRecentList
|
sl@0
|
88 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
89 |
, TSimId aSimId
|
sl@0
|
90 |
#endif
|
sl@0
|
91 |
);
|
sl@0
|
92 |
//
|
sl@0
|
93 |
void TaskMaintenanceStartL(TRequestStatus& aStatus, TBool aPurge);
|
sl@0
|
94 |
//
|
sl@0
|
95 |
void TaskBuildWindowL(TRequestStatus& aStatus, const CLogServViewBase& aView, const TLogTransferWindow& aWindow, const RMessage2& aMessage);
|
sl@0
|
96 |
//
|
sl@0
|
97 |
void TaskCancelCurrent();
|
sl@0
|
98 |
|
sl@0
|
99 |
private:
|
sl@0
|
100 |
void DestroyHitters();
|
sl@0
|
101 |
void CreateHittersL();
|
sl@0
|
102 |
|
sl@0
|
103 |
private:
|
sl@0
|
104 |
TInt iHitterPriorities;//The active object priority used for all objects which hit the database
|
sl@0
|
105 |
MLogServBackupInterface& iBackupInterface;//The interface to the backup manager
|
sl@0
|
106 |
MLogServDatabaseTransactionInterface& iDatabase;//Access the database
|
sl@0
|
107 |
CLogServResourceInterpreter& iResourceInterface;//Access resource files
|
sl@0
|
108 |
CLogServRecentListManager& iRecentListManager;//Access recent list
|
sl@0
|
109 |
// The hitters - named as such because they all hit the database in some
|
sl@0
|
110 |
// way (e.g. read or write from/to it).
|
sl@0
|
111 |
CLogAddEvent* iAddEvent;
|
sl@0
|
112 |
CLogGetEvent* iGetEvent;
|
sl@0
|
113 |
CLogChangeEvent* iChangeEvent;
|
sl@0
|
114 |
CLogDeleteEvent* iDeleteEvent;
|
sl@0
|
115 |
CLogChangeConfig* iChangeConfig;
|
sl@0
|
116 |
CLogMaintenance* iMaintainer;
|
sl@0
|
117 |
CLogServViewWindowFetcher* iWindowFetcher;
|
sl@0
|
118 |
|
sl@0
|
119 |
};
|
sl@0
|
120 |
|
sl@0
|
121 |
#endif
|
sl@0
|
122 |
|