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