os/persistentdata/loggingservices/eventlogger/LogServ/inc/LOGQUERY.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __LOGQUERY_H__
    17 #define __LOGQUERY_H__
    18 
    19 #include <d32dbms.h>
    20 #include <logwraplimits.h>
    21 
    22 // Classes referenced
    23 class MLogServDatabaseTransactionInterface;
    24 
    25 /**
    26 RDbTable derived class which offers an OpenLC() method.
    27 As part of the "open table" call, the method will try to recover the database if the database is damaged.
    28 
    29 @internalComponent
    30 */
    31 class RLogDbTable : public RDbTable
    32 	{
    33 public:
    34 	void OpenLC(RDbDatabase& aDb, const TDesC& aTblName, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
    35 	};
    36 
    37 /**
    38 RLogDbTable derived class.
    39 Opens "Event" table.
    40 If the table is opened for the first time, the OpenLC() method will retrieve the table column numbers. 
    41 
    42 @see RLogDbTable 
    43 @internalComponent
    44 */
    45 class RLogEventDbTable : public RLogDbTable
    46     {
    47 public:
    48     void OpenLC(RDbDatabase& aDb, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
    49        
    50 public:
    51     static TDbColNo iIdColNo;
    52     static TDbColNo iTypeColNo;
    53     static TDbColNo iRemotePartyColNo;
    54     static TDbColNo iDirectionColNo;
    55     static TDbColNo iTimeColNo;
    56     static TDbColNo iDurationTypeColNo;
    57     static TDbColNo iDurationColNo;
    58     static TDbColNo iStatusColNo;
    59     static TDbColNo iSubjectColNo;
    60     static TDbColNo iNumberColNo;
    61     static TDbColNo iContactColNo;
    62     static TDbColNo iLinkColNo;
    63     static TDbColNo iDataColNo;
    64     static TDbColNo iFlagColNo[KLogFlagsCount];
    65     static TDbColNo iRecentColNo;
    66     static TDbColNo iDuplicateColNo;
    67 #ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM	
    68     static TDbColNo iSimIdColNo;
    69 #endif
    70     
    71 private:
    72     void InitializeColumnsL();
    73     };
    74 
    75 /**
    76 RLogDbTable derived class.
    77 Opens "Config" table.
    78 If the table is opened for the first time, the OpenLC() method will retrieve the table column numbers. 
    79 
    80 @see RLogDbTable 
    81 @internalComponent
    82 */
    83 class RLogConfigDbTable : public RLogDbTable
    84     {
    85 public:
    86     void OpenLC(RDbDatabase& aDb, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
    87        
    88 public:
    89     static TDbColNo iSizeColNo;
    90     static TDbColNo iRecentColNo;
    91     static TDbColNo iAgeColNo;
    92     
    93 private:
    94     void InitializeColumnsL();
    95     };
    96 
    97 /**
    98 RDbView derived class.
    99 
   100 As part of the "prepare view" call, the method will try to recover the database if the database is damaged.
   101 The PrepareLC() method will call also view's EvaluateAll() method, if the preparation was successful.
   102 
   103 @internalComponent
   104 */
   105 class RLogDbView : public RDbView
   106 	{
   107 public:
   108 	void PrepareLC(RDbDatabase& aDb, const TDesC& aQuery, RDbRowSet::TAccess aAccess = RDbRowSet::EUpdatable);
   109 	};
   110 
   111 void LogGetRecentEventsLC(MLogServDatabaseTransactionInterface& aDb, TLogRecentList aRecentListId, 
   112                           TLogRecentSize aMaxRecentLogSize, RArray<TLogId>& aEventIds);
   113 void LogPurgeRecentEventsL(MLogServDatabaseTransactionInterface& aDb, const RArray<TLogId>& aEventIds);
   114 void LogPurgeMainL(MLogServDatabaseTransactionInterface& aDb, RLogEventDbTable& aTbl, 
   115                    TLogSize aMaxLogSize, TInt aCountPlus);
   116 void LogResetDuplicatesL(MLogServDatabaseTransactionInterface& aDb, TLogId aEventId);
   117 
   118 #endif