os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServDatabaseDriver.h
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.
16 #ifndef __LOGSERVDATABASEDRIVER_H__
17 #define __LOGSERVDATABASEDRIVER_H__
20 #include "LogServTaskInterface.h"
21 #include "LogServBackupObserver.h"
27 class CLogMaintenance;
28 class CLogChangeEvent;
30 class CLogDeleteEvent;
31 class CLogChangeConfig;
32 class MLogServDatabaseTransactionInterface;
33 class MLogServBackupInterface;
34 class CLogServRecentListManager;
35 class CLogServResourceInterpreter;
36 class CLogServViewWindowFetcher;
39 Implements MLogServTaskInterface and MLogServBackupObserver.
40 Maintains a list of hitters, i.e. objects that will execute the requested by the client operation - add event, etc.
41 Every time, when one of the implemented TaskEventAddL(), TaskEventChangeL() etc. methods is called, that method
42 will read the client data and call the StartL() method of the hitter suitable for that operation.
44 @see MLogServTaskInterface
45 @see MLogServBackupObserver
50 @see CLogChangeConfig;
55 class CLogServDatabaseDriver : public CBase, public MLogServTaskInterface, public MLogServBackupObserver
58 static CLogServDatabaseDriver* NewL(MLogServBackupInterface& aBackupInterface, MLogServDatabaseTransactionInterface& aDatabase, CLogServResourceInterpreter& aResourceInterface, CLogServRecentListManager& aRecentListManager, TInt aHitterPriorities);
59 ~CLogServDatabaseDriver();
62 CLogServDatabaseDriver(MLogServBackupInterface& aBackupInterface, MLogServDatabaseTransactionInterface& aDatabase, CLogServResourceInterpreter& aResourceInterface, CLogServRecentListManager& aRecentListManager, TInt aHitterPriorities);
65 private: // FROM MLogServBackupObserver
66 void BOHandleEventL(TLogServBackupEvent aEvent);
68 private: // FROM MLogServTaskInterface
69 void TaskEventAddL(TRequestStatus& aStatus, CLogEvent& aEvent, const RMessage2& aMessage);
70 void TaskEventChangeL(TRequestStatus& aStatus, const CLogEvent& aEvent, const RMessage2& aMessage);
71 void TaskEventGetL(TRequestStatus& aStatus, CLogEvent& aEvent, const RMessage2& aMessage);
72 void TaskEventDeleteL(TRequestStatus& aStatus, TLogId aId, const RMessage2& aMessage);
74 void TaskEventTypeAddL(TRequestStatus& aStatus, const CLogEventType& aEventType);
75 void TaskEventTypeGetL(TRequestStatus& aStatus, const CLogEventType*& aEventType, TUid aUid);
76 void TaskEventTypeChangeL(TRequestStatus& aStatus, const CLogEventType& aEventType);
77 void TaskEventTypeDeleteL(TRequestStatus& aStatus, TUid aType);
79 void TaskConfigGetL(TRequestStatus& aStatus, TLogConfig& aConfig);
80 void TaskConfigChangeL(TRequestStatus& aStatus, const TLogConfig& aConfig);
82 void TaskClearLogL(TRequestStatus& aStatus, const TTime& aDate
83 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
87 void TaskClearRecentL(TRequestStatus& aStatus, TInt aRecentList
88 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
93 void TaskMaintenanceStartL(TRequestStatus& aStatus, TBool aPurge);
95 void TaskBuildWindowL(TRequestStatus& aStatus, const CLogServViewBase& aView, const TLogTransferWindow& aWindow, const RMessage2& aMessage);
97 void TaskCancelCurrent();
100 void DestroyHitters();
101 void CreateHittersL();
104 TInt iHitterPriorities;//The active object priority used for all objects which hit the database
105 MLogServBackupInterface& iBackupInterface;//The interface to the backup manager
106 MLogServDatabaseTransactionInterface& iDatabase;//Access the database
107 CLogServResourceInterpreter& iResourceInterface;//Access resource files
108 CLogServRecentListManager& iRecentListManager;//Access recent list
109 // The hitters - named as such because they all hit the database in some
110 // way (e.g. read or write from/to it).
111 CLogAddEvent* iAddEvent;
112 CLogGetEvent* iGetEvent;
113 CLogChangeEvent* iChangeEvent;
114 CLogDeleteEvent* iDeleteEvent;
115 CLogChangeConfig* iChangeConfig;
116 CLogMaintenance* iMaintainer;
117 CLogServViewWindowFetcher* iWindowFetcher;