sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __LOGQUERY_H__ sl@0: #define __LOGQUERY_H__ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: // Classes referenced sl@0: class MLogServDatabaseTransactionInterface; sl@0: sl@0: /** sl@0: RDbTable derived class which offers an OpenLC() method. sl@0: As part of the "open table" call, the method will try to recover the database if the database is damaged. sl@0: sl@0: @internalComponent sl@0: */ sl@0: class RLogDbTable : public RDbTable sl@0: { sl@0: public: sl@0: void OpenLC(RDbDatabase& aDb, const TDesC& aTblName, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable); sl@0: }; sl@0: sl@0: /** sl@0: RLogDbTable derived class. sl@0: Opens "Event" table. sl@0: If the table is opened for the first time, the OpenLC() method will retrieve the table column numbers. sl@0: sl@0: @see RLogDbTable sl@0: @internalComponent sl@0: */ sl@0: class RLogEventDbTable : public RLogDbTable sl@0: { sl@0: public: sl@0: void OpenLC(RDbDatabase& aDb, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable); sl@0: sl@0: public: sl@0: static TDbColNo iIdColNo; sl@0: static TDbColNo iTypeColNo; sl@0: static TDbColNo iRemotePartyColNo; sl@0: static TDbColNo iDirectionColNo; sl@0: static TDbColNo iTimeColNo; sl@0: static TDbColNo iDurationTypeColNo; sl@0: static TDbColNo iDurationColNo; sl@0: static TDbColNo iStatusColNo; sl@0: static TDbColNo iSubjectColNo; sl@0: static TDbColNo iNumberColNo; sl@0: static TDbColNo iContactColNo; sl@0: static TDbColNo iLinkColNo; sl@0: static TDbColNo iDataColNo; sl@0: static TDbColNo iFlagColNo[KLogFlagsCount]; sl@0: static TDbColNo iRecentColNo; sl@0: static TDbColNo iDuplicateColNo; sl@0: #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM sl@0: static TDbColNo iSimIdColNo; sl@0: #endif sl@0: sl@0: private: sl@0: void InitializeColumnsL(); sl@0: }; sl@0: sl@0: /** sl@0: RLogDbTable derived class. sl@0: Opens "Config" table. sl@0: If the table is opened for the first time, the OpenLC() method will retrieve the table column numbers. sl@0: sl@0: @see RLogDbTable sl@0: @internalComponent sl@0: */ sl@0: class RLogConfigDbTable : public RLogDbTable sl@0: { sl@0: public: sl@0: void OpenLC(RDbDatabase& aDb, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable); sl@0: sl@0: public: sl@0: static TDbColNo iSizeColNo; sl@0: static TDbColNo iRecentColNo; sl@0: static TDbColNo iAgeColNo; sl@0: sl@0: private: sl@0: void InitializeColumnsL(); sl@0: }; sl@0: sl@0: /** sl@0: RDbView derived class. sl@0: sl@0: As part of the "prepare view" call, the method will try to recover the database if the database is damaged. sl@0: The PrepareLC() method will call also view's EvaluateAll() method, if the preparation was successful. sl@0: sl@0: @internalComponent sl@0: */ sl@0: class RLogDbView : public RDbView sl@0: { sl@0: public: sl@0: void PrepareLC(RDbDatabase& aDb, const TDesC& aQuery, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable); sl@0: }; sl@0: sl@0: void LogGetRecentEventsLC(MLogServDatabaseTransactionInterface& aDb, TLogRecentList aRecentListId, sl@0: TLogRecentSize aMaxRecentLogSize, RArray& aEventIds); sl@0: void LogPurgeRecentEventsL(MLogServDatabaseTransactionInterface& aDb, const RArray& aEventIds); sl@0: void LogPurgeMainL(MLogServDatabaseTransactionInterface& aDb, RLogEventDbTable& aTbl, sl@0: TLogSize aMaxLogSize, TInt aCountPlus); sl@0: void LogResetDuplicatesL(MLogServDatabaseTransactionInterface& aDb, TLogId aEventId); sl@0: sl@0: #endif