os/persistentdata/loggingservices/eventlogger/LogServ/inc/LOGQUERY.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogServ/inc/LOGQUERY.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,118 @@
     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 __LOGQUERY_H__
    1.20 +#define __LOGQUERY_H__
    1.21 +
    1.22 +#include <d32dbms.h>
    1.23 +#include <logwraplimits.h>
    1.24 +
    1.25 +// Classes referenced
    1.26 +class MLogServDatabaseTransactionInterface;
    1.27 +
    1.28 +/**
    1.29 +RDbTable derived class which offers an OpenLC() method.
    1.30 +As part of the "open table" call, the method will try to recover the database if the database is damaged.
    1.31 +
    1.32 +@internalComponent
    1.33 +*/
    1.34 +class RLogDbTable : public RDbTable
    1.35 +	{
    1.36 +public:
    1.37 +	void OpenLC(RDbDatabase& aDb, const TDesC& aTblName, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
    1.38 +	};
    1.39 +
    1.40 +/**
    1.41 +RLogDbTable derived class.
    1.42 +Opens "Event" table.
    1.43 +If the table is opened for the first time, the OpenLC() method will retrieve the table column numbers. 
    1.44 +
    1.45 +@see RLogDbTable 
    1.46 +@internalComponent
    1.47 +*/
    1.48 +class RLogEventDbTable : public RLogDbTable
    1.49 +    {
    1.50 +public:
    1.51 +    void OpenLC(RDbDatabase& aDb, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
    1.52 +       
    1.53 +public:
    1.54 +    static TDbColNo iIdColNo;
    1.55 +    static TDbColNo iTypeColNo;
    1.56 +    static TDbColNo iRemotePartyColNo;
    1.57 +    static TDbColNo iDirectionColNo;
    1.58 +    static TDbColNo iTimeColNo;
    1.59 +    static TDbColNo iDurationTypeColNo;
    1.60 +    static TDbColNo iDurationColNo;
    1.61 +    static TDbColNo iStatusColNo;
    1.62 +    static TDbColNo iSubjectColNo;
    1.63 +    static TDbColNo iNumberColNo;
    1.64 +    static TDbColNo iContactColNo;
    1.65 +    static TDbColNo iLinkColNo;
    1.66 +    static TDbColNo iDataColNo;
    1.67 +    static TDbColNo iFlagColNo[KLogFlagsCount];
    1.68 +    static TDbColNo iRecentColNo;
    1.69 +    static TDbColNo iDuplicateColNo;
    1.70 +#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM	
    1.71 +    static TDbColNo iSimIdColNo;
    1.72 +#endif
    1.73 +    
    1.74 +private:
    1.75 +    void InitializeColumnsL();
    1.76 +    };
    1.77 +
    1.78 +/**
    1.79 +RLogDbTable derived class.
    1.80 +Opens "Config" table.
    1.81 +If the table is opened for the first time, the OpenLC() method will retrieve the table column numbers. 
    1.82 +
    1.83 +@see RLogDbTable 
    1.84 +@internalComponent
    1.85 +*/
    1.86 +class RLogConfigDbTable : public RLogDbTable
    1.87 +    {
    1.88 +public:
    1.89 +    void OpenLC(RDbDatabase& aDb, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
    1.90 +       
    1.91 +public:
    1.92 +    static TDbColNo iSizeColNo;
    1.93 +    static TDbColNo iRecentColNo;
    1.94 +    static TDbColNo iAgeColNo;
    1.95 +    
    1.96 +private:
    1.97 +    void InitializeColumnsL();
    1.98 +    };
    1.99 +
   1.100 +/**
   1.101 +RDbView derived class.
   1.102 +
   1.103 +As part of the "prepare view" call, the method will try to recover the database if the database is damaged.
   1.104 +The PrepareLC() method will call also view's EvaluateAll() method, if the preparation was successful.
   1.105 +
   1.106 +@internalComponent
   1.107 +*/
   1.108 +class RLogDbView : public RDbView
   1.109 +	{
   1.110 +public:
   1.111 +	void PrepareLC(RDbDatabase& aDb, const TDesC& aQuery, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
   1.112 +	};
   1.113 +
   1.114 +void LogGetRecentEventsLC(MLogServDatabaseTransactionInterface& aDb, TLogRecentList aRecentListId, 
   1.115 +                          TLogRecentSize aMaxRecentLogSize, RArray<TLogId>& aEventIds);
   1.116 +void LogPurgeRecentEventsL(MLogServDatabaseTransactionInterface& aDb, const RArray<TLogId>& aEventIds);
   1.117 +void LogPurgeMainL(MLogServDatabaseTransactionInterface& aDb, RLogEventDbTable& aTbl, 
   1.118 +                   TLogSize aMaxLogSize, TInt aCountPlus);
   1.119 +void LogResetDuplicatesL(MLogServDatabaseTransactionInterface& aDb, TLogId aEventId);
   1.120 +
   1.121 +#endif