os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServDatabaseDriver.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServDatabaseDriver.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,122 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __LOGSERVDATABASEDRIVER_H__
1.20 +#define __LOGSERVDATABASEDRIVER_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +#include "LogServTaskInterface.h"
1.24 +#include "LogServBackupObserver.h"
1.25 +
1.26 +// Classes referenced
1.27 +class CLogEvent;
1.28 +class CLogEventType;
1.29 +class CLogAddEvent;
1.30 +class CLogMaintenance;
1.31 +class CLogChangeEvent;
1.32 +class CLogGetEvent;
1.33 +class CLogDeleteEvent;
1.34 +class CLogChangeConfig;
1.35 +class MLogServDatabaseTransactionInterface;
1.36 +class MLogServBackupInterface;
1.37 +class CLogServRecentListManager;
1.38 +class CLogServResourceInterpreter;
1.39 +class CLogServViewWindowFetcher;
1.40 +
1.41 +/**
1.42 +Implements MLogServTaskInterface and MLogServBackupObserver.
1.43 +Maintains a list of hitters, i.e. objects that will execute the requested by the client operation - add event, etc.
1.44 +Every time, when one of the implemented TaskEventAddL(), TaskEventChangeL() etc. methods is called, that method
1.45 +will read the client data and call the StartL() method of the hitter suitable for that operation.
1.46 +
1.47 +@see MLogServTaskInterface
1.48 +@see MLogServBackupObserver
1.49 +@see CLogAddEvent;
1.50 +@see CLogGetEvent;
1.51 +@see CLogChangeEvent;
1.52 +@see CLogDeleteEvent;
1.53 +@see CLogChangeConfig;
1.54 +@see CLogMaintenance;
1.55 +
1.56 +@internalComponent
1.57 +*/
1.58 +class CLogServDatabaseDriver : public CBase, public MLogServTaskInterface, public MLogServBackupObserver
1.59 + {
1.60 +public:
1.61 + static CLogServDatabaseDriver* NewL(MLogServBackupInterface& aBackupInterface, MLogServDatabaseTransactionInterface& aDatabase, CLogServResourceInterpreter& aResourceInterface, CLogServRecentListManager& aRecentListManager, TInt aHitterPriorities);
1.62 + ~CLogServDatabaseDriver();
1.63 +
1.64 +private:
1.65 + CLogServDatabaseDriver(MLogServBackupInterface& aBackupInterface, MLogServDatabaseTransactionInterface& aDatabase, CLogServResourceInterpreter& aResourceInterface, CLogServRecentListManager& aRecentListManager, TInt aHitterPriorities);
1.66 + void ConstructL();
1.67 +
1.68 +private: // FROM MLogServBackupObserver
1.69 + void BOHandleEventL(TLogServBackupEvent aEvent);
1.70 +
1.71 +private: // FROM MLogServTaskInterface
1.72 + void TaskEventAddL(TRequestStatus& aStatus, CLogEvent& aEvent, const RMessage2& aMessage);
1.73 + void TaskEventChangeL(TRequestStatus& aStatus, const CLogEvent& aEvent, const RMessage2& aMessage);
1.74 + void TaskEventGetL(TRequestStatus& aStatus, CLogEvent& aEvent, const RMessage2& aMessage);
1.75 + void TaskEventDeleteL(TRequestStatus& aStatus, TLogId aId, const RMessage2& aMessage);
1.76 + //
1.77 + void TaskEventTypeAddL(TRequestStatus& aStatus, const CLogEventType& aEventType);
1.78 + void TaskEventTypeGetL(TRequestStatus& aStatus, const CLogEventType*& aEventType, TUid aUid);
1.79 + void TaskEventTypeChangeL(TRequestStatus& aStatus, const CLogEventType& aEventType);
1.80 + void TaskEventTypeDeleteL(TRequestStatus& aStatus, TUid aType);
1.81 + //
1.82 + void TaskConfigGetL(TRequestStatus& aStatus, TLogConfig& aConfig);
1.83 + void TaskConfigChangeL(TRequestStatus& aStatus, const TLogConfig& aConfig);
1.84 + //
1.85 + void TaskClearLogL(TRequestStatus& aStatus, const TTime& aDate
1.86 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
1.87 + , TSimId aSimId
1.88 +#endif
1.89 + );
1.90 + void TaskClearRecentL(TRequestStatus& aStatus, TInt aRecentList
1.91 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
1.92 + , TSimId aSimId
1.93 +#endif
1.94 + );
1.95 + //
1.96 + void TaskMaintenanceStartL(TRequestStatus& aStatus, TBool aPurge);
1.97 + //
1.98 + void TaskBuildWindowL(TRequestStatus& aStatus, const CLogServViewBase& aView, const TLogTransferWindow& aWindow, const RMessage2& aMessage);
1.99 + //
1.100 + void TaskCancelCurrent();
1.101 +
1.102 +private:
1.103 + void DestroyHitters();
1.104 + void CreateHittersL();
1.105 +
1.106 +private:
1.107 + TInt iHitterPriorities;//The active object priority used for all objects which hit the database
1.108 + MLogServBackupInterface& iBackupInterface;//The interface to the backup manager
1.109 + MLogServDatabaseTransactionInterface& iDatabase;//Access the database
1.110 + CLogServResourceInterpreter& iResourceInterface;//Access resource files
1.111 + CLogServRecentListManager& iRecentListManager;//Access recent list
1.112 + // The hitters - named as such because they all hit the database in some
1.113 + // way (e.g. read or write from/to it).
1.114 + CLogAddEvent* iAddEvent;
1.115 + CLogGetEvent* iGetEvent;
1.116 + CLogChangeEvent* iChangeEvent;
1.117 + CLogDeleteEvent* iDeleteEvent;
1.118 + CLogChangeConfig* iChangeConfig;
1.119 + CLogMaintenance* iMaintainer;
1.120 + CLogServViewWindowFetcher* iWindowFetcher;
1.121 +
1.122 + };
1.123 +
1.124 +#endif
1.125 +